diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 7647bb496dba9..0aea09c8962ed 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -682a103cde99a3091850d1c27de8846b5d14e803 +989af12f72080c17db03ead91d99b6394a215564 diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 7647bb496dba9..0aea09c8962ed 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -682a103cde99a3091850d1c27de8846b5d14e803 +989af12f72080c17db03ead91d99b6394a215564 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 536b0fd40af35..dfdcab1ce2577 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -1819,7 +1819,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-classic-682a103c-20241107"; + exports.version = "19.0.0-www-classic-989af12f-20241108"; "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 38b1d1c86e37f..80012ab56a677 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1819,7 +1819,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-modern-682a103c-20241107"; + exports.version = "19.0.0-www-modern-989af12f-20241108"; "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 3c581ef1296c6..dc379230aa207 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -619,4 +619,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-682a103c-20241107"; +exports.version = "19.0.0-www-classic-989af12f-20241108"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 7392f90479e7d..3036c2901b17f 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -619,4 +619,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-682a103c-20241107"; +exports.version = "19.0.0-www-modern-989af12f-20241108"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 2d171e2d85f2a..5c17d94dcbafd 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -623,7 +623,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-682a103c-20241107"; +exports.version = "19.0.0-www-classic-989af12f-20241108"; "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 719563f28d13b..f2d7d0865f2c0 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -623,7 +623,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-682a103c-20241107"; +exports.version = "19.0.0-www-modern-989af12f-20241108"; "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 077a60690f752..2d4676dc7c1e4 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -880,6 +880,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: @@ -2167,7 +2175,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2238,45 +2247,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; @@ -12171,7 +12181,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -12229,7 +12239,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -12237,200 +12247,202 @@ __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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + 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, + !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; } + renderWasConcurrent = !1; + 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) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } 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) { + lanes = shouldTimeSlice; + forceSync = workInProgressRootRecoverableErrors; + shouldTimeSlice = workInProgressTransitions; + exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate; + renderWasConcurrent = workInProgressDeferredLane; + lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes; + originallyAttemptedLanes = workInProgressSuspendedRetryLanes; + var suspendedCommitReason = IMMEDIATE_COMMIT, + prevTransition = ReactSharedInternals.T, + previousUpdateLanePriority = currentUpdatePriority; + try { + (currentUpdatePriority = DiscreteEventPriority), + (ReactSharedInternals.T = null), + commitRootImpl( + lanes, + forceSync, + shouldTimeSlice, + exitStatus, + previousUpdateLanePriority, + renderWasConcurrent, + lanesThatJustErrored, + originallyAttemptedLanes, + suspendedCommitReason, + -0, + 0 + ); + } finally { + (ReactSharedInternals.T = prevTransition), + (currentUpdatePriority = previousUpdateLanePriority); + } + } 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) { @@ -12533,20 +12545,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -12590,11 +12602,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 = @@ -12719,7 +12727,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12728,10 +12738,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -12753,37 +12763,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); @@ -12794,16 +12813,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); @@ -12828,12 +12844,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 @@ -16702,11 +16716,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-682a103c-20241107", + version: "19.0.0-www-classic-989af12f-20241108", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16740,7 +16754,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-classic-682a103c-20241107"; + exports.version = "19.0.0-www-classic-989af12f-20241108"; "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 8396e11425b6c..24663fccc5ea9 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -866,6 +866,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: @@ -2059,7 +2067,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2130,45 +2139,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; @@ -11975,7 +11985,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -12033,7 +12043,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -12041,200 +12051,202 @@ __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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + 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, + !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; } + renderWasConcurrent = !1; + 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) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } 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) { + lanes = shouldTimeSlice; + forceSync = workInProgressRootRecoverableErrors; + shouldTimeSlice = workInProgressTransitions; + exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate; + renderWasConcurrent = workInProgressDeferredLane; + lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes; + originallyAttemptedLanes = workInProgressSuspendedRetryLanes; + var suspendedCommitReason = IMMEDIATE_COMMIT, + prevTransition = ReactSharedInternals.T, + previousUpdateLanePriority = currentUpdatePriority; + try { + (currentUpdatePriority = DiscreteEventPriority), + (ReactSharedInternals.T = null), + commitRootImpl( + lanes, + forceSync, + shouldTimeSlice, + exitStatus, + previousUpdateLanePriority, + renderWasConcurrent, + lanesThatJustErrored, + originallyAttemptedLanes, + suspendedCommitReason, + -0, + 0 + ); + } finally { + (ReactSharedInternals.T = prevTransition), + (currentUpdatePriority = previousUpdateLanePriority); + } + } 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) { @@ -12337,20 +12349,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -12394,11 +12406,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 = @@ -12523,7 +12531,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -12532,10 +12542,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -12557,37 +12567,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); @@ -12598,16 +12617,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); @@ -12632,12 +12648,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 @@ -16465,11 +16479,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-682a103c-20241107", + version: "19.0.0-www-modern-989af12f-20241108", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16503,7 +16517,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-modern-682a103c-20241107"; + exports.version = "19.0.0-www-modern-989af12f-20241108"; "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 0ca934d126d58..41e73c8bbe7b8 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -624,6 +624,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: @@ -1234,7 +1242,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; @@ -1303,39 +1312,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; @@ -8971,7 +8979,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -8998,172 +9006,175 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -9262,20 +9273,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -9319,9 +9330,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 = @@ -9410,7 +9419,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)) || @@ -9419,10 +9430,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(), @@ -9431,6 +9442,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) { @@ -9439,24 +9451,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$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$135) { + handleThrow(root, thrownValue$135); } while (1); lanes && root.shellSuspendCounter++; @@ -9464,11 +9489,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); @@ -9482,12 +9507,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) { @@ -9571,8 +9594,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$132) { - handleThrow(root, thrownValue$132); + } catch (thrownValue$137) { + handleThrow(root, thrownValue$137); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -10609,27 +10632,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1464 = { +var internals$jscomp$inline_1471 = { bundleType: 0, - version: "19.0.0-www-classic-682a103c-20241107", + version: "19.0.0-www-classic-989af12f-20241108", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1465 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1472 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1465.isDisabled && - hook$jscomp$inline_1465.supportsFiber + !hook$jscomp$inline_1472.isDisabled && + hook$jscomp$inline_1472.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1465.inject( - internals$jscomp$inline_1464 + (rendererID = hook$jscomp$inline_1472.inject( + internals$jscomp$inline_1471 )), - (injectedHook = hook$jscomp$inline_1465); + (injectedHook = hook$jscomp$inline_1472); } catch (err) {} } var Path = Mode$1.Path; @@ -10643,4 +10666,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-classic-682a103c-20241107"; +exports.version = "19.0.0-www-classic-989af12f-20241108"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 11b94da916d02..2c070efe57616 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -545,6 +545,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: @@ -1081,7 +1089,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; @@ -1150,39 +1159,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; @@ -8731,7 +8739,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -8758,172 +8766,175 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -9022,20 +9033,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -9079,9 +9090,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 = @@ -9170,7 +9179,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)) || @@ -9179,10 +9190,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(), @@ -9191,6 +9202,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) { @@ -9199,24 +9211,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$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$135) { + handleThrow(root, thrownValue$135); } while (1); lanes && root.shellSuspendCounter++; @@ -9224,11 +9249,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); @@ -9242,12 +9267,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) { @@ -9331,8 +9354,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$132) { - handleThrow(root, thrownValue$132); + } catch (thrownValue$137) { + handleThrow(root, thrownValue$137); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -10325,27 +10348,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1443 = { +var internals$jscomp$inline_1450 = { bundleType: 0, - version: "19.0.0-www-modern-682a103c-20241107", + version: "19.0.0-www-modern-989af12f-20241108", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1444 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1451 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1444.isDisabled && - hook$jscomp$inline_1444.supportsFiber + !hook$jscomp$inline_1451.isDisabled && + hook$jscomp$inline_1451.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1444.inject( - internals$jscomp$inline_1443 + (rendererID = hook$jscomp$inline_1451.inject( + internals$jscomp$inline_1450 )), - (injectedHook = hook$jscomp$inline_1444); + (injectedHook = hook$jscomp$inline_1451); } catch (err) {} } var Path = Mode$1.Path; @@ -10359,4 +10382,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-modern-682a103c-20241107"; +exports.version = "19.0.0-www-modern-989af12f-20241108"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 87392ae853eba..f7bce0aeec230 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -964,6 +964,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: @@ -3897,7 +3905,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3974,45 +3983,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; @@ -9089,32 +9099,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2458; - var JSCompiler_object_inline_stack_2459 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2460; + var JSCompiler_object_inline_stack_2461 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2460 = !1; + var JSCompiler_object_inline_componentStack_2462 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2458 = didSuspend) || - (JSCompiler_object_inline_digest_2458 = + (JSCompiler_object_inline_digest_2460 = didSuspend) || + (JSCompiler_object_inline_digest_2460 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2458 && - ((JSCompiler_object_inline_componentStack_2460 = !0), + JSCompiler_object_inline_digest_2460 && + ((JSCompiler_object_inline_componentStack_2462 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2458 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2460 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2460 + JSCompiler_object_inline_componentStack_2462 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2457 = nextHydratableInstance; + var JSCompiler_object_inline_message_2459 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2457)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2459)) { c: { - var instance = JSCompiler_object_inline_message_2457; + var instance = JSCompiler_object_inline_message_2459; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9155,19 +9165,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2457 + JSCompiler_object_inline_message_2459 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2457 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2459 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2457 && - ((JSCompiler_object_inline_message_2457 = - JSCompiler_object_inline_message_2457.dehydrated), - null !== JSCompiler_object_inline_message_2457) + null !== JSCompiler_object_inline_message_2459 && + ((JSCompiler_object_inline_message_2459 = + JSCompiler_object_inline_message_2459.dehydrated), + null !== JSCompiler_object_inline_message_2459) ) return ( - JSCompiler_object_inline_message_2457.data === + JSCompiler_object_inline_message_2459.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9175,27 +9185,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2457 = - JSCompiler_object_inline_stack_2459.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2459.fallback; - if (JSCompiler_object_inline_componentStack_2460) + JSCompiler_object_inline_message_2459 = + JSCompiler_object_inline_stack_2461.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2461.fallback; + if (JSCompiler_object_inline_componentStack_2462) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2459 = + (JSCompiler_object_inline_stack_2461 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2457, + JSCompiler_object_inline_message_2459, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2460 = + (JSCompiler_object_inline_componentStack_2462 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2460.memoizedState = + (JSCompiler_object_inline_componentStack_2462.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2460.childLanes = + (JSCompiler_object_inline_componentStack_2462.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2458, + JSCompiler_object_inline_digest_2460, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9208,9 +9218,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2460.updateQueue), + JSCompiler_object_inline_componentStack_2462.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2460.updateQueue = + ? (JSCompiler_object_inline_componentStack_2462.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9218,46 +9228,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2459 + JSCompiler_object_inline_stack_2461 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2459.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2461.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2459 = + (JSCompiler_object_inline_stack_2461 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2457, + JSCompiler_object_inline_message_2459, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2460 = + (JSCompiler_object_inline_componentStack_2462 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2460.memoizedState = + (JSCompiler_object_inline_componentStack_2462.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2460.childLanes = + (JSCompiler_object_inline_componentStack_2462.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2458, + JSCompiler_object_inline_digest_2460, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2459 + JSCompiler_object_inline_stack_2461 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2457 + JSCompiler_object_inline_message_2459 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2457 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2457) + ((JSCompiler_object_inline_message_2459 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2459) ) { if (didSuspend) workInProgress.flags & 256 @@ -9274,95 +9284,95 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2460 = - JSCompiler_object_inline_stack_2459.fallback), - (JSCompiler_object_inline_message_2457 = workInProgress.mode), - (JSCompiler_object_inline_stack_2459 = + (JSCompiler_object_inline_componentStack_2462 = + JSCompiler_object_inline_stack_2461.fallback), + (JSCompiler_object_inline_message_2459 = workInProgress.mode), + (JSCompiler_object_inline_stack_2461 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2459.children + children: JSCompiler_object_inline_stack_2461.children }, - JSCompiler_object_inline_message_2457 + JSCompiler_object_inline_message_2459 )), - (JSCompiler_object_inline_componentStack_2460 = + (JSCompiler_object_inline_componentStack_2462 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2460, - JSCompiler_object_inline_message_2457, + JSCompiler_object_inline_componentStack_2462, + JSCompiler_object_inline_message_2459, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2460.flags |= 2), - (JSCompiler_object_inline_stack_2459.return = workInProgress), - (JSCompiler_object_inline_componentStack_2460.return = + (JSCompiler_object_inline_componentStack_2462.flags |= 2), + (JSCompiler_object_inline_stack_2461.return = workInProgress), + (JSCompiler_object_inline_componentStack_2462.return = workInProgress), - (JSCompiler_object_inline_stack_2459.sibling = - JSCompiler_object_inline_componentStack_2460), - (workInProgress.child = JSCompiler_object_inline_stack_2459), + (JSCompiler_object_inline_stack_2461.sibling = + JSCompiler_object_inline_componentStack_2462), + (workInProgress.child = JSCompiler_object_inline_stack_2461), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2459 = workInProgress.child), - (JSCompiler_object_inline_stack_2459.memoizedState = + (JSCompiler_object_inline_stack_2461 = workInProgress.child), + (JSCompiler_object_inline_stack_2461.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2459.childLanes = + (JSCompiler_object_inline_stack_2461.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2458, + JSCompiler_object_inline_digest_2460, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2460)); + JSCompiler_object_inline_componentStack_2462)); 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_2457.data === + JSCompiler_object_inline_message_2459.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2458 = - JSCompiler_object_inline_message_2457.nextSibling && - JSCompiler_object_inline_message_2457.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2458) { - JSCompiler_temp = JSCompiler_object_inline_digest_2458.dgst; - var message = JSCompiler_object_inline_digest_2458.msg; - instance = JSCompiler_object_inline_digest_2458.stck; - var componentStack = JSCompiler_object_inline_digest_2458.cstck; + JSCompiler_object_inline_digest_2460 = + JSCompiler_object_inline_message_2459.nextSibling && + JSCompiler_object_inline_message_2459.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2460) { + JSCompiler_temp = JSCompiler_object_inline_digest_2460.dgst; + var message = JSCompiler_object_inline_digest_2460.msg; + instance = JSCompiler_object_inline_digest_2460.stck; + var componentStack = JSCompiler_object_inline_digest_2460.cstck; } - JSCompiler_object_inline_message_2457 = message; - JSCompiler_object_inline_digest_2458 = JSCompiler_temp; - JSCompiler_object_inline_stack_2459 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2460 = + JSCompiler_object_inline_message_2459 = message; + JSCompiler_object_inline_digest_2460 = JSCompiler_temp; + JSCompiler_object_inline_stack_2461 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2462 = componentStack; - JSCompiler_object_inline_componentStack_2460 = - JSCompiler_object_inline_message_2457 - ? Error(JSCompiler_object_inline_message_2457) + JSCompiler_object_inline_componentStack_2462 = + JSCompiler_object_inline_message_2459 + ? Error(JSCompiler_object_inline_message_2459) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2460.stack = - JSCompiler_object_inline_stack_2459 || ""; - JSCompiler_object_inline_componentStack_2460.digest = - JSCompiler_object_inline_digest_2458; - JSCompiler_object_inline_digest_2458 = + JSCompiler_object_inline_componentStack_2462.stack = + JSCompiler_object_inline_stack_2461 || ""; + JSCompiler_object_inline_componentStack_2462.digest = + JSCompiler_object_inline_digest_2460; + JSCompiler_object_inline_digest_2460 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2459 = { - value: JSCompiler_object_inline_componentStack_2460, + JSCompiler_object_inline_stack_2461 = { + value: JSCompiler_object_inline_componentStack_2462, source: null, - stack: JSCompiler_object_inline_digest_2458 + stack: JSCompiler_object_inline_digest_2460 }; - "string" === typeof JSCompiler_object_inline_digest_2458 && + "string" === typeof JSCompiler_object_inline_digest_2460 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2460, - JSCompiler_object_inline_stack_2459 + JSCompiler_object_inline_componentStack_2462, + JSCompiler_object_inline_stack_2461 ); - queueHydrationError(JSCompiler_object_inline_stack_2459); + queueHydrationError(JSCompiler_object_inline_stack_2461); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9376,25 +9386,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2458 = + (JSCompiler_object_inline_digest_2460 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2458) + didReceiveUpdate || JSCompiler_object_inline_digest_2460) ) { - JSCompiler_object_inline_digest_2458 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2458) { - JSCompiler_object_inline_stack_2459 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2459 & 42)) - JSCompiler_object_inline_stack_2459 = 1; + JSCompiler_object_inline_digest_2460 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2460) { + JSCompiler_object_inline_stack_2461 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2461 & 42)) + JSCompiler_object_inline_stack_2461 = 1; else - switch (JSCompiler_object_inline_stack_2459) { + switch (JSCompiler_object_inline_stack_2461) { case 2: - JSCompiler_object_inline_stack_2459 = 1; + JSCompiler_object_inline_stack_2461 = 1; break; case 8: - JSCompiler_object_inline_stack_2459 = 4; + JSCompiler_object_inline_stack_2461 = 4; break; case 32: - JSCompiler_object_inline_stack_2459 = 16; + JSCompiler_object_inline_stack_2461 = 16; break; case 128: case 256: @@ -9415,40 +9425,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2459 = 64; + JSCompiler_object_inline_stack_2461 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2459 = 134217728; + JSCompiler_object_inline_stack_2461 = 134217728; break; default: - JSCompiler_object_inline_stack_2459 = 0; + JSCompiler_object_inline_stack_2461 = 0; } - JSCompiler_object_inline_stack_2459 = + JSCompiler_object_inline_stack_2461 = 0 !== - (JSCompiler_object_inline_stack_2459 & - (JSCompiler_object_inline_digest_2458.suspendedLanes | + (JSCompiler_object_inline_stack_2461 & + (JSCompiler_object_inline_digest_2460.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2459; + : JSCompiler_object_inline_stack_2461; if ( - 0 !== JSCompiler_object_inline_stack_2459 && - JSCompiler_object_inline_stack_2459 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2461 && + JSCompiler_object_inline_stack_2461 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2459), + ((prevState.retryLane = JSCompiler_object_inline_stack_2461), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2459 + JSCompiler_object_inline_stack_2461 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2458, + JSCompiler_object_inline_digest_2460, current, - JSCompiler_object_inline_stack_2459 + JSCompiler_object_inline_stack_2461 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2457.data === + JSCompiler_object_inline_message_2459.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9456,7 +9466,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2457.data === + JSCompiler_object_inline_message_2459.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9464,12 +9474,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2457._reactRetry = + (JSCompiler_object_inline_message_2459._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2457.nextSibling + JSCompiler_object_inline_message_2459.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9487,57 +9497,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2459.children + JSCompiler_object_inline_stack_2461.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2460) + if (JSCompiler_object_inline_componentStack_2462) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2460 = - JSCompiler_object_inline_stack_2459.fallback), - (JSCompiler_object_inline_message_2457 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2462 = + JSCompiler_object_inline_stack_2461.fallback), + (JSCompiler_object_inline_message_2459 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2459 = createWorkInProgress( + (JSCompiler_object_inline_stack_2461 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2459.children + children: JSCompiler_object_inline_stack_2461.children } )), - (JSCompiler_object_inline_stack_2459.subtreeFlags = + (JSCompiler_object_inline_stack_2461.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2460 = + ? (JSCompiler_object_inline_componentStack_2462 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2460 + JSCompiler_object_inline_componentStack_2462 )) - : ((JSCompiler_object_inline_componentStack_2460 = + : ((JSCompiler_object_inline_componentStack_2462 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2460, - JSCompiler_object_inline_message_2457, + JSCompiler_object_inline_componentStack_2462, + JSCompiler_object_inline_message_2459, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2460.flags |= 2)), - (JSCompiler_object_inline_componentStack_2460.return = + (JSCompiler_object_inline_componentStack_2462.flags |= 2)), + (JSCompiler_object_inline_componentStack_2462.return = workInProgress), - (JSCompiler_object_inline_stack_2459.return = workInProgress), - (JSCompiler_object_inline_stack_2459.sibling = - JSCompiler_object_inline_componentStack_2460), - (workInProgress.child = JSCompiler_object_inline_stack_2459), - (JSCompiler_object_inline_stack_2459 = - JSCompiler_object_inline_componentStack_2460), - (JSCompiler_object_inline_componentStack_2460 = workInProgress.child), - (JSCompiler_object_inline_message_2457 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2457 - ? (JSCompiler_object_inline_message_2457 = + (JSCompiler_object_inline_stack_2461.return = workInProgress), + (JSCompiler_object_inline_stack_2461.sibling = + JSCompiler_object_inline_componentStack_2462), + (workInProgress.child = JSCompiler_object_inline_stack_2461), + (JSCompiler_object_inline_stack_2461 = + JSCompiler_object_inline_componentStack_2462), + (JSCompiler_object_inline_componentStack_2462 = workInProgress.child), + (JSCompiler_object_inline_message_2459 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2459 + ? (JSCompiler_object_inline_message_2459 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2457.cachePool), + JSCompiler_object_inline_message_2459.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9545,34 +9555,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2457 = { + (JSCompiler_object_inline_message_2459 = { baseLanes: - JSCompiler_object_inline_message_2457.baseLanes | renderLanes, + JSCompiler_object_inline_message_2459.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2460.memoizedState = - JSCompiler_object_inline_message_2457), + (JSCompiler_object_inline_componentStack_2462.memoizedState = + JSCompiler_object_inline_message_2459), enableTransitionTracing && - ((JSCompiler_object_inline_message_2457 = enableTransitionTracing + ((JSCompiler_object_inline_message_2459 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2457 && + null !== JSCompiler_object_inline_message_2459 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2460.updateQueue), + JSCompiler_object_inline_componentStack_2462.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2460.updateQueue = { - transitions: JSCompiler_object_inline_message_2457, + ? (JSCompiler_object_inline_componentStack_2462.updateQueue = { + transitions: JSCompiler_object_inline_message_2459, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2460.updateQueue = + ? (JSCompiler_object_inline_componentStack_2462.updateQueue = { - transitions: JSCompiler_object_inline_message_2457, + transitions: JSCompiler_object_inline_message_2459, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9580,32 +9590,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2457), + JSCompiler_object_inline_message_2459), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2460.childLanes = + (JSCompiler_object_inline_componentStack_2462.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2458, + JSCompiler_object_inline_digest_2460, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2459 + JSCompiler_object_inline_stack_2461 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2459.children + children: JSCompiler_object_inline_stack_2461.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2458 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2458 + ((JSCompiler_object_inline_digest_2460 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2460 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2458.push(current)); + : JSCompiler_object_inline_digest_2460.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -15266,7 +15276,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15324,7 +15334,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -15332,191 +15342,195 @@ __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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + 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 - ); - 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; } + renderWasConcurrent = !1; + 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) { @@ -15565,7 +15579,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15632,20 +15651,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -15689,11 +15708,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 = @@ -15817,7 +15832,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15826,10 +15843,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15851,37 +15868,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); @@ -15892,16 +15918,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); @@ -15926,12 +15949,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 @@ -27115,11 +27136,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-682a103c-20241107" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-989af12f-20241108" !== 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-682a103c-20241107\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-989af12f-20241108\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27162,11 +27183,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-682a103c-20241107", + version: "19.0.0-www-classic-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27771,7 +27792,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-682a103c-20241107"; + exports.version = "19.0.0-www-classic-989af12f-20241108"; "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 329662dbb2f41..8970654c1f3d9 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -964,6 +964,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: @@ -3784,7 +3792,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3861,45 +3870,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 +8911,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2450; - var JSCompiler_object_inline_stack_2451 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2452; + var JSCompiler_object_inline_stack_2453 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2452 = !1; + var JSCompiler_object_inline_componentStack_2454 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2450 = didSuspend) || - (JSCompiler_object_inline_digest_2450 = + (JSCompiler_object_inline_digest_2452 = didSuspend) || + (JSCompiler_object_inline_digest_2452 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2450 && - ((JSCompiler_object_inline_componentStack_2452 = !0), + JSCompiler_object_inline_digest_2452 && + ((JSCompiler_object_inline_componentStack_2454 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2450 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2452 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2452 + JSCompiler_object_inline_componentStack_2454 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2449 = nextHydratableInstance; + var JSCompiler_object_inline_message_2451 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2449)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2451)) { c: { - var instance = JSCompiler_object_inline_message_2449; + var instance = JSCompiler_object_inline_message_2451; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -8967,19 +8977,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2449 + JSCompiler_object_inline_message_2451 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2449 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2451 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2449 && - ((JSCompiler_object_inline_message_2449 = - JSCompiler_object_inline_message_2449.dehydrated), - null !== JSCompiler_object_inline_message_2449) + null !== JSCompiler_object_inline_message_2451 && + ((JSCompiler_object_inline_message_2451 = + JSCompiler_object_inline_message_2451.dehydrated), + null !== JSCompiler_object_inline_message_2451) ) return ( - JSCompiler_object_inline_message_2449.data === + JSCompiler_object_inline_message_2451.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8987,27 +8997,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - 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) + JSCompiler_object_inline_message_2451 = + JSCompiler_object_inline_stack_2453.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2453.fallback; + if (JSCompiler_object_inline_componentStack_2454) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2451 = + (JSCompiler_object_inline_stack_2453 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2449, + JSCompiler_object_inline_message_2451, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2452 = + (JSCompiler_object_inline_componentStack_2454 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2452.memoizedState = + (JSCompiler_object_inline_componentStack_2454.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2452.childLanes = + (JSCompiler_object_inline_componentStack_2454.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2450, + JSCompiler_object_inline_digest_2452, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9020,9 +9030,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2452.updateQueue), + JSCompiler_object_inline_componentStack_2454.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2452.updateQueue = + ? (JSCompiler_object_inline_componentStack_2454.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9030,46 +9040,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2451 + JSCompiler_object_inline_stack_2453 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2451.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2453.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2451 = + (JSCompiler_object_inline_stack_2453 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2449, + JSCompiler_object_inline_message_2451, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2452 = + (JSCompiler_object_inline_componentStack_2454 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2452.memoizedState = + (JSCompiler_object_inline_componentStack_2454.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2452.childLanes = + (JSCompiler_object_inline_componentStack_2454.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2450, + JSCompiler_object_inline_digest_2452, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2451 + JSCompiler_object_inline_stack_2453 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2449 + JSCompiler_object_inline_message_2451 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2449 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2449) + ((JSCompiler_object_inline_message_2451 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2451) ) { if (didSuspend) workInProgress.flags & 256 @@ -9086,95 +9096,95 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2452 = - JSCompiler_object_inline_stack_2451.fallback), - (JSCompiler_object_inline_message_2449 = workInProgress.mode), - (JSCompiler_object_inline_stack_2451 = + (JSCompiler_object_inline_componentStack_2454 = + JSCompiler_object_inline_stack_2453.fallback), + (JSCompiler_object_inline_message_2451 = workInProgress.mode), + (JSCompiler_object_inline_stack_2453 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2451.children + children: JSCompiler_object_inline_stack_2453.children }, - JSCompiler_object_inline_message_2449 + JSCompiler_object_inline_message_2451 )), - (JSCompiler_object_inline_componentStack_2452 = + (JSCompiler_object_inline_componentStack_2454 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2452, - JSCompiler_object_inline_message_2449, + JSCompiler_object_inline_componentStack_2454, + JSCompiler_object_inline_message_2451, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2452.flags |= 2), - (JSCompiler_object_inline_stack_2451.return = workInProgress), - (JSCompiler_object_inline_componentStack_2452.return = + (JSCompiler_object_inline_componentStack_2454.flags |= 2), + (JSCompiler_object_inline_stack_2453.return = workInProgress), + (JSCompiler_object_inline_componentStack_2454.return = workInProgress), - (JSCompiler_object_inline_stack_2451.sibling = - JSCompiler_object_inline_componentStack_2452), - (workInProgress.child = JSCompiler_object_inline_stack_2451), + (JSCompiler_object_inline_stack_2453.sibling = + JSCompiler_object_inline_componentStack_2454), + (workInProgress.child = JSCompiler_object_inline_stack_2453), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2451 = workInProgress.child), - (JSCompiler_object_inline_stack_2451.memoizedState = + (JSCompiler_object_inline_stack_2453 = workInProgress.child), + (JSCompiler_object_inline_stack_2453.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2451.childLanes = + (JSCompiler_object_inline_stack_2453.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2450, + JSCompiler_object_inline_digest_2452, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2452)); + JSCompiler_object_inline_componentStack_2454)); 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_2449.data === + JSCompiler_object_inline_message_2451.data === SUSPENSE_FALLBACK_START_DATA) ) { - 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_digest_2452 = + JSCompiler_object_inline_message_2451.nextSibling && + JSCompiler_object_inline_message_2451.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2452) { + JSCompiler_temp = JSCompiler_object_inline_digest_2452.dgst; + var message = JSCompiler_object_inline_digest_2452.msg; + instance = JSCompiler_object_inline_digest_2452.stck; + var componentStack = JSCompiler_object_inline_digest_2452.cstck; } - JSCompiler_object_inline_message_2449 = message; - JSCompiler_object_inline_digest_2450 = JSCompiler_temp; - JSCompiler_object_inline_stack_2451 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2452 = + JSCompiler_object_inline_message_2451 = message; + JSCompiler_object_inline_digest_2452 = JSCompiler_temp; + JSCompiler_object_inline_stack_2453 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2454 = componentStack; - JSCompiler_object_inline_componentStack_2452 = - JSCompiler_object_inline_message_2449 - ? Error(JSCompiler_object_inline_message_2449) + JSCompiler_object_inline_componentStack_2454 = + JSCompiler_object_inline_message_2451 + ? Error(JSCompiler_object_inline_message_2451) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2452.stack = - JSCompiler_object_inline_stack_2451 || ""; - JSCompiler_object_inline_componentStack_2452.digest = - JSCompiler_object_inline_digest_2450; - JSCompiler_object_inline_digest_2450 = + JSCompiler_object_inline_componentStack_2454.stack = + JSCompiler_object_inline_stack_2453 || ""; + JSCompiler_object_inline_componentStack_2454.digest = + JSCompiler_object_inline_digest_2452; + JSCompiler_object_inline_digest_2452 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2451 = { - value: JSCompiler_object_inline_componentStack_2452, + JSCompiler_object_inline_stack_2453 = { + value: JSCompiler_object_inline_componentStack_2454, source: null, - stack: JSCompiler_object_inline_digest_2450 + stack: JSCompiler_object_inline_digest_2452 }; - "string" === typeof JSCompiler_object_inline_digest_2450 && + "string" === typeof JSCompiler_object_inline_digest_2452 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2452, - JSCompiler_object_inline_stack_2451 + JSCompiler_object_inline_componentStack_2454, + JSCompiler_object_inline_stack_2453 ); - queueHydrationError(JSCompiler_object_inline_stack_2451); + queueHydrationError(JSCompiler_object_inline_stack_2453); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9188,25 +9198,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2450 = + (JSCompiler_object_inline_digest_2452 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2450) + didReceiveUpdate || JSCompiler_object_inline_digest_2452) ) { - 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; + JSCompiler_object_inline_digest_2452 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2452) { + JSCompiler_object_inline_stack_2453 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2453 & 42)) + JSCompiler_object_inline_stack_2453 = 1; else - switch (JSCompiler_object_inline_stack_2451) { + switch (JSCompiler_object_inline_stack_2453) { case 2: - JSCompiler_object_inline_stack_2451 = 1; + JSCompiler_object_inline_stack_2453 = 1; break; case 8: - JSCompiler_object_inline_stack_2451 = 4; + JSCompiler_object_inline_stack_2453 = 4; break; case 32: - JSCompiler_object_inline_stack_2451 = 16; + JSCompiler_object_inline_stack_2453 = 16; break; case 128: case 256: @@ -9227,40 +9237,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2451 = 64; + JSCompiler_object_inline_stack_2453 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2451 = 134217728; + JSCompiler_object_inline_stack_2453 = 134217728; break; default: - JSCompiler_object_inline_stack_2451 = 0; + JSCompiler_object_inline_stack_2453 = 0; } - JSCompiler_object_inline_stack_2451 = + JSCompiler_object_inline_stack_2453 = 0 !== - (JSCompiler_object_inline_stack_2451 & - (JSCompiler_object_inline_digest_2450.suspendedLanes | + (JSCompiler_object_inline_stack_2453 & + (JSCompiler_object_inline_digest_2452.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2451; + : JSCompiler_object_inline_stack_2453; if ( - 0 !== JSCompiler_object_inline_stack_2451 && - JSCompiler_object_inline_stack_2451 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2453 && + JSCompiler_object_inline_stack_2453 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2451), + ((prevState.retryLane = JSCompiler_object_inline_stack_2453), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2451 + JSCompiler_object_inline_stack_2453 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2450, + JSCompiler_object_inline_digest_2452, current, - JSCompiler_object_inline_stack_2451 + JSCompiler_object_inline_stack_2453 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2449.data === + JSCompiler_object_inline_message_2451.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9268,7 +9278,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2449.data === + JSCompiler_object_inline_message_2451.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9276,12 +9286,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2449._reactRetry = + (JSCompiler_object_inline_message_2451._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2449.nextSibling + JSCompiler_object_inline_message_2451.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9299,57 +9309,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2451.children + JSCompiler_object_inline_stack_2453.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2452) + if (JSCompiler_object_inline_componentStack_2454) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2452 = - JSCompiler_object_inline_stack_2451.fallback), - (JSCompiler_object_inline_message_2449 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2454 = + JSCompiler_object_inline_stack_2453.fallback), + (JSCompiler_object_inline_message_2451 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2451 = createWorkInProgress( + (JSCompiler_object_inline_stack_2453 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2451.children + children: JSCompiler_object_inline_stack_2453.children } )), - (JSCompiler_object_inline_stack_2451.subtreeFlags = + (JSCompiler_object_inline_stack_2453.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2452 = + ? (JSCompiler_object_inline_componentStack_2454 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2452 + JSCompiler_object_inline_componentStack_2454 )) - : ((JSCompiler_object_inline_componentStack_2452 = + : ((JSCompiler_object_inline_componentStack_2454 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2452, - JSCompiler_object_inline_message_2449, + JSCompiler_object_inline_componentStack_2454, + JSCompiler_object_inline_message_2451, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2452.flags |= 2)), - (JSCompiler_object_inline_componentStack_2452.return = + (JSCompiler_object_inline_componentStack_2454.flags |= 2)), + (JSCompiler_object_inline_componentStack_2454.return = workInProgress), - (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 = + (JSCompiler_object_inline_stack_2453.return = workInProgress), + (JSCompiler_object_inline_stack_2453.sibling = + JSCompiler_object_inline_componentStack_2454), + (workInProgress.child = JSCompiler_object_inline_stack_2453), + (JSCompiler_object_inline_stack_2453 = + JSCompiler_object_inline_componentStack_2454), + (JSCompiler_object_inline_componentStack_2454 = workInProgress.child), + (JSCompiler_object_inline_message_2451 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2451 + ? (JSCompiler_object_inline_message_2451 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2449.cachePool), + JSCompiler_object_inline_message_2451.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9357,34 +9367,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2449 = { + (JSCompiler_object_inline_message_2451 = { baseLanes: - JSCompiler_object_inline_message_2449.baseLanes | renderLanes, + JSCompiler_object_inline_message_2451.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2452.memoizedState = - JSCompiler_object_inline_message_2449), + (JSCompiler_object_inline_componentStack_2454.memoizedState = + JSCompiler_object_inline_message_2451), enableTransitionTracing && - ((JSCompiler_object_inline_message_2449 = enableTransitionTracing + ((JSCompiler_object_inline_message_2451 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2449 && + null !== JSCompiler_object_inline_message_2451 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2452.updateQueue), + JSCompiler_object_inline_componentStack_2454.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2452.updateQueue = { - transitions: JSCompiler_object_inline_message_2449, + ? (JSCompiler_object_inline_componentStack_2454.updateQueue = { + transitions: JSCompiler_object_inline_message_2451, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2452.updateQueue = + ? (JSCompiler_object_inline_componentStack_2454.updateQueue = { - transitions: JSCompiler_object_inline_message_2449, + transitions: JSCompiler_object_inline_message_2451, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9392,32 +9402,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2449), + JSCompiler_object_inline_message_2451), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2452.childLanes = + (JSCompiler_object_inline_componentStack_2454.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2450, + JSCompiler_object_inline_digest_2452, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2451 + JSCompiler_object_inline_stack_2453 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2451.children + children: JSCompiler_object_inline_stack_2453.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2450 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2450 + ((JSCompiler_object_inline_digest_2452 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2452 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2450.push(current)); + : JSCompiler_object_inline_digest_2452.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -15065,7 +15075,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15123,7 +15133,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -15131,191 +15141,195 @@ __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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + 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 - ); - 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; } + renderWasConcurrent = !1; + 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) { @@ -15364,7 +15378,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15431,20 +15450,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -15488,11 +15507,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 = @@ -15616,7 +15631,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15625,10 +15642,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15650,37 +15667,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); @@ -15691,16 +15717,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); @@ -15725,12 +15748,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 @@ -26894,11 +26915,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-682a103c-20241107" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-989af12f-20241108" !== 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-682a103c-20241107\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-989af12f-20241108\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -26941,11 +26962,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-682a103c-20241107", + version: "19.0.0-www-modern-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27550,7 +27571,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-682a103c-20241107"; + exports.version = "19.0.0-www-modern-989af12f-20241108"; "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 94ecd7a518c58..7e2677badb6f1 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -672,6 +672,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: @@ -1983,7 +1991,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$26, root$26 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$26, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); root$26 = root$26.next; @@ -2058,39 +2067,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; @@ -8566,7 +8574,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$195) { + } catch (e$200) { JSCompiler_temp = null; break a; } @@ -10816,7 +10824,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -10843,179 +10851,181 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -11064,7 +11074,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11128,20 +11138,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -11185,9 +11195,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 = @@ -11275,7 +11283,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)) || @@ -11284,10 +11294,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(), @@ -11296,6 +11306,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) { @@ -11304,24 +11315,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$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$188) { + handleThrow(root, thrownValue$188); } while (1); lanes && root.shellSuspendCounter++; @@ -11329,11 +11353,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); @@ -11347,12 +11371,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) { @@ -11436,8 +11458,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$185) { - handleThrow(root, thrownValue$185); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -11787,7 +11809,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$190 = rootWithPendingPassiveEffects, + var root$195 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11802,7 +11824,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$190, remainingLanes); + releaseRootPooledCache(root$195, remainingLanes); } } return !1; @@ -13038,19 +13060,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$348; + var JSCompiler_inline_result$jscomp$353; if (canUseDOM) { - var isSupported$jscomp$inline_1520 = "oninput" in document; - if (!isSupported$jscomp$inline_1520) { - var element$jscomp$inline_1521 = document.createElement("div"); - element$jscomp$inline_1521.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1520 = - "function" === typeof element$jscomp$inline_1521.oninput; + var isSupported$jscomp$inline_1527 = "oninput" in document; + if (!isSupported$jscomp$inline_1527) { + var element$jscomp$inline_1528 = document.createElement("div"); + element$jscomp$inline_1528.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1527 = + "function" === typeof element$jscomp$inline_1528.oninput; } - JSCompiler_inline_result$jscomp$348 = isSupported$jscomp$inline_1520; - } else JSCompiler_inline_result$jscomp$348 = !1; + JSCompiler_inline_result$jscomp$353 = isSupported$jscomp$inline_1527; + } else JSCompiler_inline_result$jscomp$353 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$348 && + JSCompiler_inline_result$jscomp$353 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13461,20 +13483,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1561 = 0; - i$jscomp$inline_1561 < simpleEventPluginEvents.length; - i$jscomp$inline_1561++ + var i$jscomp$inline_1568 = 0; + i$jscomp$inline_1568 < simpleEventPluginEvents.length; + i$jscomp$inline_1568++ ) { - var eventName$jscomp$inline_1562 = - simpleEventPluginEvents[i$jscomp$inline_1561], - domEventName$jscomp$inline_1563 = - eventName$jscomp$inline_1562.toLowerCase(), - capitalizedEvent$jscomp$inline_1564 = - eventName$jscomp$inline_1562[0].toUpperCase() + - eventName$jscomp$inline_1562.slice(1); + var eventName$jscomp$inline_1569 = + simpleEventPluginEvents[i$jscomp$inline_1568], + domEventName$jscomp$inline_1570 = + eventName$jscomp$inline_1569.toLowerCase(), + capitalizedEvent$jscomp$inline_1571 = + eventName$jscomp$inline_1569[0].toUpperCase() + + eventName$jscomp$inline_1569.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1563, - "on" + capitalizedEvent$jscomp$inline_1564 + domEventName$jscomp$inline_1570, + "on" + capitalizedEvent$jscomp$inline_1571 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14767,34 +14789,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$209 = props[hasSrc]; - if (null != propValue$209) + var propValue$214 = props[hasSrc]; + if (null != propValue$214) switch (hasSrc) { case "name": - hasSrcSet = propValue$209; + hasSrcSet = propValue$214; break; case "type": - propValue = propValue$209; + propValue = propValue$214; break; case "checked": - checked = propValue$209; + checked = propValue$214; break; case "defaultChecked": - defaultChecked = propValue$209; + defaultChecked = propValue$214; break; case "value": - propKey = propValue$209; + propKey = propValue$214; break; case "defaultValue": - defaultValue = propValue$209; + defaultValue = propValue$214; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$209) + if (null != propValue$214) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$209, props, null); + setProp(domElement, tag, hasSrc, propValue$214, props, null); } } initInput( @@ -14931,14 +14953,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$209 in props) - props.hasOwnProperty(propValue$209) && - ((hasSrc = props[propValue$209]), + for (propValue$214 in props) + props.hasOwnProperty(propValue$214) && + ((hasSrc = props[propValue$214]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$209, + propValue$214, hasSrc, props, void 0 @@ -14986,14 +15008,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$226 in nextProps) { - var propKey = nextProps[propKey$226]; - lastProp = lastProps[propKey$226]; + for (var propKey$231 in nextProps) { + var propKey = nextProps[propKey$231]; + lastProp = lastProps[propKey$231]; if ( - nextProps.hasOwnProperty(propKey$226) && + nextProps.hasOwnProperty(propKey$231) && (null != propKey || null != lastProp) ) - switch (propKey$226) { + switch (propKey$231) { case "type": type = propKey; break; @@ -15022,7 +15044,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$226, + propKey$231, propKey, nextProps, lastProp @@ -15041,7 +15063,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$226 = null; + propKey = value = defaultValue = propKey$231 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15072,7 +15094,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$226 = type; + propKey$231 = type; break; case "defaultValue": defaultValue = type; @@ -15093,15 +15115,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$226 - ? updateOptions(domElement, !!lastProps, propKey$226, !1) + null != propKey$231 + ? updateOptions(domElement, !!lastProps, propKey$231, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$226 = null; + propKey = propKey$231 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15125,7 +15147,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$226 = name; + propKey$231 = name; break; case "defaultValue": propKey = name; @@ -15139,17 +15161,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$226, propKey); + updateTextarea(domElement, propKey$231, propKey); return; case "option": - for (var propKey$242 in lastProps) + for (var propKey$247 in lastProps) if ( - ((propKey$226 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$242)) + ((propKey$231 = lastProps[propKey$247]), + lastProps.hasOwnProperty(propKey$247) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$247)) ) - switch (propKey$242) { + switch (propKey$247) { case "selected": domElement.selected = !1; break; @@ -15157,33 +15179,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$247, null, nextProps, - propKey$226 + propKey$231 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$226 = nextProps[lastDefaultValue]), + ((propKey$231 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$231 !== propKey && + (null != propKey$231 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$226 && - "function" !== typeof propKey$226 && - "symbol" !== typeof propKey$226; + propKey$231 && + "function" !== typeof propKey$231 && + "symbol" !== typeof propKey$231; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$226, + propKey$231, nextProps, propKey ); @@ -15204,24 +15226,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$247 in lastProps) - (propKey$226 = lastProps[propKey$247]), - lastProps.hasOwnProperty(propKey$247) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$247) && - setProp(domElement, tag, propKey$247, null, nextProps, propKey$226); + for (var propKey$252 in lastProps) + (propKey$231 = lastProps[propKey$252]), + lastProps.hasOwnProperty(propKey$252) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$252) && + setProp(domElement, tag, propKey$252, null, nextProps, propKey$231); for (checked in nextProps) if ( - ((propKey$226 = nextProps[checked]), + ((propKey$231 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$231 !== propKey && + (null != propKey$231 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$226) + if (null != propKey$231) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15229,7 +15251,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$226, + propKey$231, nextProps, propKey ); @@ -15237,49 +15259,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$252 in lastProps) - (propKey$226 = lastProps[propKey$252]), - lastProps.hasOwnProperty(propKey$252) && - void 0 !== propKey$226 && - !nextProps.hasOwnProperty(propKey$252) && + for (var propKey$257 in lastProps) + (propKey$231 = lastProps[propKey$257]), + lastProps.hasOwnProperty(propKey$257) && + void 0 !== propKey$231 && + !nextProps.hasOwnProperty(propKey$257) && setPropOnCustomElement( domElement, tag, - propKey$252, + propKey$257, void 0, nextProps, - propKey$226 + propKey$231 ); for (defaultChecked in nextProps) - (propKey$226 = nextProps[defaultChecked]), + (propKey$231 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$226 === propKey || - (void 0 === propKey$226 && void 0 === propKey) || + propKey$231 === propKey || + (void 0 === propKey$231 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$226, + propKey$231, nextProps, propKey ); return; } } - for (var propKey$257 in lastProps) - (propKey$226 = lastProps[propKey$257]), - lastProps.hasOwnProperty(propKey$257) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$257) && - setProp(domElement, tag, propKey$257, null, nextProps, propKey$226); + for (var propKey$262 in lastProps) + (propKey$231 = lastProps[propKey$262]), + lastProps.hasOwnProperty(propKey$262) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$262) && + setProp(domElement, tag, propKey$262, null, nextProps, propKey$231); for (lastProp in nextProps) - (propKey$226 = nextProps[lastProp]), + (propKey$231 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$226 === propKey || - (null == propKey$226 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$226, nextProps, propKey); + propKey$231 === propKey || + (null == propKey$231 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$231, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15857,26 +15879,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$265 = getResourcesFromRoot( + var styles$270 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$266 = styles$265.get(type); - resource$266 || + resource$271 = styles$270.get(type); + resource$271 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$266 = { + (resource$271 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$265.set(type, resource$266), - (styles$265 = JSCompiler_inline_result.querySelector( + styles$270.set(type, resource$271), + (styles$270 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$265._p && - ((resource$266.instance = styles$265), - (resource$266.state.loading = 5)), + !styles$270._p && + ((resource$271.instance = styles$270), + (resource$271.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15889,16 +15911,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$265 || + styles$270 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$266.state + resource$271.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$266; + return resource$271; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15995,37 +16017,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$271 = hoistableRoot.querySelector( + var instance$276 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$271) + if (instance$276) return ( (resource.state.loading |= 4), - (resource.instance = instance$271), - markNodeAsHoistable(instance$271), - instance$271 + (resource.instance = instance$276), + markNodeAsHoistable(instance$276), + instance$276 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$271 = ( + instance$276 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$271); - var linkInstance = instance$271; + markNodeAsHoistable(instance$276); + var linkInstance = instance$276; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$271, "link", instance); + setInitialProperties(instance$276, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$271, props.precedence, hoistableRoot); - return (resource.instance = instance$271); + insertStylesheet(instance$276, props.precedence, hoistableRoot); + return (resource.instance = instance$276); case "script": - instance$271 = getScriptKey(props.src); + instance$276 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$271) + getScriptSelectorFromKey(instance$276) )) ) return ( @@ -16034,7 +16056,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$271))) + if ((styleProps = preloadPropsMap.get(instance$276))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17037,16 +17059,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1734 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1741 = React.version; if ( - "19.0.0-www-classic-682a103c-20241107" !== - isomorphicReactPackageVersion$jscomp$inline_1734 + "19.0.0-www-classic-989af12f-20241108" !== + isomorphicReactPackageVersion$jscomp$inline_1741 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1734, - "19.0.0-www-classic-682a103c-20241107" + isomorphicReactPackageVersion$jscomp$inline_1741, + "19.0.0-www-classic-989af12f-20241108" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17062,25 +17084,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2278 = { +var internals$jscomp$inline_2285 = { bundleType: 0, - version: "19.0.0-www-classic-682a103c-20241107", + version: "19.0.0-www-classic-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; 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) { @@ -17431,4 +17453,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-682a103c-20241107"; +exports.version = "19.0.0-www-classic-989af12f-20241108"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 51e86067c217a..0faf862621138 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -607,6 +607,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: @@ -1834,7 +1842,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$26, root$26 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$26, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); root$26 = root$26.next; @@ -1909,39 +1918,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; @@ -8317,7 +8325,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$195) { + } catch (e$200) { JSCompiler_temp = null; break a; } @@ -10567,7 +10575,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -10594,179 +10602,181 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -10815,7 +10825,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -10879,20 +10889,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -10936,9 +10946,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 = @@ -11026,7 +11034,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)) || @@ -11035,10 +11045,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(), @@ -11047,6 +11057,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) { @@ -11055,24 +11066,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$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$188) { + handleThrow(root, thrownValue$188); } while (1); lanes && root.shellSuspendCounter++; @@ -11080,11 +11104,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); @@ -11098,12 +11122,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) { @@ -11187,8 +11209,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$185) { - handleThrow(root, thrownValue$185); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -11534,7 +11556,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$190 = rootWithPendingPassiveEffects, + var root$195 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11549,7 +11571,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$190, remainingLanes); + releaseRootPooledCache(root$195, remainingLanes); } } return !1; @@ -12774,19 +12796,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$351; + var JSCompiler_inline_result$jscomp$356; if (canUseDOM) { - var isSupported$jscomp$inline_1510 = "oninput" in document; - if (!isSupported$jscomp$inline_1510) { - var element$jscomp$inline_1511 = document.createElement("div"); - element$jscomp$inline_1511.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1510 = - "function" === typeof element$jscomp$inline_1511.oninput; + var isSupported$jscomp$inline_1517 = "oninput" in document; + if (!isSupported$jscomp$inline_1517) { + var element$jscomp$inline_1518 = document.createElement("div"); + element$jscomp$inline_1518.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1517 = + "function" === typeof element$jscomp$inline_1518.oninput; } - JSCompiler_inline_result$jscomp$351 = isSupported$jscomp$inline_1510; - } else JSCompiler_inline_result$jscomp$351 = !1; + JSCompiler_inline_result$jscomp$356 = isSupported$jscomp$inline_1517; + } else JSCompiler_inline_result$jscomp$356 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$351 && + JSCompiler_inline_result$jscomp$356 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13197,20 +13219,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1551 = 0; - i$jscomp$inline_1551 < simpleEventPluginEvents.length; - i$jscomp$inline_1551++ + var i$jscomp$inline_1558 = 0; + i$jscomp$inline_1558 < simpleEventPluginEvents.length; + i$jscomp$inline_1558++ ) { - var eventName$jscomp$inline_1552 = - simpleEventPluginEvents[i$jscomp$inline_1551], - domEventName$jscomp$inline_1553 = - eventName$jscomp$inline_1552.toLowerCase(), - capitalizedEvent$jscomp$inline_1554 = - eventName$jscomp$inline_1552[0].toUpperCase() + - eventName$jscomp$inline_1552.slice(1); + var eventName$jscomp$inline_1559 = + simpleEventPluginEvents[i$jscomp$inline_1558], + domEventName$jscomp$inline_1560 = + eventName$jscomp$inline_1559.toLowerCase(), + capitalizedEvent$jscomp$inline_1561 = + eventName$jscomp$inline_1559[0].toUpperCase() + + eventName$jscomp$inline_1559.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1553, - "on" + capitalizedEvent$jscomp$inline_1554 + domEventName$jscomp$inline_1560, + "on" + capitalizedEvent$jscomp$inline_1561 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14499,34 +14521,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$209 = props[hasSrc]; - if (null != propValue$209) + var propValue$214 = props[hasSrc]; + if (null != propValue$214) switch (hasSrc) { case "name": - hasSrcSet = propValue$209; + hasSrcSet = propValue$214; break; case "type": - propKey = propValue$209; + propKey = propValue$214; break; case "checked": - checked = propValue$209; + checked = propValue$214; break; case "defaultChecked": - defaultChecked = propValue$209; + defaultChecked = propValue$214; break; case "value": - propValue = propValue$209; + propValue = propValue$214; break; case "defaultValue": - defaultValue = propValue$209; + defaultValue = propValue$214; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$209) + if (null != propValue$214) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$209, props, null); + setProp(domElement, tag, hasSrc, propValue$214, props, null); } } initInput( @@ -14662,14 +14684,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$209 in props) - props.hasOwnProperty(propValue$209) && - ((hasSrc = props[propValue$209]), + for (propValue$214 in props) + props.hasOwnProperty(propValue$214) && + ((hasSrc = props[propValue$214]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$209, + propValue$214, hasSrc, props, void 0 @@ -14717,14 +14739,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$226 in nextProps) { - var propKey = nextProps[propKey$226]; - lastProp = lastProps[propKey$226]; + for (var propKey$231 in nextProps) { + var propKey = nextProps[propKey$231]; + lastProp = lastProps[propKey$231]; if ( - nextProps.hasOwnProperty(propKey$226) && + nextProps.hasOwnProperty(propKey$231) && (null != propKey || null != lastProp) ) - switch (propKey$226) { + switch (propKey$231) { case "type": type = propKey; break; @@ -14753,7 +14775,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$226, + propKey$231, propKey, nextProps, lastProp @@ -14772,7 +14794,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$226 = null; + propKey = value = defaultValue = propKey$231 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14803,7 +14825,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$226 = type; + propKey$231 = type; break; case "defaultValue": defaultValue = type; @@ -14824,15 +14846,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$226 - ? updateOptions(domElement, !!lastProps, propKey$226, !1) + null != propKey$231 + ? updateOptions(domElement, !!lastProps, propKey$231, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$226 = null; + propKey = propKey$231 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14856,7 +14878,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$226 = name; + propKey$231 = name; break; case "defaultValue": propKey = name; @@ -14870,17 +14892,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$226, propKey); + updateTextarea(domElement, propKey$231, propKey); return; case "option": - for (var propKey$242 in lastProps) + for (var propKey$247 in lastProps) if ( - ((propKey$226 = lastProps[propKey$242]), - lastProps.hasOwnProperty(propKey$242) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$242)) + ((propKey$231 = lastProps[propKey$247]), + lastProps.hasOwnProperty(propKey$247) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$247)) ) - switch (propKey$242) { + switch (propKey$247) { case "selected": domElement.selected = !1; break; @@ -14888,33 +14910,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$242, + propKey$247, null, nextProps, - propKey$226 + propKey$231 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$226 = nextProps[lastDefaultValue]), + ((propKey$231 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$231 !== propKey && + (null != propKey$231 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$226 && - "function" !== typeof propKey$226 && - "symbol" !== typeof propKey$226; + propKey$231 && + "function" !== typeof propKey$231 && + "symbol" !== typeof propKey$231; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$226, + propKey$231, nextProps, propKey ); @@ -14935,24 +14957,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$247 in lastProps) - (propKey$226 = lastProps[propKey$247]), - lastProps.hasOwnProperty(propKey$247) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$247) && - setProp(domElement, tag, propKey$247, null, nextProps, propKey$226); + for (var propKey$252 in lastProps) + (propKey$231 = lastProps[propKey$252]), + lastProps.hasOwnProperty(propKey$252) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$252) && + setProp(domElement, tag, propKey$252, null, nextProps, propKey$231); for (checked in nextProps) if ( - ((propKey$226 = nextProps[checked]), + ((propKey$231 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$226 !== propKey && - (null != propKey$226 || null != propKey)) + propKey$231 !== propKey && + (null != propKey$231 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$226) + if (null != propKey$231) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14960,7 +14982,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$226, + propKey$231, nextProps, propKey ); @@ -14968,49 +14990,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$252 in lastProps) - (propKey$226 = lastProps[propKey$252]), - lastProps.hasOwnProperty(propKey$252) && - void 0 !== propKey$226 && - !nextProps.hasOwnProperty(propKey$252) && + for (var propKey$257 in lastProps) + (propKey$231 = lastProps[propKey$257]), + lastProps.hasOwnProperty(propKey$257) && + void 0 !== propKey$231 && + !nextProps.hasOwnProperty(propKey$257) && setPropOnCustomElement( domElement, tag, - propKey$252, + propKey$257, void 0, nextProps, - propKey$226 + propKey$231 ); for (defaultChecked in nextProps) - (propKey$226 = nextProps[defaultChecked]), + (propKey$231 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$226 === propKey || - (void 0 === propKey$226 && void 0 === propKey) || + propKey$231 === propKey || + (void 0 === propKey$231 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$226, + propKey$231, nextProps, propKey ); return; } } - for (var propKey$257 in lastProps) - (propKey$226 = lastProps[propKey$257]), - lastProps.hasOwnProperty(propKey$257) && - null != propKey$226 && - !nextProps.hasOwnProperty(propKey$257) && - setProp(domElement, tag, propKey$257, null, nextProps, propKey$226); + for (var propKey$262 in lastProps) + (propKey$231 = lastProps[propKey$262]), + lastProps.hasOwnProperty(propKey$262) && + null != propKey$231 && + !nextProps.hasOwnProperty(propKey$262) && + setProp(domElement, tag, propKey$262, null, nextProps, propKey$231); for (lastProp in nextProps) - (propKey$226 = nextProps[lastProp]), + (propKey$231 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$226 === propKey || - (null == propKey$226 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$226, nextProps, propKey); + propKey$231 === propKey || + (null == propKey$231 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$231, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15588,26 +15610,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$265 = getResourcesFromRoot( + var styles$270 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$266 = styles$265.get(type); - resource$266 || + resource$271 = styles$270.get(type); + resource$271 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$266 = { + (resource$271 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$265.set(type, resource$266), - (styles$265 = JSCompiler_inline_result.querySelector( + styles$270.set(type, resource$271), + (styles$270 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$265._p && - ((resource$266.instance = styles$265), - (resource$266.state.loading = 5)), + !styles$270._p && + ((resource$271.instance = styles$270), + (resource$271.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15620,16 +15642,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$265 || + styles$270 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$266.state + resource$271.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$266; + return resource$271; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15726,37 +15748,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$271 = hoistableRoot.querySelector( + var instance$276 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$271) + if (instance$276) return ( (resource.state.loading |= 4), - (resource.instance = instance$271), - markNodeAsHoistable(instance$271), - instance$271 + (resource.instance = instance$276), + markNodeAsHoistable(instance$276), + instance$276 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$271 = ( + instance$276 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$271); - var linkInstance = instance$271; + markNodeAsHoistable(instance$276); + var linkInstance = instance$276; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$271, "link", instance); + setInitialProperties(instance$276, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$271, props.precedence, hoistableRoot); - return (resource.instance = instance$271); + insertStylesheet(instance$276, props.precedence, hoistableRoot); + return (resource.instance = instance$276); case "script": - instance$271 = getScriptKey(props.src); + instance$276 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$271) + getScriptSelectorFromKey(instance$276) )) ) return ( @@ -15765,7 +15787,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$271))) + if ((styleProps = preloadPropsMap.get(instance$276))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16768,16 +16790,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1724 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1731 = React.version; if ( - "19.0.0-www-modern-682a103c-20241107" !== - isomorphicReactPackageVersion$jscomp$inline_1724 + "19.0.0-www-modern-989af12f-20241108" !== + isomorphicReactPackageVersion$jscomp$inline_1731 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1724, - "19.0.0-www-modern-682a103c-20241107" + isomorphicReactPackageVersion$jscomp$inline_1731, + "19.0.0-www-modern-989af12f-20241108" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16793,25 +16815,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2260 = { +var internals$jscomp$inline_2267 = { bundleType: 0, - version: "19.0.0-www-modern-682a103c-20241107", + version: "19.0.0-www-modern-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2261 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2268 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2261.isDisabled && - hook$jscomp$inline_2261.supportsFiber + !hook$jscomp$inline_2268.isDisabled && + hook$jscomp$inline_2268.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2261.inject( - internals$jscomp$inline_2260 + (rendererID = hook$jscomp$inline_2268.inject( + internals$jscomp$inline_2267 )), - (injectedHook = hook$jscomp$inline_2261); + (injectedHook = hook$jscomp$inline_2268); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17162,4 +17184,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-682a103c-20241107"; +exports.version = "19.0.0-www-modern-989af12f-20241108"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 591370cc8d16c..01adff45350b7 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -753,6 +753,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: @@ -2148,7 +2156,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$28, root$28 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$28, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$28, JSCompiler_inline_result)); root$28 = root$28.next; @@ -2223,39 +2232,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; @@ -9010,7 +9018,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; } @@ -11350,7 +11358,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11378,179 +11386,181 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -11599,7 +11609,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11663,20 +11673,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -11720,9 +11730,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 = @@ -11840,7 +11848,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)) || @@ -11849,10 +11859,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(), @@ -11870,32 +11880,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$198) { - handleThrow(root, thrownValue$198); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); lanes && root.shellSuspendCounter++; @@ -11903,12 +11927,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); @@ -11930,12 +11954,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 { @@ -12021,8 +12040,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -12419,7 +12438,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$205 = rootWithPendingPassiveEffects, + var root$210 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12434,7 +12453,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$205, remainingLanes); + releaseRootPooledCache(root$210, remainingLanes); } } return !1; @@ -13183,9 +13202,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$210 = 0; - 31 > index$210; - index$210++ + var map = new Map(), lane = 1, index$215 = 0; + 31 > index$215; + index$215++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13731,19 +13750,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$365; + var JSCompiler_inline_result$jscomp$370; if (canUseDOM) { - var isSupported$jscomp$inline_1613 = "oninput" in document; - if (!isSupported$jscomp$inline_1613) { - var element$jscomp$inline_1614 = document.createElement("div"); - element$jscomp$inline_1614.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1613 = - "function" === typeof element$jscomp$inline_1614.oninput; + var isSupported$jscomp$inline_1620 = "oninput" in document; + if (!isSupported$jscomp$inline_1620) { + var element$jscomp$inline_1621 = document.createElement("div"); + element$jscomp$inline_1621.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1620 = + "function" === typeof element$jscomp$inline_1621.oninput; } - JSCompiler_inline_result$jscomp$365 = isSupported$jscomp$inline_1613; - } else JSCompiler_inline_result$jscomp$365 = !1; + JSCompiler_inline_result$jscomp$370 = isSupported$jscomp$inline_1620; + } else JSCompiler_inline_result$jscomp$370 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$365 && + JSCompiler_inline_result$jscomp$370 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14154,20 +14173,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1654 = 0; - i$jscomp$inline_1654 < simpleEventPluginEvents.length; - i$jscomp$inline_1654++ + var i$jscomp$inline_1661 = 0; + i$jscomp$inline_1661 < simpleEventPluginEvents.length; + i$jscomp$inline_1661++ ) { - var eventName$jscomp$inline_1655 = - simpleEventPluginEvents[i$jscomp$inline_1654], - domEventName$jscomp$inline_1656 = - eventName$jscomp$inline_1655.toLowerCase(), - capitalizedEvent$jscomp$inline_1657 = - eventName$jscomp$inline_1655[0].toUpperCase() + - eventName$jscomp$inline_1655.slice(1); + var eventName$jscomp$inline_1662 = + simpleEventPluginEvents[i$jscomp$inline_1661], + domEventName$jscomp$inline_1663 = + eventName$jscomp$inline_1662.toLowerCase(), + capitalizedEvent$jscomp$inline_1664 = + eventName$jscomp$inline_1662[0].toUpperCase() + + eventName$jscomp$inline_1662.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1656, - "on" + capitalizedEvent$jscomp$inline_1657 + domEventName$jscomp$inline_1663, + "on" + capitalizedEvent$jscomp$inline_1664 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15460,34 +15479,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": - propValue = propValue$226; + propValue = propValue$231; break; case "checked": - checked = propValue$226; + checked = propValue$231; break; case "defaultChecked": - defaultChecked = propValue$226; + defaultChecked = propValue$231; break; case "value": - propKey = propValue$226; + propKey = 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( @@ -15624,14 +15643,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 @@ -15679,14 +15698,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; @@ -15715,7 +15734,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$243, + propKey$248, propKey, nextProps, lastProp @@ -15734,7 +15753,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]), @@ -15765,7 +15784,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$243 = type; + propKey$248 = type; break; case "defaultValue": defaultValue = type; @@ -15786,15 +15805,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]), @@ -15818,7 +15837,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$243 = name; + propKey$248 = name; break; case "defaultValue": propKey = name; @@ -15832,17 +15851,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; @@ -15850,33 +15869,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 ); @@ -15897,24 +15916,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: @@ -15922,7 +15941,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$243, + propKey$248, nextProps, propKey ); @@ -15930,49 +15949,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; @@ -16550,26 +16569,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$282 = getResourcesFromRoot( + var styles$287 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$283 = styles$282.get(type); - resource$283 || + resource$288 = styles$287.get(type); + resource$288 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$283 = { + (resource$288 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$282.set(type, resource$283), - (styles$282 = JSCompiler_inline_result.querySelector( + styles$287.set(type, resource$288), + (styles$287 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$282._p && - ((resource$283.instance = styles$282), - (resource$283.state.loading = 5)), + !styles$287._p && + ((resource$288.instance = styles$287), + (resource$288.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16582,16 +16601,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$282 || + styles$287 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$283.state + resource$288.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$283; + return resource$288; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16688,37 +16707,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$288 = hoistableRoot.querySelector( + var instance$293 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$288) + if (instance$293) return ( (resource.state.loading |= 4), - (resource.instance = instance$288), - markNodeAsHoistable(instance$288), - instance$288 + (resource.instance = instance$293), + markNodeAsHoistable(instance$293), + instance$293 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$288 = ( + instance$293 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$288); - var linkInstance = instance$288; + markNodeAsHoistable(instance$293); + var linkInstance = instance$293; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$288, "link", instance); + setInitialProperties(instance$293, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$288, props.precedence, hoistableRoot); - return (resource.instance = instance$288); + insertStylesheet(instance$293, props.precedence, hoistableRoot); + return (resource.instance = instance$293); case "script": - instance$288 = getScriptKey(props.src); + instance$293 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$288) + getScriptSelectorFromKey(instance$293) )) ) return ( @@ -16727,7 +16746,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$288))) + if ((styleProps = preloadPropsMap.get(instance$293))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17730,16 +17749,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1827 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1834 = React.version; if ( - "19.0.0-www-classic-682a103c-20241107" !== - isomorphicReactPackageVersion$jscomp$inline_1827 + "19.0.0-www-classic-989af12f-20241108" !== + isomorphicReactPackageVersion$jscomp$inline_1834 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1827, - "19.0.0-www-classic-682a103c-20241107" + isomorphicReactPackageVersion$jscomp$inline_1834, + "19.0.0-www-classic-989af12f-20241108" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17755,28 +17774,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1829 = { +var internals$jscomp$inline_1836 = { bundleType: 0, - version: "19.0.0-www-classic-682a103c-20241107", + version: "19.0.0-www-classic-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1829.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1829.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1836.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1836.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_1829 + (rendererID = hook$jscomp$inline_2337.inject( + internals$jscomp$inline_1836 )), - (injectedHook = hook$jscomp$inline_2330); + (injectedHook = hook$jscomp$inline_2337); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18127,7 +18146,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-682a103c-20241107"; +exports.version = "19.0.0-www-classic-989af12f-20241108"; "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 ba8d754d9267a..6e27b5012b7c5 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -688,6 +688,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: @@ -1999,7 +2007,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$28, root$28 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$28, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$28, JSCompiler_inline_result)); root$28 = root$28.next; @@ -2074,39 +2083,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; @@ -8760,7 +8768,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; } @@ -11100,7 +11108,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11128,179 +11136,181 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -11349,7 +11359,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11413,20 +11423,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -11470,9 +11480,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 = @@ -11590,7 +11598,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)) || @@ -11599,10 +11609,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(), @@ -11620,32 +11630,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$198) { - handleThrow(root, thrownValue$198); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); lanes && root.shellSuspendCounter++; @@ -11653,12 +11677,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); @@ -11680,12 +11704,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 { @@ -11771,8 +11790,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -12165,7 +12184,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$205 = rootWithPendingPassiveEffects, + var root$210 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12180,7 +12199,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$205, remainingLanes); + releaseRootPooledCache(root$210, remainingLanes); } } return !1; @@ -12890,9 +12909,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$210 = 0; - 31 > index$210; - index$210++ + var map = new Map(), lane = 1, index$215 = 0; + 31 > index$215; + index$215++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13466,19 +13485,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$368; + var JSCompiler_inline_result$jscomp$373; if (canUseDOM) { - var isSupported$jscomp$inline_1603 = "oninput" in document; - if (!isSupported$jscomp$inline_1603) { - var element$jscomp$inline_1604 = document.createElement("div"); - element$jscomp$inline_1604.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1603 = - "function" === typeof element$jscomp$inline_1604.oninput; + var isSupported$jscomp$inline_1610 = "oninput" in document; + if (!isSupported$jscomp$inline_1610) { + var element$jscomp$inline_1611 = document.createElement("div"); + element$jscomp$inline_1611.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1610 = + "function" === typeof element$jscomp$inline_1611.oninput; } - JSCompiler_inline_result$jscomp$368 = isSupported$jscomp$inline_1603; - } else JSCompiler_inline_result$jscomp$368 = !1; + JSCompiler_inline_result$jscomp$373 = isSupported$jscomp$inline_1610; + } else JSCompiler_inline_result$jscomp$373 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$368 && + JSCompiler_inline_result$jscomp$373 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13889,20 +13908,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1644 = 0; - i$jscomp$inline_1644 < simpleEventPluginEvents.length; - i$jscomp$inline_1644++ + var i$jscomp$inline_1651 = 0; + i$jscomp$inline_1651 < simpleEventPluginEvents.length; + i$jscomp$inline_1651++ ) { - var eventName$jscomp$inline_1645 = - simpleEventPluginEvents[i$jscomp$inline_1644], - domEventName$jscomp$inline_1646 = - eventName$jscomp$inline_1645.toLowerCase(), - capitalizedEvent$jscomp$inline_1647 = - eventName$jscomp$inline_1645[0].toUpperCase() + - eventName$jscomp$inline_1645.slice(1); + var eventName$jscomp$inline_1652 = + simpleEventPluginEvents[i$jscomp$inline_1651], + domEventName$jscomp$inline_1653 = + eventName$jscomp$inline_1652.toLowerCase(), + capitalizedEvent$jscomp$inline_1654 = + eventName$jscomp$inline_1652[0].toUpperCase() + + eventName$jscomp$inline_1652.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1646, - "on" + capitalizedEvent$jscomp$inline_1647 + domEventName$jscomp$inline_1653, + "on" + capitalizedEvent$jscomp$inline_1654 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15191,34 +15210,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( @@ -15354,14 +15373,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 @@ -15409,14 +15428,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; @@ -15445,7 +15464,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$243, + propKey$248, propKey, nextProps, lastProp @@ -15464,7 +15483,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]), @@ -15495,7 +15514,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$243 = type; + propKey$248 = type; break; case "defaultValue": defaultValue = type; @@ -15516,15 +15535,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]), @@ -15548,7 +15567,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$243 = name; + propKey$248 = name; break; case "defaultValue": propKey = name; @@ -15562,17 +15581,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; @@ -15580,33 +15599,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 ); @@ -15627,24 +15646,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: @@ -15652,7 +15671,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$243, + propKey$248, nextProps, propKey ); @@ -15660,49 +15679,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; @@ -16280,26 +16299,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$282 = getResourcesFromRoot( + var styles$287 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$283 = styles$282.get(type); - resource$283 || + resource$288 = styles$287.get(type); + resource$288 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$283 = { + (resource$288 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$282.set(type, resource$283), - (styles$282 = JSCompiler_inline_result.querySelector( + styles$287.set(type, resource$288), + (styles$287 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$282._p && - ((resource$283.instance = styles$282), - (resource$283.state.loading = 5)), + !styles$287._p && + ((resource$288.instance = styles$287), + (resource$288.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16312,16 +16331,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$282 || + styles$287 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$283.state + resource$288.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$283; + return resource$288; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16418,37 +16437,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$288 = hoistableRoot.querySelector( + var instance$293 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$288) + if (instance$293) return ( (resource.state.loading |= 4), - (resource.instance = instance$288), - markNodeAsHoistable(instance$288), - instance$288 + (resource.instance = instance$293), + markNodeAsHoistable(instance$293), + instance$293 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$288 = ( + instance$293 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$288); - var linkInstance = instance$288; + markNodeAsHoistable(instance$293); + var linkInstance = instance$293; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$288, "link", instance); + setInitialProperties(instance$293, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$288, props.precedence, hoistableRoot); - return (resource.instance = instance$288); + insertStylesheet(instance$293, props.precedence, hoistableRoot); + return (resource.instance = instance$293); case "script": - instance$288 = getScriptKey(props.src); + instance$293 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$288) + getScriptSelectorFromKey(instance$293) )) ) return ( @@ -16457,7 +16476,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$288))) + if ((styleProps = preloadPropsMap.get(instance$293))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17460,16 +17479,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1817 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1824 = React.version; if ( - "19.0.0-www-modern-682a103c-20241107" !== - isomorphicReactPackageVersion$jscomp$inline_1817 + "19.0.0-www-modern-989af12f-20241108" !== + isomorphicReactPackageVersion$jscomp$inline_1824 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1817, - "19.0.0-www-modern-682a103c-20241107" + isomorphicReactPackageVersion$jscomp$inline_1824, + "19.0.0-www-modern-989af12f-20241108" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17485,28 +17504,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1819 = { +var internals$jscomp$inline_1826 = { bundleType: 0, - version: "19.0.0-www-modern-682a103c-20241107", + version: "19.0.0-www-modern-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1819.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1819.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1826.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1826.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2312 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2319 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2312.isDisabled && - hook$jscomp$inline_2312.supportsFiber + !hook$jscomp$inline_2319.isDisabled && + hook$jscomp$inline_2319.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2312.inject( - internals$jscomp$inline_1819 + (rendererID = hook$jscomp$inline_2319.inject( + internals$jscomp$inline_1826 )), - (injectedHook = hook$jscomp$inline_2312); + (injectedHook = hook$jscomp$inline_2319); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17857,7 +17876,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-682a103c-20241107"; +exports.version = "19.0.0-www-modern-989af12f-20241108"; "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 56286680e83bb..ad282e184b8ce 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -8991,5 +8991,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-682a103c-20241107"; + exports.version = "19.0.0-www-classic-989af12f-20241108"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 8e92935410b2b..974fa9f76a529 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8809,5 +8809,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-682a103c-20241107"; + exports.version = "19.0.0-www-modern-989af12f-20241108"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 348b58cfaedb5..f62e1cc8e7654 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5910,4 +5910,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-682a103c-20241107"; +exports.version = "19.0.0-www-classic-989af12f-20241108"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 4f2124ff04413..a3ff69f11c4ff 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5822,4 +5822,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-682a103c-20241107"; +exports.version = "19.0.0-www-modern-989af12f-20241108"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 240a689e474dd..b9e553b4e3926 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -964,6 +964,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: @@ -3938,7 +3946,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -4015,45 +4024,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; @@ -9130,32 +9140,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2492; - var JSCompiler_object_inline_stack_2493 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2494; + var JSCompiler_object_inline_stack_2495 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2494 = !1; + var JSCompiler_object_inline_componentStack_2496 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2492 = didSuspend) || - (JSCompiler_object_inline_digest_2492 = + (JSCompiler_object_inline_digest_2494 = didSuspend) || + (JSCompiler_object_inline_digest_2494 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2492 && - ((JSCompiler_object_inline_componentStack_2494 = !0), + JSCompiler_object_inline_digest_2494 && + ((JSCompiler_object_inline_componentStack_2496 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2492 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2494 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2494 + JSCompiler_object_inline_componentStack_2496 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2491 = nextHydratableInstance; + var JSCompiler_object_inline_message_2493 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2491)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2493)) { c: { - var instance = JSCompiler_object_inline_message_2491; + var instance = JSCompiler_object_inline_message_2493; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9196,19 +9206,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2491 + JSCompiler_object_inline_message_2493 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2491 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2493 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2491 && - ((JSCompiler_object_inline_message_2491 = - JSCompiler_object_inline_message_2491.dehydrated), - null !== JSCompiler_object_inline_message_2491) + null !== JSCompiler_object_inline_message_2493 && + ((JSCompiler_object_inline_message_2493 = + JSCompiler_object_inline_message_2493.dehydrated), + null !== JSCompiler_object_inline_message_2493) ) return ( - JSCompiler_object_inline_message_2491.data === + JSCompiler_object_inline_message_2493.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9216,27 +9226,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2491 = - JSCompiler_object_inline_stack_2493.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2493.fallback; - if (JSCompiler_object_inline_componentStack_2494) + JSCompiler_object_inline_message_2493 = + JSCompiler_object_inline_stack_2495.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2495.fallback; + if (JSCompiler_object_inline_componentStack_2496) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2493 = + (JSCompiler_object_inline_stack_2495 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2491, + JSCompiler_object_inline_message_2493, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2494 = + (JSCompiler_object_inline_componentStack_2496 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2494.memoizedState = + (JSCompiler_object_inline_componentStack_2496.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2494.childLanes = + (JSCompiler_object_inline_componentStack_2496.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2492, + JSCompiler_object_inline_digest_2494, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9249,9 +9259,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2494.updateQueue), + JSCompiler_object_inline_componentStack_2496.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2494.updateQueue = + ? (JSCompiler_object_inline_componentStack_2496.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9259,46 +9269,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2493 + JSCompiler_object_inline_stack_2495 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2493.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2495.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2493 = + (JSCompiler_object_inline_stack_2495 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2491, + JSCompiler_object_inline_message_2493, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2494 = + (JSCompiler_object_inline_componentStack_2496 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2494.memoizedState = + (JSCompiler_object_inline_componentStack_2496.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2494.childLanes = + (JSCompiler_object_inline_componentStack_2496.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2492, + JSCompiler_object_inline_digest_2494, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2493 + JSCompiler_object_inline_stack_2495 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2491 + JSCompiler_object_inline_message_2493 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2491 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2491) + ((JSCompiler_object_inline_message_2493 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2493) ) { if (didSuspend) workInProgress.flags & 256 @@ -9315,95 +9325,95 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2494 = - JSCompiler_object_inline_stack_2493.fallback), - (JSCompiler_object_inline_message_2491 = workInProgress.mode), - (JSCompiler_object_inline_stack_2493 = + (JSCompiler_object_inline_componentStack_2496 = + JSCompiler_object_inline_stack_2495.fallback), + (JSCompiler_object_inline_message_2493 = workInProgress.mode), + (JSCompiler_object_inline_stack_2495 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2493.children + children: JSCompiler_object_inline_stack_2495.children }, - JSCompiler_object_inline_message_2491 + JSCompiler_object_inline_message_2493 )), - (JSCompiler_object_inline_componentStack_2494 = + (JSCompiler_object_inline_componentStack_2496 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2494, - JSCompiler_object_inline_message_2491, + JSCompiler_object_inline_componentStack_2496, + JSCompiler_object_inline_message_2493, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2494.flags |= 2), - (JSCompiler_object_inline_stack_2493.return = workInProgress), - (JSCompiler_object_inline_componentStack_2494.return = + (JSCompiler_object_inline_componentStack_2496.flags |= 2), + (JSCompiler_object_inline_stack_2495.return = workInProgress), + (JSCompiler_object_inline_componentStack_2496.return = workInProgress), - (JSCompiler_object_inline_stack_2493.sibling = - JSCompiler_object_inline_componentStack_2494), - (workInProgress.child = JSCompiler_object_inline_stack_2493), + (JSCompiler_object_inline_stack_2495.sibling = + JSCompiler_object_inline_componentStack_2496), + (workInProgress.child = JSCompiler_object_inline_stack_2495), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2493 = workInProgress.child), - (JSCompiler_object_inline_stack_2493.memoizedState = + (JSCompiler_object_inline_stack_2495 = workInProgress.child), + (JSCompiler_object_inline_stack_2495.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2493.childLanes = + (JSCompiler_object_inline_stack_2495.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2492, + JSCompiler_object_inline_digest_2494, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2494)); + JSCompiler_object_inline_componentStack_2496)); 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_2491.data === + JSCompiler_object_inline_message_2493.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2492 = - JSCompiler_object_inline_message_2491.nextSibling && - JSCompiler_object_inline_message_2491.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2492) { - JSCompiler_temp = JSCompiler_object_inline_digest_2492.dgst; - var message = JSCompiler_object_inline_digest_2492.msg; - instance = JSCompiler_object_inline_digest_2492.stck; - var componentStack = JSCompiler_object_inline_digest_2492.cstck; + JSCompiler_object_inline_digest_2494 = + JSCompiler_object_inline_message_2493.nextSibling && + JSCompiler_object_inline_message_2493.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2494) { + JSCompiler_temp = JSCompiler_object_inline_digest_2494.dgst; + var message = JSCompiler_object_inline_digest_2494.msg; + instance = JSCompiler_object_inline_digest_2494.stck; + var componentStack = JSCompiler_object_inline_digest_2494.cstck; } - JSCompiler_object_inline_message_2491 = message; - JSCompiler_object_inline_digest_2492 = JSCompiler_temp; - JSCompiler_object_inline_stack_2493 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2494 = + JSCompiler_object_inline_message_2493 = message; + JSCompiler_object_inline_digest_2494 = JSCompiler_temp; + JSCompiler_object_inline_stack_2495 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2496 = componentStack; - JSCompiler_object_inline_componentStack_2494 = - JSCompiler_object_inline_message_2491 - ? Error(JSCompiler_object_inline_message_2491) + JSCompiler_object_inline_componentStack_2496 = + JSCompiler_object_inline_message_2493 + ? Error(JSCompiler_object_inline_message_2493) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2494.stack = - JSCompiler_object_inline_stack_2493 || ""; - JSCompiler_object_inline_componentStack_2494.digest = - JSCompiler_object_inline_digest_2492; - JSCompiler_object_inline_digest_2492 = + JSCompiler_object_inline_componentStack_2496.stack = + JSCompiler_object_inline_stack_2495 || ""; + JSCompiler_object_inline_componentStack_2496.digest = + JSCompiler_object_inline_digest_2494; + JSCompiler_object_inline_digest_2494 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2493 = { - value: JSCompiler_object_inline_componentStack_2494, + JSCompiler_object_inline_stack_2495 = { + value: JSCompiler_object_inline_componentStack_2496, source: null, - stack: JSCompiler_object_inline_digest_2492 + stack: JSCompiler_object_inline_digest_2494 }; - "string" === typeof JSCompiler_object_inline_digest_2492 && + "string" === typeof JSCompiler_object_inline_digest_2494 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2494, - JSCompiler_object_inline_stack_2493 + JSCompiler_object_inline_componentStack_2496, + JSCompiler_object_inline_stack_2495 ); - queueHydrationError(JSCompiler_object_inline_stack_2493); + queueHydrationError(JSCompiler_object_inline_stack_2495); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9417,25 +9427,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2492 = + (JSCompiler_object_inline_digest_2494 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2492) + didReceiveUpdate || JSCompiler_object_inline_digest_2494) ) { - JSCompiler_object_inline_digest_2492 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2492) { - JSCompiler_object_inline_stack_2493 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2493 & 42)) - JSCompiler_object_inline_stack_2493 = 1; + JSCompiler_object_inline_digest_2494 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2494) { + JSCompiler_object_inline_stack_2495 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2495 & 42)) + JSCompiler_object_inline_stack_2495 = 1; else - switch (JSCompiler_object_inline_stack_2493) { + switch (JSCompiler_object_inline_stack_2495) { case 2: - JSCompiler_object_inline_stack_2493 = 1; + JSCompiler_object_inline_stack_2495 = 1; break; case 8: - JSCompiler_object_inline_stack_2493 = 4; + JSCompiler_object_inline_stack_2495 = 4; break; case 32: - JSCompiler_object_inline_stack_2493 = 16; + JSCompiler_object_inline_stack_2495 = 16; break; case 128: case 256: @@ -9456,40 +9466,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2493 = 64; + JSCompiler_object_inline_stack_2495 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2493 = 134217728; + JSCompiler_object_inline_stack_2495 = 134217728; break; default: - JSCompiler_object_inline_stack_2493 = 0; + JSCompiler_object_inline_stack_2495 = 0; } - JSCompiler_object_inline_stack_2493 = + JSCompiler_object_inline_stack_2495 = 0 !== - (JSCompiler_object_inline_stack_2493 & - (JSCompiler_object_inline_digest_2492.suspendedLanes | + (JSCompiler_object_inline_stack_2495 & + (JSCompiler_object_inline_digest_2494.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2493; + : JSCompiler_object_inline_stack_2495; if ( - 0 !== JSCompiler_object_inline_stack_2493 && - JSCompiler_object_inline_stack_2493 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2495 && + JSCompiler_object_inline_stack_2495 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2493), + ((prevState.retryLane = JSCompiler_object_inline_stack_2495), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2493 + JSCompiler_object_inline_stack_2495 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2492, + JSCompiler_object_inline_digest_2494, current, - JSCompiler_object_inline_stack_2493 + JSCompiler_object_inline_stack_2495 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2491.data === + JSCompiler_object_inline_message_2493.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9497,7 +9507,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2491.data === + JSCompiler_object_inline_message_2493.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9505,12 +9515,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2491._reactRetry = + (JSCompiler_object_inline_message_2493._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2491.nextSibling + JSCompiler_object_inline_message_2493.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9528,57 +9538,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2493.children + JSCompiler_object_inline_stack_2495.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2494) + if (JSCompiler_object_inline_componentStack_2496) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2494 = - JSCompiler_object_inline_stack_2493.fallback), - (JSCompiler_object_inline_message_2491 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2496 = + JSCompiler_object_inline_stack_2495.fallback), + (JSCompiler_object_inline_message_2493 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2493 = createWorkInProgress( + (JSCompiler_object_inline_stack_2495 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2493.children + children: JSCompiler_object_inline_stack_2495.children } )), - (JSCompiler_object_inline_stack_2493.subtreeFlags = + (JSCompiler_object_inline_stack_2495.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2494 = + ? (JSCompiler_object_inline_componentStack_2496 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2494 + JSCompiler_object_inline_componentStack_2496 )) - : ((JSCompiler_object_inline_componentStack_2494 = + : ((JSCompiler_object_inline_componentStack_2496 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2494, - JSCompiler_object_inline_message_2491, + JSCompiler_object_inline_componentStack_2496, + JSCompiler_object_inline_message_2493, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2494.flags |= 2)), - (JSCompiler_object_inline_componentStack_2494.return = + (JSCompiler_object_inline_componentStack_2496.flags |= 2)), + (JSCompiler_object_inline_componentStack_2496.return = workInProgress), - (JSCompiler_object_inline_stack_2493.return = workInProgress), - (JSCompiler_object_inline_stack_2493.sibling = - JSCompiler_object_inline_componentStack_2494), - (workInProgress.child = JSCompiler_object_inline_stack_2493), - (JSCompiler_object_inline_stack_2493 = - JSCompiler_object_inline_componentStack_2494), - (JSCompiler_object_inline_componentStack_2494 = workInProgress.child), - (JSCompiler_object_inline_message_2491 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2491 - ? (JSCompiler_object_inline_message_2491 = + (JSCompiler_object_inline_stack_2495.return = workInProgress), + (JSCompiler_object_inline_stack_2495.sibling = + JSCompiler_object_inline_componentStack_2496), + (workInProgress.child = JSCompiler_object_inline_stack_2495), + (JSCompiler_object_inline_stack_2495 = + JSCompiler_object_inline_componentStack_2496), + (JSCompiler_object_inline_componentStack_2496 = workInProgress.child), + (JSCompiler_object_inline_message_2493 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2493 + ? (JSCompiler_object_inline_message_2493 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2491.cachePool), + JSCompiler_object_inline_message_2493.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9586,34 +9596,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2491 = { + (JSCompiler_object_inline_message_2493 = { baseLanes: - JSCompiler_object_inline_message_2491.baseLanes | renderLanes, + JSCompiler_object_inline_message_2493.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2494.memoizedState = - JSCompiler_object_inline_message_2491), + (JSCompiler_object_inline_componentStack_2496.memoizedState = + JSCompiler_object_inline_message_2493), enableTransitionTracing && - ((JSCompiler_object_inline_message_2491 = enableTransitionTracing + ((JSCompiler_object_inline_message_2493 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2491 && + null !== JSCompiler_object_inline_message_2493 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2494.updateQueue), + JSCompiler_object_inline_componentStack_2496.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2494.updateQueue = { - transitions: JSCompiler_object_inline_message_2491, + ? (JSCompiler_object_inline_componentStack_2496.updateQueue = { + transitions: JSCompiler_object_inline_message_2493, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2494.updateQueue = + ? (JSCompiler_object_inline_componentStack_2496.updateQueue = { - transitions: JSCompiler_object_inline_message_2491, + transitions: JSCompiler_object_inline_message_2493, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9621,32 +9631,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2491), + JSCompiler_object_inline_message_2493), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2494.childLanes = + (JSCompiler_object_inline_componentStack_2496.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2492, + JSCompiler_object_inline_digest_2494, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2493 + JSCompiler_object_inline_stack_2495 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2493.children + children: JSCompiler_object_inline_stack_2495.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2492 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2492 + ((JSCompiler_object_inline_digest_2494 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2494 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2492.push(current)); + : JSCompiler_object_inline_digest_2494.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -15489,7 +15499,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15547,7 +15557,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -15555,191 +15565,195 @@ __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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + 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 - ); - 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; } + renderWasConcurrent = !1; + 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) { @@ -15788,7 +15802,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15855,20 +15874,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -15912,11 +15931,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 = @@ -16040,7 +16055,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -16049,10 +16066,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -16074,37 +16091,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); @@ -16115,16 +16141,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); @@ -16149,12 +16172,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 @@ -27449,11 +27470,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-682a103c-20241107" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-989af12f-20241108" !== 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-682a103c-20241107\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-989af12f-20241108\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27496,11 +27517,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-682a103c-20241107", + version: "19.0.0-www-classic-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28271,5 +28292,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-682a103c-20241107"; + exports.version = "19.0.0-www-classic-989af12f-20241108"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 1fa859119321f..f620a27da14b2 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -964,6 +964,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: @@ -3825,7 +3833,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -3902,45 +3911,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 +8952,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2484; - var JSCompiler_object_inline_stack_2485 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2486; + var JSCompiler_object_inline_stack_2487 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2486 = !1; + var JSCompiler_object_inline_componentStack_2488 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2484 = didSuspend) || - (JSCompiler_object_inline_digest_2484 = + (JSCompiler_object_inline_digest_2486 = didSuspend) || + (JSCompiler_object_inline_digest_2486 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2484 && - ((JSCompiler_object_inline_componentStack_2486 = !0), + JSCompiler_object_inline_digest_2486 && + ((JSCompiler_object_inline_componentStack_2488 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2484 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2486 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2486 + JSCompiler_object_inline_componentStack_2488 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2483 = nextHydratableInstance; + var JSCompiler_object_inline_message_2485 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2483)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2485)) { c: { - var instance = JSCompiler_object_inline_message_2483; + var instance = JSCompiler_object_inline_message_2485; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9008,19 +9018,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2483 + JSCompiler_object_inline_message_2485 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2483 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2485 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2483 && - ((JSCompiler_object_inline_message_2483 = - JSCompiler_object_inline_message_2483.dehydrated), - null !== JSCompiler_object_inline_message_2483) + null !== JSCompiler_object_inline_message_2485 && + ((JSCompiler_object_inline_message_2485 = + JSCompiler_object_inline_message_2485.dehydrated), + null !== JSCompiler_object_inline_message_2485) ) return ( - JSCompiler_object_inline_message_2483.data === + JSCompiler_object_inline_message_2485.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9028,27 +9038,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - 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) + JSCompiler_object_inline_message_2485 = + JSCompiler_object_inline_stack_2487.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2487.fallback; + if (JSCompiler_object_inline_componentStack_2488) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2485 = + (JSCompiler_object_inline_stack_2487 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_message_2485, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2486 = + (JSCompiler_object_inline_componentStack_2488 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2486.memoizedState = + (JSCompiler_object_inline_componentStack_2488.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2486.childLanes = + (JSCompiler_object_inline_componentStack_2488.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2486, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9061,9 +9071,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2486.updateQueue), + JSCompiler_object_inline_componentStack_2488.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2486.updateQueue = + ? (JSCompiler_object_inline_componentStack_2488.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9071,46 +9081,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2487 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2485.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2487.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2485 = + (JSCompiler_object_inline_stack_2487 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_message_2485, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2486 = + (JSCompiler_object_inline_componentStack_2488 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2486.memoizedState = + (JSCompiler_object_inline_componentStack_2488.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2486.childLanes = + (JSCompiler_object_inline_componentStack_2488.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2486, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2487 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2483 + JSCompiler_object_inline_message_2485 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2483 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2483) + ((JSCompiler_object_inline_message_2485 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2485) ) { if (didSuspend) workInProgress.flags & 256 @@ -9127,95 +9137,95 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2486 = - JSCompiler_object_inline_stack_2485.fallback), - (JSCompiler_object_inline_message_2483 = workInProgress.mode), - (JSCompiler_object_inline_stack_2485 = + (JSCompiler_object_inline_componentStack_2488 = + JSCompiler_object_inline_stack_2487.fallback), + (JSCompiler_object_inline_message_2485 = workInProgress.mode), + (JSCompiler_object_inline_stack_2487 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2485.children + children: JSCompiler_object_inline_stack_2487.children }, - JSCompiler_object_inline_message_2483 + JSCompiler_object_inline_message_2485 )), - (JSCompiler_object_inline_componentStack_2486 = + (JSCompiler_object_inline_componentStack_2488 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2486, - JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_componentStack_2488, + JSCompiler_object_inline_message_2485, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2486.flags |= 2), - (JSCompiler_object_inline_stack_2485.return = workInProgress), - (JSCompiler_object_inline_componentStack_2486.return = + (JSCompiler_object_inline_componentStack_2488.flags |= 2), + (JSCompiler_object_inline_stack_2487.return = workInProgress), + (JSCompiler_object_inline_componentStack_2488.return = workInProgress), - (JSCompiler_object_inline_stack_2485.sibling = - JSCompiler_object_inline_componentStack_2486), - (workInProgress.child = JSCompiler_object_inline_stack_2485), + (JSCompiler_object_inline_stack_2487.sibling = + JSCompiler_object_inline_componentStack_2488), + (workInProgress.child = JSCompiler_object_inline_stack_2487), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2485 = workInProgress.child), - (JSCompiler_object_inline_stack_2485.memoizedState = + (JSCompiler_object_inline_stack_2487 = workInProgress.child), + (JSCompiler_object_inline_stack_2487.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2485.childLanes = + (JSCompiler_object_inline_stack_2487.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2486, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2486)); + JSCompiler_object_inline_componentStack_2488)); 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_2483.data === + JSCompiler_object_inline_message_2485.data === SUSPENSE_FALLBACK_START_DATA) ) { - 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_digest_2486 = + JSCompiler_object_inline_message_2485.nextSibling && + JSCompiler_object_inline_message_2485.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2486) { + JSCompiler_temp = JSCompiler_object_inline_digest_2486.dgst; + var message = JSCompiler_object_inline_digest_2486.msg; + instance = JSCompiler_object_inline_digest_2486.stck; + var componentStack = JSCompiler_object_inline_digest_2486.cstck; } - JSCompiler_object_inline_message_2483 = message; - JSCompiler_object_inline_digest_2484 = JSCompiler_temp; - JSCompiler_object_inline_stack_2485 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_message_2485 = message; + JSCompiler_object_inline_digest_2486 = JSCompiler_temp; + JSCompiler_object_inline_stack_2487 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2488 = componentStack; - JSCompiler_object_inline_componentStack_2486 = - JSCompiler_object_inline_message_2483 - ? Error(JSCompiler_object_inline_message_2483) + JSCompiler_object_inline_componentStack_2488 = + JSCompiler_object_inline_message_2485 + ? Error(JSCompiler_object_inline_message_2485) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2486.stack = - JSCompiler_object_inline_stack_2485 || ""; - JSCompiler_object_inline_componentStack_2486.digest = - JSCompiler_object_inline_digest_2484; - JSCompiler_object_inline_digest_2484 = + JSCompiler_object_inline_componentStack_2488.stack = + JSCompiler_object_inline_stack_2487 || ""; + JSCompiler_object_inline_componentStack_2488.digest = + JSCompiler_object_inline_digest_2486; + JSCompiler_object_inline_digest_2486 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2485 = { - value: JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_stack_2487 = { + value: JSCompiler_object_inline_componentStack_2488, source: null, - stack: JSCompiler_object_inline_digest_2484 + stack: JSCompiler_object_inline_digest_2486 }; - "string" === typeof JSCompiler_object_inline_digest_2484 && + "string" === typeof JSCompiler_object_inline_digest_2486 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2486, - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_componentStack_2488, + JSCompiler_object_inline_stack_2487 ); - queueHydrationError(JSCompiler_object_inline_stack_2485); + queueHydrationError(JSCompiler_object_inline_stack_2487); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9229,25 +9239,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2484 = + (JSCompiler_object_inline_digest_2486 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2484) + didReceiveUpdate || JSCompiler_object_inline_digest_2486) ) { - 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; + JSCompiler_object_inline_digest_2486 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2486) { + JSCompiler_object_inline_stack_2487 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2487 & 42)) + JSCompiler_object_inline_stack_2487 = 1; else - switch (JSCompiler_object_inline_stack_2485) { + switch (JSCompiler_object_inline_stack_2487) { case 2: - JSCompiler_object_inline_stack_2485 = 1; + JSCompiler_object_inline_stack_2487 = 1; break; case 8: - JSCompiler_object_inline_stack_2485 = 4; + JSCompiler_object_inline_stack_2487 = 4; break; case 32: - JSCompiler_object_inline_stack_2485 = 16; + JSCompiler_object_inline_stack_2487 = 16; break; case 128: case 256: @@ -9268,40 +9278,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2485 = 64; + JSCompiler_object_inline_stack_2487 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2485 = 134217728; + JSCompiler_object_inline_stack_2487 = 134217728; break; default: - JSCompiler_object_inline_stack_2485 = 0; + JSCompiler_object_inline_stack_2487 = 0; } - JSCompiler_object_inline_stack_2485 = + JSCompiler_object_inline_stack_2487 = 0 !== - (JSCompiler_object_inline_stack_2485 & - (JSCompiler_object_inline_digest_2484.suspendedLanes | + (JSCompiler_object_inline_stack_2487 & + (JSCompiler_object_inline_digest_2486.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2485; + : JSCompiler_object_inline_stack_2487; if ( - 0 !== JSCompiler_object_inline_stack_2485 && - JSCompiler_object_inline_stack_2485 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2487 && + JSCompiler_object_inline_stack_2487 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2485), + ((prevState.retryLane = JSCompiler_object_inline_stack_2487), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2487 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2486, current, - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2487 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2483.data === + JSCompiler_object_inline_message_2485.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9309,7 +9319,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2483.data === + JSCompiler_object_inline_message_2485.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9317,12 +9327,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2483._reactRetry = + (JSCompiler_object_inline_message_2485._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2483.nextSibling + JSCompiler_object_inline_message_2485.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9340,57 +9350,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2485.children + JSCompiler_object_inline_stack_2487.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2486) + if (JSCompiler_object_inline_componentStack_2488) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2486 = - JSCompiler_object_inline_stack_2485.fallback), - (JSCompiler_object_inline_message_2483 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2488 = + JSCompiler_object_inline_stack_2487.fallback), + (JSCompiler_object_inline_message_2485 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2485 = createWorkInProgress( + (JSCompiler_object_inline_stack_2487 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2485.children + children: JSCompiler_object_inline_stack_2487.children } )), - (JSCompiler_object_inline_stack_2485.subtreeFlags = + (JSCompiler_object_inline_stack_2487.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2486 = + ? (JSCompiler_object_inline_componentStack_2488 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2486 + JSCompiler_object_inline_componentStack_2488 )) - : ((JSCompiler_object_inline_componentStack_2486 = + : ((JSCompiler_object_inline_componentStack_2488 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2486, - JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_componentStack_2488, + JSCompiler_object_inline_message_2485, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2486.flags |= 2)), - (JSCompiler_object_inline_componentStack_2486.return = + (JSCompiler_object_inline_componentStack_2488.flags |= 2)), + (JSCompiler_object_inline_componentStack_2488.return = workInProgress), - (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 = + (JSCompiler_object_inline_stack_2487.return = workInProgress), + (JSCompiler_object_inline_stack_2487.sibling = + JSCompiler_object_inline_componentStack_2488), + (workInProgress.child = JSCompiler_object_inline_stack_2487), + (JSCompiler_object_inline_stack_2487 = + JSCompiler_object_inline_componentStack_2488), + (JSCompiler_object_inline_componentStack_2488 = workInProgress.child), + (JSCompiler_object_inline_message_2485 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2485 + ? (JSCompiler_object_inline_message_2485 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2483.cachePool), + JSCompiler_object_inline_message_2485.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9398,34 +9408,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2483 = { + (JSCompiler_object_inline_message_2485 = { baseLanes: - JSCompiler_object_inline_message_2483.baseLanes | renderLanes, + JSCompiler_object_inline_message_2485.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2486.memoizedState = - JSCompiler_object_inline_message_2483), + (JSCompiler_object_inline_componentStack_2488.memoizedState = + JSCompiler_object_inline_message_2485), enableTransitionTracing && - ((JSCompiler_object_inline_message_2483 = enableTransitionTracing + ((JSCompiler_object_inline_message_2485 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2483 && + null !== JSCompiler_object_inline_message_2485 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2486.updateQueue), + JSCompiler_object_inline_componentStack_2488.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { - transitions: JSCompiler_object_inline_message_2483, + ? (JSCompiler_object_inline_componentStack_2488.updateQueue = { + transitions: JSCompiler_object_inline_message_2485, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2486.updateQueue = + ? (JSCompiler_object_inline_componentStack_2488.updateQueue = { - transitions: JSCompiler_object_inline_message_2483, + transitions: JSCompiler_object_inline_message_2485, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9433,32 +9443,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2483), + JSCompiler_object_inline_message_2485), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2486.childLanes = + (JSCompiler_object_inline_componentStack_2488.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2486, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2487 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2485.children + children: JSCompiler_object_inline_stack_2487.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2484 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2484 + ((JSCompiler_object_inline_digest_2486 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2486 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2484.push(current)); + : JSCompiler_object_inline_digest_2486.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -15288,7 +15298,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -15346,7 +15356,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -15354,191 +15364,195 @@ __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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + 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 - ); - 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; } + renderWasConcurrent = !1; + 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) { @@ -15587,7 +15601,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -15654,20 +15673,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -15711,11 +15730,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 = @@ -15839,7 +15854,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -15848,10 +15865,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -15873,37 +15890,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); @@ -15914,16 +15940,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); @@ -15948,12 +15971,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 @@ -27228,11 +27249,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-682a103c-20241107" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-989af12f-20241108" !== 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-682a103c-20241107\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-989af12f-20241108\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27275,11 +27296,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-682a103c-20241107", + version: "19.0.0-www-modern-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28050,5 +28071,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-682a103c-20241107"; + exports.version = "19.0.0-www-modern-989af12f-20241108"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index a4e989e5e8486..3072566a5da2c 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -672,6 +672,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: @@ -2069,7 +2077,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$26, root$26 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$26, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); root$26 = root$26.next; @@ -2144,39 +2153,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; @@ -8652,7 +8660,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$196) { + } catch (e$201) { JSCompiler_temp = null; break a; } @@ -11088,7 +11096,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -11115,179 +11123,181 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -11336,7 +11346,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11400,20 +11410,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -11457,9 +11467,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 = @@ -11547,7 +11555,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)) || @@ -11556,10 +11566,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(), @@ -11568,6 +11578,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) { @@ -11576,24 +11587,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$184) { - handleThrow(root, thrownValue$184); + } catch (thrownValue$189) { + handleThrow(root, thrownValue$189); } while (1); lanes && root.shellSuspendCounter++; @@ -11601,11 +11625,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); @@ -11619,12 +11643,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) { @@ -11708,8 +11730,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$186) { - handleThrow(root, thrownValue$186); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -12059,7 +12081,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$191 = rootWithPendingPassiveEffects, + var root$196 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12074,7 +12096,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$191, remainingLanes); + releaseRootPooledCache(root$196, remainingLanes); } } return !1; @@ -13310,19 +13332,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$350; + var JSCompiler_inline_result$jscomp$355; if (canUseDOM) { - var isSupported$jscomp$inline_1549 = "oninput" in document; - if (!isSupported$jscomp$inline_1549) { - var element$jscomp$inline_1550 = document.createElement("div"); - element$jscomp$inline_1550.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1549 = - "function" === typeof element$jscomp$inline_1550.oninput; + var isSupported$jscomp$inline_1556 = "oninput" in document; + if (!isSupported$jscomp$inline_1556) { + var element$jscomp$inline_1557 = document.createElement("div"); + element$jscomp$inline_1557.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1556 = + "function" === typeof element$jscomp$inline_1557.oninput; } - JSCompiler_inline_result$jscomp$350 = isSupported$jscomp$inline_1549; - } else JSCompiler_inline_result$jscomp$350 = !1; + JSCompiler_inline_result$jscomp$355 = isSupported$jscomp$inline_1556; + } else JSCompiler_inline_result$jscomp$355 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$350 && + JSCompiler_inline_result$jscomp$355 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13733,20 +13755,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1590 = 0; - i$jscomp$inline_1590 < simpleEventPluginEvents.length; - i$jscomp$inline_1590++ + var i$jscomp$inline_1597 = 0; + i$jscomp$inline_1597 < simpleEventPluginEvents.length; + i$jscomp$inline_1597++ ) { - var eventName$jscomp$inline_1591 = - simpleEventPluginEvents[i$jscomp$inline_1590], - domEventName$jscomp$inline_1592 = - eventName$jscomp$inline_1591.toLowerCase(), - capitalizedEvent$jscomp$inline_1593 = - eventName$jscomp$inline_1591[0].toUpperCase() + - eventName$jscomp$inline_1591.slice(1); + var eventName$jscomp$inline_1598 = + simpleEventPluginEvents[i$jscomp$inline_1597], + domEventName$jscomp$inline_1599 = + eventName$jscomp$inline_1598.toLowerCase(), + capitalizedEvent$jscomp$inline_1600 = + eventName$jscomp$inline_1598[0].toUpperCase() + + eventName$jscomp$inline_1598.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1592, - "on" + capitalizedEvent$jscomp$inline_1593 + domEventName$jscomp$inline_1599, + "on" + capitalizedEvent$jscomp$inline_1600 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15039,34 +15061,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$210 = props[hasSrc]; - if (null != propValue$210) + var propValue$215 = props[hasSrc]; + if (null != propValue$215) switch (hasSrc) { case "name": - hasSrcSet = propValue$210; + hasSrcSet = propValue$215; break; case "type": - propValue = propValue$210; + propValue = propValue$215; break; case "checked": - checked = propValue$210; + checked = propValue$215; break; case "defaultChecked": - defaultChecked = propValue$210; + defaultChecked = propValue$215; break; case "value": - propKey = propValue$210; + propKey = propValue$215; break; case "defaultValue": - defaultValue = propValue$210; + defaultValue = propValue$215; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$210) + if (null != propValue$215) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$210, props, null); + setProp(domElement, tag, hasSrc, propValue$215, props, null); } } initInput( @@ -15203,14 +15225,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$210 in props) - props.hasOwnProperty(propValue$210) && - ((hasSrc = props[propValue$210]), + for (propValue$215 in props) + props.hasOwnProperty(propValue$215) && + ((hasSrc = props[propValue$215]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$210, + propValue$215, hasSrc, props, void 0 @@ -15258,14 +15280,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$227 in nextProps) { - var propKey = nextProps[propKey$227]; - lastProp = lastProps[propKey$227]; + for (var propKey$232 in nextProps) { + var propKey = nextProps[propKey$232]; + lastProp = lastProps[propKey$232]; if ( - nextProps.hasOwnProperty(propKey$227) && + nextProps.hasOwnProperty(propKey$232) && (null != propKey || null != lastProp) ) - switch (propKey$227) { + switch (propKey$232) { case "type": type = propKey; break; @@ -15294,7 +15316,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$227, + propKey$232, propKey, nextProps, lastProp @@ -15313,7 +15335,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$227 = null; + propKey = value = defaultValue = propKey$232 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15344,7 +15366,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$227 = type; + propKey$232 = type; break; case "defaultValue": defaultValue = type; @@ -15365,15 +15387,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$227 - ? updateOptions(domElement, !!lastProps, propKey$227, !1) + null != propKey$232 + ? updateOptions(domElement, !!lastProps, propKey$232, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$227 = null; + propKey = propKey$232 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15397,7 +15419,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$227 = name; + propKey$232 = name; break; case "defaultValue": propKey = name; @@ -15411,17 +15433,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$227, propKey); + updateTextarea(domElement, propKey$232, propKey); return; case "option": - for (var propKey$243 in lastProps) + for (var propKey$248 in lastProps) if ( - ((propKey$227 = lastProps[propKey$243]), - lastProps.hasOwnProperty(propKey$243) && - null != propKey$227 && - !nextProps.hasOwnProperty(propKey$243)) + ((propKey$232 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + null != propKey$232 && + !nextProps.hasOwnProperty(propKey$248)) ) - switch (propKey$243) { + switch (propKey$248) { case "selected": domElement.selected = !1; break; @@ -15429,33 +15451,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$243, + propKey$248, null, nextProps, - propKey$227 + propKey$232 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$227 = nextProps[lastDefaultValue]), + ((propKey$232 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$227 !== propKey && - (null != propKey$227 || null != propKey)) + propKey$232 !== propKey && + (null != propKey$232 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$227 && - "function" !== typeof propKey$227 && - "symbol" !== typeof propKey$227; + propKey$232 && + "function" !== typeof propKey$232 && + "symbol" !== typeof propKey$232; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$227, + propKey$232, nextProps, propKey ); @@ -15476,24 +15498,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$248 in lastProps) - (propKey$227 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$227 && - !nextProps.hasOwnProperty(propKey$248) && - setProp(domElement, tag, propKey$248, null, nextProps, propKey$227); + for (var propKey$253 in lastProps) + (propKey$232 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + null != propKey$232 && + !nextProps.hasOwnProperty(propKey$253) && + setProp(domElement, tag, propKey$253, null, nextProps, propKey$232); for (checked in nextProps) if ( - ((propKey$227 = nextProps[checked]), + ((propKey$232 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$227 !== propKey && - (null != propKey$227 || null != propKey)) + propKey$232 !== propKey && + (null != propKey$232 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$227) + if (null != propKey$232) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15501,7 +15523,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$227, + propKey$232, nextProps, propKey ); @@ -15509,49 +15531,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$253 in lastProps) - (propKey$227 = lastProps[propKey$253]), - lastProps.hasOwnProperty(propKey$253) && - void 0 !== propKey$227 && - !nextProps.hasOwnProperty(propKey$253) && + for (var propKey$258 in lastProps) + (propKey$232 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + void 0 !== propKey$232 && + !nextProps.hasOwnProperty(propKey$258) && setPropOnCustomElement( domElement, tag, - propKey$253, + propKey$258, void 0, nextProps, - propKey$227 + propKey$232 ); for (defaultChecked in nextProps) - (propKey$227 = nextProps[defaultChecked]), + (propKey$232 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$227 === propKey || - (void 0 === propKey$227 && void 0 === propKey) || + propKey$232 === propKey || + (void 0 === propKey$232 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$227, + propKey$232, nextProps, propKey ); return; } } - for (var propKey$258 in lastProps) - (propKey$227 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - null != propKey$227 && - !nextProps.hasOwnProperty(propKey$258) && - setProp(domElement, tag, propKey$258, null, nextProps, propKey$227); + for (var propKey$263 in lastProps) + (propKey$232 = lastProps[propKey$263]), + lastProps.hasOwnProperty(propKey$263) && + null != propKey$232 && + !nextProps.hasOwnProperty(propKey$263) && + setProp(domElement, tag, propKey$263, null, nextProps, propKey$232); for (lastProp in nextProps) - (propKey$227 = nextProps[lastProp]), + (propKey$232 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$227 === propKey || - (null == propKey$227 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$227, nextProps, propKey); + propKey$232 === propKey || + (null == propKey$232 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$232, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16186,26 +16208,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$266 = getResourcesFromRoot( + var styles$271 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$267 = styles$266.get(type); - resource$267 || + resource$272 = styles$271.get(type); + resource$272 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$267 = { + (resource$272 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$266.set(type, resource$267), - (styles$266 = JSCompiler_inline_result.querySelector( + styles$271.set(type, resource$272), + (styles$271 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$266._p && - ((resource$267.instance = styles$266), - (resource$267.state.loading = 5)), + !styles$271._p && + ((resource$272.instance = styles$271), + (resource$272.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16218,16 +16240,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$266 || + styles$271 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$267.state + resource$272.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$267; + return resource$272; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16324,37 +16346,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$272 = hoistableRoot.querySelector( + var instance$277 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$272) + if (instance$277) return ( (resource.state.loading |= 4), - (resource.instance = instance$272), - markNodeAsHoistable(instance$272), - instance$272 + (resource.instance = instance$277), + markNodeAsHoistable(instance$277), + instance$277 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$272 = ( + instance$277 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$272); - var linkInstance = instance$272; + markNodeAsHoistable(instance$277); + var linkInstance = instance$277; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$272, "link", instance); + setInitialProperties(instance$277, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$272, props.precedence, hoistableRoot); - return (resource.instance = instance$272); + insertStylesheet(instance$277, props.precedence, hoistableRoot); + return (resource.instance = instance$277); case "script": - instance$272 = getScriptKey(props.src); + instance$277 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$272) + getScriptSelectorFromKey(instance$277) )) ) return ( @@ -16363,7 +16385,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$272))) + if ((styleProps = preloadPropsMap.get(instance$277))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17366,16 +17388,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1763 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1770 = React.version; if ( - "19.0.0-www-classic-682a103c-20241107" !== - isomorphicReactPackageVersion$jscomp$inline_1763 + "19.0.0-www-classic-989af12f-20241108" !== + isomorphicReactPackageVersion$jscomp$inline_1770 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1763, - "19.0.0-www-classic-682a103c-20241107" + isomorphicReactPackageVersion$jscomp$inline_1770, + "19.0.0-www-classic-989af12f-20241108" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17391,25 +17413,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2312 = { +var internals$jscomp$inline_2319 = { bundleType: 0, - version: "19.0.0-www-classic-682a103c-20241107", + version: "19.0.0-www-classic-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2313 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2320 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2313.isDisabled && - hook$jscomp$inline_2313.supportsFiber + !hook$jscomp$inline_2320.isDisabled && + hook$jscomp$inline_2320.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2313.inject( - internals$jscomp$inline_2312 + (rendererID = hook$jscomp$inline_2320.inject( + internals$jscomp$inline_2319 )), - (injectedHook = hook$jscomp$inline_2313); + (injectedHook = hook$jscomp$inline_2320); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17911,4 +17933,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-682a103c-20241107"; +exports.version = "19.0.0-www-classic-989af12f-20241108"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index fac068ad7887a..decdf89c50aac 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -607,6 +607,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: @@ -1920,7 +1928,8 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { root$26, root$26 === workInProgressRoot ? JSCompiler_inline_result : 0 )), - 0 !== (JSCompiler_inline_result & 3) && + 0 === (JSCompiler_inline_result & 3) || + checkIfRootIsPrerendering(root$26, JSCompiler_inline_result) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); root$26 = root$26.next; @@ -1995,39 +2004,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; @@ -8403,7 +8411,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$196) { + } catch (e$201) { JSCompiler_temp = null; break a; } @@ -10839,7 +10847,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -10866,179 +10874,181 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -11087,7 +11097,7 @@ function commitRootWhenReady( completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -11151,20 +11161,20 @@ function markRootSuspended( root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -11208,9 +11218,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 = @@ -11298,7 +11306,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)) || @@ -11307,10 +11317,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(), @@ -11319,6 +11329,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) { @@ -11327,24 +11338,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$184) { - handleThrow(root, thrownValue$184); + } catch (thrownValue$189) { + handleThrow(root, thrownValue$189); } while (1); lanes && root.shellSuspendCounter++; @@ -11352,11 +11376,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); @@ -11370,12 +11394,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) { @@ -11459,8 +11481,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$186) { - handleThrow(root, thrownValue$186); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -11806,7 +11828,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$191 = rootWithPendingPassiveEffects, + var root$196 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11821,7 +11843,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$191, remainingLanes); + releaseRootPooledCache(root$196, remainingLanes); } } return !1; @@ -13046,19 +13068,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$353; + var JSCompiler_inline_result$jscomp$358; if (canUseDOM) { - var isSupported$jscomp$inline_1539 = "oninput" in document; - if (!isSupported$jscomp$inline_1539) { - var element$jscomp$inline_1540 = document.createElement("div"); - element$jscomp$inline_1540.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1539 = - "function" === typeof element$jscomp$inline_1540.oninput; + var isSupported$jscomp$inline_1546 = "oninput" in document; + if (!isSupported$jscomp$inline_1546) { + var element$jscomp$inline_1547 = document.createElement("div"); + element$jscomp$inline_1547.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1546 = + "function" === typeof element$jscomp$inline_1547.oninput; } - JSCompiler_inline_result$jscomp$353 = isSupported$jscomp$inline_1539; - } else JSCompiler_inline_result$jscomp$353 = !1; + JSCompiler_inline_result$jscomp$358 = isSupported$jscomp$inline_1546; + } else JSCompiler_inline_result$jscomp$358 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$353 && + JSCompiler_inline_result$jscomp$358 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13469,20 +13491,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1580 = 0; - i$jscomp$inline_1580 < simpleEventPluginEvents.length; - i$jscomp$inline_1580++ + var i$jscomp$inline_1587 = 0; + i$jscomp$inline_1587 < simpleEventPluginEvents.length; + i$jscomp$inline_1587++ ) { - var eventName$jscomp$inline_1581 = - simpleEventPluginEvents[i$jscomp$inline_1580], - domEventName$jscomp$inline_1582 = - eventName$jscomp$inline_1581.toLowerCase(), - capitalizedEvent$jscomp$inline_1583 = - eventName$jscomp$inline_1581[0].toUpperCase() + - eventName$jscomp$inline_1581.slice(1); + var eventName$jscomp$inline_1588 = + simpleEventPluginEvents[i$jscomp$inline_1587], + domEventName$jscomp$inline_1589 = + eventName$jscomp$inline_1588.toLowerCase(), + capitalizedEvent$jscomp$inline_1590 = + eventName$jscomp$inline_1588[0].toUpperCase() + + eventName$jscomp$inline_1588.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1582, - "on" + capitalizedEvent$jscomp$inline_1583 + domEventName$jscomp$inline_1589, + "on" + capitalizedEvent$jscomp$inline_1590 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14771,34 +14793,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$210 = props[hasSrc]; - if (null != propValue$210) + var propValue$215 = props[hasSrc]; + if (null != propValue$215) switch (hasSrc) { case "name": - hasSrcSet = propValue$210; + hasSrcSet = propValue$215; break; case "type": - propKey = propValue$210; + propKey = propValue$215; break; case "checked": - checked = propValue$210; + checked = propValue$215; break; case "defaultChecked": - defaultChecked = propValue$210; + defaultChecked = propValue$215; break; case "value": - propValue = propValue$210; + propValue = propValue$215; break; case "defaultValue": - defaultValue = propValue$210; + defaultValue = propValue$215; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$210) + if (null != propValue$215) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$210, props, null); + setProp(domElement, tag, hasSrc, propValue$215, props, null); } } initInput( @@ -14934,14 +14956,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$210 in props) - props.hasOwnProperty(propValue$210) && - ((hasSrc = props[propValue$210]), + for (propValue$215 in props) + props.hasOwnProperty(propValue$215) && + ((hasSrc = props[propValue$215]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$210, + propValue$215, hasSrc, props, void 0 @@ -14989,14 +15011,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$227 in nextProps) { - var propKey = nextProps[propKey$227]; - lastProp = lastProps[propKey$227]; + for (var propKey$232 in nextProps) { + var propKey = nextProps[propKey$232]; + lastProp = lastProps[propKey$232]; if ( - nextProps.hasOwnProperty(propKey$227) && + nextProps.hasOwnProperty(propKey$232) && (null != propKey || null != lastProp) ) - switch (propKey$227) { + switch (propKey$232) { case "type": type = propKey; break; @@ -15025,7 +15047,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$227, + propKey$232, propKey, nextProps, lastProp @@ -15044,7 +15066,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$227 = null; + propKey = value = defaultValue = propKey$232 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15075,7 +15097,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$227 = type; + propKey$232 = type; break; case "defaultValue": defaultValue = type; @@ -15096,15 +15118,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$227 - ? updateOptions(domElement, !!lastProps, propKey$227, !1) + null != propKey$232 + ? updateOptions(domElement, !!lastProps, propKey$232, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$227 = null; + propKey = propKey$232 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15128,7 +15150,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$227 = name; + propKey$232 = name; break; case "defaultValue": propKey = name; @@ -15142,17 +15164,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$227, propKey); + updateTextarea(domElement, propKey$232, propKey); return; case "option": - for (var propKey$243 in lastProps) + for (var propKey$248 in lastProps) if ( - ((propKey$227 = lastProps[propKey$243]), - lastProps.hasOwnProperty(propKey$243) && - null != propKey$227 && - !nextProps.hasOwnProperty(propKey$243)) + ((propKey$232 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + null != propKey$232 && + !nextProps.hasOwnProperty(propKey$248)) ) - switch (propKey$243) { + switch (propKey$248) { case "selected": domElement.selected = !1; break; @@ -15160,33 +15182,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$243, + propKey$248, null, nextProps, - propKey$227 + propKey$232 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$227 = nextProps[lastDefaultValue]), + ((propKey$232 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$227 !== propKey && - (null != propKey$227 || null != propKey)) + propKey$232 !== propKey && + (null != propKey$232 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$227 && - "function" !== typeof propKey$227 && - "symbol" !== typeof propKey$227; + propKey$232 && + "function" !== typeof propKey$232 && + "symbol" !== typeof propKey$232; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$227, + propKey$232, nextProps, propKey ); @@ -15207,24 +15229,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$248 in lastProps) - (propKey$227 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$227 && - !nextProps.hasOwnProperty(propKey$248) && - setProp(domElement, tag, propKey$248, null, nextProps, propKey$227); + for (var propKey$253 in lastProps) + (propKey$232 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + null != propKey$232 && + !nextProps.hasOwnProperty(propKey$253) && + setProp(domElement, tag, propKey$253, null, nextProps, propKey$232); for (checked in nextProps) if ( - ((propKey$227 = nextProps[checked]), + ((propKey$232 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$227 !== propKey && - (null != propKey$227 || null != propKey)) + propKey$232 !== propKey && + (null != propKey$232 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$227) + if (null != propKey$232) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15232,7 +15254,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$227, + propKey$232, nextProps, propKey ); @@ -15240,49 +15262,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$253 in lastProps) - (propKey$227 = lastProps[propKey$253]), - lastProps.hasOwnProperty(propKey$253) && - void 0 !== propKey$227 && - !nextProps.hasOwnProperty(propKey$253) && + for (var propKey$258 in lastProps) + (propKey$232 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + void 0 !== propKey$232 && + !nextProps.hasOwnProperty(propKey$258) && setPropOnCustomElement( domElement, tag, - propKey$253, + propKey$258, void 0, nextProps, - propKey$227 + propKey$232 ); for (defaultChecked in nextProps) - (propKey$227 = nextProps[defaultChecked]), + (propKey$232 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$227 === propKey || - (void 0 === propKey$227 && void 0 === propKey) || + propKey$232 === propKey || + (void 0 === propKey$232 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$227, + propKey$232, nextProps, propKey ); return; } } - for (var propKey$258 in lastProps) - (propKey$227 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - null != propKey$227 && - !nextProps.hasOwnProperty(propKey$258) && - setProp(domElement, tag, propKey$258, null, nextProps, propKey$227); + for (var propKey$263 in lastProps) + (propKey$232 = lastProps[propKey$263]), + lastProps.hasOwnProperty(propKey$263) && + null != propKey$232 && + !nextProps.hasOwnProperty(propKey$263) && + setProp(domElement, tag, propKey$263, null, nextProps, propKey$232); for (lastProp in nextProps) - (propKey$227 = nextProps[lastProp]), + (propKey$232 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$227 === propKey || - (null == propKey$227 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$227, nextProps, propKey); + propKey$232 === propKey || + (null == propKey$232 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$232, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15917,26 +15939,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$266 = getResourcesFromRoot( + var styles$271 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$267 = styles$266.get(type); - resource$267 || + resource$272 = styles$271.get(type); + resource$272 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$267 = { + (resource$272 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$266.set(type, resource$267), - (styles$266 = JSCompiler_inline_result.querySelector( + styles$271.set(type, resource$272), + (styles$271 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$266._p && - ((resource$267.instance = styles$266), - (resource$267.state.loading = 5)), + !styles$271._p && + ((resource$272.instance = styles$271), + (resource$272.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15949,16 +15971,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$266 || + styles$271 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$267.state + resource$272.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$267; + return resource$272; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16055,37 +16077,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$272 = hoistableRoot.querySelector( + var instance$277 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$272) + if (instance$277) return ( (resource.state.loading |= 4), - (resource.instance = instance$272), - markNodeAsHoistable(instance$272), - instance$272 + (resource.instance = instance$277), + markNodeAsHoistable(instance$277), + instance$277 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$272 = ( + instance$277 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$272); - var linkInstance = instance$272; + markNodeAsHoistable(instance$277); + var linkInstance = instance$277; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$272, "link", instance); + setInitialProperties(instance$277, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$272, props.precedence, hoistableRoot); - return (resource.instance = instance$272); + insertStylesheet(instance$277, props.precedence, hoistableRoot); + return (resource.instance = instance$277); case "script": - instance$272 = getScriptKey(props.src); + instance$277 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$272) + getScriptSelectorFromKey(instance$277) )) ) return ( @@ -16094,7 +16116,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$272))) + if ((styleProps = preloadPropsMap.get(instance$277))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17097,16 +17119,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1753 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1760 = React.version; if ( - "19.0.0-www-modern-682a103c-20241107" !== - isomorphicReactPackageVersion$jscomp$inline_1753 + "19.0.0-www-modern-989af12f-20241108" !== + isomorphicReactPackageVersion$jscomp$inline_1760 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1753, - "19.0.0-www-modern-682a103c-20241107" + isomorphicReactPackageVersion$jscomp$inline_1760, + "19.0.0-www-modern-989af12f-20241108" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17122,25 +17144,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2294 = { +var internals$jscomp$inline_2301 = { bundleType: 0, - version: "19.0.0-www-modern-682a103c-20241107", + version: "19.0.0-www-modern-989af12f-20241108", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2295 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2302 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2295.isDisabled && - hook$jscomp$inline_2295.supportsFiber + !hook$jscomp$inline_2302.isDisabled && + hook$jscomp$inline_2302.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2295.inject( - internals$jscomp$inline_2294 + (rendererID = hook$jscomp$inline_2302.inject( + internals$jscomp$inline_2301 )), - (injectedHook = hook$jscomp$inline_2295); + (injectedHook = hook$jscomp$inline_2302); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17642,4 +17664,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-682a103c-20241107"; +exports.version = "19.0.0-www-modern-989af12f-20241108"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 9bbd3dc0c047d..885cc1ef8bae8 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -955,6 +955,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: @@ -2280,7 +2288,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2357,45 +2366,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; @@ -13653,7 +13663,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -13711,7 +13721,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -13719,192 +13729,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 (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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + 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 - ); - 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; } + renderWasConcurrent = !1; + 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) { @@ -13953,7 +13967,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -14020,20 +14039,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -14077,11 +14096,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 = @@ -14205,7 +14220,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -14214,10 +14231,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -14239,37 +14256,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); @@ -14280,16 +14306,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); @@ -14314,12 +14337,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 @@ -18845,7 +18866,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index f60f589e6f461..1cef6818525b2 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -861,6 +861,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: @@ -2186,7 +2194,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -2263,45 +2272,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; @@ -13471,7 +13481,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if ( @@ -13529,7 +13539,7 @@ __DEV__ && root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 )); ensureRootIsScheduled(root); } @@ -13537,192 +13547,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 (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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + 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 - ); - 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; } + renderWasConcurrent = !1; + 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) { @@ -13771,7 +13785,12 @@ __DEV__ && completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended( + root, + lanes, + spawnedLane, + !didSkipSuspendedSiblings + ); return; } commitRoot( @@ -13838,20 +13857,20 @@ __DEV__ && root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -13895,11 +13914,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 = @@ -14023,7 +14038,9 @@ __DEV__ && function renderDidSuspendDelayIfPossible() { workInProgressRootExitStatus = RootSuspendedWithDelay; workInProgressRootDidSkipSuspendedSiblings || - 0 !== (workInProgressRootRenderLanes & 60) || + ((workInProgressRootRenderLanes & 4194176) !== + workInProgressRootRenderLanes && + null !== suspenseHandlerStackCursor.current) || (workInProgressRootIsPrerendering = !0); (0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) || @@ -14032,10 +14049,10 @@ __DEV__ && workInProgressRoot, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); } - function renderRootSync(root, lanes) { + function renderRootSync(root, lanes, shouldYieldForPrerendering) { var prevExecutionContext = executionContext; executionContext |= RenderContext; var prevDispatcher = pushDispatcher(), @@ -14057,37 +14074,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); @@ -14098,16 +14124,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); @@ -14132,12 +14155,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 @@ -18619,7 +18640,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index 9af9d9ba25a52..be351cfc4235b 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -660,6 +660,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: @@ -1139,7 +1147,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; @@ -1214,39 +1223,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; @@ -9744,7 +9754,7 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -9771,180 +9781,184 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -9993,7 +10007,7 @@ module.exports = function ($$$config) { completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -10057,20 +10071,20 @@ module.exports = function ($$$config) { root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -10114,9 +10128,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 = @@ -10204,7 +10216,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)) || @@ -10213,10 +10227,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(), @@ -10225,6 +10239,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) { @@ -10233,24 +10248,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$167) { - handleThrow(root, thrownValue$167); + } catch (thrownValue$172) { + handleThrow(root, thrownValue$172); } while (1); lanes && root.shellSuspendCounter++; @@ -10258,11 +10286,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); @@ -10276,12 +10304,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) { @@ -10371,8 +10397,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$169) { - handleThrow(root, thrownValue$169); + } catch (thrownValue$174) { + handleThrow(root, thrownValue$174); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -12616,7 +12642,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index 459a56a8f5006..7842011cd0c54 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -526,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: @@ -1005,7 +1013,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; @@ -1080,39 +1089,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; @@ -9506,7 +9516,7 @@ module.exports = function ($$$config) { root, workInProgressRootRenderLanes, workInProgressDeferredLane, - workInProgressRootDidSkipSuspendedSiblings + !1 ); markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { @@ -9533,180 +9543,184 @@ 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), + renderWasConcurrent = shouldTimeSlice; + do { + 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); + renderWasConcurrent = !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; } + renderWasConcurrent = !1; + 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) { @@ -9755,7 +9769,7 @@ module.exports = function ($$$config) { completedRenderEndTime ) ); - markRootSuspended(root, lanes, spawnedLane, didSkipSuspendedSiblings); + markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings); return; } commitRoot( @@ -9819,20 +9833,20 @@ module.exports = function ($$$config) { root, suspendedLanes, spawnedLane, - didSkipSuspendedSiblings + didAttemptEntireTree ) { suspendedLanes &= ~workInProgressRootPingedLanes; suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes; root.suspendedLanes |= suspendedLanes; root.pingedLanes &= ~suspendedLanes; enableSiblingPrerendering && - !didSkipSuspendedSiblings && + didAttemptEntireTree && (root.warmLanes |= suspendedLanes); - didSkipSuspendedSiblings = root.expirationTimes; + 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 && @@ -9876,9 +9890,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 = @@ -9966,7 +9978,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)) || @@ -9975,10 +9989,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(), @@ -9987,6 +10001,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) { @@ -9995,24 +10010,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$167) { - handleThrow(root, thrownValue$167); + } catch (thrownValue$172) { + handleThrow(root, thrownValue$172); } while (1); lanes && root.shellSuspendCounter++; @@ -10020,11 +10048,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); @@ -10038,12 +10066,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) { @@ -10133,8 +10159,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$169) { - handleThrow(root, thrownValue$169); + } catch (thrownValue$174) { + handleThrow(root, thrownValue$174); } while (1); lastContextDependency = currentlyRenderingFiber = null; @@ -12335,7 +12361,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index fed1310e112c6..58986cca8a9c7 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -829,6 +829,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: @@ -1865,7 +1873,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -1950,8 +1959,6 @@ __DEV__ && else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -10774,186 +10781,189 @@ __DEV__ && 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); - 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); + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1) + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0), + renderWasConcurrent = forceSync; + do { + 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); + 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, + !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; } + renderWasConcurrent = !1; + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); - 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 - ); - 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) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } 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: { + 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 ); - 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 - ); break a; } - commitRootWhenReady( + 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) { + lanes = renderWasConcurrent; + forceSync = workInProgressRootRecoverableErrors; + exitStatus = workInProgressTransitions; + renderWasConcurrent = + workInProgressRootDidIncludeRecursiveRenderUpdate; + lanesThatJustErrored = workInProgressDeferredLane; + originallyAttemptedLanes = + workInProgressRootInterleavedUpdatedLanes; + var suspendedRetryLanes = workInProgressSuspendedRetryLanes, + suspendedCommitReason = IMMEDIATE_COMMIT, + prevTransition = ReactSharedInternals.T, + previousUpdateLanePriority = currentUpdatePriority; + try { + (currentUpdatePriority = DiscreteEventPriority), + (ReactSharedInternals.T = null), + commitRootImpl( + lanes, + forceSync, + exitStatus, + renderWasConcurrent, + previousUpdateLanePriority, + lanesThatJustErrored, + originallyAttemptedLanes, + suspendedRetryLanes, + suspendedCommitReason, + -0, + 0 + ); + } finally { + (ReactSharedInternals.T = prevTransition), + (currentUpdatePriority = previousUpdateLanePriority); + } + } else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressDeferredLane + ); + 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 ); + break a; } + commitRootWhenReady( + renderWasConcurrent, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -11114,8 +11124,9 @@ __DEV__ && workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11221,6 +11232,7 @@ __DEV__ && ) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if ( @@ -11232,21 +11244,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); @@ -11257,14 +11274,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); @@ -11274,13 +11288,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 ( @@ -14921,11 +14933,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-682a103c-20241107", + version: "19.0.0-www-classic-989af12f-20241108", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-682a103c-20241107" + reconcilerVersion: "19.0.0-www-classic-989af12f-20241108" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15060,5 +15072,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-classic-682a103c-20241107"; + exports.version = "19.0.0-www-classic-989af12f-20241108"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index ea059607e1549..28ea36c6e9715 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -829,6 +829,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: @@ -1865,7 +1873,8 @@ __DEV__ && root, root === workInProgressRoot ? nextLanes : 0 )), - 0 !== (nextLanes & 3) && + 0 === (nextLanes & 3) || + checkIfRootIsPrerendering(root, nextLanes) || ((didPerformSomeWork = !0), performSyncWorkOnRoot(root, nextLanes)); root = root.next; @@ -1950,8 +1959,6 @@ __DEV__ && else return currentTime; switch (lanesToEventPriority(suspendedLanes)) { case DiscreteEventPriority: - suspendedLanes = ImmediatePriority; - break; case ContinuousEventPriority: suspendedLanes = UserBlockingPriority; break; @@ -10774,186 +10781,189 @@ __DEV__ && 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); - 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); + (!forceSync && + 0 === (lanes & 60) && + 0 === (lanes & root.expiredLanes)) || + !1) + ? renderRootConcurrent(root, lanes) + : renderRootSync(root, lanes, !0), + renderWasConcurrent = forceSync; + do { + 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); + 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, + !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; } + renderWasConcurrent = !1; + if (exitStatus !== RootErrored) continue; } - if (exitStatus === RootFatalErrored) { - prepareFreshStack(root, 0); - markRootSuspended(root, lanes, 0); - 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 - ); - 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) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } 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: { + 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 ); - 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 - ); break a; } - commitRootWhenReady( + 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) { + lanes = renderWasConcurrent; + forceSync = workInProgressRootRecoverableErrors; + exitStatus = workInProgressTransitions; + renderWasConcurrent = + workInProgressRootDidIncludeRecursiveRenderUpdate; + lanesThatJustErrored = workInProgressDeferredLane; + originallyAttemptedLanes = + workInProgressRootInterleavedUpdatedLanes; + var suspendedRetryLanes = workInProgressSuspendedRetryLanes, + suspendedCommitReason = IMMEDIATE_COMMIT, + prevTransition = ReactSharedInternals.T, + previousUpdateLanePriority = currentUpdatePriority; + try { + (currentUpdatePriority = DiscreteEventPriority), + (ReactSharedInternals.T = null), + commitRootImpl( + lanes, + forceSync, + exitStatus, + renderWasConcurrent, + previousUpdateLanePriority, + lanesThatJustErrored, + originallyAttemptedLanes, + suspendedRetryLanes, + suspendedCommitReason, + -0, + 0 + ); + } finally { + (ReactSharedInternals.T = prevTransition), + (currentUpdatePriority = previousUpdateLanePriority); + } + } else { + if ( + (lanes & 62914560) === lanes && + ((exitStatus = + globalMostRecentFallbackTime + + FALLBACK_THROTTLE_MS - + now$1()), + 10 < exitStatus) + ) { + markRootSuspended( renderWasConcurrent, - forceSync, - workInProgressRootRecoverableErrors, - workInProgressTransitions, - workInProgressRootDidIncludeRecursiveRenderUpdate, lanes, - workInProgressDeferredLane, - workInProgressRootInterleavedUpdatedLanes, - workInProgressSuspendedRetryLanes, - workInProgressRootDidSkipSuspendedSiblings, - IMMEDIATE_COMMIT, - -0, - 0 + workInProgressDeferredLane + ); + 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 ); + break a; } + commitRootWhenReady( + renderWasConcurrent, + forceSync, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + lanes, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + workInProgressRootDidSkipSuspendedSiblings, + IMMEDIATE_COMMIT, + -0, + 0 + ); } } - break; - } while (1); - } + } + break; + } while (1); ensureRootIsScheduled(root); } function queueRecoverableErrors(errors) { @@ -11114,8 +11124,9 @@ __DEV__ && workInProgressRootRenderLanes = lanes; workInProgressSuspendedReason = NotSuspended; workInProgressThrownValue = null; - workInProgressRootDidAttachPingListener = - workInProgressRootDidSkipSuspendedSiblings = !1; + workInProgressRootDidSkipSuspendedSiblings = !1; + checkIfRootIsPrerendering(root, lanes); + workInProgressRootDidAttachPingListener = !1; workInProgressRootExitStatus = RootInProgress; workInProgressSuspendedRetryLanes = workInProgressDeferredLane = @@ -11221,6 +11232,7 @@ __DEV__ && ) (workInProgressTransitions = null), prepareFreshStack(root, lanes); lanes = !1; + var exitStatus = workInProgressRootExitStatus; a: do try { if ( @@ -11232,21 +11244,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); @@ -11257,14 +11274,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); @@ -11274,13 +11288,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 ( @@ -14921,11 +14933,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-682a103c-20241107", + version: "19.0.0-www-modern-989af12f-20241108", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-682a103c-20241107" + reconcilerVersion: "19.0.0-www-modern-989af12f-20241108" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15060,5 +15072,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-modern-682a103c-20241107"; + exports.version = "19.0.0-www-modern-989af12f-20241108"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index b7669378fd96d..c93a583884401 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.0.0-www-classic-682a103c-20241107 \ No newline at end of file +19.0.0-www-classic-989af12f-20241108 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 9b7a3421479ff..da88a30127509 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.0.0-www-modern-682a103c-20241107 \ No newline at end of file +19.0.0-www-modern-989af12f-20241108 \ No newline at end of file