diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index c3c84b02a4..2092706306 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -7b56a542987890f618eeda4e4906fbf1f1df2213 +4549be0f846e7df5a4eaabf06369d93bd120271e diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index c3c84b02a4..2092706306 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -7b56a542987890f618eeda4e4906fbf1f1df2213 +4549be0f846e7df5a4eaabf06369d93bd120271e diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 4b041a5591..f06719d8ca 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -2001,7 +2001,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-classic-7b56a542-20240917"; + exports.version = "19.0.0-www-classic-4549be0f-20240917"; "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 ac0df54875..338d3b9417 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1981,7 +1981,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.0.0-www-modern-7b56a542-20240917"; + exports.version = "19.0.0-www-modern-4549be0f-20240917"; "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 b9025e00b5..480392920b 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-7b56a542-20240917"; +exports.version = "19.0.0-www-classic-4549be0f-20240917"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 6ad76879fe..32340b4ec3 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-7b56a542-20240917"; +exports.version = "19.0.0-www-modern-4549be0f-20240917"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index a8740be3a9..5feb893cd4 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-7b56a542-20240917"; +exports.version = "19.0.0-www-classic-4549be0f-20240917"; "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 5d718d5e01..2bf9f385d2 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-7b56a542-20240917"; +exports.version = "19.0.0-www-modern-4549be0f-20240917"; "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 552869312f..fadafe5f9f 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -743,20 +743,6 @@ __DEV__ && typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } - function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); - } - function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); - } function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -5431,6 +5417,21 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -5450,44 +5451,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -7866,8 +7838,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -8289,8 +8261,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -9662,16 +9634,35 @@ __DEV__ && pop(markerInstanceStack, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return 0 !== (current.mode & 2); } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -9789,10 +9780,18 @@ __DEV__ && finishedWork ) : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStarted(finishedWork)), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = !0), - safelyCallDestroy( + runWithFiberInDEV( + finishedWork, + callDestroyInDEV, finishedWork, nearestMountedAncestor, destroy @@ -9807,7 +9806,11 @@ __DEV__ && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped())); } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -9817,10 +9820,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -9828,14 +9831,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -9940,8 +9943,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -9949,7 +9952,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -9973,12 +9976,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -10003,12 +10006,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$18) { @@ -10020,11 +10022,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$19) { @@ -10032,15 +10034,6 @@ __DEV__ && } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - runWithFiberInDEV( - current, - callDestroyInDEV, - current, - nearestMountedAncestor, - destroy - ); - } function commitProfiler(finishedWork, current, commitTime, effectDuration) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, @@ -10332,15 +10325,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -10367,8 +10360,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -10378,7 +10371,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -10393,27 +10386,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$15) { captureCommitPhaseError( @@ -10423,6 +10417,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: case 27: @@ -10432,9 +10427,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -10442,7 +10439,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -10451,19 +10448,7 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -10822,96 +10807,19 @@ __DEV__ && case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((_prevHostParent = deletedFiber.updateQueue), - null !== _prevHostParent && - ((_prevHostParent = _prevHostParent.lastEffect), - null !== _prevHostParent)) - ) { - _prevHostParentIsContainer = _prevHostParent = - _prevHostParent.next; - do { - var tag = _prevHostParentIsContainer.tag, - inst = _prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - 0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - _prevHostParentIsContainer = _prevHostParentIsContainer.next; - } while (_prevHostParentIsContainer !== _prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((_prevHostParent = deletedFiber.updateQueue), - null !== _prevHostParent && - ((_prevHostParent = _prevHostParent.lastEffect), - null !== _prevHostParent)) - ) { - _prevHostParentIsContainer = _prevHostParent = _prevHostParent.next; - do - (tag = _prevHostParentIsContainer.tag), - (inst = _prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : (tag & Layout) !== NoFlags && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - 0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (_prevHostParentIsContainer = _prevHostParentIsContainer.next); - while (_prevHostParentIsContainer !== _prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -11101,19 +11009,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - 0 !== (finishedWork.mode & 2) - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -11207,13 +11107,22 @@ __DEV__ && } break; case 3: + flags = pushNestedEffectDurations(); recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); + root.effectDuration += popNestedEffectDurations(flags); break; case 4: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -11416,23 +11325,11 @@ __DEV__ && case 11: case 14: case 15: - if (0 !== (finishedWork.mode & 2)) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -11529,14 +11426,16 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -11544,7 +11443,7 @@ __DEV__ && finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -11553,21 +11452,12 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -11720,6 +11610,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11787,37 +11678,33 @@ __DEV__ && clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -11834,9 +11721,9 @@ __DEV__ && ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11848,21 +11735,21 @@ __DEV__ && finishedRoot, finishedWork ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions )) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11874,7 +11761,7 @@ __DEV__ && commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -12164,12 +12051,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -14770,7 +14669,7 @@ __DEV__ && identifierPrefix++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (identifierPrefix = 0; 31 > identifierPrefix; identifierPrefix++) @@ -16607,10 +16506,9 @@ __DEV__ && return unstable_useContextWithBailout(context, select); }; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -17128,11 +17026,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-7b56a542-20240917", + version: "19.0.0-www-classic-4549be0f-20240917", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -17166,7 +17064,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-classic-7b56a542-20240917"; + exports.version = "19.0.0-www-classic-4549be0f-20240917"; "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 3c3e2654ae..5ae7fb3b05 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -726,20 +726,6 @@ __DEV__ && typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } - function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); - } - function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); - } function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -5307,6 +5293,21 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -5326,44 +5327,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -7567,8 +7539,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -7990,8 +7962,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -9294,16 +9266,35 @@ __DEV__ && pop(markerInstanceStack, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return 0 !== (current.mode & 2); } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -9421,10 +9412,18 @@ __DEV__ && finishedWork ) : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStarted(finishedWork)), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = !0), - safelyCallDestroy( + runWithFiberInDEV( + finishedWork, + callDestroyInDEV, finishedWork, nearestMountedAncestor, destroy @@ -9439,7 +9438,11 @@ __DEV__ && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped())); } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -9449,10 +9452,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -9460,14 +9463,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -9562,8 +9565,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -9571,7 +9574,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -9595,12 +9598,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -9625,12 +9628,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$18) { @@ -9642,11 +9644,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$19) { @@ -9654,15 +9656,6 @@ __DEV__ && } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - runWithFiberInDEV( - current, - callDestroyInDEV, - current, - nearestMountedAncestor, - destroy - ); - } function commitProfiler(finishedWork, current, commitTime, effectDuration) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, @@ -9954,15 +9947,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -9989,8 +9982,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -10000,7 +9993,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -10015,27 +10008,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$15) { captureCommitPhaseError( @@ -10045,6 +10039,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: case 27: @@ -10054,9 +10049,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -10064,7 +10061,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -10073,19 +10070,7 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -10439,96 +10424,19 @@ __DEV__ && case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((_prevHostParent = deletedFiber.updateQueue), - null !== _prevHostParent && - ((_prevHostParent = _prevHostParent.lastEffect), - null !== _prevHostParent)) - ) { - _prevHostParentIsContainer = _prevHostParent = - _prevHostParent.next; - do { - var tag = _prevHostParentIsContainer.tag, - inst = _prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - 0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - _prevHostParentIsContainer = _prevHostParentIsContainer.next; - } while (_prevHostParentIsContainer !== _prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((_prevHostParent = deletedFiber.updateQueue), - null !== _prevHostParent && - ((_prevHostParent = _prevHostParent.lastEffect), - null !== _prevHostParent)) - ) { - _prevHostParentIsContainer = _prevHostParent = _prevHostParent.next; - do - (tag = _prevHostParentIsContainer.tag), - (inst = _prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : (tag & Layout) !== NoFlags && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - 0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (_prevHostParentIsContainer = _prevHostParentIsContainer.next); - while (_prevHostParentIsContainer !== _prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -10712,19 +10620,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - 0 !== (finishedWork.mode & 2) - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -10818,13 +10718,22 @@ __DEV__ && } break; case 3: + flags = pushNestedEffectDurations(); recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); + root.effectDuration += popNestedEffectDurations(flags); break; case 4: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -11024,23 +10933,11 @@ __DEV__ && case 11: case 14: case 15: - if (0 !== (finishedWork.mode & 2)) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -11144,14 +11041,16 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -11159,7 +11058,7 @@ __DEV__ && finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -11168,21 +11067,12 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -11335,6 +11225,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11402,37 +11293,33 @@ __DEV__ && clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -11449,9 +11336,9 @@ __DEV__ && ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11462,14 +11349,14 @@ __DEV__ && finishedRoot, finishedWork ) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11481,7 +11368,7 @@ __DEV__ && commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -11762,12 +11649,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -14265,7 +14164,7 @@ __DEV__ && tag++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); @@ -16044,10 +15943,9 @@ __DEV__ && return unstable_useContextWithBailout(context, select); }; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -16574,11 +16472,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-7b56a542-20240917", + version: "19.0.0-www-modern-4549be0f-20240917", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16612,7 +16510,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.0.0-www-modern-7b56a542-20240917"; + exports.version = "19.0.0-www-modern-4549be0f-20240917"; "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 0ad75bb7ad..4dfeecc8c2 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -7083,7 +7083,7 @@ function commitHookEffectListMount(flags, finishedWork) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -7095,9 +7095,20 @@ function commitHookEffectListUnmount( if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + if (void 0 !== destroy) { + inst.destroy = void 0; + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -7179,11 +7190,25 @@ function safelyDetachRef(current, nearestMountedAncestor) { } else ref.current = null; } -function safelyCallDestroy(current, nearestMountedAncestor, destroy) { +function commitProfilerPostCommit( + finishedWork, + current, + commitTime, + passiveEffectDuration +) { try { - destroy(); + var _finishedWork$memoize2 = finishedWork.memoizedProps, + id = _finishedWork$memoize2.id, + onPostCommit = _finishedWork$memoize2.onPostCommit; + "function" === typeof onPostCommit && + onPostCommit( + id, + null === current ? "mount" : "update", + passiveEffectDuration, + commitTime + ); } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function isHostParent(fiber) { @@ -7425,23 +7450,6 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { break; case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -7771,63 +7779,11 @@ function commitDeletionEffectsOnFiber( case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((child = deletedFiber.updateQueue), - null !== child && ((child = child.lastEffect), null !== child)) - ) { - child$jscomp$0 = child = child.next; - do { - prevHostParent = child$jscomp$0.tag; - prevHostParentIsContainer = child$jscomp$0.inst; - var destroy = prevHostParentIsContainer.destroy; - void 0 !== destroy && - (0 !== (prevHostParent & 2) - ? ((prevHostParentIsContainer.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (prevHostParent & 4) || - ((prevHostParentIsContainer.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))); - child$jscomp$0 = child$jscomp$0.next; - } while (child$jscomp$0 !== child); - } - } else if ( - !offscreenSubtreeWasHidden && - ((child = deletedFiber.updateQueue), - null !== child && ((child = child.lastEffect), null !== child)) - ) { - child$jscomp$0 = child = child.next; - do - (prevHostParent = child$jscomp$0.tag), - (prevHostParentIsContainer = child$jscomp$0.inst), - (destroy = prevHostParentIsContainer.destroy), - void 0 !== destroy && - (0 !== (prevHostParent & 2) - ? ((prevHostParentIsContainer.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (prevHostParent & 4) && - ((prevHostParentIsContainer.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))), - (child$jscomp$0 = child$jscomp$0.next); - while (child$jscomp$0 !== child); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -8040,6 +7996,10 @@ function commitMutationEffectsOnFiber(finishedWork, root) { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 12: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -8344,23 +8304,6 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -8555,12 +8498,25 @@ function commitPassiveMountOnFiber( } break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); + flags & 2048 + ? (recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + -0, + finishedWork.stateNode.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -8695,9 +8651,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$147 = finishedWork.stateNode; + var instance$140 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$147._visibility & 4 + ? instance$140._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8710,7 +8666,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$147._visibility |= 4), + : ((instance$140._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8718,7 +8674,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$147._visibility |= 4), + : ((instance$140._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8731,7 +8687,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$147 + instance$140 ); break; case 24: @@ -8825,12 +8781,12 @@ function accumulateSuspenseyCommitOnFiber(fiber) { break; case 22: if (null === fiber.memoizedState) { - var current$152 = fiber.alternate; - null !== current$152 && null !== current$152.memoizedState - ? ((current$152 = suspenseyCommitFlag), + var current$145 = fiber.alternate; + null !== current$145 && null !== current$145.memoizedState + ? ((current$145 = suspenseyCommitFlag), (suspenseyCommitFlag = 16777216), recursivelyAccumulateSuspenseyCommit(fiber), - (suspenseyCommitFlag = current$152)) + (suspenseyCommitFlag = current$145)) : recursivelyAccumulateSuspenseyCommit(fiber); } break; @@ -8880,6 +8836,12 @@ function commitPassiveUnmountOnFiber(finishedWork) { finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return); break; + case 3: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; + case 12: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && @@ -9695,8 +9657,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$158) { - handleThrow(root, thrownValue$158); + } catch (thrownValue$151) { + handleThrow(root, thrownValue$151); } while (1); lanes && root.shellSuspendCounter++; @@ -9811,8 +9773,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$160) { - handleThrow(root, thrownValue$160); + } catch (thrownValue$153) { + handleThrow(root, thrownValue$153); } while (1); resetContextDependencies(); @@ -10889,27 +10851,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1424 = { +var internals$jscomp$inline_1439 = { bundleType: 0, - version: "19.0.0-www-classic-7b56a542-20240917", + version: "19.0.0-www-classic-4549be0f-20240917", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1425 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1440 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1425.isDisabled && - hook$jscomp$inline_1425.supportsFiber + !hook$jscomp$inline_1440.isDisabled && + hook$jscomp$inline_1440.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1425.inject( - internals$jscomp$inline_1424 + (rendererID = hook$jscomp$inline_1440.inject( + internals$jscomp$inline_1439 )), - (injectedHook = hook$jscomp$inline_1425); + (injectedHook = hook$jscomp$inline_1440); } catch (err) {} } var Path = Mode$1.Path; @@ -10923,4 +10885,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-classic-7b56a542-20240917"; +exports.version = "19.0.0-www-classic-4549be0f-20240917"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 60ea4341f5..7d4a5326e9 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -6692,7 +6692,7 @@ function commitHookEffectListMount(flags, finishedWork) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -6704,9 +6704,20 @@ function commitHookEffectListUnmount( if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + if (void 0 !== destroy) { + inst.destroy = void 0; + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -6788,11 +6799,25 @@ function safelyDetachRef(current, nearestMountedAncestor) { } else ref.current = null; } -function safelyCallDestroy(current, nearestMountedAncestor, destroy) { +function commitProfilerPostCommit( + finishedWork, + current, + commitTime, + passiveEffectDuration +) { try { - destroy(); + var _finishedWork$memoize2 = finishedWork.memoizedProps, + id = _finishedWork$memoize2.id, + onPostCommit = _finishedWork$memoize2.onPostCommit; + "function" === typeof onPostCommit && + onPostCommit( + id, + null === current ? "mount" : "update", + passiveEffectDuration, + commitTime + ); } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function isHostParent(fiber) { @@ -7034,23 +7059,6 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { break; case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -7375,63 +7383,11 @@ function commitDeletionEffectsOnFiber( case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((child = deletedFiber.updateQueue), - null !== child && ((child = child.lastEffect), null !== child)) - ) { - child$jscomp$0 = child = child.next; - do { - prevHostParent = child$jscomp$0.tag; - prevHostParentIsContainer = child$jscomp$0.inst; - var destroy = prevHostParentIsContainer.destroy; - void 0 !== destroy && - (0 !== (prevHostParent & 2) - ? ((prevHostParentIsContainer.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (prevHostParent & 4) || - ((prevHostParentIsContainer.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))); - child$jscomp$0 = child$jscomp$0.next; - } while (child$jscomp$0 !== child); - } - } else if ( - !offscreenSubtreeWasHidden && - ((child = deletedFiber.updateQueue), - null !== child && ((child = child.lastEffect), null !== child)) - ) { - child$jscomp$0 = child = child.next; - do - (prevHostParent = child$jscomp$0.tag), - (prevHostParentIsContainer = child$jscomp$0.inst), - (destroy = prevHostParentIsContainer.destroy), - void 0 !== destroy && - (0 !== (prevHostParent & 2) - ? ((prevHostParentIsContainer.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (prevHostParent & 4) && - ((prevHostParentIsContainer.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))), - (child$jscomp$0 = child$jscomp$0.next); - while (child$jscomp$0 !== child); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -7638,6 +7594,10 @@ function commitMutationEffectsOnFiber(finishedWork, root) { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 12: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -7939,23 +7899,6 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -8150,12 +8093,25 @@ function commitPassiveMountOnFiber( } break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); + flags & 2048 + ? (recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + -0, + finishedWork.stateNode.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -8279,9 +8235,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$138 = finishedWork.stateNode; + var instance$131 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$138._visibility & 4 + ? instance$131._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8293,7 +8249,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$138._visibility |= 4), + : ((instance$131._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8306,7 +8262,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$138 + instance$131 ); break; case 24: @@ -8400,12 +8356,12 @@ function accumulateSuspenseyCommitOnFiber(fiber) { break; case 22: if (null === fiber.memoizedState) { - var current$143 = fiber.alternate; - null !== current$143 && null !== current$143.memoizedState - ? ((current$143 = suspenseyCommitFlag), + var current$136 = fiber.alternate; + null !== current$136 && null !== current$136.memoizedState + ? ((current$136 = suspenseyCommitFlag), (suspenseyCommitFlag = 16777216), recursivelyAccumulateSuspenseyCommit(fiber), - (suspenseyCommitFlag = current$143)) + (suspenseyCommitFlag = current$136)) : recursivelyAccumulateSuspenseyCommit(fiber); } break; @@ -8455,6 +8411,12 @@ function commitPassiveUnmountOnFiber(finishedWork) { finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return); break; + case 3: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; + case 12: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && @@ -9261,8 +9223,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$149) { - handleThrow(root, thrownValue$149); + } catch (thrownValue$142) { + handleThrow(root, thrownValue$142); } while (1); lanes && root.shellSuspendCounter++; @@ -9377,8 +9339,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$151) { - handleThrow(root, thrownValue$151); + } catch (thrownValue$144) { + handleThrow(root, thrownValue$144); } while (1); resetContextDependencies(); @@ -10403,27 +10365,27 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1416 = { +var internals$jscomp$inline_1431 = { bundleType: 0, - version: "19.0.0-www-modern-7b56a542-20240917", + version: "19.0.0-www-modern-4549be0f-20240917", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: function () { return null; }, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1417 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1432 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1417.isDisabled && - hook$jscomp$inline_1417.supportsFiber + !hook$jscomp$inline_1432.isDisabled && + hook$jscomp$inline_1432.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1417.inject( - internals$jscomp$inline_1416 + (rendererID = hook$jscomp$inline_1432.inject( + internals$jscomp$inline_1431 )), - (injectedHook = hook$jscomp$inline_1417); + (injectedHook = hook$jscomp$inline_1432); } catch (err) {} } var Path = Mode$1.Path; @@ -10437,4 +10399,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.0.0-www-modern-7b56a542-20240917"; +exports.version = "19.0.0-www-modern-4549be0f-20240917"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 8dc81f34ad..2022bb6f21 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -840,20 +840,6 @@ __DEV__ && typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } - function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); - } - function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); - } function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -7349,6 +7335,21 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -7368,44 +7369,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -9206,32 +9178,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2417; - var JSCompiler_object_inline_stack_2418 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2418; + var JSCompiler_object_inline_stack_2419 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2419 = !1; + var JSCompiler_object_inline_componentStack_2420 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2417 = didSuspend) || - (JSCompiler_object_inline_digest_2417 = + (JSCompiler_object_inline_digest_2418 = didSuspend) || + (JSCompiler_object_inline_digest_2418 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2417 && - ((JSCompiler_object_inline_componentStack_2419 = !0), + JSCompiler_object_inline_digest_2418 && + ((JSCompiler_object_inline_componentStack_2420 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2417 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2418 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2419 + JSCompiler_object_inline_componentStack_2420 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2416 = nextHydratableInstance; + var JSCompiler_object_inline_message_2417 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2416)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2417)) { c: { - var instance = JSCompiler_object_inline_message_2416; + var instance = JSCompiler_object_inline_message_2417; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9272,19 +9244,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2416 + JSCompiler_object_inline_message_2417 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2416 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2417 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2416 && - ((JSCompiler_object_inline_message_2416 = - JSCompiler_object_inline_message_2416.dehydrated), - null !== JSCompiler_object_inline_message_2416) + null !== JSCompiler_object_inline_message_2417 && + ((JSCompiler_object_inline_message_2417 = + JSCompiler_object_inline_message_2417.dehydrated), + null !== JSCompiler_object_inline_message_2417) ) return ( - JSCompiler_object_inline_message_2416.data === + JSCompiler_object_inline_message_2417.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9292,27 +9264,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2416 = - JSCompiler_object_inline_stack_2418.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2418.fallback; - if (JSCompiler_object_inline_componentStack_2419) + JSCompiler_object_inline_message_2417 = + JSCompiler_object_inline_stack_2419.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2419.fallback; + if (JSCompiler_object_inline_componentStack_2420) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2418 = + (JSCompiler_object_inline_stack_2419 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2416, + JSCompiler_object_inline_message_2417, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2419 = + (JSCompiler_object_inline_componentStack_2420 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2419.memoizedState = + (JSCompiler_object_inline_componentStack_2420.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2419.childLanes = + (JSCompiler_object_inline_componentStack_2420.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2417, + JSCompiler_object_inline_digest_2418, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9325,9 +9297,9 @@ __DEV__ && ? markerInstanceStack.current : null), (current = - JSCompiler_object_inline_componentStack_2419.updateQueue), + JSCompiler_object_inline_componentStack_2420.updateQueue), null === current - ? (JSCompiler_object_inline_componentStack_2419.updateQueue = + ? (JSCompiler_object_inline_componentStack_2420.updateQueue = { transitions: workInProgress, markerInstances: renderLanes, @@ -9335,46 +9307,46 @@ __DEV__ && }) : ((current.transitions = workInProgress), (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2418 + JSCompiler_object_inline_stack_2419 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2418.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2419.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2418 = + (JSCompiler_object_inline_stack_2419 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2416, + JSCompiler_object_inline_message_2417, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2419 = + (JSCompiler_object_inline_componentStack_2420 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2419.memoizedState = + (JSCompiler_object_inline_componentStack_2420.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2419.childLanes = + (JSCompiler_object_inline_componentStack_2420.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2417, + JSCompiler_object_inline_digest_2418, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2418 + JSCompiler_object_inline_stack_2419 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2416 + JSCompiler_object_inline_message_2417 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2416 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2416) + ((JSCompiler_object_inline_message_2417 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2417) ) { if (didSuspend) workInProgress.flags & 256 @@ -9391,32 +9363,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2419 = - JSCompiler_object_inline_stack_2418.fallback), - (JSCompiler_object_inline_message_2416 = workInProgress.mode), - (JSCompiler_object_inline_stack_2418 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2420 = + JSCompiler_object_inline_stack_2419.fallback), + (JSCompiler_object_inline_message_2417 = workInProgress.mode), + (JSCompiler_object_inline_stack_2419 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2418.children + children: JSCompiler_object_inline_stack_2419.children }, - JSCompiler_object_inline_message_2416, + JSCompiler_object_inline_message_2417, 0, null )), - (JSCompiler_object_inline_componentStack_2419 = + (JSCompiler_object_inline_componentStack_2420 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2419, - JSCompiler_object_inline_message_2416, + JSCompiler_object_inline_componentStack_2420, + JSCompiler_object_inline_message_2417, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2419.flags |= 2), - (JSCompiler_object_inline_stack_2418.return = workInProgress), - (JSCompiler_object_inline_componentStack_2419.return = + (JSCompiler_object_inline_componentStack_2420.flags |= 2), + (JSCompiler_object_inline_stack_2419.return = workInProgress), + (JSCompiler_object_inline_componentStack_2420.return = workInProgress), - (JSCompiler_object_inline_stack_2418.sibling = - JSCompiler_object_inline_componentStack_2419), - (workInProgress.child = JSCompiler_object_inline_stack_2418), + (JSCompiler_object_inline_stack_2419.sibling = + JSCompiler_object_inline_componentStack_2420), + (workInProgress.child = JSCompiler_object_inline_stack_2419), (disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode) && reconcileChildFibers( @@ -9425,63 +9397,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2418 = workInProgress.child), - (JSCompiler_object_inline_stack_2418.memoizedState = + (JSCompiler_object_inline_stack_2419 = workInProgress.child), + (JSCompiler_object_inline_stack_2419.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2418.childLanes = + (JSCompiler_object_inline_stack_2419.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2417, + JSCompiler_object_inline_digest_2418, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2419)); + JSCompiler_object_inline_componentStack_2420)); 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_2416.data === + JSCompiler_object_inline_message_2417.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2417 = - JSCompiler_object_inline_message_2416.nextSibling && - JSCompiler_object_inline_message_2416.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2417) { - JSCompiler_temp = JSCompiler_object_inline_digest_2417.dgst; - var message = JSCompiler_object_inline_digest_2417.msg; - instance = JSCompiler_object_inline_digest_2417.stck; - var componentStack = JSCompiler_object_inline_digest_2417.cstck; + JSCompiler_object_inline_digest_2418 = + JSCompiler_object_inline_message_2417.nextSibling && + JSCompiler_object_inline_message_2417.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2418) { + JSCompiler_temp = JSCompiler_object_inline_digest_2418.dgst; + var message = JSCompiler_object_inline_digest_2418.msg; + instance = JSCompiler_object_inline_digest_2418.stck; + var componentStack = JSCompiler_object_inline_digest_2418.cstck; } - JSCompiler_object_inline_message_2416 = message; - JSCompiler_object_inline_digest_2417 = JSCompiler_temp; - JSCompiler_object_inline_stack_2418 = instance; - JSCompiler_object_inline_componentStack_2419 = componentStack; - JSCompiler_object_inline_message_2416 = - JSCompiler_object_inline_message_2416 - ? Error(JSCompiler_object_inline_message_2416) + JSCompiler_object_inline_message_2417 = message; + JSCompiler_object_inline_digest_2418 = JSCompiler_temp; + JSCompiler_object_inline_stack_2419 = instance; + JSCompiler_object_inline_componentStack_2420 = componentStack; + JSCompiler_object_inline_message_2417 = + JSCompiler_object_inline_message_2417 + ? Error(JSCompiler_object_inline_message_2417) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2416.stack = - JSCompiler_object_inline_stack_2418 || ""; - JSCompiler_object_inline_message_2416.digest = - JSCompiler_object_inline_digest_2417; - JSCompiler_object_inline_digest_2417 = - void 0 === JSCompiler_object_inline_componentStack_2419 + JSCompiler_object_inline_message_2417.stack = + JSCompiler_object_inline_stack_2419 || ""; + JSCompiler_object_inline_message_2417.digest = + JSCompiler_object_inline_digest_2418; + JSCompiler_object_inline_digest_2418 = + void 0 === JSCompiler_object_inline_componentStack_2420 ? null - : JSCompiler_object_inline_componentStack_2419; - "string" === typeof JSCompiler_object_inline_digest_2417 && + : JSCompiler_object_inline_componentStack_2420; + "string" === typeof JSCompiler_object_inline_digest_2418 && CapturedStacks.set( - JSCompiler_object_inline_message_2416, - JSCompiler_object_inline_digest_2417 + JSCompiler_object_inline_message_2417, + JSCompiler_object_inline_digest_2418 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2416, + value: JSCompiler_object_inline_message_2417, source: null, - stack: JSCompiler_object_inline_digest_2417 + stack: JSCompiler_object_inline_digest_2418 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9496,25 +9468,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2417 = + (JSCompiler_object_inline_digest_2418 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2417) + didReceiveUpdate || JSCompiler_object_inline_digest_2418) ) { - JSCompiler_object_inline_digest_2417 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2417) { - JSCompiler_object_inline_stack_2418 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2418 & 42)) - JSCompiler_object_inline_stack_2418 = 1; + JSCompiler_object_inline_digest_2418 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2418) { + JSCompiler_object_inline_stack_2419 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2419 & 42)) + JSCompiler_object_inline_stack_2419 = 1; else - switch (JSCompiler_object_inline_stack_2418) { + switch (JSCompiler_object_inline_stack_2419) { case 2: - JSCompiler_object_inline_stack_2418 = 1; + JSCompiler_object_inline_stack_2419 = 1; break; case 8: - JSCompiler_object_inline_stack_2418 = 4; + JSCompiler_object_inline_stack_2419 = 4; break; case 32: - JSCompiler_object_inline_stack_2418 = 16; + JSCompiler_object_inline_stack_2419 = 16; break; case 128: case 256: @@ -9535,40 +9507,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2418 = 64; + JSCompiler_object_inline_stack_2419 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2418 = 134217728; + JSCompiler_object_inline_stack_2419 = 134217728; break; default: - JSCompiler_object_inline_stack_2418 = 0; + JSCompiler_object_inline_stack_2419 = 0; } - JSCompiler_object_inline_stack_2418 = + JSCompiler_object_inline_stack_2419 = 0 !== - (JSCompiler_object_inline_stack_2418 & - (JSCompiler_object_inline_digest_2417.suspendedLanes | + (JSCompiler_object_inline_stack_2419 & + (JSCompiler_object_inline_digest_2418.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2418; + : JSCompiler_object_inline_stack_2419; if ( - 0 !== JSCompiler_object_inline_stack_2418 && - JSCompiler_object_inline_stack_2418 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2419 && + JSCompiler_object_inline_stack_2419 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2418), + ((prevState.retryLane = JSCompiler_object_inline_stack_2419), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2418 + JSCompiler_object_inline_stack_2419 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2417, + JSCompiler_object_inline_digest_2418, current, - JSCompiler_object_inline_stack_2418 + JSCompiler_object_inline_stack_2419 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2416.data === + JSCompiler_object_inline_message_2417.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9576,7 +9548,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2416.data === + JSCompiler_object_inline_message_2417.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9584,12 +9556,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2416._reactRetry = + (JSCompiler_object_inline_message_2417._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2416.nextSibling + JSCompiler_object_inline_message_2417.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9607,73 +9579,73 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2418.children + JSCompiler_object_inline_stack_2419.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2419) + if (JSCompiler_object_inline_componentStack_2420) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2419 = - JSCompiler_object_inline_stack_2418.fallback), - (JSCompiler_object_inline_message_2416 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2420 = + JSCompiler_object_inline_stack_2419.fallback), + (JSCompiler_object_inline_message_2417 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2418.children + children: JSCompiler_object_inline_stack_2419.children }), disableLegacyMode || - (JSCompiler_object_inline_message_2416 & ConcurrentMode) !== NoMode || + (JSCompiler_object_inline_message_2417 & ConcurrentMode) !== NoMode || workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2418 = createWorkInProgress( + ? ((JSCompiler_object_inline_stack_2419 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2418.subtreeFlags = + (JSCompiler_object_inline_stack_2419.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2418 = workInProgress.child), - (JSCompiler_object_inline_stack_2418.childLanes = 0), - (JSCompiler_object_inline_stack_2418.pendingProps = + : ((JSCompiler_object_inline_stack_2419 = workInProgress.child), + (JSCompiler_object_inline_stack_2419.childLanes = 0), + (JSCompiler_object_inline_stack_2419.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2418.actualDuration = -0), - (JSCompiler_object_inline_stack_2418.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2418.selfBaseDuration = + ((JSCompiler_object_inline_stack_2419.actualDuration = -0), + (JSCompiler_object_inline_stack_2419.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2419.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2418.treeBaseDuration = + (JSCompiler_object_inline_stack_2419.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)), null !== instance - ? (JSCompiler_object_inline_componentStack_2419 = + ? (JSCompiler_object_inline_componentStack_2420 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2419 + JSCompiler_object_inline_componentStack_2420 )) - : ((JSCompiler_object_inline_componentStack_2419 = + : ((JSCompiler_object_inline_componentStack_2420 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2419, - JSCompiler_object_inline_message_2416, + JSCompiler_object_inline_componentStack_2420, + JSCompiler_object_inline_message_2417, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2419.flags |= 2)), - (JSCompiler_object_inline_componentStack_2419.return = + (JSCompiler_object_inline_componentStack_2420.flags |= 2)), + (JSCompiler_object_inline_componentStack_2420.return = workInProgress), - (JSCompiler_object_inline_stack_2418.return = workInProgress), - (JSCompiler_object_inline_stack_2418.sibling = - JSCompiler_object_inline_componentStack_2419), - (workInProgress.child = JSCompiler_object_inline_stack_2418), - (JSCompiler_object_inline_stack_2418 = - JSCompiler_object_inline_componentStack_2419), - (JSCompiler_object_inline_componentStack_2419 = workInProgress.child), - (JSCompiler_object_inline_message_2416 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2416 - ? (JSCompiler_object_inline_message_2416 = + (JSCompiler_object_inline_stack_2419.return = workInProgress), + (JSCompiler_object_inline_stack_2419.sibling = + JSCompiler_object_inline_componentStack_2420), + (workInProgress.child = JSCompiler_object_inline_stack_2419), + (JSCompiler_object_inline_stack_2419 = + JSCompiler_object_inline_componentStack_2420), + (JSCompiler_object_inline_componentStack_2420 = workInProgress.child), + (JSCompiler_object_inline_message_2417 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2417 + ? (JSCompiler_object_inline_message_2417 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2416.cachePool), + JSCompiler_object_inline_message_2417.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9681,34 +9653,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2416 = { + (JSCompiler_object_inline_message_2417 = { baseLanes: - JSCompiler_object_inline_message_2416.baseLanes | renderLanes, + JSCompiler_object_inline_message_2417.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2419.memoizedState = - JSCompiler_object_inline_message_2416), + (JSCompiler_object_inline_componentStack_2420.memoizedState = + JSCompiler_object_inline_message_2417), enableTransitionTracing && - ((JSCompiler_object_inline_message_2416 = enableTransitionTracing + ((JSCompiler_object_inline_message_2417 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2416 && + null !== JSCompiler_object_inline_message_2417 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2419.updateQueue), + JSCompiler_object_inline_componentStack_2420.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2419.updateQueue = { - transitions: JSCompiler_object_inline_message_2416, + ? (JSCompiler_object_inline_componentStack_2420.updateQueue = { + transitions: JSCompiler_object_inline_message_2417, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2419.updateQueue = + ? (JSCompiler_object_inline_componentStack_2420.updateQueue = { - transitions: JSCompiler_object_inline_message_2416, + transitions: JSCompiler_object_inline_message_2417, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9716,41 +9688,41 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2416), + JSCompiler_object_inline_message_2417), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2419.childLanes = + (JSCompiler_object_inline_componentStack_2420.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2417, + JSCompiler_object_inline_digest_2418, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2418 + JSCompiler_object_inline_stack_2419 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2417 = current.child; - current = JSCompiler_object_inline_digest_2417.sibling; - JSCompiler_object_inline_digest_2417 = createWorkInProgress( - JSCompiler_object_inline_digest_2417, + JSCompiler_object_inline_digest_2418 = current.child; + current = JSCompiler_object_inline_digest_2418.sibling; + JSCompiler_object_inline_digest_2418 = createWorkInProgress( + JSCompiler_object_inline_digest_2418, { mode: "visible", - children: JSCompiler_object_inline_stack_2418.children + children: JSCompiler_object_inline_stack_2419.children } ); disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode || - (JSCompiler_object_inline_digest_2417.lanes = renderLanes); - JSCompiler_object_inline_digest_2417.return = workInProgress; - JSCompiler_object_inline_digest_2417.sibling = null; + (JSCompiler_object_inline_digest_2418.lanes = renderLanes); + JSCompiler_object_inline_digest_2418.return = workInProgress; + JSCompiler_object_inline_digest_2418.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2417; + workInProgress.child = JSCompiler_object_inline_digest_2418; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2417; + return JSCompiler_object_inline_digest_2418; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -10130,8 +10102,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -10773,8 +10745,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -12338,16 +12310,35 @@ __DEV__ && pop(markerInstanceStack, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return (current.mode & ProfileMode) !== NoMode; } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -12465,10 +12456,18 @@ __DEV__ && finishedWork ) : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStarted(finishedWork)), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = !0), - safelyCallDestroy( + runWithFiberInDEV( + finishedWork, + callDestroyInDEV, finishedWork, nearestMountedAncestor, destroy @@ -12483,7 +12482,11 @@ __DEV__ && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped())); } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -12493,10 +12496,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -12504,14 +12507,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -12616,8 +12619,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -12625,7 +12628,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -12649,12 +12652,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -12679,12 +12682,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$19) { @@ -12696,11 +12698,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$20) { @@ -12708,15 +12710,6 @@ __DEV__ && } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - runWithFiberInDEV( - current, - callDestroyInDEV, - current, - nearestMountedAncestor, - destroy - ); - } function commitProfiler(finishedWork, current, commitTime, effectDuration) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, @@ -13134,15 +13127,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -13169,8 +13162,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -13180,7 +13173,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -13195,27 +13188,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$16) { captureCommitPhaseError( @@ -13225,6 +13219,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -13237,9 +13232,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -13247,7 +13244,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -13256,19 +13253,7 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -13678,95 +13663,19 @@ __DEV__ && case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - var tag = prevHostParentIsContainer.tag, - inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (tag = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : (tag & Layout) !== NoFlags && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -13994,19 +13903,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - (finishedWork.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -14031,113 +13932,110 @@ __DEV__ && flags & 512 && null !== current && safelyDetachRef(current, current.return); - if (flags & 4) { - var currentResource = - null !== current ? current.memoizedState : null; - flags = finishedWork.memoizedState; - if (null === current) + if (flags & 4) + if ( + ((root = null !== current ? current.memoizedState : null), + (flags = finishedWork.memoizedState), + null === current) + ) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - hoistableRoot = - hoistableRoot.ownerDocument || hoistableRoot; + root = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - currentResource = - hoistableRoot.getElementsByTagName("title")[0]; + hoistableRoot = root.getElementsByTagName("title")[0]; if ( - !currentResource || - currentResource[internalHoistableMarker] || - currentResource[internalInstanceKey] || - currentResource.namespaceURI === SVG_NAMESPACE || - currentResource.hasAttribute("itemprop") + !hoistableRoot || + hoistableRoot[internalHoistableMarker] || + hoistableRoot[internalInstanceKey] || + hoistableRoot.namespaceURI === SVG_NAMESPACE || + hoistableRoot.hasAttribute("itemprop") ) - (currentResource = - hoistableRoot.createElement(flags)), - hoistableRoot.head.insertBefore( - currentResource, - hoistableRoot.querySelector("head > title") + (hoistableRoot = root.createElement(flags)), + root.head.insertBefore( + hoistableRoot, + root.querySelector("head > title") ); - setInitialProperties(currentResource, flags, current); - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + setInitialProperties(hoistableRoot, flags, current); + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; break a; case "link": - if ( - (root = getHydratableHoistableCache( - "link", - "href", - hoistableRoot - ).get(flags + (current.href || ""))) - ) - for (var i = 0; i < root.length; i++) + var maybeNodes = getHydratableHoistableCache( + "link", + "href", + root + ).get(flags + (current.href || "")); + if (maybeNodes) + for (var i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = root[i]), - currentResource.getAttribute("href") === + ((hoistableRoot = maybeNodes[i]), + hoistableRoot.getAttribute("href") === (null == current.href ? null : current.href) && - currentResource.getAttribute("rel") === + hoistableRoot.getAttribute("rel") === (null == current.rel ? null : current.rel) && - currentResource.getAttribute("title") === + hoistableRoot.getAttribute("title") === (null == current.title ? null : current.title) && - currentResource.getAttribute("crossorigin") === + hoistableRoot.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) ) { - root.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; case "meta": if ( - (root = getHydratableHoistableCache( + (maybeNodes = getHydratableHoistableCache( "meta", "content", - hoistableRoot + root ).get(flags + (current.content || ""))) ) - for (i = 0; i < root.length; i++) + for (i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = root[i]), + ((hoistableRoot = maybeNodes[i]), checkAttributeStringCoercion( current.content, "content" ), - currentResource.getAttribute("content") === + hoistableRoot.getAttribute("content") === (null == current.content ? null : "" + current.content) && - currentResource.getAttribute("name") === + hoistableRoot.getAttribute("name") === (null == current.name ? null : current.name) && - currentResource.getAttribute("property") === + hoistableRoot.getAttribute("property") === (null == current.property ? null : current.property) && - currentResource.getAttribute("http-equiv") === + hoistableRoot.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - currentResource.getAttribute("charset") === + hoistableRoot.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) ) { - root.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; default: throw Error( @@ -14146,9 +14044,9 @@ __DEV__ && '". This is a bug in React.' ); } - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; } finishedWork.stateNode = flags; } else @@ -14164,12 +14062,12 @@ __DEV__ && finishedWork.memoizedProps ); else - currentResource !== flags - ? (null === currentResource + root !== flags + ? (null === root ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : currentResource.count--, + : root.count--, null === flags ? mountHoistable( hoistableRoot, @@ -14188,12 +14086,11 @@ __DEV__ && finishedWork.memoizedProps, current.memoizedProps ); - } break; case 27: if (flags & 4 && null === finishedWork.alternate) { hoistableRoot = finishedWork.stateNode; - currentResource = finishedWork.memoizedProps; + maybeNodes = finishedWork.memoizedProps; try { for (i = hoistableRoot.firstChild; i; ) { var nextNode = i.nextSibling, @@ -14212,7 +14109,7 @@ __DEV__ && finishedWork, acquireSingletonInstance, finishedWork.type, - currentResource, + maybeNodes, hoistableRoot, finishedWork ); @@ -14231,9 +14128,9 @@ __DEV__ && null !== current && safelyDetachRef(current, current.return); if (finishedWork.flags & 32) { - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { - runWithFiberInDEV(finishedWork, resetTextContent, hoistableRoot); + runWithFiberInDEV(finishedWork, resetTextContent, root); } catch (error$26) { captureCommitPhaseError( finishedWork, @@ -14244,11 +14141,11 @@ __DEV__ && } flags & 4 && null != finishedWork.stateNode && - ((hoistableRoot = finishedWork.memoizedProps), + ((root = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - hoistableRoot, - null !== current ? current.memoizedProps : hoistableRoot + root, + null !== current ? current.memoizedProps : root )); flags & 1024 && ((needsFormReset = !0), @@ -14267,12 +14164,12 @@ __DEV__ && ); flags = finishedWork.memoizedProps; current = null !== current ? current.memoizedProps : flags; - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { runWithFiberInDEV( finishedWork, commitTextUpdate, - hoistableRoot, + root, current, flags ); @@ -14286,11 +14183,12 @@ __DEV__ && } break; case 3: + hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - hoistableRoot = currentHoistableRoot; + maybeNodes = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = hoistableRoot; + currentHoistableRoot = maybeNodes; commitReconciliationEffects(finishedWork); if ( flags & 4 && @@ -14312,6 +14210,7 @@ __DEV__ && } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); + root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: flags = currentHoistableRoot; @@ -14322,18 +14221,22 @@ __DEV__ && commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); finishedWork.child.flags & 8192 && - ((hoistableRoot = null !== finishedWork.memoizedState), + ((root = null !== finishedWork.memoizedState), (current = null !== current && null !== current.memoizedState), alwaysThrottleRetries - ? hoistableRoot !== current && - (globalMostRecentFallbackTime = now$1()) - : hoistableRoot && - !current && - (globalMostRecentFallbackTime = now$1())); + ? root !== current && (globalMostRecentFallbackTime = now$1()) + : root && !current && (globalMostRecentFallbackTime = now$1())); if (flags & 4) { try { if (null !== finishedWork.memoizedState) { @@ -14425,17 +14328,17 @@ __DEV__ && if (null === current) { nextNode = root; try { - (currentResource = nextNode.stateNode), + (maybeNodes = nextNode.stateNode), i ? runWithFiberInDEV( nextNode, hideTextInstance, - currentResource + maybeNodes ) : runWithFiberInDEV( nextNode, unhideTextInstance, - currentResource, + maybeNodes, nextNode.memoizedProps ); } catch (error$28) { @@ -14538,23 +14441,11 @@ __DEV__ && case 11: case 14: case 15: - if ((finishedWork.mode & ProfileMode) !== NoMode) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -14651,14 +14542,16 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -14666,7 +14559,7 @@ __DEV__ && finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -14675,21 +14568,12 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -14845,6 +14729,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -14912,37 +14797,33 @@ __DEV__ && clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -14959,9 +14840,9 @@ __DEV__ && ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -14973,21 +14854,21 @@ __DEV__ && finishedRoot, finishedWork ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions )) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -14999,7 +14880,7 @@ __DEV__ && commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -15298,12 +15179,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -17994,7 +17887,7 @@ __DEV__ && identifierPrefix++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (identifierPrefix = 0; 31 > identifierPrefix; identifierPrefix++) @@ -18683,41 +18576,41 @@ __DEV__ && : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmp494383497$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmp1796948182$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmp494383497$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmp1796948182$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmp494383497$1.defaultView) + : $jscomp$optchain$tmp1796948182$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmp494383497$1 = getActiveElement( + $jscomp$optchain$tmp1796948182$1 = getActiveElement( containerInfo.document ); - $jscomp$optchain$tmp494383497$1 instanceof + $jscomp$optchain$tmp1796948182$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmp494383497$1.contentWindow.location.href; + typeof $jscomp$optchain$tmp1796948182$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmp494383497$1.contentWindow; + containerInfo = $jscomp$optchain$tmp1796948182$1.contentWindow; else break; - $jscomp$optchain$tmp494383497$1 = getActiveElement( + $jscomp$optchain$tmp1796948182$1 = getActiveElement( containerInfo.document ); } - return $jscomp$optchain$tmp494383497$1; + return $jscomp$optchain$tmp1796948182$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -26760,10 +26653,9 @@ __DEV__ && return unstable_useContextWithBailout(context, select); }; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -27882,11 +27774,11 @@ __DEV__ && : flushSyncErrorInBuildsThatSupportLegacyMode; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-7b56a542-20240917" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-4549be0f-20240917" !== 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-7b56a542-20240917\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-4549be0f-20240917\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27930,11 +27822,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-7b56a542-20240917", + version: "19.0.0-www-classic-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28587,7 +28479,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-7b56a542-20240917"; + exports.version = "19.0.0-www-classic-4549be0f-20240917"; "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 c6979d6411..0a1c665ffc 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -824,20 +824,6 @@ __DEV__ && typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } - function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); - } - function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); - } function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -7207,6 +7193,21 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -7226,44 +7227,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -8891,32 +8863,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2438; - var JSCompiler_object_inline_stack_2439 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2439; + var JSCompiler_object_inline_stack_2440 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2440 = !1; + var JSCompiler_object_inline_componentStack_2441 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2438 = didSuspend) || - (JSCompiler_object_inline_digest_2438 = + (JSCompiler_object_inline_digest_2439 = didSuspend) || + (JSCompiler_object_inline_digest_2439 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2438 && - ((JSCompiler_object_inline_componentStack_2440 = !0), + JSCompiler_object_inline_digest_2439 && + ((JSCompiler_object_inline_componentStack_2441 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2438 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2439 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2440 + JSCompiler_object_inline_componentStack_2441 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2437 = nextHydratableInstance; + var JSCompiler_object_inline_message_2438 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2437)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2438)) { c: { - var instance = JSCompiler_object_inline_message_2437; + var instance = JSCompiler_object_inline_message_2438; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -8957,19 +8929,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2437 + JSCompiler_object_inline_message_2438 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2437 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2438 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2437 && - ((JSCompiler_object_inline_message_2437 = - JSCompiler_object_inline_message_2437.dehydrated), - null !== JSCompiler_object_inline_message_2437) + null !== JSCompiler_object_inline_message_2438 && + ((JSCompiler_object_inline_message_2438 = + JSCompiler_object_inline_message_2438.dehydrated), + null !== JSCompiler_object_inline_message_2438) ) return ( - JSCompiler_object_inline_message_2437.data === + JSCompiler_object_inline_message_2438.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8977,27 +8949,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2437 = - JSCompiler_object_inline_stack_2439.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2439.fallback; - if (JSCompiler_object_inline_componentStack_2440) + JSCompiler_object_inline_message_2438 = + JSCompiler_object_inline_stack_2440.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2440.fallback; + if (JSCompiler_object_inline_componentStack_2441) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2439 = + (JSCompiler_object_inline_stack_2440 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2437, + JSCompiler_object_inline_message_2438, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2440 = + (JSCompiler_object_inline_componentStack_2441 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2440.memoizedState = + (JSCompiler_object_inline_componentStack_2441.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2440.childLanes = + (JSCompiler_object_inline_componentStack_2441.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2438, + JSCompiler_object_inline_digest_2439, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9010,9 +8982,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2440.updateQueue), + JSCompiler_object_inline_componentStack_2441.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2440.updateQueue = + ? (JSCompiler_object_inline_componentStack_2441.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9020,46 +8992,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2439 + JSCompiler_object_inline_stack_2440 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2439.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2440.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2439 = + (JSCompiler_object_inline_stack_2440 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2437, + JSCompiler_object_inline_message_2438, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2440 = + (JSCompiler_object_inline_componentStack_2441 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2440.memoizedState = + (JSCompiler_object_inline_componentStack_2441.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2440.childLanes = + (JSCompiler_object_inline_componentStack_2441.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2438, + JSCompiler_object_inline_digest_2439, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2439 + JSCompiler_object_inline_stack_2440 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2437 + JSCompiler_object_inline_message_2438 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2437 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2437) + ((JSCompiler_object_inline_message_2438 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2438) ) { if (didSuspend) workInProgress.flags & 256 @@ -9076,94 +9048,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2440 = - JSCompiler_object_inline_stack_2439.fallback), - (JSCompiler_object_inline_message_2437 = workInProgress.mode), - (JSCompiler_object_inline_stack_2439 = + (JSCompiler_object_inline_componentStack_2441 = + JSCompiler_object_inline_stack_2440.fallback), + (JSCompiler_object_inline_message_2438 = workInProgress.mode), + (JSCompiler_object_inline_stack_2440 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2439.children + children: JSCompiler_object_inline_stack_2440.children }, - JSCompiler_object_inline_message_2437 + JSCompiler_object_inline_message_2438 )), - (JSCompiler_object_inline_componentStack_2440 = + (JSCompiler_object_inline_componentStack_2441 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2440, - JSCompiler_object_inline_message_2437, + JSCompiler_object_inline_componentStack_2441, + JSCompiler_object_inline_message_2438, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2440.flags |= 2), - (JSCompiler_object_inline_stack_2439.return = workInProgress), - (JSCompiler_object_inline_componentStack_2440.return = + (JSCompiler_object_inline_componentStack_2441.flags |= 2), + (JSCompiler_object_inline_stack_2440.return = workInProgress), + (JSCompiler_object_inline_componentStack_2441.return = workInProgress), - (JSCompiler_object_inline_stack_2439.sibling = - JSCompiler_object_inline_componentStack_2440), - (workInProgress.child = JSCompiler_object_inline_stack_2439), + (JSCompiler_object_inline_stack_2440.sibling = + JSCompiler_object_inline_componentStack_2441), + (workInProgress.child = JSCompiler_object_inline_stack_2440), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2439 = workInProgress.child), - (JSCompiler_object_inline_stack_2439.memoizedState = + (JSCompiler_object_inline_stack_2440 = workInProgress.child), + (JSCompiler_object_inline_stack_2440.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2439.childLanes = + (JSCompiler_object_inline_stack_2440.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2438, + JSCompiler_object_inline_digest_2439, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2440)); + JSCompiler_object_inline_componentStack_2441)); 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_2437.data === + JSCompiler_object_inline_message_2438.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2438 = - JSCompiler_object_inline_message_2437.nextSibling && - JSCompiler_object_inline_message_2437.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2438) { - JSCompiler_temp = JSCompiler_object_inline_digest_2438.dgst; - var message = JSCompiler_object_inline_digest_2438.msg; - instance = JSCompiler_object_inline_digest_2438.stck; - var componentStack = JSCompiler_object_inline_digest_2438.cstck; + JSCompiler_object_inline_digest_2439 = + JSCompiler_object_inline_message_2438.nextSibling && + JSCompiler_object_inline_message_2438.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2439) { + JSCompiler_temp = JSCompiler_object_inline_digest_2439.dgst; + var message = JSCompiler_object_inline_digest_2439.msg; + instance = JSCompiler_object_inline_digest_2439.stck; + var componentStack = JSCompiler_object_inline_digest_2439.cstck; } - JSCompiler_object_inline_message_2437 = message; - JSCompiler_object_inline_digest_2438 = JSCompiler_temp; - JSCompiler_object_inline_stack_2439 = instance; - JSCompiler_object_inline_componentStack_2440 = componentStack; - JSCompiler_object_inline_message_2437 = - JSCompiler_object_inline_message_2437 - ? Error(JSCompiler_object_inline_message_2437) + JSCompiler_object_inline_message_2438 = message; + JSCompiler_object_inline_digest_2439 = JSCompiler_temp; + JSCompiler_object_inline_stack_2440 = instance; + JSCompiler_object_inline_componentStack_2441 = componentStack; + JSCompiler_object_inline_message_2438 = + JSCompiler_object_inline_message_2438 + ? Error(JSCompiler_object_inline_message_2438) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2437.stack = - JSCompiler_object_inline_stack_2439 || ""; - JSCompiler_object_inline_message_2437.digest = - JSCompiler_object_inline_digest_2438; - JSCompiler_object_inline_digest_2438 = - void 0 === JSCompiler_object_inline_componentStack_2440 + JSCompiler_object_inline_message_2438.stack = + JSCompiler_object_inline_stack_2440 || ""; + JSCompiler_object_inline_message_2438.digest = + JSCompiler_object_inline_digest_2439; + JSCompiler_object_inline_digest_2439 = + void 0 === JSCompiler_object_inline_componentStack_2441 ? null - : JSCompiler_object_inline_componentStack_2440; - "string" === typeof JSCompiler_object_inline_digest_2438 && + : JSCompiler_object_inline_componentStack_2441; + "string" === typeof JSCompiler_object_inline_digest_2439 && CapturedStacks.set( - JSCompiler_object_inline_message_2437, - JSCompiler_object_inline_digest_2438 + JSCompiler_object_inline_message_2438, + JSCompiler_object_inline_digest_2439 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2437, + value: JSCompiler_object_inline_message_2438, source: null, - stack: JSCompiler_object_inline_digest_2438 + stack: JSCompiler_object_inline_digest_2439 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9178,25 +9150,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2438 = + (JSCompiler_object_inline_digest_2439 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2438) + didReceiveUpdate || JSCompiler_object_inline_digest_2439) ) { - JSCompiler_object_inline_digest_2438 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2438) { - JSCompiler_object_inline_stack_2439 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2439 & 42)) - JSCompiler_object_inline_stack_2439 = 1; + JSCompiler_object_inline_digest_2439 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2439) { + JSCompiler_object_inline_stack_2440 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2440 & 42)) + JSCompiler_object_inline_stack_2440 = 1; else - switch (JSCompiler_object_inline_stack_2439) { + switch (JSCompiler_object_inline_stack_2440) { case 2: - JSCompiler_object_inline_stack_2439 = 1; + JSCompiler_object_inline_stack_2440 = 1; break; case 8: - JSCompiler_object_inline_stack_2439 = 4; + JSCompiler_object_inline_stack_2440 = 4; break; case 32: - JSCompiler_object_inline_stack_2439 = 16; + JSCompiler_object_inline_stack_2440 = 16; break; case 128: case 256: @@ -9217,40 +9189,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2439 = 64; + JSCompiler_object_inline_stack_2440 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2439 = 134217728; + JSCompiler_object_inline_stack_2440 = 134217728; break; default: - JSCompiler_object_inline_stack_2439 = 0; + JSCompiler_object_inline_stack_2440 = 0; } - JSCompiler_object_inline_stack_2439 = + JSCompiler_object_inline_stack_2440 = 0 !== - (JSCompiler_object_inline_stack_2439 & - (JSCompiler_object_inline_digest_2438.suspendedLanes | + (JSCompiler_object_inline_stack_2440 & + (JSCompiler_object_inline_digest_2439.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2439; + : JSCompiler_object_inline_stack_2440; if ( - 0 !== JSCompiler_object_inline_stack_2439 && - JSCompiler_object_inline_stack_2439 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2440 && + JSCompiler_object_inline_stack_2440 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2439), + ((prevState.retryLane = JSCompiler_object_inline_stack_2440), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2439 + JSCompiler_object_inline_stack_2440 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2438, + JSCompiler_object_inline_digest_2439, current, - JSCompiler_object_inline_stack_2439 + JSCompiler_object_inline_stack_2440 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2437.data === + JSCompiler_object_inline_message_2438.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9258,7 +9230,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2437.data === + JSCompiler_object_inline_message_2438.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9266,12 +9238,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2437._reactRetry = + (JSCompiler_object_inline_message_2438._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2437.nextSibling + JSCompiler_object_inline_message_2438.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9289,57 +9261,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2439.children + JSCompiler_object_inline_stack_2440.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2440) + if (JSCompiler_object_inline_componentStack_2441) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2440 = - JSCompiler_object_inline_stack_2439.fallback), - (JSCompiler_object_inline_message_2437 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2441 = + JSCompiler_object_inline_stack_2440.fallback), + (JSCompiler_object_inline_message_2438 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2439 = createWorkInProgress( + (JSCompiler_object_inline_stack_2440 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2439.children + children: JSCompiler_object_inline_stack_2440.children } )), - (JSCompiler_object_inline_stack_2439.subtreeFlags = + (JSCompiler_object_inline_stack_2440.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2440 = + ? (JSCompiler_object_inline_componentStack_2441 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2440 + JSCompiler_object_inline_componentStack_2441 )) - : ((JSCompiler_object_inline_componentStack_2440 = + : ((JSCompiler_object_inline_componentStack_2441 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2440, - JSCompiler_object_inline_message_2437, + JSCompiler_object_inline_componentStack_2441, + JSCompiler_object_inline_message_2438, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2440.flags |= 2)), - (JSCompiler_object_inline_componentStack_2440.return = + (JSCompiler_object_inline_componentStack_2441.flags |= 2)), + (JSCompiler_object_inline_componentStack_2441.return = workInProgress), - (JSCompiler_object_inline_stack_2439.return = workInProgress), - (JSCompiler_object_inline_stack_2439.sibling = - JSCompiler_object_inline_componentStack_2440), - (workInProgress.child = JSCompiler_object_inline_stack_2439), - (JSCompiler_object_inline_stack_2439 = - JSCompiler_object_inline_componentStack_2440), - (JSCompiler_object_inline_componentStack_2440 = workInProgress.child), - (JSCompiler_object_inline_message_2437 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2437 - ? (JSCompiler_object_inline_message_2437 = + (JSCompiler_object_inline_stack_2440.return = workInProgress), + (JSCompiler_object_inline_stack_2440.sibling = + JSCompiler_object_inline_componentStack_2441), + (workInProgress.child = JSCompiler_object_inline_stack_2440), + (JSCompiler_object_inline_stack_2440 = + JSCompiler_object_inline_componentStack_2441), + (JSCompiler_object_inline_componentStack_2441 = workInProgress.child), + (JSCompiler_object_inline_message_2438 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2438 + ? (JSCompiler_object_inline_message_2438 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2437.cachePool), + JSCompiler_object_inline_message_2438.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9347,34 +9319,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2437 = { + (JSCompiler_object_inline_message_2438 = { baseLanes: - JSCompiler_object_inline_message_2437.baseLanes | renderLanes, + JSCompiler_object_inline_message_2438.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2440.memoizedState = - JSCompiler_object_inline_message_2437), + (JSCompiler_object_inline_componentStack_2441.memoizedState = + JSCompiler_object_inline_message_2438), enableTransitionTracing && - ((JSCompiler_object_inline_message_2437 = enableTransitionTracing + ((JSCompiler_object_inline_message_2438 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2437 && + null !== JSCompiler_object_inline_message_2438 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2440.updateQueue), + JSCompiler_object_inline_componentStack_2441.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2440.updateQueue = { - transitions: JSCompiler_object_inline_message_2437, + ? (JSCompiler_object_inline_componentStack_2441.updateQueue = { + transitions: JSCompiler_object_inline_message_2438, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2440.updateQueue = + ? (JSCompiler_object_inline_componentStack_2441.updateQueue = { - transitions: JSCompiler_object_inline_message_2437, + transitions: JSCompiler_object_inline_message_2438, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9382,32 +9354,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2437), + JSCompiler_object_inline_message_2438), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2440.childLanes = + (JSCompiler_object_inline_componentStack_2441.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2438, + JSCompiler_object_inline_digest_2439, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2439 + JSCompiler_object_inline_stack_2440 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2439.children + children: JSCompiler_object_inline_stack_2440.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2438 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2438 + ((JSCompiler_object_inline_digest_2439 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2439 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2438.push(current)); + : JSCompiler_object_inline_digest_2439.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -9763,8 +9735,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -10406,8 +10378,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -11900,16 +11872,35 @@ __DEV__ && pop(markerInstanceStack, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return (current.mode & ProfileMode) !== NoMode; } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -12027,10 +12018,18 @@ __DEV__ && finishedWork ) : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStarted(finishedWork)), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = !0), - safelyCallDestroy( + runWithFiberInDEV( + finishedWork, + callDestroyInDEV, finishedWork, nearestMountedAncestor, destroy @@ -12045,7 +12044,11 @@ __DEV__ && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped())); } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -12055,10 +12058,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -12066,14 +12069,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -12168,8 +12171,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -12177,7 +12180,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -12201,12 +12204,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -12231,12 +12234,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$19) { @@ -12248,11 +12250,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$20) { @@ -12260,15 +12262,6 @@ __DEV__ && } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - runWithFiberInDEV( - current, - callDestroyInDEV, - current, - nearestMountedAncestor, - destroy - ); - } function commitProfiler(finishedWork, current, commitTime, effectDuration) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, @@ -12701,15 +12694,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -12736,8 +12729,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -12747,7 +12740,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -12762,27 +12755,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$16) { captureCommitPhaseError( @@ -12792,6 +12786,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -12804,9 +12799,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -12814,7 +12811,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -12823,19 +12820,7 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -13237,95 +13222,19 @@ __DEV__ && case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - var tag = prevHostParentIsContainer.tag, - inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (tag = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : (tag & Layout) !== NoFlags && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -13547,19 +13456,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - (finishedWork.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -13584,113 +13485,110 @@ __DEV__ && flags & 512 && null !== current && safelyDetachRef(current, current.return); - if (flags & 4) { - var currentResource = - null !== current ? current.memoizedState : null; - flags = finishedWork.memoizedState; - if (null === current) + if (flags & 4) + if ( + ((root = null !== current ? current.memoizedState : null), + (flags = finishedWork.memoizedState), + null === current) + ) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - hoistableRoot = - hoistableRoot.ownerDocument || hoistableRoot; + root = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - currentResource = - hoistableRoot.getElementsByTagName("title")[0]; + hoistableRoot = root.getElementsByTagName("title")[0]; if ( - !currentResource || - currentResource[internalHoistableMarker] || - currentResource[internalInstanceKey] || - currentResource.namespaceURI === SVG_NAMESPACE || - currentResource.hasAttribute("itemprop") + !hoistableRoot || + hoistableRoot[internalHoistableMarker] || + hoistableRoot[internalInstanceKey] || + hoistableRoot.namespaceURI === SVG_NAMESPACE || + hoistableRoot.hasAttribute("itemprop") ) - (currentResource = - hoistableRoot.createElement(flags)), - hoistableRoot.head.insertBefore( - currentResource, - hoistableRoot.querySelector("head > title") + (hoistableRoot = root.createElement(flags)), + root.head.insertBefore( + hoistableRoot, + root.querySelector("head > title") ); - setInitialProperties(currentResource, flags, current); - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + setInitialProperties(hoistableRoot, flags, current); + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; break a; case "link": - if ( - (root = getHydratableHoistableCache( - "link", - "href", - hoistableRoot - ).get(flags + (current.href || ""))) - ) - for (var i = 0; i < root.length; i++) + var maybeNodes = getHydratableHoistableCache( + "link", + "href", + root + ).get(flags + (current.href || "")); + if (maybeNodes) + for (var i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = root[i]), - currentResource.getAttribute("href") === + ((hoistableRoot = maybeNodes[i]), + hoistableRoot.getAttribute("href") === (null == current.href ? null : current.href) && - currentResource.getAttribute("rel") === + hoistableRoot.getAttribute("rel") === (null == current.rel ? null : current.rel) && - currentResource.getAttribute("title") === + hoistableRoot.getAttribute("title") === (null == current.title ? null : current.title) && - currentResource.getAttribute("crossorigin") === + hoistableRoot.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) ) { - root.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; case "meta": if ( - (root = getHydratableHoistableCache( + (maybeNodes = getHydratableHoistableCache( "meta", "content", - hoistableRoot + root ).get(flags + (current.content || ""))) ) - for (i = 0; i < root.length; i++) + for (i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = root[i]), + ((hoistableRoot = maybeNodes[i]), checkAttributeStringCoercion( current.content, "content" ), - currentResource.getAttribute("content") === + hoistableRoot.getAttribute("content") === (null == current.content ? null : "" + current.content) && - currentResource.getAttribute("name") === + hoistableRoot.getAttribute("name") === (null == current.name ? null : current.name) && - currentResource.getAttribute("property") === + hoistableRoot.getAttribute("property") === (null == current.property ? null : current.property) && - currentResource.getAttribute("http-equiv") === + hoistableRoot.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - currentResource.getAttribute("charset") === + hoistableRoot.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) ) { - root.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; default: throw Error( @@ -13699,9 +13597,9 @@ __DEV__ && '". This is a bug in React.' ); } - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; } finishedWork.stateNode = flags; } else @@ -13717,12 +13615,12 @@ __DEV__ && finishedWork.memoizedProps ); else - currentResource !== flags - ? (null === currentResource + root !== flags + ? (null === root ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : currentResource.count--, + : root.count--, null === flags ? mountHoistable( hoistableRoot, @@ -13741,12 +13639,11 @@ __DEV__ && finishedWork.memoizedProps, current.memoizedProps ); - } break; case 27: if (flags & 4 && null === finishedWork.alternate) { hoistableRoot = finishedWork.stateNode; - currentResource = finishedWork.memoizedProps; + maybeNodes = finishedWork.memoizedProps; try { for (i = hoistableRoot.firstChild; i; ) { var nextNode = i.nextSibling, @@ -13765,7 +13662,7 @@ __DEV__ && finishedWork, acquireSingletonInstance, finishedWork.type, - currentResource, + maybeNodes, hoistableRoot, finishedWork ); @@ -13784,9 +13681,9 @@ __DEV__ && null !== current && safelyDetachRef(current, current.return); if (finishedWork.flags & 32) { - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { - runWithFiberInDEV(finishedWork, resetTextContent, hoistableRoot); + runWithFiberInDEV(finishedWork, resetTextContent, root); } catch (error$26) { captureCommitPhaseError( finishedWork, @@ -13797,11 +13694,11 @@ __DEV__ && } flags & 4 && null != finishedWork.stateNode && - ((hoistableRoot = finishedWork.memoizedProps), + ((root = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - hoistableRoot, - null !== current ? current.memoizedProps : hoistableRoot + root, + null !== current ? current.memoizedProps : root )); flags & 1024 && ((needsFormReset = !0), @@ -13820,12 +13717,12 @@ __DEV__ && ); flags = finishedWork.memoizedProps; current = null !== current ? current.memoizedProps : flags; - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { runWithFiberInDEV( finishedWork, commitTextUpdate, - hoistableRoot, + root, current, flags ); @@ -13839,11 +13736,12 @@ __DEV__ && } break; case 3: + hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - hoistableRoot = currentHoistableRoot; + maybeNodes = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = hoistableRoot; + currentHoistableRoot = maybeNodes; commitReconciliationEffects(finishedWork); if ( flags & 4 && @@ -13865,6 +13763,7 @@ __DEV__ && } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); + root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: flags = currentHoistableRoot; @@ -13875,18 +13774,22 @@ __DEV__ && commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); finishedWork.child.flags & 8192 && - ((hoistableRoot = null !== finishedWork.memoizedState), + ((root = null !== finishedWork.memoizedState), (current = null !== current && null !== current.memoizedState), alwaysThrottleRetries - ? hoistableRoot !== current && - (globalMostRecentFallbackTime = now$1()) - : hoistableRoot && - !current && - (globalMostRecentFallbackTime = now$1())); + ? root !== current && (globalMostRecentFallbackTime = now$1()) + : root && !current && (globalMostRecentFallbackTime = now$1())); if (flags & 4) { try { if (null !== finishedWork.memoizedState) { @@ -13974,17 +13877,17 @@ __DEV__ && if (null === current) { nextNode = root; try { - (currentResource = nextNode.stateNode), + (maybeNodes = nextNode.stateNode), i ? runWithFiberInDEV( nextNode, hideTextInstance, - currentResource + maybeNodes ) : runWithFiberInDEV( nextNode, unhideTextInstance, - currentResource, + maybeNodes, nextNode.memoizedProps ); } catch (error$28) { @@ -14087,23 +13990,11 @@ __DEV__ && case 11: case 14: case 15: - if ((finishedWork.mode & ProfileMode) !== NoMode) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -14207,14 +14098,16 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -14222,7 +14115,7 @@ __DEV__ && finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -14231,21 +14124,12 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -14401,6 +14285,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -14468,37 +14353,33 @@ __DEV__ && clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -14515,9 +14396,9 @@ __DEV__ && ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -14528,14 +14409,14 @@ __DEV__ && finishedRoot, finishedWork ) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -14547,7 +14428,7 @@ __DEV__ && commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -14837,12 +14718,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -17408,7 +17301,7 @@ __DEV__ && tag++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); @@ -18017,41 +17910,41 @@ __DEV__ && : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmp962334877$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmp2083589854$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmp962334877$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmp2083589854$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmp962334877$1.defaultView) + : $jscomp$optchain$tmp2083589854$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmp962334877$1 = getActiveElement( + $jscomp$optchain$tmp2083589854$1 = getActiveElement( containerInfo.document ); - $jscomp$optchain$tmp962334877$1 instanceof + $jscomp$optchain$tmp2083589854$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmp962334877$1.contentWindow.location.href; + typeof $jscomp$optchain$tmp2083589854$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmp962334877$1.contentWindow; + containerInfo = $jscomp$optchain$tmp2083589854$1.contentWindow; else break; - $jscomp$optchain$tmp962334877$1 = getActiveElement( + $jscomp$optchain$tmp2083589854$1 = getActiveElement( containerInfo.document ); } - return $jscomp$optchain$tmp962334877$1; + return $jscomp$optchain$tmp2083589854$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -25879,10 +25772,9 @@ __DEV__ && return unstable_useContextWithBailout(context, select); }; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -26999,11 +26891,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-7b56a542-20240917" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-4549be0f-20240917" !== 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-7b56a542-20240917\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-4549be0f-20240917\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27046,11 +26938,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-7b56a542-20240917", + version: "19.0.0-www-modern-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27655,7 +27547,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-7b56a542-20240917"; + exports.version = "19.0.0-www-modern-4549be0f-20240917"; "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 badc37fa84..992365fb78 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -8465,7 +8465,7 @@ function commitHookEffectListMount(flags, finishedWork) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -8477,9 +8477,20 @@ function commitHookEffectListUnmount( if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + if (void 0 !== destroy) { + inst.destroy = void 0; + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8561,11 +8572,25 @@ function safelyDetachRef(current, nearestMountedAncestor) { } else ref.current = null; } -function safelyCallDestroy(current, nearestMountedAncestor, destroy) { +function commitProfilerPostCommit( + finishedWork, + current, + commitTime, + passiveEffectDuration +) { try { - destroy(); + var _finishedWork$memoize2 = finishedWork.memoizedProps, + id = _finishedWork$memoize2.id, + onPostCommit = _finishedWork$memoize2.onPostCommit; + "function" === typeof onPostCommit && + onPostCommit( + id, + null === current ? "mount" : "update", + passiveEffectDuration, + commitTime + ); } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHostMount(finishedWork) { @@ -8699,7 +8724,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$230) { + } catch (e$221) { JSCompiler_temp = null; break a; } @@ -8945,23 +8970,6 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { break; case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -9266,7 +9274,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$181 = hostParentIsContainer; + var prevHostParentIsContainer$180 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9274,7 +9282,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$181; + hostParentIsContainer = prevHostParentIsContainer$180; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9341,67 +9349,11 @@ function commitDeletionEffectsOnFiber( case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - prevHostParentIsContainer$181 = prevHostParentIsContainer.tag; - var inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$181 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (prevHostParentIsContainer$181 & 4) || - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (prevHostParentIsContainer$181 = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$181 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (prevHostParentIsContainer$181 & 4) && - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -9460,15 +9412,15 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$191 = finishedWork.alternate; + var current$183 = finishedWork.alternate; if ( - null !== current$191 && - ((current$191 = current$191.memoizedState), - null !== current$191 && - ((current$191 = current$191.dehydrated), null !== current$191)) + null !== current$183 && + ((current$183 = current$183.memoizedState), + null !== current$183 && + ((current$183 = current$183.dehydrated), null !== current$183)) ) { try { - retryIfBlockedOn(current$191); + retryIfBlockedOn(current$183); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -9476,7 +9428,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$191); + onHydrated && onHydrated(current$183); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -9849,6 +9801,10 @@ function commitMutationEffectsOnFiber(finishedWork, root) { commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10116,7 +10072,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$198 = parentFiber.alternate, + var current$189 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -10137,18 +10093,18 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - current$198 = finishedWork; - finishedRoot = current$198.stateNode; + current$189 = finishedWork; + finishedRoot = current$189.stateNode; if ("function" === typeof finishedRoot.componentDidMount) try { finishedRoot.componentDidMount(); } catch (error) { - captureCommitPhaseError(current$198, current$198.return, error); + captureCommitPhaseError(current$189, current$189.return, error); } - current$198 = finishedWork; - finishedRoot = current$198.updateQueue; + current$189 = finishedWork; + finishedRoot = current$189.updateQueue; if (null !== finishedRoot) { - var instance = current$198.stateNode; + var instance = current$189.stateNode; try { var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks; if (null !== hiddenCallbacks) @@ -10159,7 +10115,7 @@ function recursivelyTraverseReappearLayoutEffects( ) callCallback(hiddenCallbacks[finishedRoot], instance); } catch (error) { - captureCommitPhaseError(current$198, current$198.return, error); + captureCommitPhaseError(current$189, current$189.return, error); } } includeWorkInProgressEffects && @@ -10176,7 +10132,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$198 && + null === current$189 && flags & 4 && commitHostMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -10187,23 +10143,6 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -10401,12 +10340,25 @@ function commitPassiveMountOnFiber( } break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); + flags & 2048 + ? (recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + -0, + finishedWork.stateNode.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -10541,9 +10493,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$205 = finishedWork.stateNode; + var instance$196 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$205._visibility & 4 + ? instance$196._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10556,7 +10508,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$205._visibility |= 4), + : ((instance$196._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10564,7 +10516,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$205._visibility |= 4), + : ((instance$196._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10577,7 +10529,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$205 + instance$196 ); break; case 24: @@ -10734,6 +10686,12 @@ function commitPassiveUnmountOnFiber(finishedWork) { finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return); break; + case 3: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; + case 12: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && @@ -11597,8 +11555,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$216) { - handleThrow(root, thrownValue$216); + } catch (thrownValue$207) { + handleThrow(root, thrownValue$207); } while (1); lanes && root.shellSuspendCounter++; @@ -11713,8 +11671,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$218) { - handleThrow(root, thrownValue$218); + } catch (thrownValue$209) { + handleThrow(root, thrownValue$209); } while (1); resetContextDependencies(); @@ -12063,7 +12021,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$225 = rootWithPendingPassiveEffects, + var root$216 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12078,7 +12036,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$225, remainingLanes); + releaseRootPooledCache(root$216, remainingLanes); } } return !1; @@ -13397,7 +13355,7 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$391; + var JSCompiler_inline_result$jscomp$382; if (canUseDOM) { var isSupported$jscomp$inline_1554 = "oninput" in document; if (!isSupported$jscomp$inline_1554) { @@ -13406,10 +13364,10 @@ if (canUseDOM) { isSupported$jscomp$inline_1554 = "function" === typeof element$jscomp$inline_1555.oninput; } - JSCompiler_inline_result$jscomp$391 = isSupported$jscomp$inline_1554; - } else JSCompiler_inline_result$jscomp$391 = !1; + JSCompiler_inline_result$jscomp$382 = isSupported$jscomp$inline_1554; + } else JSCompiler_inline_result$jscomp$382 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$391 && + JSCompiler_inline_result$jscomp$382 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13498,36 +13456,36 @@ function containsNode(outerNode, innerNode) { : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmp1245017784$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmpm920822322$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmp1245017784$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmpm920822322$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmp1245017784$1.defaultView) + : $jscomp$optchain$tmpm920822322$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmp1245017784$1 = getActiveElement(containerInfo.document); - $jscomp$optchain$tmp1245017784$1 instanceof containerInfo.HTMLIFrameElement; + $jscomp$optchain$tmpm920822322$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmpm920822322$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmp1245017784$1.contentWindow.location.href; + typeof $jscomp$optchain$tmpm920822322$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmp1245017784$1.contentWindow; + containerInfo = $jscomp$optchain$tmpm920822322$1.contentWindow; else break; - $jscomp$optchain$tmp1245017784$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmpm920822322$1 = getActiveElement(containerInfo.document); } - return $jscomp$optchain$tmp1245017784$1; + return $jscomp$optchain$tmpm920822322$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -15134,34 +15092,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$244 = props[hasSrc]; - if (null != propValue$244) + var propValue$235 = props[hasSrc]; + if (null != propValue$235) switch (hasSrc) { case "name": - hasSrcSet = propValue$244; + hasSrcSet = propValue$235; break; case "type": - propValue = propValue$244; + propValue = propValue$235; break; case "checked": - checked = propValue$244; + checked = propValue$235; break; case "defaultChecked": - defaultChecked = propValue$244; + defaultChecked = propValue$235; break; case "value": - propKey = propValue$244; + propKey = propValue$235; break; case "defaultValue": - defaultValue = propValue$244; + defaultValue = propValue$235; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$244) + if (null != propValue$235) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$244, props, null); + setProp(domElement, tag, hasSrc, propValue$235, props, null); } } initInput( @@ -15298,14 +15256,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$244 in props) - props.hasOwnProperty(propValue$244) && - ((hasSrc = props[propValue$244]), + for (propValue$235 in props) + props.hasOwnProperty(propValue$235) && + ((hasSrc = props[propValue$235]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$244, + propValue$235, hasSrc, props, void 0 @@ -15353,14 +15311,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$261 in nextProps) { - var propKey = nextProps[propKey$261]; - lastProp = lastProps[propKey$261]; + for (var propKey$252 in nextProps) { + var propKey = nextProps[propKey$252]; + lastProp = lastProps[propKey$252]; if ( - nextProps.hasOwnProperty(propKey$261) && + nextProps.hasOwnProperty(propKey$252) && (null != propKey || null != lastProp) ) - switch (propKey$261) { + switch (propKey$252) { case "type": type = propKey; break; @@ -15389,7 +15347,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$261, + propKey$252, propKey, nextProps, lastProp @@ -15408,7 +15366,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$261 = null; + propKey = value = defaultValue = propKey$252 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15439,7 +15397,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$261 = type; + propKey$252 = type; break; case "defaultValue": defaultValue = type; @@ -15460,15 +15418,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$261 - ? updateOptions(domElement, !!lastProps, propKey$261, !1) + null != propKey$252 + ? updateOptions(domElement, !!lastProps, propKey$252, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$261 = null; + propKey = propKey$252 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15492,7 +15450,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$261 = name; + propKey$252 = name; break; case "defaultValue": propKey = name; @@ -15506,17 +15464,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$261, propKey); + updateTextarea(domElement, propKey$252, propKey); return; case "option": - for (var propKey$277 in lastProps) + for (var propKey$268 in lastProps) if ( - ((propKey$261 = lastProps[propKey$277]), - lastProps.hasOwnProperty(propKey$277) && - null != propKey$261 && - !nextProps.hasOwnProperty(propKey$277)) + ((propKey$252 = lastProps[propKey$268]), + lastProps.hasOwnProperty(propKey$268) && + null != propKey$252 && + !nextProps.hasOwnProperty(propKey$268)) ) - switch (propKey$277) { + switch (propKey$268) { case "selected": domElement.selected = !1; break; @@ -15524,33 +15482,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$277, + propKey$268, null, nextProps, - propKey$261 + propKey$252 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$261 = nextProps[lastDefaultValue]), + ((propKey$252 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$261 !== propKey && - (null != propKey$261 || null != propKey)) + propKey$252 !== propKey && + (null != propKey$252 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$261 && - "function" !== typeof propKey$261 && - "symbol" !== typeof propKey$261; + propKey$252 && + "function" !== typeof propKey$252 && + "symbol" !== typeof propKey$252; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$261, + propKey$252, nextProps, propKey ); @@ -15571,24 +15529,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$282 in lastProps) - (propKey$261 = lastProps[propKey$282]), - lastProps.hasOwnProperty(propKey$282) && - null != propKey$261 && - !nextProps.hasOwnProperty(propKey$282) && - setProp(domElement, tag, propKey$282, null, nextProps, propKey$261); + for (var propKey$273 in lastProps) + (propKey$252 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + null != propKey$252 && + !nextProps.hasOwnProperty(propKey$273) && + setProp(domElement, tag, propKey$273, null, nextProps, propKey$252); for (checked in nextProps) if ( - ((propKey$261 = nextProps[checked]), + ((propKey$252 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$261 !== propKey && - (null != propKey$261 || null != propKey)) + propKey$252 !== propKey && + (null != propKey$252 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$261) + if (null != propKey$252) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15596,7 +15554,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$261, + propKey$252, nextProps, propKey ); @@ -15604,49 +15562,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$287 in lastProps) - (propKey$261 = lastProps[propKey$287]), - lastProps.hasOwnProperty(propKey$287) && - void 0 !== propKey$261 && - !nextProps.hasOwnProperty(propKey$287) && + for (var propKey$278 in lastProps) + (propKey$252 = lastProps[propKey$278]), + lastProps.hasOwnProperty(propKey$278) && + void 0 !== propKey$252 && + !nextProps.hasOwnProperty(propKey$278) && setPropOnCustomElement( domElement, tag, - propKey$287, + propKey$278, void 0, nextProps, - propKey$261 + propKey$252 ); for (defaultChecked in nextProps) - (propKey$261 = nextProps[defaultChecked]), + (propKey$252 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$261 === propKey || - (void 0 === propKey$261 && void 0 === propKey) || + propKey$252 === propKey || + (void 0 === propKey$252 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$261, + propKey$252, nextProps, propKey ); return; } } - for (var propKey$292 in lastProps) - (propKey$261 = lastProps[propKey$292]), - lastProps.hasOwnProperty(propKey$292) && - null != propKey$261 && - !nextProps.hasOwnProperty(propKey$292) && - setProp(domElement, tag, propKey$292, null, nextProps, propKey$261); + for (var propKey$283 in lastProps) + (propKey$252 = lastProps[propKey$283]), + lastProps.hasOwnProperty(propKey$283) && + null != propKey$252 && + !nextProps.hasOwnProperty(propKey$283) && + setProp(domElement, tag, propKey$283, null, nextProps, propKey$252); for (lastProp in nextProps) - (propKey$261 = nextProps[lastProp]), + (propKey$252 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$261 === propKey || - (null == propKey$261 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$261, nextProps, propKey); + propKey$252 === propKey || + (null == propKey$252 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$252, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16241,26 +16199,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$300 = getResourcesFromRoot( + var styles$291 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$301 = styles$300.get(type); - resource$301 || + resource$292 = styles$291.get(type); + resource$292 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$301 = { + (resource$292 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$300.set(type, resource$301), - (styles$300 = JSCompiler_inline_result.querySelector( + styles$291.set(type, resource$292), + (styles$291 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$300._p && - ((resource$301.instance = styles$300), - (resource$301.state.loading = 5)), + !styles$291._p && + ((resource$292.instance = styles$291), + (resource$292.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16273,16 +16231,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$300 || + styles$291 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$301.state + resource$292.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$301; + return resource$292; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16379,37 +16337,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$306 = hoistableRoot.querySelector( + var instance$297 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$306) + if (instance$297) return ( (resource.state.loading |= 4), - (resource.instance = instance$306), - markNodeAsHoistable(instance$306), - instance$306 + (resource.instance = instance$297), + markNodeAsHoistable(instance$297), + instance$297 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$306 = ( + instance$297 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$306); - var linkInstance = instance$306; + markNodeAsHoistable(instance$297); + var linkInstance = instance$297; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$306, "link", instance); + setInitialProperties(instance$297, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$306, props.precedence, hoistableRoot); - return (resource.instance = instance$306); + insertStylesheet(instance$297, props.precedence, hoistableRoot); + return (resource.instance = instance$297); case "script": - instance$306 = getScriptKey(props.src); + instance$297 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$306) + getScriptSelectorFromKey(instance$297) )) ) return ( @@ -16418,7 +16376,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$306))) + if ((styleProps = preloadPropsMap.get(instance$297))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17452,14 +17410,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1768 = React.version; if ( - "19.0.0-www-classic-7b56a542-20240917" !== + "19.0.0-www-classic-4549be0f-20240917" !== isomorphicReactPackageVersion$jscomp$inline_1768 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1768, - "19.0.0-www-classic-7b56a542-20240917" + "19.0.0-www-classic-4549be0f-20240917" ) ); function flushSyncFromReconciler(fn) { @@ -17502,25 +17460,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2263 = { +var internals$jscomp$inline_2276 = { bundleType: 0, - version: "19.0.0-www-classic-7b56a542-20240917", + version: "19.0.0-www-classic-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2264 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2277 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2264.isDisabled && - hook$jscomp$inline_2264.supportsFiber + !hook$jscomp$inline_2277.isDisabled && + hook$jscomp$inline_2277.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2264.inject( - internals$jscomp$inline_2263 + (rendererID = hook$jscomp$inline_2277.inject( + internals$jscomp$inline_2276 )), - (injectedHook = hook$jscomp$inline_2264); + (injectedHook = hook$jscomp$inline_2277); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17594,11 +17552,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$327); + var instance = getPublicRootInstance(root$318); originalCallback.call(instance); }; } - var root$327 = createHydrationContainer( + var root$318 = createHydrationContainer( initialChildren, callback, container, @@ -17613,23 +17571,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$327; - container[internalContainerInstanceKey] = root$327.current; + container._reactRootContainer = root$318; + container[internalContainerInstanceKey] = root$318.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$327; + return root$318; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$328 = callback; + var originalCallback$319 = callback; callback = function () { - var instance = getPublicRootInstance(root$329); - originalCallback$328.call(instance); + var instance = getPublicRootInstance(root$320); + originalCallback$319.call(instance); }; } - var root$329 = createFiberRoot( + var root$320 = createFiberRoot( container, 0, !1, @@ -17643,14 +17601,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$329; - container[internalContainerInstanceKey] = root$329.current; + container._reactRootContainer = root$320; + container[internalContainerInstanceKey] = root$320.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$329, parentComponent, callback); + updateContainerSync(initialChildren, root$320, parentComponent, callback); flushSyncWork$1(); - return root$329; + return root$320; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17964,4 +17922,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-7b56a542-20240917"; +exports.version = "19.0.0-www-classic-4549be0f-20240917"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 3ebd5db2b1..28cf3fbe37 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -8033,7 +8033,7 @@ function commitHookEffectListMount(flags, finishedWork) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -8045,9 +8045,20 @@ function commitHookEffectListUnmount( if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + if (void 0 !== destroy) { + inst.destroy = void 0; + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8129,11 +8140,25 @@ function safelyDetachRef(current, nearestMountedAncestor) { } else ref.current = null; } -function safelyCallDestroy(current, nearestMountedAncestor, destroy) { +function commitProfilerPostCommit( + finishedWork, + current, + commitTime, + passiveEffectDuration +) { try { - destroy(); + var _finishedWork$memoize2 = finishedWork.memoizedProps, + id = _finishedWork$memoize2.id, + onPostCommit = _finishedWork$memoize2.onPostCommit; + "function" === typeof onPostCommit && + onPostCommit( + id, + null === current ? "mount" : "update", + passiveEffectDuration, + commitTime + ); } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHostMount(finishedWork) { @@ -8267,7 +8292,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$221) { + } catch (e$212) { JSCompiler_temp = null; break a; } @@ -8528,23 +8553,6 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { break; case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -8844,7 +8852,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$172 = hostParentIsContainer; + var prevHostParentIsContainer$171 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8852,7 +8860,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$172; + hostParentIsContainer = prevHostParentIsContainer$171; if (null !== hostParent) if (hostParentIsContainer) try { @@ -8919,67 +8927,11 @@ function commitDeletionEffectsOnFiber( case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - prevHostParentIsContainer$172 = prevHostParentIsContainer.tag; - var inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$172 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (prevHostParentIsContainer$172 & 4) || - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (prevHostParentIsContainer$172 = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$172 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (prevHostParentIsContainer$172 & 4) && - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -9032,15 +8984,15 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$182 = finishedWork.alternate; + var current$174 = finishedWork.alternate; if ( - null !== current$182 && - ((current$182 = current$182.memoizedState), - null !== current$182 && - ((current$182 = current$182.dehydrated), null !== current$182)) + null !== current$174 && + ((current$174 = current$174.memoizedState), + null !== current$174 && + ((current$174 = current$174.dehydrated), null !== current$174)) ) { try { - retryIfBlockedOn(current$182); + retryIfBlockedOn(current$174); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -9048,7 +9000,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$182); + onHydrated && onHydrated(current$174); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -9421,6 +9373,10 @@ function commitMutationEffectsOnFiber(finishedWork, root) { commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -9685,7 +9641,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$189 = parentFiber.alternate, + var current$180 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -9706,18 +9662,18 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - current$189 = finishedWork; - finishedRoot = current$189.stateNode; + current$180 = finishedWork; + finishedRoot = current$180.stateNode; if ("function" === typeof finishedRoot.componentDidMount) try { finishedRoot.componentDidMount(); } catch (error) { - captureCommitPhaseError(current$189, current$189.return, error); + captureCommitPhaseError(current$180, current$180.return, error); } - current$189 = finishedWork; - finishedRoot = current$189.updateQueue; + current$180 = finishedWork; + finishedRoot = current$180.updateQueue; if (null !== finishedRoot) { - var instance = current$189.stateNode; + var instance = current$180.stateNode; try { var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks; if (null !== hiddenCallbacks) @@ -9728,7 +9684,7 @@ function recursivelyTraverseReappearLayoutEffects( ) callCallback(hiddenCallbacks[finishedRoot], instance); } catch (error) { - captureCommitPhaseError(current$189, current$189.return, error); + captureCommitPhaseError(current$180, current$180.return, error); } } includeWorkInProgressEffects && @@ -9745,7 +9701,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$189 && + null === current$180 && flags & 4 && commitHostMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -9756,23 +9712,6 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -9970,12 +9909,25 @@ function commitPassiveMountOnFiber( } break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); + flags & 2048 + ? (recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + -0, + finishedWork.stateNode.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -10099,9 +10051,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$196 = finishedWork.stateNode; + var instance$187 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$196._visibility & 4 + ? instance$187._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10113,7 +10065,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$196._visibility |= 4), + : ((instance$187._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10126,7 +10078,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$196 + instance$187 ); break; case 24: @@ -10283,6 +10235,12 @@ function commitPassiveUnmountOnFiber(finishedWork) { finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return); break; + case 3: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; + case 12: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && @@ -11124,8 +11082,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$207) { - handleThrow(root, thrownValue$207); + } catch (thrownValue$198) { + handleThrow(root, thrownValue$198); } while (1); lanes && root.shellSuspendCounter++; @@ -11240,8 +11198,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$209) { - handleThrow(root, thrownValue$209); + } catch (thrownValue$200) { + handleThrow(root, thrownValue$200); } while (1); resetContextDependencies(); @@ -11584,7 +11542,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$216 = rootWithPendingPassiveEffects, + var root$207 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11599,7 +11557,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$216, remainingLanes); + releaseRootPooledCache(root$207, remainingLanes); } } return !1; @@ -12824,7 +12782,7 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$378; + var JSCompiler_inline_result$jscomp$369; if (canUseDOM) { var isSupported$jscomp$inline_1525 = "oninput" in document; if (!isSupported$jscomp$inline_1525) { @@ -12833,10 +12791,10 @@ if (canUseDOM) { isSupported$jscomp$inline_1525 = "function" === typeof element$jscomp$inline_1526.oninput; } - JSCompiler_inline_result$jscomp$378 = isSupported$jscomp$inline_1525; - } else JSCompiler_inline_result$jscomp$378 = !1; + JSCompiler_inline_result$jscomp$369 = isSupported$jscomp$inline_1525; + } else JSCompiler_inline_result$jscomp$369 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$378 && + JSCompiler_inline_result$jscomp$369 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -12925,36 +12883,36 @@ function containsNode(outerNode, innerNode) { : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmpm209527808$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmp1412174161$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmpm209527808$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmp1412174161$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmpm209527808$1.defaultView) + : $jscomp$optchain$tmp1412174161$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmpm209527808$1 = getActiveElement(containerInfo.document); - $jscomp$optchain$tmpm209527808$1 instanceof containerInfo.HTMLIFrameElement; + $jscomp$optchain$tmp1412174161$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmp1412174161$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmpm209527808$1.contentWindow.location.href; + typeof $jscomp$optchain$tmp1412174161$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmpm209527808$1.contentWindow; + containerInfo = $jscomp$optchain$tmp1412174161$1.contentWindow; else break; - $jscomp$optchain$tmpm209527808$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmp1412174161$1 = getActiveElement(containerInfo.document); } - return $jscomp$optchain$tmpm209527808$1; + return $jscomp$optchain$tmp1412174161$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -14557,34 +14515,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$235 = props[hasSrc]; - if (null != propValue$235) + var propValue$226 = props[hasSrc]; + if (null != propValue$226) switch (hasSrc) { case "name": - hasSrcSet = propValue$235; + hasSrcSet = propValue$226; break; case "type": - propKey = propValue$235; + propKey = propValue$226; break; case "checked": - checked = propValue$235; + checked = propValue$226; break; case "defaultChecked": - defaultChecked = propValue$235; + defaultChecked = propValue$226; break; case "value": - propValue = propValue$235; + propValue = propValue$226; break; case "defaultValue": - defaultValue = propValue$235; + defaultValue = propValue$226; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$235) + if (null != propValue$226) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$235, props, null); + setProp(domElement, tag, hasSrc, propValue$226, props, null); } } initInput( @@ -14720,14 +14678,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$235 in props) - props.hasOwnProperty(propValue$235) && - ((hasSrc = props[propValue$235]), + for (propValue$226 in props) + props.hasOwnProperty(propValue$226) && + ((hasSrc = props[propValue$226]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$235, + propValue$226, hasSrc, props, void 0 @@ -14775,14 +14733,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$252 in nextProps) { - var propKey = nextProps[propKey$252]; - lastProp = lastProps[propKey$252]; + for (var propKey$243 in nextProps) { + var propKey = nextProps[propKey$243]; + lastProp = lastProps[propKey$243]; if ( - nextProps.hasOwnProperty(propKey$252) && + nextProps.hasOwnProperty(propKey$243) && (null != propKey || null != lastProp) ) - switch (propKey$252) { + switch (propKey$243) { case "type": type = propKey; break; @@ -14811,7 +14769,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$252, + propKey$243, propKey, nextProps, lastProp @@ -14830,7 +14788,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$252 = null; + propKey = value = defaultValue = propKey$243 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14861,7 +14819,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$252 = type; + propKey$243 = type; break; case "defaultValue": defaultValue = type; @@ -14882,15 +14840,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$252 - ? updateOptions(domElement, !!lastProps, propKey$252, !1) + null != propKey$243 + ? updateOptions(domElement, !!lastProps, propKey$243, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$252 = null; + propKey = propKey$243 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14914,7 +14872,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$252 = name; + propKey$243 = name; break; case "defaultValue": propKey = name; @@ -14928,17 +14886,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$252, propKey); + updateTextarea(domElement, propKey$243, propKey); return; case "option": - for (var propKey$268 in lastProps) + for (var propKey$259 in lastProps) if ( - ((propKey$252 = lastProps[propKey$268]), - lastProps.hasOwnProperty(propKey$268) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$268)) + ((propKey$243 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + null != propKey$243 && + !nextProps.hasOwnProperty(propKey$259)) ) - switch (propKey$268) { + switch (propKey$259) { case "selected": domElement.selected = !1; break; @@ -14946,33 +14904,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$268, + propKey$259, null, nextProps, - propKey$252 + propKey$243 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$252 = nextProps[lastDefaultValue]), + ((propKey$243 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$252 !== propKey && - (null != propKey$252 || null != propKey)) + propKey$243 !== propKey && + (null != propKey$243 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$252 && - "function" !== typeof propKey$252 && - "symbol" !== typeof propKey$252; + propKey$243 && + "function" !== typeof propKey$243 && + "symbol" !== typeof propKey$243; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$252, + propKey$243, nextProps, propKey ); @@ -14993,24 +14951,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$273 in lastProps) - (propKey$252 = lastProps[propKey$273]), - lastProps.hasOwnProperty(propKey$273) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$273) && - setProp(domElement, tag, propKey$273, null, nextProps, propKey$252); + for (var propKey$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 (checked in nextProps) if ( - ((propKey$252 = nextProps[checked]), + ((propKey$243 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$252 !== propKey && - (null != propKey$252 || null != propKey)) + propKey$243 !== propKey && + (null != propKey$243 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$252) + if (null != propKey$243) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15018,7 +14976,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$252, + propKey$243, nextProps, propKey ); @@ -15026,49 +14984,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$278 in lastProps) - (propKey$252 = lastProps[propKey$278]), - lastProps.hasOwnProperty(propKey$278) && - void 0 !== propKey$252 && - !nextProps.hasOwnProperty(propKey$278) && + for (var propKey$269 in lastProps) + (propKey$243 = lastProps[propKey$269]), + lastProps.hasOwnProperty(propKey$269) && + void 0 !== propKey$243 && + !nextProps.hasOwnProperty(propKey$269) && setPropOnCustomElement( domElement, tag, - propKey$278, + propKey$269, void 0, nextProps, - propKey$252 + propKey$243 ); for (defaultChecked in nextProps) - (propKey$252 = nextProps[defaultChecked]), + (propKey$243 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$252 === propKey || - (void 0 === propKey$252 && void 0 === propKey) || + propKey$243 === propKey || + (void 0 === propKey$243 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$252, + propKey$243, nextProps, propKey ); return; } } - for (var propKey$283 in lastProps) - (propKey$252 = lastProps[propKey$283]), - lastProps.hasOwnProperty(propKey$283) && - null != propKey$252 && - !nextProps.hasOwnProperty(propKey$283) && - setProp(domElement, tag, propKey$283, null, nextProps, propKey$252); + for (var propKey$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 (lastProp in nextProps) - (propKey$252 = nextProps[lastProp]), + (propKey$243 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$252 === propKey || - (null == propKey$252 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$252, nextProps, propKey); + propKey$243 === propKey || + (null == propKey$243 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$243, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15646,26 +15604,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$291 = getResourcesFromRoot( + var styles$282 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$292 = styles$291.get(type); - resource$292 || + resource$283 = styles$282.get(type); + resource$283 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$292 = { + (resource$283 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$291.set(type, resource$292), - (styles$291 = JSCompiler_inline_result.querySelector( + styles$282.set(type, resource$283), + (styles$282 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$291._p && - ((resource$292.instance = styles$291), - (resource$292.state.loading = 5)), + !styles$282._p && + ((resource$283.instance = styles$282), + (resource$283.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15678,16 +15636,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$291 || + styles$282 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$292.state + resource$283.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$292; + return resource$283; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15784,37 +15742,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$297 = hoistableRoot.querySelector( + var instance$288 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$297) + if (instance$288) return ( (resource.state.loading |= 4), - (resource.instance = instance$297), - markNodeAsHoistable(instance$297), - instance$297 + (resource.instance = instance$288), + markNodeAsHoistable(instance$288), + instance$288 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$297 = ( + instance$288 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$297); - var linkInstance = instance$297; + markNodeAsHoistable(instance$288); + var linkInstance = instance$288; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$297, "link", instance); + setInitialProperties(instance$288, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$297, props.precedence, hoistableRoot); - return (resource.instance = instance$297); + insertStylesheet(instance$288, props.precedence, hoistableRoot); + return (resource.instance = instance$288); case "script": - instance$297 = getScriptKey(props.src); + instance$288 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$297) + getScriptSelectorFromKey(instance$288) )) ) return ( @@ -15823,7 +15781,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$297))) + if ((styleProps = preloadPropsMap.get(instance$288))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16828,14 +16786,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1739 = React.version; if ( - "19.0.0-www-modern-7b56a542-20240917" !== + "19.0.0-www-modern-4549be0f-20240917" !== isomorphicReactPackageVersion$jscomp$inline_1739 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1739, - "19.0.0-www-modern-7b56a542-20240917" + "19.0.0-www-modern-4549be0f-20240917" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16851,25 +16809,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2254 = { +var internals$jscomp$inline_2267 = { bundleType: 0, - version: "19.0.0-www-modern-7b56a542-20240917", + version: "19.0.0-www-modern-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2255 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2268 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2255.isDisabled && - hook$jscomp$inline_2255.supportsFiber + !hook$jscomp$inline_2268.isDisabled && + hook$jscomp$inline_2268.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2255.inject( - internals$jscomp$inline_2254 + (rendererID = hook$jscomp$inline_2268.inject( + internals$jscomp$inline_2267 )), - (injectedHook = hook$jscomp$inline_2255); + (injectedHook = hook$jscomp$inline_2268); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17220,4 +17178,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-7b56a542-20240917"; +exports.version = "19.0.0-www-modern-4549be0f-20240917"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 05bf5bd203..8984f49f27 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -615,20 +615,6 @@ function markComponentRenderStopped() { "function" === typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } -function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); -} -function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); -} function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -4892,11 +4878,25 @@ HooksDispatcherOnRerender.useOptimistic = function (passthrough, reducer) { HooksDispatcherOnRerender.unstable_useContextWithBailout = unstable_useContextWithBailout; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, - currentUpdateIsNested = !1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0; +function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; +} +function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; +} +function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; +} +var currentUpdateIsNested = !1, nestedUpdateScheduled = !1; function startProfilerTimer(fiber) { profilerStartTime = now(); @@ -4917,44 +4917,15 @@ function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) { profilerStartTime = -1; } } -function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } +function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } -function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } -} -function startLayoutEffectTimer() { - layoutEffectStartTime = now(); +function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -5132,9 +5103,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$88 in Component) - void 0 === newProps[propName$88] && - (newProps[propName$88] = Component[propName$88]); + for (var propName$86 in Component) + void 0 === newProps[propName$86] && + (newProps[propName$86] = Component[propName$86]); } return newProps; } @@ -5577,10 +5548,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$102 = workInProgress.stateNode; + root$100 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$102.incompleteTransitions.has(transition)) { + if (!root$100.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5588,11 +5559,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$102.incompleteTransitions.set(transition, markerInstance); + root$100.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$102.incompleteTransitions.forEach(function (markerInstance) { + root$100.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6920,8 +6891,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -7385,8 +7356,8 @@ function beginWork(current, workInProgress, renderLanes) { (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (props = workInProgress.stateNode), - (props.effectDuration = 0), - (props.passiveEffectDuration = 0), + (props.effectDuration = -0), + (props.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -8027,14 +7998,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$145 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$145 = lastTailNode), + for (var lastTailNode$143 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$143 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$145 + null === lastTailNode$143 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$145.sibling = null); + : (lastTailNode$143.sibling = null); } } function bubbleProperties(completedWork) { @@ -8046,53 +8017,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$147 = completedWork.selfBaseDuration, - child$148 = completedWork.child; - null !== child$148; + var treeBaseDuration$145 = completedWork.selfBaseDuration, + child$146 = completedWork.child; + null !== child$146; ) - (newChildLanes |= child$148.lanes | child$148.childLanes), - (subtreeFlags |= child$148.subtreeFlags & 31457280), - (subtreeFlags |= child$148.flags & 31457280), - (treeBaseDuration$147 += child$148.treeBaseDuration), - (child$148 = child$148.sibling); - completedWork.treeBaseDuration = treeBaseDuration$147; + (newChildLanes |= child$146.lanes | child$146.childLanes), + (subtreeFlags |= child$146.subtreeFlags & 31457280), + (subtreeFlags |= child$146.flags & 31457280), + (treeBaseDuration$145 += child$146.treeBaseDuration), + (child$146 = child$146.sibling); + completedWork.treeBaseDuration = treeBaseDuration$145; } else for ( - treeBaseDuration$147 = completedWork.child; - null !== treeBaseDuration$147; + treeBaseDuration$145 = completedWork.child; + null !== treeBaseDuration$145; ) (newChildLanes |= - treeBaseDuration$147.lanes | treeBaseDuration$147.childLanes), - (subtreeFlags |= treeBaseDuration$147.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$147.flags & 31457280), - (treeBaseDuration$147.return = completedWork), - (treeBaseDuration$147 = treeBaseDuration$147.sibling); + treeBaseDuration$145.lanes | treeBaseDuration$145.childLanes), + (subtreeFlags |= treeBaseDuration$145.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$145.flags & 31457280), + (treeBaseDuration$145.return = completedWork), + (treeBaseDuration$145 = treeBaseDuration$145.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$147 = completedWork.actualDuration; - child$148 = completedWork.selfBaseDuration; + treeBaseDuration$145 = completedWork.actualDuration; + child$146 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$147 += child.actualDuration), - (child$148 += child.treeBaseDuration), + (treeBaseDuration$145 += child.actualDuration), + (child$146 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$147; - completedWork.treeBaseDuration = child$148; + completedWork.actualDuration = treeBaseDuration$145; + completedWork.treeBaseDuration = child$146; } else for ( - treeBaseDuration$147 = completedWork.child; - null !== treeBaseDuration$147; + treeBaseDuration$145 = completedWork.child; + null !== treeBaseDuration$145; ) (newChildLanes |= - treeBaseDuration$147.lanes | treeBaseDuration$147.childLanes), - (subtreeFlags |= treeBaseDuration$147.subtreeFlags), - (subtreeFlags |= treeBaseDuration$147.flags), - (treeBaseDuration$147.return = completedWork), - (treeBaseDuration$147 = treeBaseDuration$147.sibling); + treeBaseDuration$145.lanes | treeBaseDuration$145.childLanes), + (subtreeFlags |= treeBaseDuration$145.subtreeFlags), + (subtreeFlags |= treeBaseDuration$145.flags), + (treeBaseDuration$145.return = completedWork), + (treeBaseDuration$145 = treeBaseDuration$145.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8405,11 +8376,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$163 = null; + var cache$161 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$163 = newProps.memoizedState.cachePool.pool); - cache$163 !== type && (newProps.flags |= 2048); + (cache$161 = newProps.memoizedState.cachePool.pool); + cache$161 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8453,8 +8424,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$163 = type.rendering; - if (null === cache$163) + cache$161 = type.rendering; + if (null === cache$161) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8462,11 +8433,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$163 = findFirstSuspended(current); - if (null !== cache$163) { + cache$161 = findFirstSuspended(current); + if (null !== cache$161) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$163.updateQueue; + current = cache$161.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8491,7 +8462,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$163)), null !== current)) { + if (((current = findFirstSuspended(cache$161)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8501,7 +8472,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$163.alternate && + !cache$161.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8514,13 +8485,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$163.sibling = workInProgress.child), - (workInProgress.child = cache$163)) + ? ((cache$161.sibling = workInProgress.child), + (workInProgress.child = cache$161)) : ((current = type.last), null !== current - ? (current.sibling = cache$163) - : (workInProgress.child = cache$163), - (type.last = cache$163)); + ? (current.sibling = cache$161) + : (workInProgress.child = cache$161), + (type.last = cache$161)); } if (null !== type.tail) return ( @@ -8752,16 +8723,35 @@ function unwindInterruptedWork(current, interruptedWork) { pop(markerInstanceStack); } } -function shouldProfile$1(current) { +function shouldProfile(current) { return 0 !== (current.mode & 2); } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } +function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags +) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); +} function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -8817,7 +8807,7 @@ function commitHookEffectListMount(flags, finishedWork) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -8829,8 +8819,8 @@ function commitHookEffectListUnmount( if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), + if (void 0 !== destroy) { + inst.destroy = void 0; enableSchedulingProfiler && (0 !== (flags & 8) ? enableSchedulingProfiler && @@ -8841,8 +8831,24 @@ function commitHookEffectListUnmount( finishedWork ) : 0 !== (flags & 4) && - markComponentLayoutEffectUnmountStarted(finishedWork)), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )); + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } enableSchedulingProfiler && (0 !== (flags & 8) ? enableSchedulingProfiler && @@ -8851,7 +8857,12 @@ function commitHookEffectListUnmount( typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : 0 !== (flags & 4) && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped()); + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8861,10 +8872,10 @@ function commitHookEffectListUnmount( } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -8872,14 +8883,14 @@ function commitHookPassiveUnmountEffects( nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -8908,19 +8919,19 @@ function safelyCallComponentWillUnmount( current.elementType === current.type ); instance.state = current.memoizedState; - if (shouldProfile$1(current)) { - startLayoutEffectTimer(); + if (shouldProfile(current)) { + startEffectTimer(); try { instance.componentWillUnmount(); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } - recordLayoutEffectDuration(current); + recordEffectDuration(); } else try { instance.componentWillUnmount(); - } catch (error$184) { - captureCommitPhaseError(current, nearestMountedAncestor, error$184); + } catch (error$182) { + captureCommitPhaseError(current, nearestMountedAncestor, error$182); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8939,11 +8950,11 @@ function safelyAttachRef(current, nearestMountedAncestor) { } 21 === current.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), (current.refCleanup = ref(instanceToUse)); + startEffectTimer(), (current.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(); } else current.refCleanup = ref(instanceToUse); else ref.current = instanceToUse; @@ -8958,11 +8969,11 @@ function safelyDetachRef(current, nearestMountedAncestor) { if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), refCleanup(); + startEffectTimer(), refCleanup(); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else refCleanup(); } catch (error) { @@ -8974,25 +8985,18 @@ function safelyDetachRef(current, nearestMountedAncestor) { } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), ref(null); + startEffectTimer(), ref(null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else ref(null); - } catch (error$185) { - captureCommitPhaseError(current, nearestMountedAncestor, error$185); + } catch (error$183) { + captureCommitPhaseError(current, nearestMountedAncestor, error$183); } else ref.current = null; } -function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - try { - destroy(); - } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); - } -} function commitProfilerUpdate( finishedWork, current, @@ -9177,7 +9181,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$246) { + } catch (e$238) { JSCompiler_temp = null; break a; } @@ -9362,22 +9366,22 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) if (((finishedRoot = finishedWork.stateNode), null === current)) - if (shouldProfile$1(finishedWork)) { - startLayoutEffectTimer(); + if (shouldProfile(finishedWork)) { + startEffectTimer(); try { finishedRoot.componentDidMount(); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else try { finishedRoot.componentDidMount(); - } catch (error$181) { + } catch (error$179) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$181 + error$179 ); } else { @@ -9387,22 +9391,22 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { finishedWork.elementType === finishedWork.type ); current = current.memoizedState; - if (shouldProfile$1(finishedWork)) { - startLayoutEffectTimer(); + if (shouldProfile(finishedWork)) { + startEffectTimer(); try { finishedRoot.componentDidUpdate( prevProps, current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$182) { + } catch (error$180) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$182 + error$180 ); } - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else try { finishedRoot.componentDidUpdate( @@ -9410,11 +9414,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$183) { + } catch (error$181) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$183 + error$181 ); } } @@ -9422,24 +9426,26 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 64 && ((flags = finishedWork.updateQueue), null !== flags)) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { - commitCallbacks(flags, finishedRoot); + commitCallbacks(flags, prevProps); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -9452,25 +9458,18 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - commitProfilerUpdate(finishedWork, current, commitTime, flags), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } + flags & 4 + ? ((flags = pushNestedEffectDurations()), + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.effectDuration += bubbleNestedEffectDurations(flags)), + commitProfilerUpdate( + finishedWork, + current, + commitTime, + finishedRoot.effectDuration + )) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -9775,7 +9774,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$194 = hostParentIsContainer; + var prevHostParentIsContainer$192 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9783,7 +9782,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$194; + hostParentIsContainer = prevHostParentIsContainer$192; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9850,93 +9849,11 @@ function commitDeletionEffectsOnFiber( case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - prevHostParentIsContainer$194 = prevHostParentIsContainer.tag; - var inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$194 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (prevHostParentIsContainer$194 & 4) || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - 0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (prevHostParentIsContainer$194 = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$194 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (prevHostParentIsContainer$194 & 4) && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - 0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects(deletedFiber, nearestMountedAncestor, 4); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -9995,15 +9912,15 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$204 = finishedWork.alternate; + var current$195 = finishedWork.alternate; if ( - null !== current$204 && - ((current$204 = current$204.memoizedState), - null !== current$204 && - ((current$204 = current$204.dehydrated), null !== current$204)) + null !== current$195 && + ((current$195 = current$195.memoizedState), + null !== current$195 && + ((current$195 = current$195.dehydrated), null !== current$195)) ) { try { - retryIfBlockedOn(current$204); + retryIfBlockedOn(current$195); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -10011,7 +9928,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$204); + onHydrated && onHydrated(current$195); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -10132,11 +10049,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags & 4 && (commitHookEffectListUnmount(3, finishedWork, finishedWork.return), commitHookEffectListMount(3, finishedWork), - 0 !== (finishedWork.mode & 2) - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount(5, finishedWork, finishedWork.return), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount(5, finishedWork, finishedWork.return)); + commitHookLayoutUnmountEffects(finishedWork, finishedWork.return, 5)); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -10161,55 +10074,56 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags & 512 && null !== current && safelyDetachRef(current, current.return); - if (flags & 4) { - var currentResource = null !== current ? current.memoizedState : null; - flags = finishedWork.memoizedState; - if (null === current) + if (flags & 4) + if ( + ((root = null !== current ? current.memoizedState : null), + (flags = finishedWork.memoizedState), + null === current) + ) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; + root = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - currentResource = - hoistableRoot.getElementsByTagName("title")[0]; + hoistableRoot = root.getElementsByTagName("title")[0]; if ( - !currentResource || - currentResource[internalHoistableMarker] || - currentResource[internalInstanceKey] || + !hoistableRoot || + hoistableRoot[internalHoistableMarker] || + hoistableRoot[internalInstanceKey] || "http://www.w3.org/2000/svg" === - currentResource.namespaceURI || - currentResource.hasAttribute("itemprop") + hoistableRoot.namespaceURI || + hoistableRoot.hasAttribute("itemprop") ) - (currentResource = hoistableRoot.createElement(flags)), - hoistableRoot.head.insertBefore( - currentResource, - hoistableRoot.querySelector("head > title") + (hoistableRoot = root.createElement(flags)), + root.head.insertBefore( + hoistableRoot, + root.querySelector("head > title") ); - setInitialProperties(currentResource, flags, current); - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + setInitialProperties(hoistableRoot, flags, current); + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; break a; case "link": var maybeNodes = getHydratableHoistableCache( "link", "href", - hoistableRoot + root ).get(flags + (current.href || "")); if (maybeNodes) for (var i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = maybeNodes[i]), - currentResource.getAttribute("href") === + ((hoistableRoot = maybeNodes[i]), + hoistableRoot.getAttribute("href") === (null == current.href ? null : current.href) && - currentResource.getAttribute("rel") === + hoistableRoot.getAttribute("rel") === (null == current.rel ? null : current.rel) && - currentResource.getAttribute("title") === + hoistableRoot.getAttribute("title") === (null == current.title ? null : current.title) && - currentResource.getAttribute("crossorigin") === + hoistableRoot.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) @@ -10217,36 +10131,36 @@ function commitMutationEffectsOnFiber(finishedWork, root) { maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; case "meta": if ( (maybeNodes = getHydratableHoistableCache( "meta", "content", - hoistableRoot + root ).get(flags + (current.content || ""))) ) for (i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = maybeNodes[i]), - currentResource.getAttribute("content") === + ((hoistableRoot = maybeNodes[i]), + hoistableRoot.getAttribute("content") === (null == current.content ? null : "" + current.content) && - currentResource.getAttribute("name") === + hoistableRoot.getAttribute("name") === (null == current.name ? null : current.name) && - currentResource.getAttribute("property") === + hoistableRoot.getAttribute("property") === (null == current.property ? null : current.property) && - currentResource.getAttribute("http-equiv") === + hoistableRoot.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - currentResource.getAttribute("charset") === + hoistableRoot.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) @@ -10254,16 +10168,16 @@ function commitMutationEffectsOnFiber(finishedWork, root) { maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; default: throw Error(formatProdErrorMessage(468, flags)); } - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; } finishedWork.stateNode = flags; } else @@ -10279,12 +10193,12 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.memoizedProps ); else - currentResource !== flags - ? (null === currentResource + root !== flags + ? (null === root ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : currentResource.count--, + : root.count--, null === flags ? mountHoistable( hoistableRoot, @@ -10303,12 +10217,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.memoizedProps, current.memoizedProps ); - } break; case 27: if (flags & 4 && null === finishedWork.alternate) { hoistableRoot = finishedWork.stateNode; - currentResource = finishedWork.memoizedProps; + maybeNodes = finishedWork.memoizedProps; try { for (var node = hoistableRoot.firstChild; node; ) { var nextNode = node.nextSibling, @@ -10329,9 +10242,9 @@ function commitMutationEffectsOnFiber(finishedWork, root) { ) hoistableRoot.removeAttributeNode(attributes[0]); - setInitialProperties(hoistableRoot, type, currentResource); + setInitialProperties(hoistableRoot, type, maybeNodes); hoistableRoot[internalInstanceKey] = finishedWork; - hoistableRoot[internalPropsKey] = currentResource; + hoistableRoot[internalPropsKey] = maybeNodes; } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -10343,20 +10256,20 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== current && safelyDetachRef(current, current.return); if (finishedWork.flags & 32) { - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { - setTextContent(hoistableRoot, ""); + setTextContent(root, ""); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((hoistableRoot = finishedWork.memoizedProps), + ((root = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - hoistableRoot, - null !== current ? current.memoizedProps : hoistableRoot + root, + null !== current ? current.memoizedProps : root )); flags & 1024 && (needsFormReset = !0); break; @@ -10376,11 +10289,12 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } break; case 3: + hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - hoistableRoot = currentHoistableRoot; + maybeNodes = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = hoistableRoot; + currentHoistableRoot = maybeNodes; commitReconciliationEffects(finishedWork); if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { @@ -10390,6 +10304,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); + root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: flags = currentHoistableRoot; @@ -10400,18 +10315,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); finishedWork.child.flags & 8192 && - ((hoistableRoot = null !== finishedWork.memoizedState), + ((root = null !== finishedWork.memoizedState), (current = null !== current && null !== current.memoizedState), alwaysThrottleRetries - ? hoistableRoot !== current && - (globalMostRecentFallbackTime = now$1()) - : hoistableRoot && - !current && - (globalMostRecentFallbackTime = now$1())); + ? root !== current && (globalMostRecentFallbackTime = now$1()) + : root && !current && (globalMostRecentFallbackTime = now$1())); if (flags & 4) { try { if (null !== finishedWork.memoizedState) { @@ -10471,22 +10390,20 @@ function commitMutationEffectsOnFiber(finishedWork, root) { nextNode = current = root; try { if (((hoistableRoot = nextNode.stateNode), node)) - (currentResource = hoistableRoot.style), - "function" === typeof currentResource.setProperty - ? currentResource.setProperty( - "display", - "none", - "important" - ) - : (currentResource.display = "none"); + (maybeNodes = hoistableRoot.style), + "function" === typeof maybeNodes.setProperty + ? maybeNodes.setProperty("display", "none", "important") + : (maybeNodes.display = "none"); else { - maybeNodes = nextNode.stateNode; - i = nextNode.memoizedProps.style; - var display = - void 0 !== i && null !== i && i.hasOwnProperty("display") - ? i.display - : null; - maybeNodes.style.display = + i = nextNode.stateNode; + var styleProp = nextNode.memoizedProps.style, + display = + void 0 !== styleProp && + null !== styleProp && + styleProp.hasOwnProperty("display") + ? styleProp.display + : null; + i.style.display = null == display || "boolean" === typeof display ? "" : ("" + display).trim(); @@ -10578,21 +10495,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$186 = JSCompiler_inline_result.stateNode; + var parent$184 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$186, ""), + (setTextContent(parent$184, ""), (JSCompiler_inline_result.flags &= -33)); - var before$187 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$187, parent$186); + var before$185 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$185, parent$184); break; case 3: case 4: - var parent$188 = JSCompiler_inline_result.stateNode.containerInfo, - before$189 = getHostSibling(finishedWork); + var parent$186 = JSCompiler_inline_result.stateNode.containerInfo, + before$187 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$189, - parent$188 + before$187, + parent$186 ); break; default: @@ -10635,14 +10552,7 @@ function recursivelyTraverseDisappearLayoutEffects(parentFiber) { case 11: case 14: case 15: - if (0 !== (finishedWork.mode & 2)) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount(4, finishedWork, finishedWork.return); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else commitHookEffectListUnmount(4, finishedWork, finishedWork.return); + commitHookLayoutUnmountEffects(finishedWork, finishedWork.return, 4); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -10681,7 +10591,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$211 = parentFiber.alternate, + var current$202 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -10702,18 +10612,18 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - current$211 = finishedWork; - finishedRoot = current$211.stateNode; + current$202 = finishedWork; + finishedRoot = current$202.stateNode; if ("function" === typeof finishedRoot.componentDidMount) try { finishedRoot.componentDidMount(); } catch (error) { - captureCommitPhaseError(current$211, current$211.return, error); + captureCommitPhaseError(current$202, current$202.return, error); } - current$211 = finishedWork; - finishedRoot = current$211.updateQueue; + current$202 = finishedWork; + finishedRoot = current$202.updateQueue; if (null !== finishedRoot) { - var instance = current$211.stateNode; + var instance = current$202.stateNode; try { var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks; if (null !== hiddenCallbacks) @@ -10724,7 +10634,7 @@ function recursivelyTraverseReappearLayoutEffects( ) callCallback(hiddenCallbacks[finishedRoot], instance); } catch (error) { - captureCommitPhaseError(current$211, current$211.return, error); + captureCommitPhaseError(current$202, current$202.return, error); } } includeWorkInProgressEffects && @@ -10741,40 +10651,32 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$211 && + null === current$202 && flags & 4 && commitHostMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - commitProfilerUpdate( - finishedWork, - current$211, - commitTime, - flags - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } + includeWorkInProgressEffects && flags & 4 + ? ((flags = pushNestedEffectDurations()), + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.effectDuration += bubbleNestedEffectDurations(flags)), + commitProfilerUpdate( + finishedWork, + current$202, + commitTime, + finishedRoot.effectDuration + )) + : recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -10911,6 +10813,7 @@ function commitPassiveMountOnFiber( flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -10970,37 +10873,33 @@ function commitPassiveMountOnFiber( clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -11017,9 +10916,9 @@ function commitPassiveMountOnFiber( ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -11031,21 +10930,21 @@ function commitPassiveMountOnFiber( finishedRoot, finishedWork ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions )) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11057,7 +10956,7 @@ function commitPassiveMountOnFiber( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -11135,9 +11034,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$219 = finishedWork.stateNode; + var instance$210 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$219._visibility & 4 + ? instance$210._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11150,7 +11049,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$219._visibility |= 4), + : ((instance$210._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11158,7 +11057,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$219._visibility |= 4), + : ((instance$210._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11171,7 +11070,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$219 + instance$210 ); break; case 24: @@ -11328,12 +11227,24 @@ function commitPassiveUnmountOnFiber(finishedWork) { finishedWork.flags & 2048 && commitHookPassiveUnmountEffects(finishedWork, finishedWork.return, 9); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -12234,8 +12145,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$230) { - handleThrow(root, thrownValue$230); + } catch (thrownValue$222) { + handleThrow(root, thrownValue$222); } while (1); lanes && root.shellSuspendCounter++; @@ -12361,8 +12272,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$232) { - handleThrow(root, thrownValue$232); + } catch (thrownValue$224) { + handleThrow(root, thrownValue$224); } while (1); resetContextDependencies(); @@ -12543,18 +12454,18 @@ function completeUnitOfWork(unitOfWork) { ); return; } - var current$236 = completedWork.alternate; + var current$228 = completedWork.alternate; unitOfWork = completedWork.return; startProfilerTimer(completedWork); - current$236 = completeWork( - current$236, + current$228 = completeWork( + current$228, completedWork, entangledRenderLanes ); 0 !== (completedWork.mode & 2) && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork); - if (null !== current$236) { - workInProgress = current$236; + if (null !== current$228) { + workInProgress = current$228; return; } completedWork = completedWork.sibling; @@ -12774,7 +12685,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$239 = rootWithPendingPassiveEffects, + var root$231 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12789,7 +12700,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$239, remainingLanes); + releaseRootPooledCache(root$231, remainingLanes); } } return !1; @@ -13385,7 +13296,7 @@ function FiberRootNode( tag++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); @@ -13621,9 +13532,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$244 = 0; - 31 > index$244; - index$244++ + var map = new Map(), lane = 1, index$236 = 0; + 31 > index$236; + index$236++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -14169,19 +14080,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$407; + var JSCompiler_inline_result$jscomp$399; if (canUseDOM) { - var isSupported$jscomp$inline_1653 = "oninput" in document; - if (!isSupported$jscomp$inline_1653) { - var element$jscomp$inline_1654 = document.createElement("div"); - element$jscomp$inline_1654.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1653 = - "function" === typeof element$jscomp$inline_1654.oninput; + var isSupported$jscomp$inline_1648 = "oninput" in document; + if (!isSupported$jscomp$inline_1648) { + var element$jscomp$inline_1649 = document.createElement("div"); + element$jscomp$inline_1649.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1648 = + "function" === typeof element$jscomp$inline_1649.oninput; } - JSCompiler_inline_result$jscomp$407 = isSupported$jscomp$inline_1653; - } else JSCompiler_inline_result$jscomp$407 = !1; + JSCompiler_inline_result$jscomp$399 = isSupported$jscomp$inline_1648; + } else JSCompiler_inline_result$jscomp$399 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$407 && + JSCompiler_inline_result$jscomp$399 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14270,41 +14181,36 @@ function containsNode(outerNode, innerNode) { : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmpm1440091763$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmp1226708909$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmpm1440091763$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmp1226708909$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmpm1440091763$1.defaultView) + : $jscomp$optchain$tmp1226708909$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmpm1440091763$1 = getActiveElement( - containerInfo.document - ); - $jscomp$optchain$tmpm1440091763$1 instanceof - containerInfo.HTMLIFrameElement; + $jscomp$optchain$tmp1226708909$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmp1226708909$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmpm1440091763$1.contentWindow.location.href; + typeof $jscomp$optchain$tmp1226708909$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmpm1440091763$1.contentWindow; + containerInfo = $jscomp$optchain$tmp1226708909$1.contentWindow; else break; - $jscomp$optchain$tmpm1440091763$1 = getActiveElement( - containerInfo.document - ); + $jscomp$optchain$tmp1226708909$1 = getActiveElement(containerInfo.document); } - return $jscomp$optchain$tmpm1440091763$1; + return $jscomp$optchain$tmp1226708909$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -14605,20 +14511,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1694 = 0; - i$jscomp$inline_1694 < simpleEventPluginEvents.length; - i$jscomp$inline_1694++ + var i$jscomp$inline_1689 = 0; + i$jscomp$inline_1689 < simpleEventPluginEvents.length; + i$jscomp$inline_1689++ ) { - var eventName$jscomp$inline_1695 = - simpleEventPluginEvents[i$jscomp$inline_1694], - domEventName$jscomp$inline_1696 = - eventName$jscomp$inline_1695.toLowerCase(), - capitalizedEvent$jscomp$inline_1697 = - eventName$jscomp$inline_1695[0].toUpperCase() + - eventName$jscomp$inline_1695.slice(1); + var eventName$jscomp$inline_1690 = + simpleEventPluginEvents[i$jscomp$inline_1689], + domEventName$jscomp$inline_1691 = + eventName$jscomp$inline_1690.toLowerCase(), + capitalizedEvent$jscomp$inline_1692 = + eventName$jscomp$inline_1690[0].toUpperCase() + + eventName$jscomp$inline_1690.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1696, - "on" + capitalizedEvent$jscomp$inline_1697 + domEventName$jscomp$inline_1691, + "on" + capitalizedEvent$jscomp$inline_1692 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15911,34 +15817,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$260 = props[hasSrc]; - if (null != propValue$260) + var propValue$252 = props[hasSrc]; + if (null != propValue$252) switch (hasSrc) { case "name": - hasSrcSet = propValue$260; + hasSrcSet = propValue$252; break; case "type": - propValue = propValue$260; + propValue = propValue$252; break; case "checked": - checked = propValue$260; + checked = propValue$252; break; case "defaultChecked": - defaultChecked = propValue$260; + defaultChecked = propValue$252; break; case "value": - propKey = propValue$260; + propKey = propValue$252; break; case "defaultValue": - defaultValue = propValue$260; + defaultValue = propValue$252; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$260) + if (null != propValue$252) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$260, props, null); + setProp(domElement, tag, hasSrc, propValue$252, props, null); } } initInput( @@ -16075,14 +15981,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$260 in props) - props.hasOwnProperty(propValue$260) && - ((hasSrc = props[propValue$260]), + for (propValue$252 in props) + props.hasOwnProperty(propValue$252) && + ((hasSrc = props[propValue$252]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$260, + propValue$252, hasSrc, props, void 0 @@ -16130,14 +16036,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$277 in nextProps) { - var propKey = nextProps[propKey$277]; - lastProp = lastProps[propKey$277]; + for (var propKey$269 in nextProps) { + var propKey = nextProps[propKey$269]; + lastProp = lastProps[propKey$269]; if ( - nextProps.hasOwnProperty(propKey$277) && + nextProps.hasOwnProperty(propKey$269) && (null != propKey || null != lastProp) ) - switch (propKey$277) { + switch (propKey$269) { case "type": type = propKey; break; @@ -16166,7 +16072,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$277, + propKey$269, propKey, nextProps, lastProp @@ -16185,7 +16091,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$277 = null; + propKey = value = defaultValue = propKey$269 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16216,7 +16122,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$277 = type; + propKey$269 = type; break; case "defaultValue": defaultValue = type; @@ -16237,15 +16143,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$277 - ? updateOptions(domElement, !!lastProps, propKey$277, !1) + null != propKey$269 + ? updateOptions(domElement, !!lastProps, propKey$269, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$277 = null; + propKey = propKey$269 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16269,7 +16175,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$277 = name; + propKey$269 = name; break; case "defaultValue": propKey = name; @@ -16283,17 +16189,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$277, propKey); + updateTextarea(domElement, propKey$269, propKey); return; case "option": - for (var propKey$293 in lastProps) + for (var propKey$285 in lastProps) if ( - ((propKey$277 = lastProps[propKey$293]), - lastProps.hasOwnProperty(propKey$293) && - null != propKey$277 && - !nextProps.hasOwnProperty(propKey$293)) + ((propKey$269 = lastProps[propKey$285]), + lastProps.hasOwnProperty(propKey$285) && + null != propKey$269 && + !nextProps.hasOwnProperty(propKey$285)) ) - switch (propKey$293) { + switch (propKey$285) { case "selected": domElement.selected = !1; break; @@ -16301,33 +16207,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$293, + propKey$285, null, nextProps, - propKey$277 + propKey$269 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$277 = nextProps[lastDefaultValue]), + ((propKey$269 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$277 !== propKey && - (null != propKey$277 || null != propKey)) + propKey$269 !== propKey && + (null != propKey$269 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$277 && - "function" !== typeof propKey$277 && - "symbol" !== typeof propKey$277; + propKey$269 && + "function" !== typeof propKey$269 && + "symbol" !== typeof propKey$269; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$277, + propKey$269, nextProps, propKey ); @@ -16348,24 +16254,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$298 in lastProps) - (propKey$277 = lastProps[propKey$298]), - lastProps.hasOwnProperty(propKey$298) && - null != propKey$277 && - !nextProps.hasOwnProperty(propKey$298) && - setProp(domElement, tag, propKey$298, null, nextProps, propKey$277); + for (var propKey$290 in lastProps) + (propKey$269 = lastProps[propKey$290]), + lastProps.hasOwnProperty(propKey$290) && + null != propKey$269 && + !nextProps.hasOwnProperty(propKey$290) && + setProp(domElement, tag, propKey$290, null, nextProps, propKey$269); for (checked in nextProps) if ( - ((propKey$277 = nextProps[checked]), + ((propKey$269 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$277 !== propKey && - (null != propKey$277 || null != propKey)) + propKey$269 !== propKey && + (null != propKey$269 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$277) + if (null != propKey$269) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16373,7 +16279,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$277, + propKey$269, nextProps, propKey ); @@ -16381,49 +16287,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$303 in lastProps) - (propKey$277 = lastProps[propKey$303]), - lastProps.hasOwnProperty(propKey$303) && - void 0 !== propKey$277 && - !nextProps.hasOwnProperty(propKey$303) && + for (var propKey$295 in lastProps) + (propKey$269 = lastProps[propKey$295]), + lastProps.hasOwnProperty(propKey$295) && + void 0 !== propKey$269 && + !nextProps.hasOwnProperty(propKey$295) && setPropOnCustomElement( domElement, tag, - propKey$303, + propKey$295, void 0, nextProps, - propKey$277 + propKey$269 ); for (defaultChecked in nextProps) - (propKey$277 = nextProps[defaultChecked]), + (propKey$269 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$277 === propKey || - (void 0 === propKey$277 && void 0 === propKey) || + propKey$269 === propKey || + (void 0 === propKey$269 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$277, + propKey$269, nextProps, propKey ); return; } } - for (var propKey$308 in lastProps) - (propKey$277 = lastProps[propKey$308]), - lastProps.hasOwnProperty(propKey$308) && - null != propKey$277 && - !nextProps.hasOwnProperty(propKey$308) && - setProp(domElement, tag, propKey$308, null, nextProps, propKey$277); + for (var propKey$300 in lastProps) + (propKey$269 = lastProps[propKey$300]), + lastProps.hasOwnProperty(propKey$300) && + null != propKey$269 && + !nextProps.hasOwnProperty(propKey$300) && + setProp(domElement, tag, propKey$300, null, nextProps, propKey$269); for (lastProp in nextProps) - (propKey$277 = nextProps[lastProp]), + (propKey$269 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$277 === propKey || - (null == propKey$277 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$277, nextProps, propKey); + propKey$269 === propKey || + (null == propKey$269 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$269, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -17018,26 +16924,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$316 = getResourcesFromRoot( + var styles$308 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$317 = styles$316.get(type); - resource$317 || + resource$309 = styles$308.get(type); + resource$309 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$317 = { + (resource$309 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$316.set(type, resource$317), - (styles$316 = JSCompiler_inline_result.querySelector( + styles$308.set(type, resource$309), + (styles$308 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$316._p && - ((resource$317.instance = styles$316), - (resource$317.state.loading = 5)), + !styles$308._p && + ((resource$309.instance = styles$308), + (resource$309.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -17050,16 +16956,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$316 || + styles$308 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$317.state + resource$309.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$317; + return resource$309; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -17156,37 +17062,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$322 = hoistableRoot.querySelector( + var instance$314 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$322) + if (instance$314) return ( (resource.state.loading |= 4), - (resource.instance = instance$322), - markNodeAsHoistable(instance$322), - instance$322 + (resource.instance = instance$314), + markNodeAsHoistable(instance$314), + instance$314 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$322 = ( + instance$314 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$322); - var linkInstance = instance$322; + markNodeAsHoistable(instance$314); + var linkInstance = instance$314; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$322, "link", instance); + setInitialProperties(instance$314, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$322, props.precedence, hoistableRoot); - return (resource.instance = instance$322); + insertStylesheet(instance$314, props.precedence, hoistableRoot); + return (resource.instance = instance$314); case "script": - instance$322 = getScriptKey(props.src); + instance$314 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$322) + getScriptSelectorFromKey(instance$314) )) ) return ( @@ -17195,7 +17101,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$322))) + if ((styleProps = preloadPropsMap.get(instance$314))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -18227,16 +18133,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1867 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1862 = React.version; if ( - "19.0.0-www-classic-7b56a542-20240917" !== - isomorphicReactPackageVersion$jscomp$inline_1867 + "19.0.0-www-classic-4549be0f-20240917" !== + isomorphicReactPackageVersion$jscomp$inline_1862 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1867, - "19.0.0-www-classic-7b56a542-20240917" + isomorphicReactPackageVersion$jscomp$inline_1862, + "19.0.0-www-classic-4549be0f-20240917" ) ); function flushSyncFromReconciler(fn) { @@ -18279,28 +18185,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1874 = { +var internals$jscomp$inline_1869 = { bundleType: 0, - version: "19.0.0-www-classic-7b56a542-20240917", + version: "19.0.0-www-classic-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1874.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1874.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1869.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1869.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2333 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2328 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2333.isDisabled && - hook$jscomp$inline_2333.supportsFiber + !hook$jscomp$inline_2328.isDisabled && + hook$jscomp$inline_2328.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2333.inject( - internals$jscomp$inline_1874 + (rendererID = hook$jscomp$inline_2328.inject( + internals$jscomp$inline_1869 )), - (injectedHook = hook$jscomp$inline_2333); + (injectedHook = hook$jscomp$inline_2328); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18374,11 +18280,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$343); + var instance = getPublicRootInstance(root$335); originalCallback.call(instance); }; } - var root$343 = createHydrationContainer( + var root$335 = createHydrationContainer( initialChildren, callback, container, @@ -18393,23 +18299,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$343; - container[internalContainerInstanceKey] = root$343.current; + container._reactRootContainer = root$335; + container[internalContainerInstanceKey] = root$335.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$343; + return root$335; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$344 = callback; + var originalCallback$336 = callback; callback = function () { - var instance = getPublicRootInstance(root$345); - originalCallback$344.call(instance); + var instance = getPublicRootInstance(root$337); + originalCallback$336.call(instance); }; } - var root$345 = createFiberRoot( + var root$337 = createFiberRoot( container, 0, !1, @@ -18423,14 +18329,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$345; - container[internalContainerInstanceKey] = root$345.current; + container._reactRootContainer = root$337; + container[internalContainerInstanceKey] = root$337.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$345, parentComponent, callback); + updateContainerSync(initialChildren, root$337, parentComponent, callback); flushSyncWork$1(); - return root$345; + return root$337; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18744,7 +18650,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-7b56a542-20240917"; +exports.version = "19.0.0-www-classic-4549be0f-20240917"; "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 a5cf6bc44f..39d7edb627 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -546,20 +546,6 @@ function markComponentRenderStopped() { "function" === typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } -function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); -} -function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); -} function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -4727,11 +4713,25 @@ HooksDispatcherOnRerender.useOptimistic = function (passthrough, reducer) { HooksDispatcherOnRerender.unstable_useContextWithBailout = unstable_useContextWithBailout; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, - currentUpdateIsNested = !1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0; +function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; +} +function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; +} +function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; +} +var currentUpdateIsNested = !1, nestedUpdateScheduled = !1; function startProfilerTimer(fiber) { profilerStartTime = now(); @@ -4752,44 +4752,15 @@ function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) { profilerStartTime = -1; } } -function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } +function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } -function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } -} -function startLayoutEffectTimer() { - layoutEffectStartTime = now(); +function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -4905,9 +4876,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$88 in Component) - void 0 === newProps[propName$88] && - (newProps[propName$88] = Component[propName$88]); + for (var propName$86 in Component) + void 0 === newProps[propName$86] && + (newProps[propName$86] = Component[propName$86]); } return newProps; } @@ -5284,10 +5255,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$101 = workInProgress.stateNode; + root$99 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$101.incompleteTransitions.has(transition)) { + if (!root$99.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5295,11 +5266,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$101.incompleteTransitions.set(transition, markerInstance); + root$99.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$101.incompleteTransitions.forEach(function (markerInstance) { + root$99.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6562,8 +6533,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -7011,8 +6982,8 @@ function beginWork(current, workInProgress, renderLanes) { (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (props = workInProgress.stateNode), - (props.effectDuration = 0), - (props.passiveEffectDuration = 0), + (props.effectDuration = -0), + (props.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -7602,14 +7573,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$137 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$137 = lastTailNode), + for (var lastTailNode$135 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$135 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$137 + null === lastTailNode$135 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$137.sibling = null); + : (lastTailNode$135.sibling = null); } } function bubbleProperties(completedWork) { @@ -7621,53 +7592,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$139 = completedWork.selfBaseDuration, - child$140 = completedWork.child; - null !== child$140; + var treeBaseDuration$137 = completedWork.selfBaseDuration, + child$138 = completedWork.child; + null !== child$138; ) - (newChildLanes |= child$140.lanes | child$140.childLanes), - (subtreeFlags |= child$140.subtreeFlags & 31457280), - (subtreeFlags |= child$140.flags & 31457280), - (treeBaseDuration$139 += child$140.treeBaseDuration), - (child$140 = child$140.sibling); - completedWork.treeBaseDuration = treeBaseDuration$139; + (newChildLanes |= child$138.lanes | child$138.childLanes), + (subtreeFlags |= child$138.subtreeFlags & 31457280), + (subtreeFlags |= child$138.flags & 31457280), + (treeBaseDuration$137 += child$138.treeBaseDuration), + (child$138 = child$138.sibling); + completedWork.treeBaseDuration = treeBaseDuration$137; } else for ( - treeBaseDuration$139 = completedWork.child; - null !== treeBaseDuration$139; + treeBaseDuration$137 = completedWork.child; + null !== treeBaseDuration$137; ) (newChildLanes |= - treeBaseDuration$139.lanes | treeBaseDuration$139.childLanes), - (subtreeFlags |= treeBaseDuration$139.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$139.flags & 31457280), - (treeBaseDuration$139.return = completedWork), - (treeBaseDuration$139 = treeBaseDuration$139.sibling); + treeBaseDuration$137.lanes | treeBaseDuration$137.childLanes), + (subtreeFlags |= treeBaseDuration$137.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$137.flags & 31457280), + (treeBaseDuration$137.return = completedWork), + (treeBaseDuration$137 = treeBaseDuration$137.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$139 = completedWork.actualDuration; - child$140 = completedWork.selfBaseDuration; + treeBaseDuration$137 = completedWork.actualDuration; + child$138 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$139 += child.actualDuration), - (child$140 += child.treeBaseDuration), + (treeBaseDuration$137 += child.actualDuration), + (child$138 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$139; - completedWork.treeBaseDuration = child$140; + completedWork.actualDuration = treeBaseDuration$137; + completedWork.treeBaseDuration = child$138; } else for ( - treeBaseDuration$139 = completedWork.child; - null !== treeBaseDuration$139; + treeBaseDuration$137 = completedWork.child; + null !== treeBaseDuration$137; ) (newChildLanes |= - treeBaseDuration$139.lanes | treeBaseDuration$139.childLanes), - (subtreeFlags |= treeBaseDuration$139.subtreeFlags), - (subtreeFlags |= treeBaseDuration$139.flags), - (treeBaseDuration$139.return = completedWork), - (treeBaseDuration$139 = treeBaseDuration$139.sibling); + treeBaseDuration$137.lanes | treeBaseDuration$137.childLanes), + (subtreeFlags |= treeBaseDuration$137.subtreeFlags), + (subtreeFlags |= treeBaseDuration$137.flags), + (treeBaseDuration$137.return = completedWork), + (treeBaseDuration$137 = treeBaseDuration$137.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7972,11 +7943,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$155 = null; + var cache$153 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$155 = newProps.memoizedState.cachePool.pool); - cache$155 !== type && (newProps.flags |= 2048); + (cache$153 = newProps.memoizedState.cachePool.pool); + cache$153 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8015,8 +7986,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$155 = type.rendering; - if (null === cache$155) + cache$153 = type.rendering; + if (null === cache$153) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8024,11 +7995,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$155 = findFirstSuspended(current); - if (null !== cache$155) { + cache$153 = findFirstSuspended(current); + if (null !== cache$153) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$155.updateQueue; + current = cache$153.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8053,7 +8024,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$155)), null !== current)) { + if (((current = findFirstSuspended(cache$153)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8063,7 +8034,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$155.alternate && + !cache$153.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8076,13 +8047,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$155.sibling = workInProgress.child), - (workInProgress.child = cache$155)) + ? ((cache$153.sibling = workInProgress.child), + (workInProgress.child = cache$153)) : ((current = type.last), null !== current - ? (current.sibling = cache$155) - : (workInProgress.child = cache$155), - (type.last = cache$155)); + ? (current.sibling = cache$153) + : (workInProgress.child = cache$153), + (type.last = cache$153)); } if (null !== type.tail) return ( @@ -8303,16 +8274,35 @@ function unwindInterruptedWork(current, interruptedWork) { pop(markerInstanceStack); } } -function shouldProfile$1(current) { +function shouldProfile(current) { return 0 !== (current.mode & 2); } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } +function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags +) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); +} function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -8368,7 +8358,7 @@ function commitHookEffectListMount(flags, finishedWork) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -8380,8 +8370,8 @@ function commitHookEffectListUnmount( if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), + if (void 0 !== destroy) { + inst.destroy = void 0; enableSchedulingProfiler && (0 !== (flags & 8) ? enableSchedulingProfiler && @@ -8392,8 +8382,24 @@ function commitHookEffectListUnmount( finishedWork ) : 0 !== (flags & 4) && - markComponentLayoutEffectUnmountStarted(finishedWork)), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )); + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } enableSchedulingProfiler && (0 !== (flags & 8) ? enableSchedulingProfiler && @@ -8402,7 +8408,12 @@ function commitHookEffectListUnmount( typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : 0 !== (flags & 4) && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped()); + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8412,10 +8423,10 @@ function commitHookEffectListUnmount( } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -8423,14 +8434,14 @@ function commitHookPassiveUnmountEffects( nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -8459,19 +8470,19 @@ function safelyCallComponentWillUnmount( current.elementType === current.type ); instance.state = current.memoizedState; - if (shouldProfile$1(current)) { - startLayoutEffectTimer(); + if (shouldProfile(current)) { + startEffectTimer(); try { instance.componentWillUnmount(); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } - recordLayoutEffectDuration(current); + recordEffectDuration(); } else try { instance.componentWillUnmount(); - } catch (error$175) { - captureCommitPhaseError(current, nearestMountedAncestor, error$175); + } catch (error$173) { + captureCommitPhaseError(current, nearestMountedAncestor, error$173); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8490,11 +8501,11 @@ function safelyAttachRef(current, nearestMountedAncestor) { } 21 === current.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), (current.refCleanup = ref(instanceToUse)); + startEffectTimer(), (current.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(); } else current.refCleanup = ref(instanceToUse); else ref.current = instanceToUse; @@ -8509,11 +8520,11 @@ function safelyDetachRef(current, nearestMountedAncestor) { if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), refCleanup(); + startEffectTimer(), refCleanup(); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else refCleanup(); } catch (error) { @@ -8525,25 +8536,18 @@ function safelyDetachRef(current, nearestMountedAncestor) { } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), ref(null); + startEffectTimer(), ref(null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else ref(null); - } catch (error$176) { - captureCommitPhaseError(current, nearestMountedAncestor, error$176); + } catch (error$174) { + captureCommitPhaseError(current, nearestMountedAncestor, error$174); } else ref.current = null; } -function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - try { - destroy(); - } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); - } -} function commitProfilerUpdate( finishedWork, current, @@ -8728,7 +8732,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$237) { + } catch (e$229) { JSCompiler_temp = null; break a; } @@ -8928,22 +8932,22 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) if (((finishedRoot = finishedWork.stateNode), null === current)) - if (shouldProfile$1(finishedWork)) { - startLayoutEffectTimer(); + if (shouldProfile(finishedWork)) { + startEffectTimer(); try { finishedRoot.componentDidMount(); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else try { finishedRoot.componentDidMount(); - } catch (error$172) { + } catch (error$170) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$172 + error$170 ); } else { @@ -8953,22 +8957,22 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { finishedWork.elementType === finishedWork.type ); current = current.memoizedState; - if (shouldProfile$1(finishedWork)) { - startLayoutEffectTimer(); + if (shouldProfile(finishedWork)) { + startEffectTimer(); try { finishedRoot.componentDidUpdate( prevProps, current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$173) { + } catch (error$171) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$173 + error$171 ); } - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else try { finishedRoot.componentDidUpdate( @@ -8976,11 +8980,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$174) { + } catch (error$172) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$174 + error$172 ); } } @@ -8988,24 +8992,26 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 64 && ((flags = finishedWork.updateQueue), null !== flags)) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { - commitCallbacks(flags, finishedRoot); + commitCallbacks(flags, prevProps); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -9018,25 +9024,18 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - commitProfilerUpdate(finishedWork, current, commitTime, flags), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } + flags & 4 + ? ((flags = pushNestedEffectDurations()), + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.effectDuration += bubbleNestedEffectDurations(flags)), + commitProfilerUpdate( + finishedWork, + current, + commitTime, + finishedRoot.effectDuration + )) + : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -9336,7 +9335,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$185 = hostParentIsContainer; + var prevHostParentIsContainer$183 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9344,7 +9343,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$185; + hostParentIsContainer = prevHostParentIsContainer$183; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9411,93 +9410,11 @@ function commitDeletionEffectsOnFiber( case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - prevHostParentIsContainer$185 = prevHostParentIsContainer.tag; - var inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$185 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (prevHostParentIsContainer$185 & 4) || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - 0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (prevHostParentIsContainer$185 = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$185 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (prevHostParentIsContainer$185 & 4) && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - 0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects(deletedFiber, nearestMountedAncestor, 4); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -9550,15 +9467,15 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$195 = finishedWork.alternate; + var current$186 = finishedWork.alternate; if ( - null !== current$195 && - ((current$195 = current$195.memoizedState), - null !== current$195 && - ((current$195 = current$195.dehydrated), null !== current$195)) + null !== current$186 && + ((current$186 = current$186.memoizedState), + null !== current$186 && + ((current$186 = current$186.dehydrated), null !== current$186)) ) { try { - retryIfBlockedOn(current$195); + retryIfBlockedOn(current$186); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -9566,7 +9483,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$195); + onHydrated && onHydrated(current$186); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -9687,11 +9604,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags & 4 && (commitHookEffectListUnmount(3, finishedWork, finishedWork.return), commitHookEffectListMount(3, finishedWork), - 0 !== (finishedWork.mode & 2) - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount(5, finishedWork, finishedWork.return), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount(5, finishedWork, finishedWork.return)); + commitHookLayoutUnmountEffects(finishedWork, finishedWork.return, 5)); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -9716,55 +9629,56 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags & 512 && null !== current && safelyDetachRef(current, current.return); - if (flags & 4) { - var currentResource = null !== current ? current.memoizedState : null; - flags = finishedWork.memoizedState; - if (null === current) + if (flags & 4) + if ( + ((root = null !== current ? current.memoizedState : null), + (flags = finishedWork.memoizedState), + null === current) + ) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; + root = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - currentResource = - hoistableRoot.getElementsByTagName("title")[0]; + hoistableRoot = root.getElementsByTagName("title")[0]; if ( - !currentResource || - currentResource[internalHoistableMarker] || - currentResource[internalInstanceKey] || + !hoistableRoot || + hoistableRoot[internalHoistableMarker] || + hoistableRoot[internalInstanceKey] || "http://www.w3.org/2000/svg" === - currentResource.namespaceURI || - currentResource.hasAttribute("itemprop") + hoistableRoot.namespaceURI || + hoistableRoot.hasAttribute("itemprop") ) - (currentResource = hoistableRoot.createElement(flags)), - hoistableRoot.head.insertBefore( - currentResource, - hoistableRoot.querySelector("head > title") + (hoistableRoot = root.createElement(flags)), + root.head.insertBefore( + hoistableRoot, + root.querySelector("head > title") ); - setInitialProperties(currentResource, flags, current); - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + setInitialProperties(hoistableRoot, flags, current); + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; break a; case "link": var maybeNodes = getHydratableHoistableCache( "link", "href", - hoistableRoot + root ).get(flags + (current.href || "")); if (maybeNodes) for (var i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = maybeNodes[i]), - currentResource.getAttribute("href") === + ((hoistableRoot = maybeNodes[i]), + hoistableRoot.getAttribute("href") === (null == current.href ? null : current.href) && - currentResource.getAttribute("rel") === + hoistableRoot.getAttribute("rel") === (null == current.rel ? null : current.rel) && - currentResource.getAttribute("title") === + hoistableRoot.getAttribute("title") === (null == current.title ? null : current.title) && - currentResource.getAttribute("crossorigin") === + hoistableRoot.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) @@ -9772,36 +9686,36 @@ function commitMutationEffectsOnFiber(finishedWork, root) { maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; case "meta": if ( (maybeNodes = getHydratableHoistableCache( "meta", "content", - hoistableRoot + root ).get(flags + (current.content || ""))) ) for (i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = maybeNodes[i]), - currentResource.getAttribute("content") === + ((hoistableRoot = maybeNodes[i]), + hoistableRoot.getAttribute("content") === (null == current.content ? null : "" + current.content) && - currentResource.getAttribute("name") === + hoistableRoot.getAttribute("name") === (null == current.name ? null : current.name) && - currentResource.getAttribute("property") === + hoistableRoot.getAttribute("property") === (null == current.property ? null : current.property) && - currentResource.getAttribute("http-equiv") === + hoistableRoot.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - currentResource.getAttribute("charset") === + hoistableRoot.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) @@ -9809,16 +9723,16 @@ function commitMutationEffectsOnFiber(finishedWork, root) { maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; default: throw Error(formatProdErrorMessage(468, flags)); } - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; } finishedWork.stateNode = flags; } else @@ -9834,12 +9748,12 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.memoizedProps ); else - currentResource !== flags - ? (null === currentResource + root !== flags + ? (null === root ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : currentResource.count--, + : root.count--, null === flags ? mountHoistable( hoistableRoot, @@ -9858,12 +9772,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.memoizedProps, current.memoizedProps ); - } break; case 27: if (flags & 4 && null === finishedWork.alternate) { hoistableRoot = finishedWork.stateNode; - currentResource = finishedWork.memoizedProps; + maybeNodes = finishedWork.memoizedProps; try { for (var node = hoistableRoot.firstChild; node; ) { var nextNode = node.nextSibling, @@ -9884,9 +9797,9 @@ function commitMutationEffectsOnFiber(finishedWork, root) { ) hoistableRoot.removeAttributeNode(attributes[0]); - setInitialProperties(hoistableRoot, type, currentResource); + setInitialProperties(hoistableRoot, type, maybeNodes); hoistableRoot[internalInstanceKey] = finishedWork; - hoistableRoot[internalPropsKey] = currentResource; + hoistableRoot[internalPropsKey] = maybeNodes; } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -9898,20 +9811,20 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== current && safelyDetachRef(current, current.return); if (finishedWork.flags & 32) { - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { - setTextContent(hoistableRoot, ""); + setTextContent(root, ""); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } } flags & 4 && null != finishedWork.stateNode && - ((hoistableRoot = finishedWork.memoizedProps), + ((root = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - hoistableRoot, - null !== current ? current.memoizedProps : hoistableRoot + root, + null !== current ? current.memoizedProps : root )); flags & 1024 && (needsFormReset = !0); break; @@ -9931,11 +9844,12 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } break; case 3: + hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - hoistableRoot = currentHoistableRoot; + maybeNodes = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = hoistableRoot; + currentHoistableRoot = maybeNodes; commitReconciliationEffects(finishedWork); if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { @@ -9945,6 +9859,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); + root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: flags = currentHoistableRoot; @@ -9955,18 +9870,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); finishedWork.child.flags & 8192 && - ((hoistableRoot = null !== finishedWork.memoizedState), + ((root = null !== finishedWork.memoizedState), (current = null !== current && null !== current.memoizedState), alwaysThrottleRetries - ? hoistableRoot !== current && - (globalMostRecentFallbackTime = now$1()) - : hoistableRoot && - !current && - (globalMostRecentFallbackTime = now$1())); + ? root !== current && (globalMostRecentFallbackTime = now$1()) + : root && !current && (globalMostRecentFallbackTime = now$1())); if (flags & 4) { try { if (null !== finishedWork.memoizedState) { @@ -10023,22 +9942,20 @@ function commitMutationEffectsOnFiber(finishedWork, root) { nextNode = current = root; try { if (((hoistableRoot = nextNode.stateNode), node)) - (currentResource = hoistableRoot.style), - "function" === typeof currentResource.setProperty - ? currentResource.setProperty( - "display", - "none", - "important" - ) - : (currentResource.display = "none"); + (maybeNodes = hoistableRoot.style), + "function" === typeof maybeNodes.setProperty + ? maybeNodes.setProperty("display", "none", "important") + : (maybeNodes.display = "none"); else { - maybeNodes = nextNode.stateNode; - i = nextNode.memoizedProps.style; - var display = - void 0 !== i && null !== i && i.hasOwnProperty("display") - ? i.display - : null; - maybeNodes.style.display = + i = nextNode.stateNode; + var styleProp = nextNode.memoizedProps.style, + display = + void 0 !== styleProp && + null !== styleProp && + styleProp.hasOwnProperty("display") + ? styleProp.display + : null; + i.style.display = null == display || "boolean" === typeof display ? "" : ("" + display).trim(); @@ -10130,21 +10047,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$177 = JSCompiler_inline_result.stateNode; + var parent$175 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$177, ""), + (setTextContent(parent$175, ""), (JSCompiler_inline_result.flags &= -33)); - var before$178 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$178, parent$177); + var before$176 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$176, parent$175); break; case 3: case 4: - var parent$179 = JSCompiler_inline_result.stateNode.containerInfo, - before$180 = getHostSibling(finishedWork); + var parent$177 = JSCompiler_inline_result.stateNode.containerInfo, + before$178 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$180, - parent$179 + before$178, + parent$177 ); break; default: @@ -10187,14 +10104,7 @@ function recursivelyTraverseDisappearLayoutEffects(parentFiber) { case 11: case 14: case 15: - if (0 !== (finishedWork.mode & 2)) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount(4, finishedWork, finishedWork.return); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else commitHookEffectListUnmount(4, finishedWork, finishedWork.return); + commitHookLayoutUnmountEffects(finishedWork, finishedWork.return, 4); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -10233,7 +10143,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$202 = parentFiber.alternate, + var current$193 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -10254,18 +10164,18 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - current$202 = finishedWork; - finishedRoot = current$202.stateNode; + current$193 = finishedWork; + finishedRoot = current$193.stateNode; if ("function" === typeof finishedRoot.componentDidMount) try { finishedRoot.componentDidMount(); } catch (error) { - captureCommitPhaseError(current$202, current$202.return, error); + captureCommitPhaseError(current$193, current$193.return, error); } - current$202 = finishedWork; - finishedRoot = current$202.updateQueue; + current$193 = finishedWork; + finishedRoot = current$193.updateQueue; if (null !== finishedRoot) { - var instance = current$202.stateNode; + var instance = current$193.stateNode; try { var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks; if (null !== hiddenCallbacks) @@ -10276,7 +10186,7 @@ function recursivelyTraverseReappearLayoutEffects( ) callCallback(hiddenCallbacks[finishedRoot], instance); } catch (error) { - captureCommitPhaseError(current$202, current$202.return, error); + captureCommitPhaseError(current$193, current$193.return, error); } } includeWorkInProgressEffects && @@ -10293,40 +10203,32 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$202 && + null === current$193 && flags & 4 && commitHostMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - commitProfilerUpdate( - finishedWork, - current$202, - commitTime, - flags - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } + includeWorkInProgressEffects && flags & 4 + ? ((flags = pushNestedEffectDurations()), + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.effectDuration += bubbleNestedEffectDurations(flags)), + commitProfilerUpdate( + finishedWork, + current$193, + commitTime, + finishedRoot.effectDuration + )) + : recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -10463,6 +10365,7 @@ function commitPassiveMountOnFiber( flags & 2048 && commitHookPassiveMountEffects(finishedWork, 9); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -10522,37 +10425,33 @@ function commitPassiveMountOnFiber( clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -10569,9 +10468,9 @@ function commitPassiveMountOnFiber( ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -10579,14 +10478,14 @@ function commitPassiveMountOnFiber( committedTransitions ) : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10598,7 +10497,7 @@ function commitPassiveMountOnFiber( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -10676,9 +10575,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$210 = finishedWork.stateNode; + var instance$201 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$210._visibility & 4 + ? instance$201._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10690,7 +10589,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$210._visibility |= 4), + : ((instance$201._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10703,7 +10602,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$210 + instance$201 ); break; case 24: @@ -10860,12 +10759,24 @@ function commitPassiveUnmountOnFiber(finishedWork) { finishedWork.flags & 2048 && commitHookPassiveUnmountEffects(finishedWork, finishedWork.return, 9); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -11744,8 +11655,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$221) { - handleThrow(root, thrownValue$221); + } catch (thrownValue$213) { + handleThrow(root, thrownValue$213); } while (1); lanes && root.shellSuspendCounter++; @@ -11871,8 +11782,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$223) { - handleThrow(root, thrownValue$223); + } catch (thrownValue$215) { + handleThrow(root, thrownValue$215); } while (1); resetContextDependencies(); @@ -12049,18 +11960,18 @@ function completeUnitOfWork(unitOfWork) { ); return; } - var current$227 = completedWork.alternate; + var current$219 = completedWork.alternate; unitOfWork = completedWork.return; startProfilerTimer(completedWork); - current$227 = completeWork( - current$227, + current$219 = completeWork( + current$219, completedWork, entangledRenderLanes ); 0 !== (completedWork.mode & 2) && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork); - if (null !== current$227) { - workInProgress = current$227; + if (null !== current$219) { + workInProgress = current$219; return; } completedWork = completedWork.sibling; @@ -12278,7 +12189,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$230 = rootWithPendingPassiveEffects, + var root$222 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12293,7 +12204,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$230, remainingLanes); + releaseRootPooledCache(root$222, remainingLanes); } } return !1; @@ -12884,7 +12795,7 @@ function FiberRootNode( tag++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); @@ -13003,9 +12914,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$235 = 0; - 31 > index$235; - index$235++ + var map = new Map(), lane = 1, index$227 = 0; + 31 > index$227; + index$227++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13579,19 +13490,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$394; + var JSCompiler_inline_result$jscomp$386; if (canUseDOM) { - var isSupported$jscomp$inline_1624 = "oninput" in document; - if (!isSupported$jscomp$inline_1624) { - var element$jscomp$inline_1625 = document.createElement("div"); - element$jscomp$inline_1625.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1624 = - "function" === typeof element$jscomp$inline_1625.oninput; + var isSupported$jscomp$inline_1619 = "oninput" in document; + if (!isSupported$jscomp$inline_1619) { + var element$jscomp$inline_1620 = document.createElement("div"); + element$jscomp$inline_1620.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1619 = + "function" === typeof element$jscomp$inline_1620.oninput; } - JSCompiler_inline_result$jscomp$394 = isSupported$jscomp$inline_1624; - } else JSCompiler_inline_result$jscomp$394 = !1; + JSCompiler_inline_result$jscomp$386 = isSupported$jscomp$inline_1619; + } else JSCompiler_inline_result$jscomp$386 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$394 && + JSCompiler_inline_result$jscomp$386 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13680,36 +13591,41 @@ function containsNode(outerNode, innerNode) { : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmp393503734$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmpm1031185536$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmp393503734$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmpm1031185536$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmp393503734$1.defaultView) + : $jscomp$optchain$tmpm1031185536$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmp393503734$1 = getActiveElement(containerInfo.document); - $jscomp$optchain$tmp393503734$1 instanceof containerInfo.HTMLIFrameElement; + $jscomp$optchain$tmpm1031185536$1 = getActiveElement( + containerInfo.document + ); + $jscomp$optchain$tmpm1031185536$1 instanceof + containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmp393503734$1.contentWindow.location.href; + typeof $jscomp$optchain$tmpm1031185536$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmp393503734$1.contentWindow; + containerInfo = $jscomp$optchain$tmpm1031185536$1.contentWindow; else break; - $jscomp$optchain$tmp393503734$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmpm1031185536$1 = getActiveElement( + containerInfo.document + ); } - return $jscomp$optchain$tmp393503734$1; + return $jscomp$optchain$tmpm1031185536$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -14010,20 +13926,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1665 = 0; - i$jscomp$inline_1665 < simpleEventPluginEvents.length; - i$jscomp$inline_1665++ + var i$jscomp$inline_1660 = 0; + i$jscomp$inline_1660 < simpleEventPluginEvents.length; + i$jscomp$inline_1660++ ) { - var eventName$jscomp$inline_1666 = - simpleEventPluginEvents[i$jscomp$inline_1665], - domEventName$jscomp$inline_1667 = - eventName$jscomp$inline_1666.toLowerCase(), - capitalizedEvent$jscomp$inline_1668 = - eventName$jscomp$inline_1666[0].toUpperCase() + - eventName$jscomp$inline_1666.slice(1); + var eventName$jscomp$inline_1661 = + simpleEventPluginEvents[i$jscomp$inline_1660], + domEventName$jscomp$inline_1662 = + eventName$jscomp$inline_1661.toLowerCase(), + capitalizedEvent$jscomp$inline_1663 = + eventName$jscomp$inline_1661[0].toUpperCase() + + eventName$jscomp$inline_1661.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1667, - "on" + capitalizedEvent$jscomp$inline_1668 + domEventName$jscomp$inline_1662, + "on" + capitalizedEvent$jscomp$inline_1663 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15312,34 +15228,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$251 = props[hasSrc]; - if (null != propValue$251) + var propValue$243 = props[hasSrc]; + if (null != propValue$243) switch (hasSrc) { case "name": - hasSrcSet = propValue$251; + hasSrcSet = propValue$243; break; case "type": - propKey = propValue$251; + propKey = propValue$243; break; case "checked": - checked = propValue$251; + checked = propValue$243; break; case "defaultChecked": - defaultChecked = propValue$251; + defaultChecked = propValue$243; break; case "value": - propValue = propValue$251; + propValue = propValue$243; break; case "defaultValue": - defaultValue = propValue$251; + defaultValue = propValue$243; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$251) + if (null != propValue$243) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$251, props, null); + setProp(domElement, tag, hasSrc, propValue$243, props, null); } } initInput( @@ -15475,14 +15391,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$251 in props) - props.hasOwnProperty(propValue$251) && - ((hasSrc = props[propValue$251]), + for (propValue$243 in props) + props.hasOwnProperty(propValue$243) && + ((hasSrc = props[propValue$243]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$251, + propValue$243, hasSrc, props, void 0 @@ -15530,14 +15446,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$268 in nextProps) { - var propKey = nextProps[propKey$268]; - lastProp = lastProps[propKey$268]; + for (var propKey$260 in nextProps) { + var propKey = nextProps[propKey$260]; + lastProp = lastProps[propKey$260]; if ( - nextProps.hasOwnProperty(propKey$268) && + nextProps.hasOwnProperty(propKey$260) && (null != propKey || null != lastProp) ) - switch (propKey$268) { + switch (propKey$260) { case "type": type = propKey; break; @@ -15566,7 +15482,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$268, + propKey$260, propKey, nextProps, lastProp @@ -15585,7 +15501,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$268 = null; + propKey = value = defaultValue = propKey$260 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15616,7 +15532,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$268 = type; + propKey$260 = type; break; case "defaultValue": defaultValue = type; @@ -15637,15 +15553,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$268 - ? updateOptions(domElement, !!lastProps, propKey$268, !1) + null != propKey$260 + ? updateOptions(domElement, !!lastProps, propKey$260, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$268 = null; + propKey = propKey$260 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15669,7 +15585,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$268 = name; + propKey$260 = name; break; case "defaultValue": propKey = name; @@ -15683,17 +15599,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$268, propKey); + updateTextarea(domElement, propKey$260, propKey); return; case "option": - for (var propKey$284 in lastProps) + for (var propKey$276 in lastProps) if ( - ((propKey$268 = lastProps[propKey$284]), - lastProps.hasOwnProperty(propKey$284) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$284)) + ((propKey$260 = lastProps[propKey$276]), + lastProps.hasOwnProperty(propKey$276) && + null != propKey$260 && + !nextProps.hasOwnProperty(propKey$276)) ) - switch (propKey$284) { + switch (propKey$276) { case "selected": domElement.selected = !1; break; @@ -15701,33 +15617,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$284, + propKey$276, null, nextProps, - propKey$268 + propKey$260 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$268 = nextProps[lastDefaultValue]), + ((propKey$260 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$268 !== propKey && - (null != propKey$268 || null != propKey)) + propKey$260 !== propKey && + (null != propKey$260 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$268 && - "function" !== typeof propKey$268 && - "symbol" !== typeof propKey$268; + propKey$260 && + "function" !== typeof propKey$260 && + "symbol" !== typeof propKey$260; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$268, + propKey$260, nextProps, propKey ); @@ -15748,24 +15664,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$289 in lastProps) - (propKey$268 = lastProps[propKey$289]), - lastProps.hasOwnProperty(propKey$289) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$289) && - setProp(domElement, tag, propKey$289, null, nextProps, propKey$268); + for (var propKey$281 in lastProps) + (propKey$260 = lastProps[propKey$281]), + lastProps.hasOwnProperty(propKey$281) && + null != propKey$260 && + !nextProps.hasOwnProperty(propKey$281) && + setProp(domElement, tag, propKey$281, null, nextProps, propKey$260); for (checked in nextProps) if ( - ((propKey$268 = nextProps[checked]), + ((propKey$260 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$268 !== propKey && - (null != propKey$268 || null != propKey)) + propKey$260 !== propKey && + (null != propKey$260 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$268) + if (null != propKey$260) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15773,7 +15689,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$268, + propKey$260, nextProps, propKey ); @@ -15781,49 +15697,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$294 in lastProps) - (propKey$268 = lastProps[propKey$294]), - lastProps.hasOwnProperty(propKey$294) && - void 0 !== propKey$268 && - !nextProps.hasOwnProperty(propKey$294) && + for (var propKey$286 in lastProps) + (propKey$260 = lastProps[propKey$286]), + lastProps.hasOwnProperty(propKey$286) && + void 0 !== propKey$260 && + !nextProps.hasOwnProperty(propKey$286) && setPropOnCustomElement( domElement, tag, - propKey$294, + propKey$286, void 0, nextProps, - propKey$268 + propKey$260 ); for (defaultChecked in nextProps) - (propKey$268 = nextProps[defaultChecked]), + (propKey$260 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$268 === propKey || - (void 0 === propKey$268 && void 0 === propKey) || + propKey$260 === propKey || + (void 0 === propKey$260 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$268, + propKey$260, nextProps, propKey ); return; } } - for (var propKey$299 in lastProps) - (propKey$268 = lastProps[propKey$299]), - lastProps.hasOwnProperty(propKey$299) && - null != propKey$268 && - !nextProps.hasOwnProperty(propKey$299) && - setProp(domElement, tag, propKey$299, null, nextProps, propKey$268); + for (var propKey$291 in lastProps) + (propKey$260 = lastProps[propKey$291]), + lastProps.hasOwnProperty(propKey$291) && + null != propKey$260 && + !nextProps.hasOwnProperty(propKey$291) && + setProp(domElement, tag, propKey$291, null, nextProps, propKey$260); for (lastProp in nextProps) - (propKey$268 = nextProps[lastProp]), + (propKey$260 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$268 === propKey || - (null == propKey$268 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$268, nextProps, propKey); + propKey$260 === propKey || + (null == propKey$260 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$260, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16401,26 +16317,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$307 = getResourcesFromRoot( + var styles$299 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$308 = styles$307.get(type); - resource$308 || + resource$300 = styles$299.get(type); + resource$300 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$308 = { + (resource$300 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$307.set(type, resource$308), - (styles$307 = JSCompiler_inline_result.querySelector( + styles$299.set(type, resource$300), + (styles$299 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$307._p && - ((resource$308.instance = styles$307), - (resource$308.state.loading = 5)), + !styles$299._p && + ((resource$300.instance = styles$299), + (resource$300.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16433,16 +16349,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$307 || + styles$299 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$308.state + resource$300.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$308; + return resource$300; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16539,37 +16455,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$313 = hoistableRoot.querySelector( + var instance$305 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$313) + if (instance$305) return ( (resource.state.loading |= 4), - (resource.instance = instance$313), - markNodeAsHoistable(instance$313), - instance$313 + (resource.instance = instance$305), + markNodeAsHoistable(instance$305), + instance$305 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$313 = ( + instance$305 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$313); - var linkInstance = instance$313; + markNodeAsHoistable(instance$305); + var linkInstance = instance$305; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$313, "link", instance); + setInitialProperties(instance$305, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$313, props.precedence, hoistableRoot); - return (resource.instance = instance$313); + insertStylesheet(instance$305, props.precedence, hoistableRoot); + return (resource.instance = instance$305); case "script": - instance$313 = getScriptKey(props.src); + instance$305 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$313) + getScriptSelectorFromKey(instance$305) )) ) return ( @@ -16578,7 +16494,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$313))) + if ((styleProps = preloadPropsMap.get(instance$305))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17581,16 +17497,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1838 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1833 = React.version; if ( - "19.0.0-www-modern-7b56a542-20240917" !== - isomorphicReactPackageVersion$jscomp$inline_1838 + "19.0.0-www-modern-4549be0f-20240917" !== + isomorphicReactPackageVersion$jscomp$inline_1833 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1838, - "19.0.0-www-modern-7b56a542-20240917" + isomorphicReactPackageVersion$jscomp$inline_1833, + "19.0.0-www-modern-4549be0f-20240917" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17606,28 +17522,28 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1840 = { +var internals$jscomp$inline_1835 = { bundleType: 0, - version: "19.0.0-www-modern-7b56a542-20240917", + version: "19.0.0-www-modern-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1840.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1840.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1835.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1835.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2325 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2320 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2325.isDisabled && - hook$jscomp$inline_2325.supportsFiber + !hook$jscomp$inline_2320.isDisabled && + hook$jscomp$inline_2320.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2325.inject( - internals$jscomp$inline_1840 + (rendererID = hook$jscomp$inline_2320.inject( + internals$jscomp$inline_1835 )), - (injectedHook = hook$jscomp$inline_2325); + (injectedHook = hook$jscomp$inline_2320); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17978,7 +17894,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-7b56a542-20240917"; +exports.version = "19.0.0-www-modern-4549be0f-20240917"; "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 18c37edcdf..dc06f81326 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -8986,5 +8986,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-7b56a542-20240917"; + exports.version = "19.0.0-www-classic-4549be0f-20240917"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 74a9b857fa..6cd54aecce 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8804,5 +8804,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-7b56a542-20240917"; + exports.version = "19.0.0-www-modern-4549be0f-20240917"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index d261a8b85a..9dd09e0c14 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5911,4 +5911,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-classic-7b56a542-20240917"; +exports.version = "19.0.0-www-classic-4549be0f-20240917"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 79b09643ca..751505eab2 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5823,4 +5823,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-modern-7b56a542-20240917"; +exports.version = "19.0.0-www-modern-4549be0f-20240917"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index e1ca29f696..0a316a22c3 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -840,20 +840,6 @@ __DEV__ && typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } - function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); - } - function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); - } function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -7390,6 +7376,21 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -7409,44 +7410,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -9247,32 +9219,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2451; - var JSCompiler_object_inline_stack_2452 = 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_2453 = !1; + var JSCompiler_object_inline_componentStack_2454 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2451 = didSuspend) || - (JSCompiler_object_inline_digest_2451 = + (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_2451 && - ((JSCompiler_object_inline_componentStack_2453 = !0), + JSCompiler_object_inline_digest_2452 && + ((JSCompiler_object_inline_componentStack_2454 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2451 = 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_2453 + JSCompiler_object_inline_componentStack_2454 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2450 = nextHydratableInstance; + var JSCompiler_object_inline_message_2451 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2450)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2451)) { c: { - var instance = JSCompiler_object_inline_message_2450; + var instance = JSCompiler_object_inline_message_2451; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9313,19 +9285,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2450 + JSCompiler_object_inline_message_2451 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2450 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2451 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2450 && - ((JSCompiler_object_inline_message_2450 = - JSCompiler_object_inline_message_2450.dehydrated), - null !== JSCompiler_object_inline_message_2450) + 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_2450.data === + JSCompiler_object_inline_message_2451.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9333,27 +9305,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2450 = - JSCompiler_object_inline_stack_2452.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2452.fallback; - if (JSCompiler_object_inline_componentStack_2453) + 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_2452 = + (JSCompiler_object_inline_stack_2453 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2450, + JSCompiler_object_inline_message_2451, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2453 = + (JSCompiler_object_inline_componentStack_2454 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2453.memoizedState = + (JSCompiler_object_inline_componentStack_2454.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2453.childLanes = + (JSCompiler_object_inline_componentStack_2454.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2451, + JSCompiler_object_inline_digest_2452, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9366,9 +9338,9 @@ __DEV__ && ? markerInstanceStack.current : null), (current = - JSCompiler_object_inline_componentStack_2453.updateQueue), + JSCompiler_object_inline_componentStack_2454.updateQueue), null === current - ? (JSCompiler_object_inline_componentStack_2453.updateQueue = + ? (JSCompiler_object_inline_componentStack_2454.updateQueue = { transitions: workInProgress, markerInstances: renderLanes, @@ -9376,46 +9348,46 @@ __DEV__ && }) : ((current.transitions = workInProgress), (current.markerInstances = renderLanes)))), - JSCompiler_object_inline_stack_2452 + JSCompiler_object_inline_stack_2453 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2452.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2453.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2452 = + (JSCompiler_object_inline_stack_2453 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2450, + JSCompiler_object_inline_message_2451, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2453 = + (JSCompiler_object_inline_componentStack_2454 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2453.memoizedState = + (JSCompiler_object_inline_componentStack_2454.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2453.childLanes = + (JSCompiler_object_inline_componentStack_2454.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2451, + JSCompiler_object_inline_digest_2452, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2452 + JSCompiler_object_inline_stack_2453 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2450 + JSCompiler_object_inline_message_2451 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2450 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2450) + ((JSCompiler_object_inline_message_2451 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2451) ) { if (didSuspend) workInProgress.flags & 256 @@ -9432,32 +9404,32 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2453 = - JSCompiler_object_inline_stack_2452.fallback), - (JSCompiler_object_inline_message_2450 = workInProgress.mode), - (JSCompiler_object_inline_stack_2452 = createFiberFromOffscreen( + (JSCompiler_object_inline_componentStack_2454 = + JSCompiler_object_inline_stack_2453.fallback), + (JSCompiler_object_inline_message_2451 = workInProgress.mode), + (JSCompiler_object_inline_stack_2453 = createFiberFromOffscreen( { mode: "visible", - children: JSCompiler_object_inline_stack_2452.children + children: JSCompiler_object_inline_stack_2453.children }, - JSCompiler_object_inline_message_2450, + JSCompiler_object_inline_message_2451, 0, null )), - (JSCompiler_object_inline_componentStack_2453 = + (JSCompiler_object_inline_componentStack_2454 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2453, - JSCompiler_object_inline_message_2450, + JSCompiler_object_inline_componentStack_2454, + JSCompiler_object_inline_message_2451, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2453.flags |= 2), - (JSCompiler_object_inline_stack_2452.return = workInProgress), - (JSCompiler_object_inline_componentStack_2453.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_2452.sibling = - JSCompiler_object_inline_componentStack_2453), - (workInProgress.child = JSCompiler_object_inline_stack_2452), + (JSCompiler_object_inline_stack_2453.sibling = + JSCompiler_object_inline_componentStack_2454), + (workInProgress.child = JSCompiler_object_inline_stack_2453), (disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode) && reconcileChildFibers( @@ -9466,63 +9438,63 @@ __DEV__ && null, renderLanes ), - (JSCompiler_object_inline_stack_2452 = workInProgress.child), - (JSCompiler_object_inline_stack_2452.memoizedState = + (JSCompiler_object_inline_stack_2453 = workInProgress.child), + (JSCompiler_object_inline_stack_2453.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2452.childLanes = + (JSCompiler_object_inline_stack_2453.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2451, + JSCompiler_object_inline_digest_2452, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2453)); + 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_2450.data === + JSCompiler_object_inline_message_2451.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2451 = - JSCompiler_object_inline_message_2450.nextSibling && - JSCompiler_object_inline_message_2450.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2451) { - JSCompiler_temp = JSCompiler_object_inline_digest_2451.dgst; - var message = JSCompiler_object_inline_digest_2451.msg; - instance = JSCompiler_object_inline_digest_2451.stck; - var componentStack = JSCompiler_object_inline_digest_2451.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_2450 = message; - JSCompiler_object_inline_digest_2451 = JSCompiler_temp; - JSCompiler_object_inline_stack_2452 = instance; - JSCompiler_object_inline_componentStack_2453 = componentStack; - JSCompiler_object_inline_message_2450 = - JSCompiler_object_inline_message_2450 - ? Error(JSCompiler_object_inline_message_2450) + JSCompiler_object_inline_message_2451 = message; + JSCompiler_object_inline_digest_2452 = JSCompiler_temp; + JSCompiler_object_inline_stack_2453 = instance; + JSCompiler_object_inline_componentStack_2454 = componentStack; + JSCompiler_object_inline_message_2451 = + 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_message_2450.stack = - JSCompiler_object_inline_stack_2452 || ""; - JSCompiler_object_inline_message_2450.digest = - JSCompiler_object_inline_digest_2451; - JSCompiler_object_inline_digest_2451 = - void 0 === JSCompiler_object_inline_componentStack_2453 + JSCompiler_object_inline_message_2451.stack = + JSCompiler_object_inline_stack_2453 || ""; + JSCompiler_object_inline_message_2451.digest = + JSCompiler_object_inline_digest_2452; + JSCompiler_object_inline_digest_2452 = + void 0 === JSCompiler_object_inline_componentStack_2454 ? null - : JSCompiler_object_inline_componentStack_2453; - "string" === typeof JSCompiler_object_inline_digest_2451 && + : JSCompiler_object_inline_componentStack_2454; + "string" === typeof JSCompiler_object_inline_digest_2452 && CapturedStacks.set( - JSCompiler_object_inline_message_2450, - JSCompiler_object_inline_digest_2451 + JSCompiler_object_inline_message_2451, + JSCompiler_object_inline_digest_2452 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2450, + value: JSCompiler_object_inline_message_2451, source: null, - stack: JSCompiler_object_inline_digest_2451 + stack: JSCompiler_object_inline_digest_2452 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9537,25 +9509,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2451 = + (JSCompiler_object_inline_digest_2452 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2451) + didReceiveUpdate || JSCompiler_object_inline_digest_2452) ) { - JSCompiler_object_inline_digest_2451 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2451) { - JSCompiler_object_inline_stack_2452 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2452 & 42)) - JSCompiler_object_inline_stack_2452 = 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_2452) { + switch (JSCompiler_object_inline_stack_2453) { case 2: - JSCompiler_object_inline_stack_2452 = 1; + JSCompiler_object_inline_stack_2453 = 1; break; case 8: - JSCompiler_object_inline_stack_2452 = 4; + JSCompiler_object_inline_stack_2453 = 4; break; case 32: - JSCompiler_object_inline_stack_2452 = 16; + JSCompiler_object_inline_stack_2453 = 16; break; case 128: case 256: @@ -9576,40 +9548,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2452 = 64; + JSCompiler_object_inline_stack_2453 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2452 = 134217728; + JSCompiler_object_inline_stack_2453 = 134217728; break; default: - JSCompiler_object_inline_stack_2452 = 0; + JSCompiler_object_inline_stack_2453 = 0; } - JSCompiler_object_inline_stack_2452 = + JSCompiler_object_inline_stack_2453 = 0 !== - (JSCompiler_object_inline_stack_2452 & - (JSCompiler_object_inline_digest_2451.suspendedLanes | + (JSCompiler_object_inline_stack_2453 & + (JSCompiler_object_inline_digest_2452.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2452; + : JSCompiler_object_inline_stack_2453; if ( - 0 !== JSCompiler_object_inline_stack_2452 && - JSCompiler_object_inline_stack_2452 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2453 && + JSCompiler_object_inline_stack_2453 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2452), + ((prevState.retryLane = JSCompiler_object_inline_stack_2453), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2452 + JSCompiler_object_inline_stack_2453 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2451, + JSCompiler_object_inline_digest_2452, current, - JSCompiler_object_inline_stack_2452 + JSCompiler_object_inline_stack_2453 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2450.data === + JSCompiler_object_inline_message_2451.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9617,7 +9589,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2450.data === + JSCompiler_object_inline_message_2451.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9625,12 +9597,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2450._reactRetry = + (JSCompiler_object_inline_message_2451._reactRetry = workInProgress), (workInProgress = null)) : ((renderLanes = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2450.nextSibling + JSCompiler_object_inline_message_2451.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9648,73 +9620,73 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2452.children + JSCompiler_object_inline_stack_2453.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2453) + if (JSCompiler_object_inline_componentStack_2454) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2453 = - JSCompiler_object_inline_stack_2452.fallback), - (JSCompiler_object_inline_message_2450 = 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), (componentStack = { mode: "hidden", - children: JSCompiler_object_inline_stack_2452.children + children: JSCompiler_object_inline_stack_2453.children }), disableLegacyMode || - (JSCompiler_object_inline_message_2450 & ConcurrentMode) !== NoMode || + (JSCompiler_object_inline_message_2451 & ConcurrentMode) !== NoMode || workInProgress.child === JSCompiler_temp - ? ((JSCompiler_object_inline_stack_2452 = createWorkInProgress( + ? ((JSCompiler_object_inline_stack_2453 = createWorkInProgress( JSCompiler_temp, componentStack )), - (JSCompiler_object_inline_stack_2452.subtreeFlags = + (JSCompiler_object_inline_stack_2453.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280)) - : ((JSCompiler_object_inline_stack_2452 = workInProgress.child), - (JSCompiler_object_inline_stack_2452.childLanes = 0), - (JSCompiler_object_inline_stack_2452.pendingProps = + : ((JSCompiler_object_inline_stack_2453 = workInProgress.child), + (JSCompiler_object_inline_stack_2453.childLanes = 0), + (JSCompiler_object_inline_stack_2453.pendingProps = componentStack), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2452.actualDuration = -0), - (JSCompiler_object_inline_stack_2452.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2452.selfBaseDuration = + ((JSCompiler_object_inline_stack_2453.actualDuration = -0), + (JSCompiler_object_inline_stack_2453.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2453.selfBaseDuration = JSCompiler_temp.selfBaseDuration), - (JSCompiler_object_inline_stack_2452.treeBaseDuration = + (JSCompiler_object_inline_stack_2453.treeBaseDuration = JSCompiler_temp.treeBaseDuration)), (workInProgress.deletions = null)), null !== instance - ? (JSCompiler_object_inline_componentStack_2453 = + ? (JSCompiler_object_inline_componentStack_2454 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2453 + JSCompiler_object_inline_componentStack_2454 )) - : ((JSCompiler_object_inline_componentStack_2453 = + : ((JSCompiler_object_inline_componentStack_2454 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2453, - JSCompiler_object_inline_message_2450, + JSCompiler_object_inline_componentStack_2454, + JSCompiler_object_inline_message_2451, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2453.flags |= 2)), - (JSCompiler_object_inline_componentStack_2453.return = + (JSCompiler_object_inline_componentStack_2454.flags |= 2)), + (JSCompiler_object_inline_componentStack_2454.return = workInProgress), - (JSCompiler_object_inline_stack_2452.return = workInProgress), - (JSCompiler_object_inline_stack_2452.sibling = - JSCompiler_object_inline_componentStack_2453), - (workInProgress.child = JSCompiler_object_inline_stack_2452), - (JSCompiler_object_inline_stack_2452 = - JSCompiler_object_inline_componentStack_2453), - (JSCompiler_object_inline_componentStack_2453 = workInProgress.child), - (JSCompiler_object_inline_message_2450 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2450 - ? (JSCompiler_object_inline_message_2450 = + (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_2450.cachePool), + JSCompiler_object_inline_message_2451.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9722,34 +9694,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2450 = { + (JSCompiler_object_inline_message_2451 = { baseLanes: - JSCompiler_object_inline_message_2450.baseLanes | renderLanes, + JSCompiler_object_inline_message_2451.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2453.memoizedState = - JSCompiler_object_inline_message_2450), + (JSCompiler_object_inline_componentStack_2454.memoizedState = + JSCompiler_object_inline_message_2451), enableTransitionTracing && - ((JSCompiler_object_inline_message_2450 = enableTransitionTracing + ((JSCompiler_object_inline_message_2451 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2450 && + null !== JSCompiler_object_inline_message_2451 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2453.updateQueue), + JSCompiler_object_inline_componentStack_2454.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2453.updateQueue = { - transitions: JSCompiler_object_inline_message_2450, + ? (JSCompiler_object_inline_componentStack_2454.updateQueue = { + transitions: JSCompiler_object_inline_message_2451, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2453.updateQueue = + ? (JSCompiler_object_inline_componentStack_2454.updateQueue = { - transitions: JSCompiler_object_inline_message_2450, + transitions: JSCompiler_object_inline_message_2451, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9757,41 +9729,41 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2450), + JSCompiler_object_inline_message_2451), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2453.childLanes = + (JSCompiler_object_inline_componentStack_2454.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2451, + JSCompiler_object_inline_digest_2452, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2452 + JSCompiler_object_inline_stack_2453 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2451 = current.child; - current = JSCompiler_object_inline_digest_2451.sibling; - JSCompiler_object_inline_digest_2451 = createWorkInProgress( - JSCompiler_object_inline_digest_2451, + JSCompiler_object_inline_digest_2452 = current.child; + current = JSCompiler_object_inline_digest_2452.sibling; + JSCompiler_object_inline_digest_2452 = createWorkInProgress( + JSCompiler_object_inline_digest_2452, { mode: "visible", - children: JSCompiler_object_inline_stack_2452.children + children: JSCompiler_object_inline_stack_2453.children } ); disableLegacyMode || (workInProgress.mode & ConcurrentMode) !== NoMode || - (JSCompiler_object_inline_digest_2451.lanes = renderLanes); - JSCompiler_object_inline_digest_2451.return = workInProgress; - JSCompiler_object_inline_digest_2451.sibling = null; + (JSCompiler_object_inline_digest_2452.lanes = renderLanes); + JSCompiler_object_inline_digest_2452.return = workInProgress; + JSCompiler_object_inline_digest_2452.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2451; + workInProgress.child = JSCompiler_object_inline_digest_2452; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2451; + return JSCompiler_object_inline_digest_2452; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = createFiberFromOffscreen( @@ -10171,8 +10143,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -10814,8 +10786,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -12379,16 +12351,35 @@ __DEV__ && pop(markerInstanceStack, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return (current.mode & ProfileMode) !== NoMode; } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -12506,10 +12497,18 @@ __DEV__ && finishedWork ) : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStarted(finishedWork)), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = !0), - safelyCallDestroy( + runWithFiberInDEV( + finishedWork, + callDestroyInDEV, finishedWork, nearestMountedAncestor, destroy @@ -12524,7 +12523,11 @@ __DEV__ && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped())); } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -12534,10 +12537,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -12545,14 +12548,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -12657,8 +12660,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -12666,7 +12669,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -12690,12 +12693,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -12720,12 +12723,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$19) { @@ -12737,11 +12739,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$20) { @@ -12749,15 +12751,6 @@ __DEV__ && } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - runWithFiberInDEV( - current, - callDestroyInDEV, - current, - nearestMountedAncestor, - destroy - ); - } function commitProfiler(finishedWork, current, commitTime, effectDuration) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, @@ -13175,15 +13168,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -13210,8 +13203,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -13221,7 +13214,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -13236,27 +13229,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$16) { captureCommitPhaseError( @@ -13266,6 +13260,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -13278,9 +13273,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -13288,7 +13285,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -13297,19 +13294,7 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -13719,95 +13704,19 @@ __DEV__ && case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - var tag = prevHostParentIsContainer.tag, - inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (tag = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : (tag & Layout) !== NoFlags && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -14035,19 +13944,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - (finishedWork.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -14072,113 +13973,110 @@ __DEV__ && flags & 512 && null !== current && safelyDetachRef(current, current.return); - if (flags & 4) { - var currentResource = - null !== current ? current.memoizedState : null; - flags = finishedWork.memoizedState; - if (null === current) + if (flags & 4) + if ( + ((root = null !== current ? current.memoizedState : null), + (flags = finishedWork.memoizedState), + null === current) + ) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - hoistableRoot = - hoistableRoot.ownerDocument || hoistableRoot; + root = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - currentResource = - hoistableRoot.getElementsByTagName("title")[0]; + hoistableRoot = root.getElementsByTagName("title")[0]; if ( - !currentResource || - currentResource[internalHoistableMarker] || - currentResource[internalInstanceKey] || - currentResource.namespaceURI === SVG_NAMESPACE || - currentResource.hasAttribute("itemprop") + !hoistableRoot || + hoistableRoot[internalHoistableMarker] || + hoistableRoot[internalInstanceKey] || + hoistableRoot.namespaceURI === SVG_NAMESPACE || + hoistableRoot.hasAttribute("itemprop") ) - (currentResource = - hoistableRoot.createElement(flags)), - hoistableRoot.head.insertBefore( - currentResource, - hoistableRoot.querySelector("head > title") + (hoistableRoot = root.createElement(flags)), + root.head.insertBefore( + hoistableRoot, + root.querySelector("head > title") ); - setInitialProperties(currentResource, flags, current); - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + setInitialProperties(hoistableRoot, flags, current); + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; break a; case "link": - if ( - (root = getHydratableHoistableCache( - "link", - "href", - hoistableRoot - ).get(flags + (current.href || ""))) - ) - for (var i = 0; i < root.length; i++) + var maybeNodes = getHydratableHoistableCache( + "link", + "href", + root + ).get(flags + (current.href || "")); + if (maybeNodes) + for (var i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = root[i]), - currentResource.getAttribute("href") === + ((hoistableRoot = maybeNodes[i]), + hoistableRoot.getAttribute("href") === (null == current.href ? null : current.href) && - currentResource.getAttribute("rel") === + hoistableRoot.getAttribute("rel") === (null == current.rel ? null : current.rel) && - currentResource.getAttribute("title") === + hoistableRoot.getAttribute("title") === (null == current.title ? null : current.title) && - currentResource.getAttribute("crossorigin") === + hoistableRoot.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) ) { - root.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; case "meta": if ( - (root = getHydratableHoistableCache( + (maybeNodes = getHydratableHoistableCache( "meta", "content", - hoistableRoot + root ).get(flags + (current.content || ""))) ) - for (i = 0; i < root.length; i++) + for (i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = root[i]), + ((hoistableRoot = maybeNodes[i]), checkAttributeStringCoercion( current.content, "content" ), - currentResource.getAttribute("content") === + hoistableRoot.getAttribute("content") === (null == current.content ? null : "" + current.content) && - currentResource.getAttribute("name") === + hoistableRoot.getAttribute("name") === (null == current.name ? null : current.name) && - currentResource.getAttribute("property") === + hoistableRoot.getAttribute("property") === (null == current.property ? null : current.property) && - currentResource.getAttribute("http-equiv") === + hoistableRoot.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - currentResource.getAttribute("charset") === + hoistableRoot.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) ) { - root.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; default: throw Error( @@ -14187,9 +14085,9 @@ __DEV__ && '". This is a bug in React.' ); } - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; } finishedWork.stateNode = flags; } else @@ -14205,12 +14103,12 @@ __DEV__ && finishedWork.memoizedProps ); else - currentResource !== flags - ? (null === currentResource + root !== flags + ? (null === root ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : currentResource.count--, + : root.count--, null === flags ? mountHoistable( hoistableRoot, @@ -14229,12 +14127,11 @@ __DEV__ && finishedWork.memoizedProps, current.memoizedProps ); - } break; case 27: if (flags & 4 && null === finishedWork.alternate) { hoistableRoot = finishedWork.stateNode; - currentResource = finishedWork.memoizedProps; + maybeNodes = finishedWork.memoizedProps; try { for (i = hoistableRoot.firstChild; i; ) { var nextNode = i.nextSibling, @@ -14253,7 +14150,7 @@ __DEV__ && finishedWork, acquireSingletonInstance, finishedWork.type, - currentResource, + maybeNodes, hoistableRoot, finishedWork ); @@ -14272,9 +14169,9 @@ __DEV__ && null !== current && safelyDetachRef(current, current.return); if (finishedWork.flags & 32) { - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { - runWithFiberInDEV(finishedWork, resetTextContent, hoistableRoot); + runWithFiberInDEV(finishedWork, resetTextContent, root); } catch (error$26) { captureCommitPhaseError( finishedWork, @@ -14285,11 +14182,11 @@ __DEV__ && } flags & 4 && null != finishedWork.stateNode && - ((hoistableRoot = finishedWork.memoizedProps), + ((root = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - hoistableRoot, - null !== current ? current.memoizedProps : hoistableRoot + root, + null !== current ? current.memoizedProps : root )); flags & 1024 && ((needsFormReset = !0), @@ -14308,12 +14205,12 @@ __DEV__ && ); flags = finishedWork.memoizedProps; current = null !== current ? current.memoizedProps : flags; - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { runWithFiberInDEV( finishedWork, commitTextUpdate, - hoistableRoot, + root, current, flags ); @@ -14327,11 +14224,12 @@ __DEV__ && } break; case 3: + hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - hoistableRoot = currentHoistableRoot; + maybeNodes = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = hoistableRoot; + currentHoistableRoot = maybeNodes; commitReconciliationEffects(finishedWork); if ( flags & 4 && @@ -14353,6 +14251,7 @@ __DEV__ && } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); + root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: flags = currentHoistableRoot; @@ -14363,18 +14262,22 @@ __DEV__ && commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); finishedWork.child.flags & 8192 && - ((hoistableRoot = null !== finishedWork.memoizedState), + ((root = null !== finishedWork.memoizedState), (current = null !== current && null !== current.memoizedState), alwaysThrottleRetries - ? hoistableRoot !== current && - (globalMostRecentFallbackTime = now$1()) - : hoistableRoot && - !current && - (globalMostRecentFallbackTime = now$1())); + ? root !== current && (globalMostRecentFallbackTime = now$1()) + : root && !current && (globalMostRecentFallbackTime = now$1())); if (flags & 4) { try { if (null !== finishedWork.memoizedState) { @@ -14466,17 +14369,17 @@ __DEV__ && if (null === current) { nextNode = root; try { - (currentResource = nextNode.stateNode), + (maybeNodes = nextNode.stateNode), i ? runWithFiberInDEV( nextNode, hideTextInstance, - currentResource + maybeNodes ) : runWithFiberInDEV( nextNode, unhideTextInstance, - currentResource, + maybeNodes, nextNode.memoizedProps ); } catch (error$28) { @@ -14579,23 +14482,11 @@ __DEV__ && case 11: case 14: case 15: - if ((finishedWork.mode & ProfileMode) !== NoMode) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -14692,14 +14583,16 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -14707,7 +14600,7 @@ __DEV__ && finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -14716,21 +14609,12 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -14886,6 +14770,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -14953,37 +14838,33 @@ __DEV__ && clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -15000,9 +14881,9 @@ __DEV__ && ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -15014,21 +14895,21 @@ __DEV__ && finishedRoot, finishedWork ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions )) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -15040,7 +14921,7 @@ __DEV__ && commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -15339,12 +15220,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -18217,7 +18110,7 @@ __DEV__ && identifierPrefix++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (identifierPrefix = 0; 31 > identifierPrefix; identifierPrefix++) @@ -18906,41 +18799,41 @@ __DEV__ && : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmpm763015211$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmp1080015674$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmpm763015211$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmp1080015674$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmpm763015211$1.defaultView) + : $jscomp$optchain$tmp1080015674$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmpm763015211$1 = getActiveElement( + $jscomp$optchain$tmp1080015674$1 = getActiveElement( containerInfo.document ); - $jscomp$optchain$tmpm763015211$1 instanceof + $jscomp$optchain$tmp1080015674$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmpm763015211$1.contentWindow.location.href; + typeof $jscomp$optchain$tmp1080015674$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmpm763015211$1.contentWindow; + containerInfo = $jscomp$optchain$tmp1080015674$1.contentWindow; else break; - $jscomp$optchain$tmpm763015211$1 = getActiveElement( + $jscomp$optchain$tmp1080015674$1 = getActiveElement( containerInfo.document ); } - return $jscomp$optchain$tmpm763015211$1; + return $jscomp$optchain$tmp1080015674$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -27089,10 +26982,9 @@ __DEV__ && return unstable_useContextWithBailout(context, select); }; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -28216,11 +28108,11 @@ __DEV__ && : flushSyncErrorInBuildsThatSupportLegacyMode; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-classic-7b56a542-20240917" !== isomorphicReactPackageVersion) + if ("19.0.0-www-classic-4549be0f-20240917" !== 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-7b56a542-20240917\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-classic-4549be0f-20240917\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -28264,11 +28156,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-7b56a542-20240917", + version: "19.0.0-www-classic-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -29087,5 +28979,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-classic-7b56a542-20240917"; + exports.version = "19.0.0-www-classic-4549be0f-20240917"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 4fdf6b58d8..af2a3bd5c5 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -824,20 +824,6 @@ __DEV__ && typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } - function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); - } - function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); - } function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -7248,6 +7234,21 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -7267,44 +7268,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -8932,32 +8904,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2472; - var JSCompiler_object_inline_stack_2473 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2473; + var JSCompiler_object_inline_stack_2474 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2474 = !1; + var JSCompiler_object_inline_componentStack_2475 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2472 = didSuspend) || - (JSCompiler_object_inline_digest_2472 = + (JSCompiler_object_inline_digest_2473 = didSuspend) || + (JSCompiler_object_inline_digest_2473 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2472 && - ((JSCompiler_object_inline_componentStack_2474 = !0), + JSCompiler_object_inline_digest_2473 && + ((JSCompiler_object_inline_componentStack_2475 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2472 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2473 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2474 + JSCompiler_object_inline_componentStack_2475 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2471 = nextHydratableInstance; + var JSCompiler_object_inline_message_2472 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2471)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2472)) { c: { - var instance = JSCompiler_object_inline_message_2471; + var instance = JSCompiler_object_inline_message_2472; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -8998,19 +8970,19 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2471 + JSCompiler_object_inline_message_2472 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2471 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2472 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2471 && - ((JSCompiler_object_inline_message_2471 = - JSCompiler_object_inline_message_2471.dehydrated), - null !== JSCompiler_object_inline_message_2471) + null !== JSCompiler_object_inline_message_2472 && + ((JSCompiler_object_inline_message_2472 = + JSCompiler_object_inline_message_2472.dehydrated), + null !== JSCompiler_object_inline_message_2472) ) return ( - JSCompiler_object_inline_message_2471.data === + JSCompiler_object_inline_message_2472.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -9018,27 +8990,27 @@ __DEV__ && ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2471 = - JSCompiler_object_inline_stack_2473.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2473.fallback; - if (JSCompiler_object_inline_componentStack_2474) + JSCompiler_object_inline_message_2472 = + JSCompiler_object_inline_stack_2474.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2474.fallback; + if (JSCompiler_object_inline_componentStack_2475) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2473 = + (JSCompiler_object_inline_stack_2474 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2471, + JSCompiler_object_inline_message_2472, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2474 = + (JSCompiler_object_inline_componentStack_2475 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2474.memoizedState = + (JSCompiler_object_inline_componentStack_2475.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2474.childLanes = + (JSCompiler_object_inline_componentStack_2475.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2472, + JSCompiler_object_inline_digest_2473, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9051,9 +9023,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2474.updateQueue), + JSCompiler_object_inline_componentStack_2475.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2474.updateQueue = + ? (JSCompiler_object_inline_componentStack_2475.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9061,46 +9033,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2473 + JSCompiler_object_inline_stack_2474 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2473.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2474.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2473 = + (JSCompiler_object_inline_stack_2474 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2471, + JSCompiler_object_inline_message_2472, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2474 = + (JSCompiler_object_inline_componentStack_2475 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2474.memoizedState = + (JSCompiler_object_inline_componentStack_2475.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2474.childLanes = + (JSCompiler_object_inline_componentStack_2475.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2472, + JSCompiler_object_inline_digest_2473, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2473 + JSCompiler_object_inline_stack_2474 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2471 + JSCompiler_object_inline_message_2472 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2471 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2471) + ((JSCompiler_object_inline_message_2472 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2472) ) { if (didSuspend) workInProgress.flags & 256 @@ -9117,94 +9089,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2474 = - JSCompiler_object_inline_stack_2473.fallback), - (JSCompiler_object_inline_message_2471 = workInProgress.mode), - (JSCompiler_object_inline_stack_2473 = + (JSCompiler_object_inline_componentStack_2475 = + JSCompiler_object_inline_stack_2474.fallback), + (JSCompiler_object_inline_message_2472 = workInProgress.mode), + (JSCompiler_object_inline_stack_2474 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2473.children + children: JSCompiler_object_inline_stack_2474.children }, - JSCompiler_object_inline_message_2471 + JSCompiler_object_inline_message_2472 )), - (JSCompiler_object_inline_componentStack_2474 = + (JSCompiler_object_inline_componentStack_2475 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2474, - JSCompiler_object_inline_message_2471, + JSCompiler_object_inline_componentStack_2475, + JSCompiler_object_inline_message_2472, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2474.flags |= 2), - (JSCompiler_object_inline_stack_2473.return = workInProgress), - (JSCompiler_object_inline_componentStack_2474.return = + (JSCompiler_object_inline_componentStack_2475.flags |= 2), + (JSCompiler_object_inline_stack_2474.return = workInProgress), + (JSCompiler_object_inline_componentStack_2475.return = workInProgress), - (JSCompiler_object_inline_stack_2473.sibling = - JSCompiler_object_inline_componentStack_2474), - (workInProgress.child = JSCompiler_object_inline_stack_2473), + (JSCompiler_object_inline_stack_2474.sibling = + JSCompiler_object_inline_componentStack_2475), + (workInProgress.child = JSCompiler_object_inline_stack_2474), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2473 = workInProgress.child), - (JSCompiler_object_inline_stack_2473.memoizedState = + (JSCompiler_object_inline_stack_2474 = workInProgress.child), + (JSCompiler_object_inline_stack_2474.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2473.childLanes = + (JSCompiler_object_inline_stack_2474.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2472, + JSCompiler_object_inline_digest_2473, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2474)); + JSCompiler_object_inline_componentStack_2475)); 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_2471.data === + JSCompiler_object_inline_message_2472.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_digest_2472 = - JSCompiler_object_inline_message_2471.nextSibling && - JSCompiler_object_inline_message_2471.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2472) { - JSCompiler_temp = JSCompiler_object_inline_digest_2472.dgst; - var message = JSCompiler_object_inline_digest_2472.msg; - instance = JSCompiler_object_inline_digest_2472.stck; - var componentStack = JSCompiler_object_inline_digest_2472.cstck; + JSCompiler_object_inline_digest_2473 = + JSCompiler_object_inline_message_2472.nextSibling && + JSCompiler_object_inline_message_2472.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2473) { + JSCompiler_temp = JSCompiler_object_inline_digest_2473.dgst; + var message = JSCompiler_object_inline_digest_2473.msg; + instance = JSCompiler_object_inline_digest_2473.stck; + var componentStack = JSCompiler_object_inline_digest_2473.cstck; } - JSCompiler_object_inline_message_2471 = message; - JSCompiler_object_inline_digest_2472 = JSCompiler_temp; - JSCompiler_object_inline_stack_2473 = instance; - JSCompiler_object_inline_componentStack_2474 = componentStack; - JSCompiler_object_inline_message_2471 = - JSCompiler_object_inline_message_2471 - ? Error(JSCompiler_object_inline_message_2471) + JSCompiler_object_inline_message_2472 = message; + JSCompiler_object_inline_digest_2473 = JSCompiler_temp; + JSCompiler_object_inline_stack_2474 = instance; + JSCompiler_object_inline_componentStack_2475 = componentStack; + JSCompiler_object_inline_message_2472 = + JSCompiler_object_inline_message_2472 + ? Error(JSCompiler_object_inline_message_2472) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_message_2471.stack = - JSCompiler_object_inline_stack_2473 || ""; - JSCompiler_object_inline_message_2471.digest = - JSCompiler_object_inline_digest_2472; - JSCompiler_object_inline_digest_2472 = - void 0 === JSCompiler_object_inline_componentStack_2474 + JSCompiler_object_inline_message_2472.stack = + JSCompiler_object_inline_stack_2474 || ""; + JSCompiler_object_inline_message_2472.digest = + JSCompiler_object_inline_digest_2473; + JSCompiler_object_inline_digest_2473 = + void 0 === JSCompiler_object_inline_componentStack_2475 ? null - : JSCompiler_object_inline_componentStack_2474; - "string" === typeof JSCompiler_object_inline_digest_2472 && + : JSCompiler_object_inline_componentStack_2475; + "string" === typeof JSCompiler_object_inline_digest_2473 && CapturedStacks.set( - JSCompiler_object_inline_message_2471, - JSCompiler_object_inline_digest_2472 + JSCompiler_object_inline_message_2472, + JSCompiler_object_inline_digest_2473 ); queueHydrationError({ - value: JSCompiler_object_inline_message_2471, + value: JSCompiler_object_inline_message_2472, source: null, - stack: JSCompiler_object_inline_digest_2472 + stack: JSCompiler_object_inline_digest_2473 }); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9219,25 +9191,25 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2472 = + (JSCompiler_object_inline_digest_2473 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2472) + didReceiveUpdate || JSCompiler_object_inline_digest_2473) ) { - JSCompiler_object_inline_digest_2472 = workInProgressRoot; - if (null !== JSCompiler_object_inline_digest_2472) { - JSCompiler_object_inline_stack_2473 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2473 & 42)) - JSCompiler_object_inline_stack_2473 = 1; + JSCompiler_object_inline_digest_2473 = workInProgressRoot; + if (null !== JSCompiler_object_inline_digest_2473) { + JSCompiler_object_inline_stack_2474 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2474 & 42)) + JSCompiler_object_inline_stack_2474 = 1; else - switch (JSCompiler_object_inline_stack_2473) { + switch (JSCompiler_object_inline_stack_2474) { case 2: - JSCompiler_object_inline_stack_2473 = 1; + JSCompiler_object_inline_stack_2474 = 1; break; case 8: - JSCompiler_object_inline_stack_2473 = 4; + JSCompiler_object_inline_stack_2474 = 4; break; case 32: - JSCompiler_object_inline_stack_2473 = 16; + JSCompiler_object_inline_stack_2474 = 16; break; case 128: case 256: @@ -9258,40 +9230,40 @@ __DEV__ && case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2473 = 64; + JSCompiler_object_inline_stack_2474 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2473 = 134217728; + JSCompiler_object_inline_stack_2474 = 134217728; break; default: - JSCompiler_object_inline_stack_2473 = 0; + JSCompiler_object_inline_stack_2474 = 0; } - JSCompiler_object_inline_stack_2473 = + JSCompiler_object_inline_stack_2474 = 0 !== - (JSCompiler_object_inline_stack_2473 & - (JSCompiler_object_inline_digest_2472.suspendedLanes | + (JSCompiler_object_inline_stack_2474 & + (JSCompiler_object_inline_digest_2473.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2473; + : JSCompiler_object_inline_stack_2474; if ( - 0 !== JSCompiler_object_inline_stack_2473 && - JSCompiler_object_inline_stack_2473 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2474 && + JSCompiler_object_inline_stack_2474 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2473), + ((prevState.retryLane = JSCompiler_object_inline_stack_2474), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2473 + JSCompiler_object_inline_stack_2474 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2472, + JSCompiler_object_inline_digest_2473, current, - JSCompiler_object_inline_stack_2473 + JSCompiler_object_inline_stack_2474 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_message_2471.data === + JSCompiler_object_inline_message_2472.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9299,7 +9271,7 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2471.data === + JSCompiler_object_inline_message_2472.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9307,12 +9279,12 @@ __DEV__ && null, current )), - (JSCompiler_object_inline_message_2471._reactRetry = + (JSCompiler_object_inline_message_2472._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2471.nextSibling + JSCompiler_object_inline_message_2472.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9330,57 +9302,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2473.children + JSCompiler_object_inline_stack_2474.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2474) + if (JSCompiler_object_inline_componentStack_2475) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2474 = - JSCompiler_object_inline_stack_2473.fallback), - (JSCompiler_object_inline_message_2471 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2475 = + JSCompiler_object_inline_stack_2474.fallback), + (JSCompiler_object_inline_message_2472 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2473 = createWorkInProgress( + (JSCompiler_object_inline_stack_2474 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2473.children + children: JSCompiler_object_inline_stack_2474.children } )), - (JSCompiler_object_inline_stack_2473.subtreeFlags = + (JSCompiler_object_inline_stack_2474.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2474 = + ? (JSCompiler_object_inline_componentStack_2475 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2474 + JSCompiler_object_inline_componentStack_2475 )) - : ((JSCompiler_object_inline_componentStack_2474 = + : ((JSCompiler_object_inline_componentStack_2475 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2474, - JSCompiler_object_inline_message_2471, + JSCompiler_object_inline_componentStack_2475, + JSCompiler_object_inline_message_2472, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2474.flags |= 2)), - (JSCompiler_object_inline_componentStack_2474.return = + (JSCompiler_object_inline_componentStack_2475.flags |= 2)), + (JSCompiler_object_inline_componentStack_2475.return = workInProgress), - (JSCompiler_object_inline_stack_2473.return = workInProgress), - (JSCompiler_object_inline_stack_2473.sibling = - JSCompiler_object_inline_componentStack_2474), - (workInProgress.child = JSCompiler_object_inline_stack_2473), - (JSCompiler_object_inline_stack_2473 = - JSCompiler_object_inline_componentStack_2474), - (JSCompiler_object_inline_componentStack_2474 = workInProgress.child), - (JSCompiler_object_inline_message_2471 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2471 - ? (JSCompiler_object_inline_message_2471 = + (JSCompiler_object_inline_stack_2474.return = workInProgress), + (JSCompiler_object_inline_stack_2474.sibling = + JSCompiler_object_inline_componentStack_2475), + (workInProgress.child = JSCompiler_object_inline_stack_2474), + (JSCompiler_object_inline_stack_2474 = + JSCompiler_object_inline_componentStack_2475), + (JSCompiler_object_inline_componentStack_2475 = workInProgress.child), + (JSCompiler_object_inline_message_2472 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2472 + ? (JSCompiler_object_inline_message_2472 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2471.cachePool), + JSCompiler_object_inline_message_2472.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9388,34 +9360,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2471 = { + (JSCompiler_object_inline_message_2472 = { baseLanes: - JSCompiler_object_inline_message_2471.baseLanes | renderLanes, + JSCompiler_object_inline_message_2472.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2474.memoizedState = - JSCompiler_object_inline_message_2471), + (JSCompiler_object_inline_componentStack_2475.memoizedState = + JSCompiler_object_inline_message_2472), enableTransitionTracing && - ((JSCompiler_object_inline_message_2471 = enableTransitionTracing + ((JSCompiler_object_inline_message_2472 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2471 && + null !== JSCompiler_object_inline_message_2472 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2474.updateQueue), + JSCompiler_object_inline_componentStack_2475.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2474.updateQueue = { - transitions: JSCompiler_object_inline_message_2471, + ? (JSCompiler_object_inline_componentStack_2475.updateQueue = { + transitions: JSCompiler_object_inline_message_2472, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2474.updateQueue = + ? (JSCompiler_object_inline_componentStack_2475.updateQueue = { - transitions: JSCompiler_object_inline_message_2471, + transitions: JSCompiler_object_inline_message_2472, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9423,32 +9395,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2471), + JSCompiler_object_inline_message_2472), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2474.childLanes = + (JSCompiler_object_inline_componentStack_2475.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2472, + JSCompiler_object_inline_digest_2473, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2473 + JSCompiler_object_inline_stack_2474 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2473.children + children: JSCompiler_object_inline_stack_2474.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2472 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2472 + ((JSCompiler_object_inline_digest_2473 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2473 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2472.push(current)); + : JSCompiler_object_inline_digest_2473.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -9804,8 +9776,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -10447,8 +10419,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -11941,16 +11913,35 @@ __DEV__ && pop(markerInstanceStack, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return (current.mode & ProfileMode) !== NoMode; } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -12068,10 +12059,18 @@ __DEV__ && finishedWork ) : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStarted(finishedWork)), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = !0), - safelyCallDestroy( + runWithFiberInDEV( + finishedWork, + callDestroyInDEV, finishedWork, nearestMountedAncestor, destroy @@ -12086,7 +12085,11 @@ __DEV__ && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped())); } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -12096,10 +12099,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -12107,14 +12110,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -12209,8 +12212,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -12218,7 +12221,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -12242,12 +12245,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -12272,12 +12275,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$19) { @@ -12289,11 +12291,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$20) { @@ -12301,15 +12303,6 @@ __DEV__ && } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - runWithFiberInDEV( - current, - callDestroyInDEV, - current, - nearestMountedAncestor, - destroy - ); - } function commitProfiler(finishedWork, current, commitTime, effectDuration) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, @@ -12742,15 +12735,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -12777,8 +12770,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -12788,7 +12781,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -12803,27 +12796,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$16) { captureCommitPhaseError( @@ -12833,6 +12827,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -12845,9 +12840,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -12855,7 +12852,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -12864,19 +12861,7 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -13278,95 +13263,19 @@ __DEV__ && case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - var tag = prevHostParentIsContainer.tag, - inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (tag = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : (tag & Layout) !== NoFlags && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -13588,19 +13497,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - (finishedWork.mode & ProfileMode) !== NoMode - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -13625,113 +13526,110 @@ __DEV__ && flags & 512 && null !== current && safelyDetachRef(current, current.return); - if (flags & 4) { - var currentResource = - null !== current ? current.memoizedState : null; - flags = finishedWork.memoizedState; - if (null === current) + if (flags & 4) + if ( + ((root = null !== current ? current.memoizedState : null), + (flags = finishedWork.memoizedState), + null === current) + ) if (null === flags) if (null === finishedWork.stateNode) { a: { flags = finishedWork.type; current = finishedWork.memoizedProps; - hoistableRoot = - hoistableRoot.ownerDocument || hoistableRoot; + root = hoistableRoot.ownerDocument || hoistableRoot; b: switch (flags) { case "title": - currentResource = - hoistableRoot.getElementsByTagName("title")[0]; + hoistableRoot = root.getElementsByTagName("title")[0]; if ( - !currentResource || - currentResource[internalHoistableMarker] || - currentResource[internalInstanceKey] || - currentResource.namespaceURI === SVG_NAMESPACE || - currentResource.hasAttribute("itemprop") + !hoistableRoot || + hoistableRoot[internalHoistableMarker] || + hoistableRoot[internalInstanceKey] || + hoistableRoot.namespaceURI === SVG_NAMESPACE || + hoistableRoot.hasAttribute("itemprop") ) - (currentResource = - hoistableRoot.createElement(flags)), - hoistableRoot.head.insertBefore( - currentResource, - hoistableRoot.querySelector("head > title") + (hoistableRoot = root.createElement(flags)), + root.head.insertBefore( + hoistableRoot, + root.querySelector("head > title") ); - setInitialProperties(currentResource, flags, current); - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + setInitialProperties(hoistableRoot, flags, current); + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; break a; case "link": - if ( - (root = getHydratableHoistableCache( - "link", - "href", - hoistableRoot - ).get(flags + (current.href || ""))) - ) - for (var i = 0; i < root.length; i++) + var maybeNodes = getHydratableHoistableCache( + "link", + "href", + root + ).get(flags + (current.href || "")); + if (maybeNodes) + for (var i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = root[i]), - currentResource.getAttribute("href") === + ((hoistableRoot = maybeNodes[i]), + hoistableRoot.getAttribute("href") === (null == current.href ? null : current.href) && - currentResource.getAttribute("rel") === + hoistableRoot.getAttribute("rel") === (null == current.rel ? null : current.rel) && - currentResource.getAttribute("title") === + hoistableRoot.getAttribute("title") === (null == current.title ? null : current.title) && - currentResource.getAttribute("crossorigin") === + hoistableRoot.getAttribute("crossorigin") === (null == current.crossOrigin ? null : current.crossOrigin)) ) { - root.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; case "meta": if ( - (root = getHydratableHoistableCache( + (maybeNodes = getHydratableHoistableCache( "meta", "content", - hoistableRoot + root ).get(flags + (current.content || ""))) ) - for (i = 0; i < root.length; i++) + for (i = 0; i < maybeNodes.length; i++) if ( - ((currentResource = root[i]), + ((hoistableRoot = maybeNodes[i]), checkAttributeStringCoercion( current.content, "content" ), - currentResource.getAttribute("content") === + hoistableRoot.getAttribute("content") === (null == current.content ? null : "" + current.content) && - currentResource.getAttribute("name") === + hoistableRoot.getAttribute("name") === (null == current.name ? null : current.name) && - currentResource.getAttribute("property") === + hoistableRoot.getAttribute("property") === (null == current.property ? null : current.property) && - currentResource.getAttribute("http-equiv") === + hoistableRoot.getAttribute("http-equiv") === (null == current.httpEquiv ? null : current.httpEquiv) && - currentResource.getAttribute("charset") === + hoistableRoot.getAttribute("charset") === (null == current.charSet ? null : current.charSet)) ) { - root.splice(i, 1); + maybeNodes.splice(i, 1); break b; } - currentResource = hoistableRoot.createElement(flags); - setInitialProperties(currentResource, flags, current); - hoistableRoot.head.appendChild(currentResource); + hoistableRoot = root.createElement(flags); + setInitialProperties(hoistableRoot, flags, current); + root.head.appendChild(hoistableRoot); break; default: throw Error( @@ -13740,9 +13638,9 @@ __DEV__ && '". This is a bug in React.' ); } - currentResource[internalInstanceKey] = finishedWork; - markNodeAsHoistable(currentResource); - flags = currentResource; + hoistableRoot[internalInstanceKey] = finishedWork; + markNodeAsHoistable(hoistableRoot); + flags = hoistableRoot; } finishedWork.stateNode = flags; } else @@ -13758,12 +13656,12 @@ __DEV__ && finishedWork.memoizedProps ); else - currentResource !== flags - ? (null === currentResource + root !== flags + ? (null === root ? null !== current.stateNode && ((current = current.stateNode), current.parentNode.removeChild(current)) - : currentResource.count--, + : root.count--, null === flags ? mountHoistable( hoistableRoot, @@ -13782,12 +13680,11 @@ __DEV__ && finishedWork.memoizedProps, current.memoizedProps ); - } break; case 27: if (flags & 4 && null === finishedWork.alternate) { hoistableRoot = finishedWork.stateNode; - currentResource = finishedWork.memoizedProps; + maybeNodes = finishedWork.memoizedProps; try { for (i = hoistableRoot.firstChild; i; ) { var nextNode = i.nextSibling, @@ -13806,7 +13703,7 @@ __DEV__ && finishedWork, acquireSingletonInstance, finishedWork.type, - currentResource, + maybeNodes, hoistableRoot, finishedWork ); @@ -13825,9 +13722,9 @@ __DEV__ && null !== current && safelyDetachRef(current, current.return); if (finishedWork.flags & 32) { - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { - runWithFiberInDEV(finishedWork, resetTextContent, hoistableRoot); + runWithFiberInDEV(finishedWork, resetTextContent, root); } catch (error$26) { captureCommitPhaseError( finishedWork, @@ -13838,11 +13735,11 @@ __DEV__ && } flags & 4 && null != finishedWork.stateNode && - ((hoistableRoot = finishedWork.memoizedProps), + ((root = finishedWork.memoizedProps), commitHostUpdate( finishedWork, - hoistableRoot, - null !== current ? current.memoizedProps : hoistableRoot + root, + null !== current ? current.memoizedProps : root )); flags & 1024 && ((needsFormReset = !0), @@ -13861,12 +13758,12 @@ __DEV__ && ); flags = finishedWork.memoizedProps; current = null !== current ? current.memoizedProps : flags; - hoistableRoot = finishedWork.stateNode; + root = finishedWork.stateNode; try { runWithFiberInDEV( finishedWork, commitTextUpdate, - hoistableRoot, + root, current, flags ); @@ -13880,11 +13777,12 @@ __DEV__ && } break; case 3: + hoistableRoot = pushNestedEffectDurations(); tagCaches = null; - hoistableRoot = currentHoistableRoot; + maybeNodes = currentHoistableRoot; currentHoistableRoot = getHoistableRoot(root.containerInfo); recursivelyTraverseMutationEffects(root, finishedWork); - currentHoistableRoot = hoistableRoot; + currentHoistableRoot = maybeNodes; commitReconciliationEffects(finishedWork); if ( flags & 4 && @@ -13906,6 +13804,7 @@ __DEV__ && } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); + root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: flags = currentHoistableRoot; @@ -13916,18 +13815,22 @@ __DEV__ && commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); finishedWork.child.flags & 8192 && - ((hoistableRoot = null !== finishedWork.memoizedState), + ((root = null !== finishedWork.memoizedState), (current = null !== current && null !== current.memoizedState), alwaysThrottleRetries - ? hoistableRoot !== current && - (globalMostRecentFallbackTime = now$1()) - : hoistableRoot && - !current && - (globalMostRecentFallbackTime = now$1())); + ? root !== current && (globalMostRecentFallbackTime = now$1()) + : root && !current && (globalMostRecentFallbackTime = now$1())); if (flags & 4) { try { if (null !== finishedWork.memoizedState) { @@ -14015,17 +13918,17 @@ __DEV__ && if (null === current) { nextNode = root; try { - (currentResource = nextNode.stateNode), + (maybeNodes = nextNode.stateNode), i ? runWithFiberInDEV( nextNode, hideTextInstance, - currentResource + maybeNodes ) : runWithFiberInDEV( nextNode, unhideTextInstance, - currentResource, + maybeNodes, nextNode.memoizedProps ); } catch (error$28) { @@ -14128,23 +14031,11 @@ __DEV__ && case 11: case 14: case 15: - if ((finishedWork.mode & ProfileMode) !== NoMode) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -14248,14 +14139,16 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -14263,7 +14156,7 @@ __DEV__ && finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -14272,21 +14165,12 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -14442,6 +14326,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -14509,37 +14394,33 @@ __DEV__ && clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -14556,9 +14437,9 @@ __DEV__ && ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -14569,14 +14450,14 @@ __DEV__ && finishedRoot, finishedWork ) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -14588,7 +14469,7 @@ __DEV__ && commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -14878,12 +14759,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -17631,7 +17524,7 @@ __DEV__ && tag++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); @@ -18240,43 +18133,43 @@ __DEV__ && : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmpm1876729869$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmpm1836913067$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmpm1876729869$1 = + ($jscomp$optchain$tmpm1836913067$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmpm1876729869$1.defaultView) + : $jscomp$optchain$tmpm1836913067$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmpm1876729869$1 = getActiveElement( + $jscomp$optchain$tmpm1836913067$1 = getActiveElement( containerInfo.document ); - $jscomp$optchain$tmpm1876729869$1 instanceof + $jscomp$optchain$tmpm1836913067$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmpm1876729869$1.contentWindow.location + typeof $jscomp$optchain$tmpm1836913067$1.contentWindow.location .href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmpm1876729869$1.contentWindow; + containerInfo = $jscomp$optchain$tmpm1836913067$1.contentWindow; else break; - $jscomp$optchain$tmpm1876729869$1 = getActiveElement( + $jscomp$optchain$tmpm1836913067$1 = getActiveElement( containerInfo.document ); } - return $jscomp$optchain$tmpm1876729869$1; + return $jscomp$optchain$tmpm1836913067$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -26210,10 +26103,9 @@ __DEV__ && return unstable_useContextWithBailout(context, select); }; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -27335,11 +27227,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-www-modern-7b56a542-20240917" !== isomorphicReactPackageVersion) + if ("19.0.0-www-modern-4549be0f-20240917" !== 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-7b56a542-20240917\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-www-modern-4549be0f-20240917\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27382,11 +27274,11 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-7b56a542-20240917", + version: "19.0.0-www-modern-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -28157,5 +28049,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-www-modern-7b56a542-20240917"; + exports.version = "19.0.0-www-modern-4549be0f-20240917"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index e3280619ea..e704bf0db5 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -8551,7 +8551,7 @@ function commitHookEffectListMount(flags, finishedWork) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -8563,9 +8563,20 @@ function commitHookEffectListUnmount( if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + if (void 0 !== destroy) { + inst.destroy = void 0; + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8647,11 +8658,25 @@ function safelyDetachRef(current, nearestMountedAncestor) { } else ref.current = null; } -function safelyCallDestroy(current, nearestMountedAncestor, destroy) { +function commitProfilerPostCommit( + finishedWork, + current, + commitTime, + passiveEffectDuration +) { try { - destroy(); + var _finishedWork$memoize2 = finishedWork.memoizedProps, + id = _finishedWork$memoize2.id, + onPostCommit = _finishedWork$memoize2.onPostCommit; + "function" === typeof onPostCommit && + onPostCommit( + id, + null === current ? "mount" : "update", + passiveEffectDuration, + commitTime + ); } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHostMount(finishedWork) { @@ -8785,7 +8810,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$231) { + } catch (e$222) { JSCompiler_temp = null; break a; } @@ -9031,23 +9056,6 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { break; case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -9352,7 +9360,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$181 = hostParentIsContainer; + var prevHostParentIsContainer$180 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9360,7 +9368,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$181; + hostParentIsContainer = prevHostParentIsContainer$180; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9427,67 +9435,11 @@ function commitDeletionEffectsOnFiber( case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - prevHostParentIsContainer$181 = prevHostParentIsContainer.tag; - var inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$181 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (prevHostParentIsContainer$181 & 4) || - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (prevHostParentIsContainer$181 = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$181 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (prevHostParentIsContainer$181 & 4) && - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -9546,15 +9498,15 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$191 = finishedWork.alternate; + var current$183 = finishedWork.alternate; if ( - null !== current$191 && - ((current$191 = current$191.memoizedState), - null !== current$191 && - ((current$191 = current$191.dehydrated), null !== current$191)) + null !== current$183 && + ((current$183 = current$183.memoizedState), + null !== current$183 && + ((current$183 = current$183.dehydrated), null !== current$183)) ) { try { - retryIfBlockedOn(current$191); + retryIfBlockedOn(current$183); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -9562,7 +9514,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$191); + onHydrated && onHydrated(current$183); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -9935,6 +9887,10 @@ function commitMutationEffectsOnFiber(finishedWork, root) { commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10202,7 +10158,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$198 = parentFiber.alternate, + var current$189 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -10223,18 +10179,18 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - current$198 = finishedWork; - finishedRoot = current$198.stateNode; + current$189 = finishedWork; + finishedRoot = current$189.stateNode; if ("function" === typeof finishedRoot.componentDidMount) try { finishedRoot.componentDidMount(); } catch (error) { - captureCommitPhaseError(current$198, current$198.return, error); + captureCommitPhaseError(current$189, current$189.return, error); } - current$198 = finishedWork; - finishedRoot = current$198.updateQueue; + current$189 = finishedWork; + finishedRoot = current$189.updateQueue; if (null !== finishedRoot) { - var instance = current$198.stateNode; + var instance = current$189.stateNode; try { var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks; if (null !== hiddenCallbacks) @@ -10245,7 +10201,7 @@ function recursivelyTraverseReappearLayoutEffects( ) callCallback(hiddenCallbacks[finishedRoot], instance); } catch (error) { - captureCommitPhaseError(current$198, current$198.return, error); + captureCommitPhaseError(current$189, current$189.return, error); } } includeWorkInProgressEffects && @@ -10262,7 +10218,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$198 && + null === current$189 && flags & 4 && commitHostMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -10273,23 +10229,6 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -10487,12 +10426,25 @@ function commitPassiveMountOnFiber( } break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); + flags & 2048 + ? (recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + -0, + finishedWork.stateNode.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -10627,9 +10579,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$205 = finishedWork.stateNode; + var instance$196 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$205._visibility & 4 + ? instance$196._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10642,7 +10594,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$205._visibility |= 4), + : ((instance$196._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10650,7 +10602,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$205._visibility |= 4), + : ((instance$196._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10663,7 +10615,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$205 + instance$196 ); break; case 24: @@ -10820,6 +10772,12 @@ function commitPassiveUnmountOnFiber(finishedWork) { finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return); break; + case 3: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; + case 12: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && @@ -11003,12 +10961,12 @@ function findFiberRootForHostRoot(hostRoot) { a: { hostRoot = [hostRoot]; for (maybeFiber = 0; maybeFiber < hostRoot.length; ) { - var current$300 = hostRoot[maybeFiber++]; - if (current$300[internalContainerInstanceKey]) { - hostRoot = getInstanceFromNode(current$300); + var current$291 = hostRoot[maybeFiber++]; + if (current$291[internalContainerInstanceKey]) { + hostRoot = getInstanceFromNode(current$291); break a; } - hostRoot.push.apply(hostRoot, current$300.children); + hostRoot.push.apply(hostRoot, current$291.children); } hostRoot = null; } @@ -11869,8 +11827,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$217) { - handleThrow(root, thrownValue$217); + } catch (thrownValue$208) { + handleThrow(root, thrownValue$208); } while (1); lanes && root.shellSuspendCounter++; @@ -11985,8 +11943,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$219) { - handleThrow(root, thrownValue$219); + } catch (thrownValue$210) { + handleThrow(root, thrownValue$210); } while (1); resetContextDependencies(); @@ -12335,7 +12293,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$226 = rootWithPendingPassiveEffects, + var root$217 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12350,7 +12308,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$226, remainingLanes); + releaseRootPooledCache(root$217, remainingLanes); } } return !1; @@ -13669,7 +13627,7 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$394; + var JSCompiler_inline_result$jscomp$385; if (canUseDOM) { var isSupported$jscomp$inline_1584 = "oninput" in document; if (!isSupported$jscomp$inline_1584) { @@ -13678,10 +13636,10 @@ if (canUseDOM) { isSupported$jscomp$inline_1584 = "function" === typeof element$jscomp$inline_1585.oninput; } - JSCompiler_inline_result$jscomp$394 = isSupported$jscomp$inline_1584; - } else JSCompiler_inline_result$jscomp$394 = !1; + JSCompiler_inline_result$jscomp$385 = isSupported$jscomp$inline_1584; + } else JSCompiler_inline_result$jscomp$385 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$394 && + JSCompiler_inline_result$jscomp$385 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13770,36 +13728,36 @@ function containsNode(outerNode, innerNode) { : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmp194412085$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmp595422812$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmp194412085$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmp595422812$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmp194412085$1.defaultView) + : $jscomp$optchain$tmp595422812$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmp194412085$1 = getActiveElement(containerInfo.document); - $jscomp$optchain$tmp194412085$1 instanceof containerInfo.HTMLIFrameElement; + $jscomp$optchain$tmp595422812$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmp595422812$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmp194412085$1.contentWindow.location.href; + typeof $jscomp$optchain$tmp595422812$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmp194412085$1.contentWindow; + containerInfo = $jscomp$optchain$tmp595422812$1.contentWindow; else break; - $jscomp$optchain$tmp194412085$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmp595422812$1 = getActiveElement(containerInfo.document); } - return $jscomp$optchain$tmp194412085$1; + return $jscomp$optchain$tmp595422812$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -15406,34 +15364,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$245 = props[hasSrc]; - if (null != propValue$245) + var propValue$236 = props[hasSrc]; + if (null != propValue$236) switch (hasSrc) { case "name": - hasSrcSet = propValue$245; + hasSrcSet = propValue$236; break; case "type": - propValue = propValue$245; + propValue = propValue$236; break; case "checked": - checked = propValue$245; + checked = propValue$236; break; case "defaultChecked": - defaultChecked = propValue$245; + defaultChecked = propValue$236; break; case "value": - propKey = propValue$245; + propKey = propValue$236; break; case "defaultValue": - defaultValue = propValue$245; + defaultValue = propValue$236; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$245) + if (null != propValue$236) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$245, props, null); + setProp(domElement, tag, hasSrc, propValue$236, props, null); } } initInput( @@ -15570,14 +15528,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$245 in props) - props.hasOwnProperty(propValue$245) && - ((hasSrc = props[propValue$245]), + for (propValue$236 in props) + props.hasOwnProperty(propValue$236) && + ((hasSrc = props[propValue$236]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$245, + propValue$236, hasSrc, props, void 0 @@ -15625,14 +15583,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$262 in nextProps) { - var propKey = nextProps[propKey$262]; - lastProp = lastProps[propKey$262]; + for (var propKey$253 in nextProps) { + var propKey = nextProps[propKey$253]; + lastProp = lastProps[propKey$253]; if ( - nextProps.hasOwnProperty(propKey$262) && + nextProps.hasOwnProperty(propKey$253) && (null != propKey || null != lastProp) ) - switch (propKey$262) { + switch (propKey$253) { case "type": type = propKey; break; @@ -15661,7 +15619,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$262, + propKey$253, propKey, nextProps, lastProp @@ -15680,7 +15638,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$262 = null; + propKey = value = defaultValue = propKey$253 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15711,7 +15669,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$262 = type; + propKey$253 = type; break; case "defaultValue": defaultValue = type; @@ -15732,15 +15690,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$262 - ? updateOptions(domElement, !!lastProps, propKey$262, !1) + null != propKey$253 + ? updateOptions(domElement, !!lastProps, propKey$253, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$262 = null; + propKey = propKey$253 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15764,7 +15722,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$262 = name; + propKey$253 = name; break; case "defaultValue": propKey = name; @@ -15778,17 +15736,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$262, propKey); + updateTextarea(domElement, propKey$253, propKey); return; case "option": - for (var propKey$278 in lastProps) + for (var propKey$269 in lastProps) if ( - ((propKey$262 = lastProps[propKey$278]), - lastProps.hasOwnProperty(propKey$278) && - null != propKey$262 && - !nextProps.hasOwnProperty(propKey$278)) + ((propKey$253 = lastProps[propKey$269]), + lastProps.hasOwnProperty(propKey$269) && + null != propKey$253 && + !nextProps.hasOwnProperty(propKey$269)) ) - switch (propKey$278) { + switch (propKey$269) { case "selected": domElement.selected = !1; break; @@ -15796,33 +15754,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$278, + propKey$269, null, nextProps, - propKey$262 + propKey$253 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$262 = nextProps[lastDefaultValue]), + ((propKey$253 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$262 !== propKey && - (null != propKey$262 || null != propKey)) + propKey$253 !== propKey && + (null != propKey$253 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$262 && - "function" !== typeof propKey$262 && - "symbol" !== typeof propKey$262; + propKey$253 && + "function" !== typeof propKey$253 && + "symbol" !== typeof propKey$253; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$262, + propKey$253, nextProps, propKey ); @@ -15843,24 +15801,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$283 in lastProps) - (propKey$262 = lastProps[propKey$283]), - lastProps.hasOwnProperty(propKey$283) && - null != propKey$262 && - !nextProps.hasOwnProperty(propKey$283) && - setProp(domElement, tag, propKey$283, null, nextProps, propKey$262); + for (var propKey$274 in lastProps) + (propKey$253 = lastProps[propKey$274]), + lastProps.hasOwnProperty(propKey$274) && + null != propKey$253 && + !nextProps.hasOwnProperty(propKey$274) && + setProp(domElement, tag, propKey$274, null, nextProps, propKey$253); for (checked in nextProps) if ( - ((propKey$262 = nextProps[checked]), + ((propKey$253 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$262 !== propKey && - (null != propKey$262 || null != propKey)) + propKey$253 !== propKey && + (null != propKey$253 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$262) + if (null != propKey$253) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15868,7 +15826,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$262, + propKey$253, nextProps, propKey ); @@ -15876,49 +15834,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$288 in lastProps) - (propKey$262 = lastProps[propKey$288]), - lastProps.hasOwnProperty(propKey$288) && - void 0 !== propKey$262 && - !nextProps.hasOwnProperty(propKey$288) && + for (var propKey$279 in lastProps) + (propKey$253 = lastProps[propKey$279]), + lastProps.hasOwnProperty(propKey$279) && + void 0 !== propKey$253 && + !nextProps.hasOwnProperty(propKey$279) && setPropOnCustomElement( domElement, tag, - propKey$288, + propKey$279, void 0, nextProps, - propKey$262 + propKey$253 ); for (defaultChecked in nextProps) - (propKey$262 = nextProps[defaultChecked]), + (propKey$253 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$262 === propKey || - (void 0 === propKey$262 && void 0 === propKey) || + propKey$253 === propKey || + (void 0 === propKey$253 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$262, + propKey$253, nextProps, propKey ); return; } } - for (var propKey$293 in lastProps) - (propKey$262 = lastProps[propKey$293]), - lastProps.hasOwnProperty(propKey$293) && - null != propKey$262 && - !nextProps.hasOwnProperty(propKey$293) && - setProp(domElement, tag, propKey$293, null, nextProps, propKey$262); + for (var propKey$284 in lastProps) + (propKey$253 = lastProps[propKey$284]), + lastProps.hasOwnProperty(propKey$284) && + null != propKey$253 && + !nextProps.hasOwnProperty(propKey$284) && + setProp(domElement, tag, propKey$284, null, nextProps, propKey$253); for (lastProp in nextProps) - (propKey$262 = nextProps[lastProp]), + (propKey$253 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$262 === propKey || - (null == propKey$262 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$262, nextProps, propKey); + propKey$253 === propKey || + (null == propKey$253 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$253, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16570,26 +16528,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$302 = getResourcesFromRoot( + var styles$293 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$303 = styles$302.get(type); - resource$303 || + resource$294 = styles$293.get(type); + resource$294 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$303 = { + (resource$294 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$302.set(type, resource$303), - (styles$302 = JSCompiler_inline_result.querySelector( + styles$293.set(type, resource$294), + (styles$293 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$302._p && - ((resource$303.instance = styles$302), - (resource$303.state.loading = 5)), + !styles$293._p && + ((resource$294.instance = styles$293), + (resource$294.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16602,16 +16560,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$302 || + styles$293 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$303.state + resource$294.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$303; + return resource$294; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16708,37 +16666,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$308 = hoistableRoot.querySelector( + var instance$299 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$308) + if (instance$299) return ( (resource.state.loading |= 4), - (resource.instance = instance$308), - markNodeAsHoistable(instance$308), - instance$308 + (resource.instance = instance$299), + markNodeAsHoistable(instance$299), + instance$299 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$308 = ( + instance$299 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$308); - var linkInstance = instance$308; + markNodeAsHoistable(instance$299); + var linkInstance = instance$299; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$308, "link", instance); + setInitialProperties(instance$299, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$308, props.precedence, hoistableRoot); - return (resource.instance = instance$308); + insertStylesheet(instance$299, props.precedence, hoistableRoot); + return (resource.instance = instance$299); case "script": - instance$308 = getScriptKey(props.src); + instance$299 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$308) + getScriptSelectorFromKey(instance$299) )) ) return ( @@ -16747,7 +16705,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$308))) + if ((styleProps = preloadPropsMap.get(instance$299))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17781,14 +17739,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1798 = React.version; if ( - "19.0.0-www-classic-7b56a542-20240917" !== + "19.0.0-www-classic-4549be0f-20240917" !== isomorphicReactPackageVersion$jscomp$inline_1798 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1798, - "19.0.0-www-classic-7b56a542-20240917" + "19.0.0-www-classic-4549be0f-20240917" ) ); function flushSyncFromReconciler(fn) { @@ -17831,25 +17789,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2298 = { +var internals$jscomp$inline_2311 = { bundleType: 0, - version: "19.0.0-www-classic-7b56a542-20240917", + version: "19.0.0-www-classic-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2299 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2312 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2299.isDisabled && - hook$jscomp$inline_2299.supportsFiber + !hook$jscomp$inline_2312.isDisabled && + hook$jscomp$inline_2312.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2299.inject( - internals$jscomp$inline_2298 + (rendererID = hook$jscomp$inline_2312.inject( + internals$jscomp$inline_2311 )), - (injectedHook = hook$jscomp$inline_2299); + (injectedHook = hook$jscomp$inline_2312); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17923,11 +17881,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$329); + var instance = getPublicRootInstance(root$320); originalCallback.call(instance); }; } - var root$329 = createHydrationContainer( + var root$320 = createHydrationContainer( initialChildren, callback, container, @@ -17942,23 +17900,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$329; - container[internalContainerInstanceKey] = root$329.current; + container._reactRootContainer = root$320; + container[internalContainerInstanceKey] = root$320.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork$1(); - return root$329; + return root$320; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$330 = callback; + var originalCallback$321 = callback; callback = function () { - var instance = getPublicRootInstance(root$331); - originalCallback$330.call(instance); + var instance = getPublicRootInstance(root$322); + originalCallback$321.call(instance); }; } - var root$331 = createFiberRoot( + var root$322 = createFiberRoot( container, 0, !1, @@ -17972,14 +17930,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$331; - container[internalContainerInstanceKey] = root$331.current; + container._reactRootContainer = root$322; + container[internalContainerInstanceKey] = root$322.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$331, parentComponent, callback); + updateContainerSync(initialChildren, root$322, parentComponent, callback); flushSyncWork$1(); - return root$331; + return root$322; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18444,4 +18402,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-7b56a542-20240917"; +exports.version = "19.0.0-www-classic-4549be0f-20240917"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index ef424c9191..0929ece21f 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -8119,7 +8119,7 @@ function commitHookEffectListMount(flags, finishedWork) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -8131,9 +8131,20 @@ function commitHookEffectListUnmount( if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + if (void 0 !== destroy) { + inst.destroy = void 0; + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8215,11 +8226,25 @@ function safelyDetachRef(current, nearestMountedAncestor) { } else ref.current = null; } -function safelyCallDestroy(current, nearestMountedAncestor, destroy) { +function commitProfilerPostCommit( + finishedWork, + current, + commitTime, + passiveEffectDuration +) { try { - destroy(); + var _finishedWork$memoize2 = finishedWork.memoizedProps, + id = _finishedWork$memoize2.id, + onPostCommit = _finishedWork$memoize2.onPostCommit; + "function" === typeof onPostCommit && + onPostCommit( + id, + null === current ? "mount" : "update", + passiveEffectDuration, + commitTime + ); } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHostMount(finishedWork) { @@ -8353,7 +8378,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$222) { + } catch (e$213) { JSCompiler_temp = null; break a; } @@ -8614,23 +8639,6 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { break; case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -8930,7 +8938,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$172 = hostParentIsContainer; + var prevHostParentIsContainer$171 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -8938,7 +8946,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$172; + hostParentIsContainer = prevHostParentIsContainer$171; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9005,67 +9013,11 @@ function commitDeletionEffectsOnFiber( case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - prevHostParentIsContainer$172 = prevHostParentIsContainer.tag; - var inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$172 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (prevHostParentIsContainer$172 & 4) || - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (prevHostParentIsContainer$172 = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - (0 !== (prevHostParentIsContainer$172 & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (prevHostParentIsContainer$172 & 4) && - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -9118,15 +9070,15 @@ function commitDeletionEffectsOnFiber( } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { - var current$182 = finishedWork.alternate; + var current$174 = finishedWork.alternate; if ( - null !== current$182 && - ((current$182 = current$182.memoizedState), - null !== current$182 && - ((current$182 = current$182.dehydrated), null !== current$182)) + null !== current$174 && + ((current$174 = current$174.memoizedState), + null !== current$174 && + ((current$174 = current$174.dehydrated), null !== current$174)) ) { try { - retryIfBlockedOn(current$182); + retryIfBlockedOn(current$174); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -9134,7 +9086,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$182); + onHydrated && onHydrated(current$174); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -9507,6 +9459,10 @@ function commitMutationEffectsOnFiber(finishedWork, root) { commitReconciliationEffects(finishedWork); currentHoistableRoot = flags; break; + case 12: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -9771,7 +9727,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$189 = parentFiber.alternate, + var current$180 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -9792,18 +9748,18 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - current$189 = finishedWork; - finishedRoot = current$189.stateNode; + current$180 = finishedWork; + finishedRoot = current$180.stateNode; if ("function" === typeof finishedRoot.componentDidMount) try { finishedRoot.componentDidMount(); } catch (error) { - captureCommitPhaseError(current$189, current$189.return, error); + captureCommitPhaseError(current$180, current$180.return, error); } - current$189 = finishedWork; - finishedRoot = current$189.updateQueue; + current$180 = finishedWork; + finishedRoot = current$180.updateQueue; if (null !== finishedRoot) { - var instance = current$189.stateNode; + var instance = current$180.stateNode; try { var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks; if (null !== hiddenCallbacks) @@ -9814,7 +9770,7 @@ function recursivelyTraverseReappearLayoutEffects( ) callCallback(hiddenCallbacks[finishedRoot], instance); } catch (error) { - captureCommitPhaseError(current$189, current$189.return, error); + captureCommitPhaseError(current$180, current$180.return, error); } } includeWorkInProgressEffects && @@ -9831,7 +9787,7 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$189 && + null === current$180 && flags & 4 && commitHostMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -9842,23 +9798,6 @@ function recursivelyTraverseReappearLayoutEffects( finishedWork, includeWorkInProgressEffects ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -10056,12 +9995,25 @@ function commitPassiveMountOnFiber( } break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); + flags & 2048 + ? (recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + -0, + finishedWork.stateNode.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -10185,9 +10137,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$196 = finishedWork.stateNode; + var instance$187 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$196._visibility & 4 + ? instance$187._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10199,7 +10151,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$196._visibility |= 4), + : ((instance$187._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10212,7 +10164,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$196 + instance$187 ); break; case 24: @@ -10369,6 +10321,12 @@ function commitPassiveUnmountOnFiber(finishedWork) { finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return); break; + case 3: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; + case 12: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && @@ -10552,12 +10510,12 @@ function findFiberRootForHostRoot(hostRoot) { a: { hostRoot = [hostRoot]; for (maybeFiber = 0; maybeFiber < hostRoot.length; ) { - var current$291 = hostRoot[maybeFiber++]; - if (current$291[internalContainerInstanceKey]) { - hostRoot = getInstanceFromNode(current$291); + var current$282 = hostRoot[maybeFiber++]; + if (current$282[internalContainerInstanceKey]) { + hostRoot = getInstanceFromNode(current$282); break a; } - hostRoot.push.apply(hostRoot, current$291.children); + hostRoot.push.apply(hostRoot, current$282.children); } hostRoot = null; } @@ -11396,8 +11354,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$208) { - handleThrow(root, thrownValue$208); + } catch (thrownValue$199) { + handleThrow(root, thrownValue$199); } while (1); lanes && root.shellSuspendCounter++; @@ -11512,8 +11470,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$210) { - handleThrow(root, thrownValue$210); + } catch (thrownValue$201) { + handleThrow(root, thrownValue$201); } while (1); resetContextDependencies(); @@ -11856,7 +11814,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$217 = rootWithPendingPassiveEffects, + var root$208 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11871,7 +11829,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$217, remainingLanes); + releaseRootPooledCache(root$208, remainingLanes); } } return !1; @@ -13096,7 +13054,7 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$381; + var JSCompiler_inline_result$jscomp$372; if (canUseDOM) { var isSupported$jscomp$inline_1555 = "oninput" in document; if (!isSupported$jscomp$inline_1555) { @@ -13105,10 +13063,10 @@ if (canUseDOM) { isSupported$jscomp$inline_1555 = "function" === typeof element$jscomp$inline_1556.oninput; } - JSCompiler_inline_result$jscomp$381 = isSupported$jscomp$inline_1555; - } else JSCompiler_inline_result$jscomp$381 = !1; + JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1555; + } else JSCompiler_inline_result$jscomp$372 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$381 && + JSCompiler_inline_result$jscomp$372 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13197,36 +13155,36 @@ function containsNode(outerNode, innerNode) { : !1; } function getActiveElementDeep(containerInfo) { - var $jscomp$optchain$tmp495076701$1, $jscomp$nullish$tmp0; + var $jscomp$optchain$tmp479822457$1, $jscomp$nullish$tmp0; containerInfo = null != ($jscomp$nullish$tmp0 = null == containerInfo ? void 0 : null == - ($jscomp$optchain$tmp495076701$1 = containerInfo.ownerDocument) + ($jscomp$optchain$tmp479822457$1 = containerInfo.ownerDocument) ? void 0 - : $jscomp$optchain$tmp495076701$1.defaultView) + : $jscomp$optchain$tmp479822457$1.defaultView) ? $jscomp$nullish$tmp0 : window; for ( - $jscomp$optchain$tmp495076701$1 = getActiveElement(containerInfo.document); - $jscomp$optchain$tmp495076701$1 instanceof containerInfo.HTMLIFrameElement; + $jscomp$optchain$tmp479822457$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmp479822457$1 instanceof containerInfo.HTMLIFrameElement; ) { try { var JSCompiler_inline_result = "string" === - typeof $jscomp$optchain$tmp495076701$1.contentWindow.location.href; + typeof $jscomp$optchain$tmp479822457$1.contentWindow.location.href; } catch (err) { JSCompiler_inline_result = !1; } if (JSCompiler_inline_result) - containerInfo = $jscomp$optchain$tmp495076701$1.contentWindow; + containerInfo = $jscomp$optchain$tmp479822457$1.contentWindow; else break; - $jscomp$optchain$tmp495076701$1 = getActiveElement(containerInfo.document); + $jscomp$optchain$tmp479822457$1 = getActiveElement(containerInfo.document); } - return $jscomp$optchain$tmp495076701$1; + return $jscomp$optchain$tmp479822457$1; } function hasSelectionCapabilities(elem) { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); @@ -14829,34 +14787,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$236 = props[hasSrc]; - if (null != propValue$236) + var propValue$227 = props[hasSrc]; + if (null != propValue$227) switch (hasSrc) { case "name": - hasSrcSet = propValue$236; + hasSrcSet = propValue$227; break; case "type": - propKey = propValue$236; + propKey = propValue$227; break; case "checked": - checked = propValue$236; + checked = propValue$227; break; case "defaultChecked": - defaultChecked = propValue$236; + defaultChecked = propValue$227; break; case "value": - propValue = propValue$236; + propValue = propValue$227; break; case "defaultValue": - defaultValue = propValue$236; + defaultValue = propValue$227; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$236) + if (null != propValue$227) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$236, props, null); + setProp(domElement, tag, hasSrc, propValue$227, props, null); } } initInput( @@ -14992,14 +14950,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$236 in props) - props.hasOwnProperty(propValue$236) && - ((hasSrc = props[propValue$236]), + for (propValue$227 in props) + props.hasOwnProperty(propValue$227) && + ((hasSrc = props[propValue$227]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$236, + propValue$227, hasSrc, props, void 0 @@ -15047,14 +15005,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$253 in nextProps) { - var propKey = nextProps[propKey$253]; - lastProp = lastProps[propKey$253]; + for (var propKey$244 in nextProps) { + var propKey = nextProps[propKey$244]; + lastProp = lastProps[propKey$244]; if ( - nextProps.hasOwnProperty(propKey$253) && + nextProps.hasOwnProperty(propKey$244) && (null != propKey || null != lastProp) ) - switch (propKey$253) { + switch (propKey$244) { case "type": type = propKey; break; @@ -15083,7 +15041,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$253, + propKey$244, propKey, nextProps, lastProp @@ -15102,7 +15060,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$253 = null; + propKey = value = defaultValue = propKey$244 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15133,7 +15091,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$253 = type; + propKey$244 = type; break; case "defaultValue": defaultValue = type; @@ -15154,15 +15112,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$253 - ? updateOptions(domElement, !!lastProps, propKey$253, !1) + null != propKey$244 + ? updateOptions(domElement, !!lastProps, propKey$244, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$253 = null; + propKey = propKey$244 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15186,7 +15144,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$253 = name; + propKey$244 = name; break; case "defaultValue": propKey = name; @@ -15200,17 +15158,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$253, propKey); + updateTextarea(domElement, propKey$244, propKey); return; case "option": - for (var propKey$269 in lastProps) + for (var propKey$260 in lastProps) if ( - ((propKey$253 = lastProps[propKey$269]), - lastProps.hasOwnProperty(propKey$269) && - null != propKey$253 && - !nextProps.hasOwnProperty(propKey$269)) + ((propKey$244 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + null != propKey$244 && + !nextProps.hasOwnProperty(propKey$260)) ) - switch (propKey$269) { + switch (propKey$260) { case "selected": domElement.selected = !1; break; @@ -15218,33 +15176,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$269, + propKey$260, null, nextProps, - propKey$253 + propKey$244 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$253 = nextProps[lastDefaultValue]), + ((propKey$244 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$253 !== propKey && - (null != propKey$253 || null != propKey)) + propKey$244 !== propKey && + (null != propKey$244 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$253 && - "function" !== typeof propKey$253 && - "symbol" !== typeof propKey$253; + propKey$244 && + "function" !== typeof propKey$244 && + "symbol" !== typeof propKey$244; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$253, + propKey$244, nextProps, propKey ); @@ -15265,24 +15223,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$274 in lastProps) - (propKey$253 = lastProps[propKey$274]), - lastProps.hasOwnProperty(propKey$274) && - null != propKey$253 && - !nextProps.hasOwnProperty(propKey$274) && - setProp(domElement, tag, propKey$274, null, nextProps, propKey$253); + for (var propKey$265 in lastProps) + (propKey$244 = lastProps[propKey$265]), + lastProps.hasOwnProperty(propKey$265) && + null != propKey$244 && + !nextProps.hasOwnProperty(propKey$265) && + setProp(domElement, tag, propKey$265, null, nextProps, propKey$244); for (checked in nextProps) if ( - ((propKey$253 = nextProps[checked]), + ((propKey$244 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$253 !== propKey && - (null != propKey$253 || null != propKey)) + propKey$244 !== propKey && + (null != propKey$244 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$253) + if (null != propKey$244) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15290,7 +15248,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$253, + propKey$244, nextProps, propKey ); @@ -15298,49 +15256,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$279 in lastProps) - (propKey$253 = lastProps[propKey$279]), - lastProps.hasOwnProperty(propKey$279) && - void 0 !== propKey$253 && - !nextProps.hasOwnProperty(propKey$279) && + for (var propKey$270 in lastProps) + (propKey$244 = lastProps[propKey$270]), + lastProps.hasOwnProperty(propKey$270) && + void 0 !== propKey$244 && + !nextProps.hasOwnProperty(propKey$270) && setPropOnCustomElement( domElement, tag, - propKey$279, + propKey$270, void 0, nextProps, - propKey$253 + propKey$244 ); for (defaultChecked in nextProps) - (propKey$253 = nextProps[defaultChecked]), + (propKey$244 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$253 === propKey || - (void 0 === propKey$253 && void 0 === propKey) || + propKey$244 === propKey || + (void 0 === propKey$244 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$253, + propKey$244, nextProps, propKey ); return; } } - for (var propKey$284 in lastProps) - (propKey$253 = lastProps[propKey$284]), - lastProps.hasOwnProperty(propKey$284) && - null != propKey$253 && - !nextProps.hasOwnProperty(propKey$284) && - setProp(domElement, tag, propKey$284, null, nextProps, propKey$253); + for (var propKey$275 in lastProps) + (propKey$244 = lastProps[propKey$275]), + lastProps.hasOwnProperty(propKey$275) && + null != propKey$244 && + !nextProps.hasOwnProperty(propKey$275) && + setProp(domElement, tag, propKey$275, null, nextProps, propKey$244); for (lastProp in nextProps) - (propKey$253 = nextProps[lastProp]), + (propKey$244 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$253 === propKey || - (null == propKey$253 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$253, nextProps, propKey); + propKey$244 === propKey || + (null == propKey$244 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$244, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15975,26 +15933,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$293 = getResourcesFromRoot( + var styles$284 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$294 = styles$293.get(type); - resource$294 || + resource$285 = styles$284.get(type); + resource$285 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$294 = { + (resource$285 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$293.set(type, resource$294), - (styles$293 = JSCompiler_inline_result.querySelector( + styles$284.set(type, resource$285), + (styles$284 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$293._p && - ((resource$294.instance = styles$293), - (resource$294.state.loading = 5)), + !styles$284._p && + ((resource$285.instance = styles$284), + (resource$285.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16007,16 +15965,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$293 || + styles$284 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$294.state + resource$285.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$294; + return resource$285; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16113,37 +16071,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$299 = hoistableRoot.querySelector( + var instance$290 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$299) + if (instance$290) return ( (resource.state.loading |= 4), - (resource.instance = instance$299), - markNodeAsHoistable(instance$299), - instance$299 + (resource.instance = instance$290), + markNodeAsHoistable(instance$290), + instance$290 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$299 = ( + instance$290 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$299); - var linkInstance = instance$299; + markNodeAsHoistable(instance$290); + var linkInstance = instance$290; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$299, "link", instance); + setInitialProperties(instance$290, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$299, props.precedence, hoistableRoot); - return (resource.instance = instance$299); + insertStylesheet(instance$290, props.precedence, hoistableRoot); + return (resource.instance = instance$290); case "script": - instance$299 = getScriptKey(props.src); + instance$290 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$299) + getScriptSelectorFromKey(instance$290) )) ) return ( @@ -16152,7 +16110,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$299))) + if ((styleProps = preloadPropsMap.get(instance$290))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17157,14 +17115,14 @@ function getCrossOriginStringAs(as, input) { } var isomorphicReactPackageVersion$jscomp$inline_1769 = React.version; if ( - "19.0.0-www-modern-7b56a542-20240917" !== + "19.0.0-www-modern-4549be0f-20240917" !== isomorphicReactPackageVersion$jscomp$inline_1769 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1769, - "19.0.0-www-modern-7b56a542-20240917" + "19.0.0-www-modern-4549be0f-20240917" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17180,25 +17138,25 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2289 = { +var internals$jscomp$inline_2302 = { bundleType: 0, - version: "19.0.0-www-modern-7b56a542-20240917", + version: "19.0.0-www-modern-4549be0f-20240917", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2290 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2303 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2290.isDisabled && - hook$jscomp$inline_2290.supportsFiber + !hook$jscomp$inline_2303.isDisabled && + hook$jscomp$inline_2303.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2290.inject( - internals$jscomp$inline_2289 + (rendererID = hook$jscomp$inline_2303.inject( + internals$jscomp$inline_2302 )), - (injectedHook = hook$jscomp$inline_2290); + (injectedHook = hook$jscomp$inline_2303); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17700,4 +17658,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-7b56a542-20240917"; +exports.version = "19.0.0-www-modern-4549be0f-20240917"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 84225af3c8..f03baf853f 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -1253,20 +1253,6 @@ __DEV__ && typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } - function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); - } - function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); - } function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -5672,6 +5658,21 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -5691,44 +5692,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -8281,8 +8253,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -8924,8 +8896,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -10675,16 +10647,35 @@ __DEV__ && pop(markerInstanceStack, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return (current.mode & 2) !== NoMode; } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -10802,10 +10793,18 @@ __DEV__ && finishedWork ) : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStarted(finishedWork)), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = !0), - safelyCallDestroy( + runWithFiberInDEV( + finishedWork, + callDestroyInDEV, finishedWork, nearestMountedAncestor, destroy @@ -10820,7 +10819,11 @@ __DEV__ && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped())); } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -10830,10 +10833,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -10841,14 +10844,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -10953,8 +10956,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -10962,7 +10965,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -10986,12 +10989,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -11016,12 +11019,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$18) { @@ -11033,11 +11035,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$19) { @@ -11045,15 +11047,6 @@ __DEV__ && } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - runWithFiberInDEV( - current, - callDestroyInDEV, - current, - nearestMountedAncestor, - destroy - ); - } function commitProfiler(finishedWork, current, commitTime, effectDuration) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, @@ -11413,15 +11406,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -11448,8 +11441,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -11459,7 +11452,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -11474,29 +11467,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = getPublicInstance( - finishedWork.child.stateNode - ); + prevProps = getPublicInstance(finishedWork.child.stateNode); break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$15) { captureCommitPhaseError( @@ -11506,6 +11498,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: if (supportsResources) { @@ -11520,9 +11513,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -11530,7 +11525,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -11539,19 +11534,7 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -11970,95 +11953,19 @@ __DEV__ && case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - var tag = prevHostParentIsContainer.tag, - inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & 2) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (tag = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : (tag & Layout) !== NoFlags && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & 2) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -12288,19 +12195,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - (finishedWork.mode & 2) !== NoMode - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -12463,12 +12362,13 @@ __DEV__ && } break; case 3: + hoistableRoot = pushNestedEffectDurations(); supportsResources ? (prepareToCommitHoistables(), - (hoistableRoot = currentHoistableRoot), + (props = currentHoistableRoot), (currentHoistableRoot = getHoistableRoot(root.containerInfo)), recursivelyTraverseMutationEffects(root, finishedWork), - (currentHoistableRoot = hoistableRoot)) + (currentHoistableRoot = props)) : recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); if (flags & 4) { @@ -12512,6 +12412,7 @@ __DEV__ && } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); + root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: supportsResources @@ -12532,6 +12433,13 @@ __DEV__ && finishedWork.stateNode.pendingChildren ); break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -12753,23 +12661,11 @@ __DEV__ && case 11: case 14: case 15: - if ((finishedWork.mode & 2) !== NoMode) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -12866,14 +12762,16 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -12881,7 +12779,7 @@ __DEV__ && finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -12890,21 +12788,12 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -13060,6 +12949,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -13127,37 +13017,33 @@ __DEV__ && clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -13174,9 +13060,9 @@ __DEV__ && ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -13188,21 +13074,21 @@ __DEV__ && finishedRoot, finishedWork ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions )) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -13214,7 +13100,7 @@ __DEV__ && commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -13518,12 +13404,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -16369,7 +16267,7 @@ __DEV__ && identifierPrefix++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (identifierPrefix = 0; 31 > identifierPrefix; identifierPrefix++) @@ -18438,10 +18336,9 @@ __DEV__ && return unstable_useContextWithBailout(context, select); }; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -19315,7 +19212,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 570080276b..dd9c2c0048 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -1156,20 +1156,6 @@ __DEV__ && typeof injectedProfilingHooks.markComponentRenderStopped && injectedProfilingHooks.markComponentRenderStopped(); } - function markComponentLayoutEffectUnmountStarted(fiber) { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && - injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber); - } - function markComponentLayoutEffectUnmountStopped() { - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && - injectedProfilingHooks.markComponentLayoutEffectUnmountStopped(); - } function markRenderStarted(lanes) { enableSchedulingProfiler && null !== injectedProfilingHooks && @@ -5562,6 +5548,21 @@ __DEV__ && } enableSchedulingProfiler && markStateUpdateScheduled(fiber, lane); } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -5581,44 +5582,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -7963,8 +7935,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -8606,8 +8578,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -10287,16 +10259,35 @@ __DEV__ && pop(markerInstanceStack, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return (current.mode & 2) !== NoMode; } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -10414,10 +10405,18 @@ __DEV__ && finishedWork ) : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStarted(finishedWork)), + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted && + injectedProfilingHooks.markComponentLayoutEffectUnmountStarted( + finishedWork + )), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = !0), - safelyCallDestroy( + runWithFiberInDEV( + finishedWork, + callDestroyInDEV, finishedWork, nearestMountedAncestor, destroy @@ -10432,7 +10431,11 @@ __DEV__ && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped && injectedProfilingHooks.markComponentPassiveEffectUnmountStopped() : (flags & Layout) !== NoFlags && - markComponentLayoutEffectUnmountStopped())); + enableSchedulingProfiler && + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped && + injectedProfilingHooks.markComponentLayoutEffectUnmountStopped())); } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -10442,10 +10445,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -10453,14 +10456,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -10555,8 +10558,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -10564,7 +10567,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -10588,12 +10591,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -10618,12 +10621,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$18) { @@ -10635,11 +10637,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$19) { @@ -10647,15 +10649,6 @@ __DEV__ && } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { - runWithFiberInDEV( - current, - callDestroyInDEV, - current, - nearestMountedAncestor, - destroy - ); - } function commitProfiler(finishedWork, current, commitTime, effectDuration) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, @@ -11015,15 +11008,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -11050,8 +11043,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -11061,7 +11054,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -11076,29 +11069,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = getPublicInstance( - finishedWork.child.stateNode - ); + prevProps = getPublicInstance(finishedWork.child.stateNode); break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$15) { captureCommitPhaseError( @@ -11108,6 +11100,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: if (supportsResources) { @@ -11122,9 +11115,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -11132,7 +11127,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -11141,19 +11136,7 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -11567,95 +11550,19 @@ __DEV__ && case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - var tag = prevHostParentIsContainer.tag, - inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & 2) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (tag = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : (tag & Layout) !== NoFlags && - (enableSchedulingProfiler && - markComponentLayoutEffectUnmountStarted(deletedFiber), - (deletedFiber.mode & 2) !== NoMode - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )), - enableSchedulingProfiler && - markComponentLayoutEffectUnmountStopped())), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -11879,19 +11786,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - (finishedWork.mode & 2) !== NoMode - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -12054,12 +11953,13 @@ __DEV__ && } break; case 3: + hoistableRoot = pushNestedEffectDurations(); supportsResources ? (prepareToCommitHoistables(), - (hoistableRoot = currentHoistableRoot), + (props = currentHoistableRoot), (currentHoistableRoot = getHoistableRoot(root.containerInfo)), recursivelyTraverseMutationEffects(root, finishedWork), - (currentHoistableRoot = hoistableRoot)) + (currentHoistableRoot = props)) : recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); if (flags & 4) { @@ -12103,6 +12003,7 @@ __DEV__ && } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); + root.effectDuration += popNestedEffectDurations(hoistableRoot); break; case 4: supportsResources @@ -12123,6 +12024,13 @@ __DEV__ && finishedWork.stateNode.pendingChildren ); break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -12341,23 +12249,11 @@ __DEV__ && case 11: case 14: case 15: - if ((finishedWork.mode & 2) !== NoMode) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -12461,14 +12357,16 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -12476,7 +12374,7 @@ __DEV__ && finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -12485,21 +12383,12 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -12655,6 +12544,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -12722,37 +12612,33 @@ __DEV__ && clearTransitionsForLanes(finishedRoot, committedLanes); } } + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); - if (flags & 2048) - a: for ( - finishedRoot = finishedWork.stateNode.passiveEffectDuration, - commitProfilerPostCommit( - finishedWork, - finishedWork.alternate, - commitTime, - finishedRoot - ), - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } + flags & 2048 + ? ((prevEffectDuration = pushNestedEffectDurations()), + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + (finishedRoot = finishedWork.stateNode), + (finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration)), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + commitTime, + finishedRoot.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -12769,9 +12655,9 @@ __DEV__ && ); break; case 22: - nextCache = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? nextCache._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -12782,14 +12668,14 @@ __DEV__ && finishedRoot, finishedWork ) - : nextCache._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((nextCache._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12801,7 +12687,7 @@ __DEV__ && commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - nextCache + prevEffectDuration ); break; case 24: @@ -13096,12 +12982,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -15828,7 +15726,7 @@ __DEV__ && tag++ ) containerInfo.push(null); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this.memoizedUpdaters = new Set(); containerInfo = this.pendingUpdatersLaneMap = []; for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set()); @@ -17846,10 +17744,9 @@ __DEV__ && return unstable_useContextWithBailout(context, select); }; var now = Scheduler.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -18709,7 +18606,7 @@ __DEV__ && rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index 23fbfc6869..92084ea147 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -7408,7 +7408,7 @@ module.exports = function ($$$config) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -7420,9 +7420,20 @@ module.exports = function ($$$config) { if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + if (void 0 !== destroy) { + inst.destroy = void 0; + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -7504,11 +7515,25 @@ module.exports = function ($$$config) { } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { + function commitProfilerPostCommit( + finishedWork, + current, + commitTime, + passiveEffectDuration + ) { try { - destroy(); + var _finishedWork$memoize2 = finishedWork.memoizedProps, + id = _finishedWork$memoize2.id, + onPostCommit = _finishedWork$memoize2.onPostCommit; + "function" === typeof onPostCommit && + onPostCommit( + id, + null === current ? "mount" : "update", + passiveEffectDuration, + commitTime + ); } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHostMount(finishedWork) { @@ -7804,23 +7829,6 @@ module.exports = function ($$$config) { break; case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -8215,67 +8223,11 @@ module.exports = function ($$$config) { case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - var tag = prevHostParentIsContainer.tag, - inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - (0 !== (tag & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (tag & 4) || - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (tag = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - (0 !== (tag & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (tag & 4) && - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -8334,15 +8286,15 @@ module.exports = function ($$$config) { } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (supportsHydration && null === finishedWork.memoizedState) { - var current$170 = finishedWork.alternate; + var current$163 = finishedWork.alternate; if ( - null !== current$170 && - ((current$170 = current$170.memoizedState), - null !== current$170 && - ((current$170 = current$170.dehydrated), null !== current$170)) + null !== current$163 && + ((current$163 = current$163.memoizedState), + null !== current$163 && + ((current$163 = current$163.dehydrated), null !== current$163)) ) { try { - commitHydratedSuspenseInstance(current$170); + commitHydratedSuspenseInstance(current$163); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -8350,7 +8302,7 @@ module.exports = function ($$$config) { var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$170); + onHydrated && onHydrated(current$163); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -8648,6 +8600,10 @@ module.exports = function ($$$config) { finishedWork.stateNode.pendingChildren ); break; + case 12: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -8930,7 +8886,7 @@ module.exports = function ($$$config) { includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$176 = parentFiber.alternate, + var current$169 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -8951,18 +8907,18 @@ module.exports = function ($$$config) { finishedWork, includeWorkInProgressEffects ); - current$176 = finishedWork; - finishedRoot = current$176.stateNode; + current$169 = finishedWork; + finishedRoot = current$169.stateNode; if ("function" === typeof finishedRoot.componentDidMount) try { finishedRoot.componentDidMount(); } catch (error) { - captureCommitPhaseError(current$176, current$176.return, error); + captureCommitPhaseError(current$169, current$169.return, error); } - current$176 = finishedWork; - finishedRoot = current$176.updateQueue; + current$169 = finishedWork; + finishedRoot = current$169.updateQueue; if (null !== finishedRoot) { - var instance = current$176.stateNode; + var instance = current$169.stateNode; try { var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks; if (null !== hiddenCallbacks) @@ -8973,7 +8929,7 @@ module.exports = function ($$$config) { ) callCallback(hiddenCallbacks[finishedRoot], instance); } catch (error) { - captureCommitPhaseError(current$176, current$176.return, error); + captureCommitPhaseError(current$169, current$169.return, error); } } includeWorkInProgressEffects && @@ -8990,7 +8946,7 @@ module.exports = function ($$$config) { includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$176 && + null === current$169 && flags & 4 && commitHostMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -9001,23 +8957,6 @@ module.exports = function ($$$config) { finishedWork, includeWorkInProgressEffects ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -9219,12 +9158,25 @@ module.exports = function ($$$config) { } break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); + flags & 2048 + ? (recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + -0, + finishedWork.stateNode.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -9359,9 +9311,9 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$182 = finishedWork.stateNode; + var instance$175 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$182._visibility & 4 + ? instance$175._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9374,7 +9326,7 @@ module.exports = function ($$$config) { finishedRoot, finishedWork ) - : ((instance$182._visibility |= 4), + : ((instance$175._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9382,7 +9334,7 @@ module.exports = function ($$$config) { committedTransitions, includeWorkInProgressEffects )) - : ((instance$182._visibility |= 4), + : ((instance$175._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9395,7 +9347,7 @@ module.exports = function ($$$config) { commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$182 + instance$175 ); break; case 24: @@ -9561,6 +9513,12 @@ module.exports = function ($$$config) { finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return); break; + case 3: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; + case 12: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && @@ -10510,8 +10468,8 @@ module.exports = function ($$$config) { } workLoopSync(); break; - } catch (thrownValue$196) { - handleThrow(root, thrownValue$196); + } catch (thrownValue$189) { + handleThrow(root, thrownValue$189); } while (1); lanes && root.shellSuspendCounter++; @@ -10632,8 +10590,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$198) { - handleThrow(root, thrownValue$198); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); resetContextDependencies(); @@ -12891,7 +12849,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index 791b613620..25b39dbe6a 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -7009,7 +7009,7 @@ module.exports = function ($$$config) { function commitHookEffectListUnmount( flags, finishedWork, - nearestMountedAncestor + nearestMountedAncestor$jscomp$0 ) { try { var updateQueue = finishedWork.updateQueue, @@ -7021,9 +7021,20 @@ module.exports = function ($$$config) { if ((updateQueue.tag & flags) === flags) { var inst = updateQueue.inst, destroy = inst.destroy; - void 0 !== destroy && - ((inst.destroy = void 0), - safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy)); + if (void 0 !== destroy) { + inst.destroy = void 0; + lastEffect = finishedWork; + var nearestMountedAncestor = nearestMountedAncestor$jscomp$0; + try { + destroy(); + } catch (error) { + captureCommitPhaseError( + lastEffect, + nearestMountedAncestor, + error + ); + } + } } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -7105,11 +7116,25 @@ module.exports = function ($$$config) { } else ref.current = null; } - function safelyCallDestroy(current, nearestMountedAncestor, destroy) { + function commitProfilerPostCommit( + finishedWork, + current, + commitTime, + passiveEffectDuration + ) { try { - destroy(); + var _finishedWork$memoize2 = finishedWork.memoizedProps, + id = _finishedWork$memoize2.id, + onPostCommit = _finishedWork$memoize2.onPostCommit; + "function" === typeof onPostCommit && + onPostCommit( + id, + null === current ? "mount" : "update", + passiveEffectDuration, + commitTime + ); } catch (error) { - captureCommitPhaseError(current, nearestMountedAncestor, error); + captureCommitPhaseError(finishedWork, finishedWork.return, error); } } function commitHostMount(finishedWork) { @@ -7405,23 +7430,6 @@ module.exports = function ($$$config) { break; case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); - if (flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -7812,67 +7820,11 @@ module.exports = function ($$$config) { case 11: case 14: case 15: - if (enableHiddenSubtreeInsertionEffectCleanup) { - if ( - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do { - var tag = prevHostParentIsContainer.tag, - inst = prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - (0 !== (tag & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : offscreenSubtreeWasHidden || - 0 === (tag & 4) || - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))); - prevHostParentIsContainer = prevHostParentIsContainer.next; - } while (prevHostParentIsContainer !== prevHostParent); - } - } else if ( - !offscreenSubtreeWasHidden && - ((prevHostParent = deletedFiber.updateQueue), - null !== prevHostParent && - ((prevHostParent = prevHostParent.lastEffect), - null !== prevHostParent)) - ) { - prevHostParentIsContainer = prevHostParent = prevHostParent.next; - do - (tag = prevHostParentIsContainer.tag), - (inst = prevHostParentIsContainer.inst), - (destroy = inst.destroy), - void 0 !== destroy && - (0 !== (tag & 2) - ? ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - )) - : 0 !== (tag & 4) && - ((inst.destroy = void 0), - safelyCallDestroy( - deletedFiber, - nearestMountedAncestor, - destroy - ))), - (prevHostParentIsContainer = prevHostParentIsContainer.next); - while (prevHostParentIsContainer !== prevHostParent); - } + (!enableHiddenSubtreeInsertionEffectCleanup && + offscreenSubtreeWasHidden) || + commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor); + offscreenSubtreeWasHidden || + commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -7925,15 +7877,15 @@ module.exports = function ($$$config) { } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (supportsHydration && null === finishedWork.memoizedState) { - var current$161 = finishedWork.alternate; + var current$154 = finishedWork.alternate; if ( - null !== current$161 && - ((current$161 = current$161.memoizedState), - null !== current$161 && - ((current$161 = current$161.dehydrated), null !== current$161)) + null !== current$154 && + ((current$154 = current$154.memoizedState), + null !== current$154 && + ((current$154 = current$154.dehydrated), null !== current$154)) ) { try { - commitHydratedSuspenseInstance(current$161); + commitHydratedSuspenseInstance(current$154); } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } @@ -7941,7 +7893,7 @@ module.exports = function ($$$config) { var hydrationCallbacks = finishedRoot.hydrationCallbacks; if (null !== hydrationCallbacks) { var onHydrated = hydrationCallbacks.onHydrated; - onHydrated && onHydrated(current$161); + onHydrated && onHydrated(current$154); } } catch (error) { captureCommitPhaseError(finishedWork, finishedWork.return, error); @@ -8239,6 +8191,10 @@ module.exports = function ($$$config) { finishedWork.stateNode.pendingChildren ); break; + case 12: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -8517,7 +8473,7 @@ module.exports = function ($$$config) { includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772); for (parentFiber = parentFiber.child; null !== parentFiber; ) { - var current$167 = parentFiber.alternate, + var current$160 = parentFiber.alternate, finishedRoot = finishedRoot$jscomp$0, finishedWork = parentFiber, flags = finishedWork.flags; @@ -8538,18 +8494,18 @@ module.exports = function ($$$config) { finishedWork, includeWorkInProgressEffects ); - current$167 = finishedWork; - finishedRoot = current$167.stateNode; + current$160 = finishedWork; + finishedRoot = current$160.stateNode; if ("function" === typeof finishedRoot.componentDidMount) try { finishedRoot.componentDidMount(); } catch (error) { - captureCommitPhaseError(current$167, current$167.return, error); + captureCommitPhaseError(current$160, current$160.return, error); } - current$167 = finishedWork; - finishedRoot = current$167.updateQueue; + current$160 = finishedWork; + finishedRoot = current$160.updateQueue; if (null !== finishedRoot) { - var instance = current$167.stateNode; + var instance = current$160.stateNode; try { var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks; if (null !== hiddenCallbacks) @@ -8560,7 +8516,7 @@ module.exports = function ($$$config) { ) callCallback(hiddenCallbacks[finishedRoot], instance); } catch (error) { - captureCommitPhaseError(current$167, current$167.return, error); + captureCommitPhaseError(current$160, current$160.return, error); } } includeWorkInProgressEffects && @@ -8577,7 +8533,7 @@ module.exports = function ($$$config) { includeWorkInProgressEffects ); includeWorkInProgressEffects && - null === current$167 && + null === current$160 && flags & 4 && commitHostMount(finishedWork); safelyAttachRef(finishedWork, finishedWork.return); @@ -8588,23 +8544,6 @@ module.exports = function ($$$config) { finishedWork, includeWorkInProgressEffects ); - if (includeWorkInProgressEffects && flags & 4) - a: for ( - flags = finishedWork.stateNode.effectDuration, - finishedWork = finishedWork.return; - null !== finishedWork; - - ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -8806,12 +8745,25 @@ module.exports = function ($$$config) { } break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); + flags & 2048 + ? (recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ), + commitProfilerPostCommit( + finishedWork, + finishedWork.alternate, + -0, + finishedWork.stateNode.passiveEffectDuration + )) + : recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: recursivelyTraversePassiveMountEffects( @@ -8938,9 +8890,9 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$173 = finishedWork.stateNode; + var instance$166 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$173._visibility & 4 + ? instance$166._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8952,7 +8904,7 @@ module.exports = function ($$$config) { finishedRoot, finishedWork ) - : ((instance$173._visibility |= 4), + : ((instance$166._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8965,7 +8917,7 @@ module.exports = function ($$$config) { commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$173 + instance$166 ); break; case 24: @@ -9131,6 +9083,12 @@ module.exports = function ($$$config) { finishedWork.flags & 2048 && commitHookEffectListUnmount(9, finishedWork, finishedWork.return); break; + case 3: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; + case 12: + recursivelyTraversePassiveUnmountEffects(finishedWork); + break; case 22: var instance = finishedWork.stateNode; null !== finishedWork.memoizedState && @@ -10068,8 +10026,8 @@ module.exports = function ($$$config) { } workLoopSync(); break; - } catch (thrownValue$187) { - handleThrow(root, thrownValue$187); + } catch (thrownValue$180) { + handleThrow(root, thrownValue$180); } while (1); lanes && root.shellSuspendCounter++; @@ -10190,8 +10148,8 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$189) { - handleThrow(root, thrownValue$189); + } catch (thrownValue$182) { + handleThrow(root, thrownValue$182); } while (1); resetContextDependencies(); @@ -12384,7 +12342,7 @@ module.exports = function ($$$config) { rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 0db71bf6ad..ace235fdf6 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1119() { + function JSCompiler_object_inline_createNodeMock_1098() { return null; } function findHook(fiber, id) { @@ -5000,6 +5000,21 @@ __DEV__ && markRootEntangled(root, lane); } } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -5019,44 +5034,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -7104,8 +7090,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -7498,8 +7484,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -8627,16 +8613,35 @@ __DEV__ && popProvider(CacheContext, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return 0 !== (current.mode & 2); } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -8734,10 +8739,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -8745,14 +8750,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -8857,8 +8862,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -8866,7 +8871,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -8890,12 +8895,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -8920,12 +8925,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$18) { @@ -8937,11 +8941,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$19) { @@ -9182,15 +9186,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -9217,8 +9221,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -9228,7 +9232,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -9243,29 +9247,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = getPublicInstance( - finishedWork.child.stateNode - ); + prevProps = getPublicInstance(finishedWork.child.stateNode); break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$15) { captureCommitPhaseError( @@ -9275,6 +9278,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: case 27: @@ -9284,9 +9288,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -9294,7 +9300,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -9303,19 +9309,7 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -9483,53 +9477,17 @@ __DEV__ && case 11: case 14: case 15: - _prevHostParent = deletedFiber.updateQueue; - if ( - null !== _prevHostParent && - ((_prevHostParent = _prevHostParent.lastEffect), - null !== _prevHostParent) - ) { - _prevHostParentIsContainer = _prevHostParent = _prevHostParent.next; - do { - var tag = _prevHostParentIsContainer.tag, - inst = _prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - runWithFiberInDEV( - deletedFiber, - callDestroyInDEV, - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - runWithFiberInDEV( - deletedFiber, - callDestroyInDEV, - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - runWithFiberInDEV( - deletedFiber, - callDestroyInDEV, - deletedFiber, - nearestMountedAncestor, - destroy - )))); - _prevHostParentIsContainer = _prevHostParentIsContainer.next; - } while (_prevHostParentIsContainer !== _prevHostParent); - } + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -9672,19 +9630,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - 0 !== (finishedWork.mode & 2) - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -9790,13 +9740,22 @@ __DEV__ && } break; case 3: + flags = pushNestedEffectDurations(); recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); + root.effectDuration += popNestedEffectDurations(flags); break; case 4: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -9996,23 +9955,11 @@ __DEV__ && case 11: case 14: case 15: - if (0 !== (finishedWork.mode & 2)) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -10110,42 +10057,38 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; - flags = finishedWork; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( - flags, + finishedWork, commitProfiler, - flags, + finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$20) { - captureCommitPhaseError(flags, flags.return, error$20); + captureCommitPhaseError( + finishedWork, + finishedWork.return, + error$20 + ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -10232,6 +10175,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -10239,23 +10183,28 @@ __DEV__ && committedTransitions ); flags & 2048 && - ((finishedRoot = null), + ((committedLanes = null), null !== finishedWork.alternate && - (finishedRoot = finishedWork.alternate.memoizedState.cache), + (committedLanes = finishedWork.alternate.memoizedState.cache), (finishedWork = finishedWork.memoizedState.cache), - finishedWork !== finishedRoot && + finishedWork !== committedLanes && (retainCache(finishedWork), - null != finishedRoot && releaseCache(finishedRoot))); + null != committedLanes && releaseCache(committedLanes))); + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); if (flags & 2048) { - finishedRoot = finishedWork.stateNode.passiveEffectDuration; + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + finishedRoot = finishedWork.stateNode; + finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); try { runWithFiberInDEV( finishedWork, @@ -10263,7 +10212,7 @@ __DEV__ && finishedWork, finishedWork.alternate, commitTime, - finishedRoot + finishedRoot.passiveEffectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -10272,26 +10221,20 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: break; case 22: - var _instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? _instance._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -10302,14 +10245,14 @@ __DEV__ && finishedRoot, finishedWork ) - : _instance._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((_instance._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10554,12 +10497,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -12641,7 +12596,7 @@ __DEV__ && this.hydrationCallbacks = null; this.formState = formState; this.incompleteTransitions = new Map(); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function testStringCoercion(value) { @@ -14541,10 +14496,9 @@ __DEV__ && return rerenderOptimistic(passthrough, reducer); }; var now = Scheduler$1.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -15020,11 +14974,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-classic-7b56a542-20240917", + version: "19.0.0-www-classic-4549be0f-20240917", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-classic-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-classic-4549be0f-20240917" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15044,7 +14998,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1119, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1098, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15159,5 +15113,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-classic-7b56a542-20240917"; + exports.version = "19.0.0-www-classic-4549be0f-20240917"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index f6847111ba..6f9b04a638 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1119() { + function JSCompiler_object_inline_createNodeMock_1098() { return null; } function findHook(fiber, id) { @@ -5000,6 +5000,21 @@ __DEV__ && markRootEntangled(root, lane); } } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } function startProfilerTimer(fiber) { profilerStartTime = now(); 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); @@ -5019,44 +5034,15 @@ __DEV__ && profilerStartTime = -1; } } - function recordLayoutEffectDuration(fiber) { - if (0 <= layoutEffectStartTime) { - var elapsedTime = now() - layoutEffectStartTime; - layoutEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber.stateNode.effectDuration += elapsedTime; - return; - case 12: - fiber.stateNode.effectDuration += elapsedTime; - return; - } - fiber = fiber.return; - } + function recordEffectDuration() { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + profilerStartTime = -1; + profilerEffectDuration += elapsedTime; } } - function recordPassiveEffectDuration(fiber) { - if (0 <= passiveEffectStartTime) { - var elapsedTime = now() - passiveEffectStartTime; - passiveEffectStartTime = -1; - for (fiber = fiber.return; null !== fiber; ) { - switch (fiber.tag) { - case 3: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - case 12: - fiber = fiber.stateNode; - null !== fiber && (fiber.passiveEffectDuration += elapsedTime); - return; - } - fiber = fiber.return; - } - } - } - function startLayoutEffectTimer() { - layoutEffectStartTime = now(); + function startEffectTimer() { + profilerStartTime = now(); } function transferActualDuration(fiber) { for (var child = fiber.child; child; ) @@ -7104,8 +7090,8 @@ __DEV__ && (workInProgress.flags |= 4); workInProgress.flags |= 2048; var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; break; case 13: stateNode = workInProgress.memoizedState; @@ -7498,8 +7484,8 @@ __DEV__ && (workInProgress.flags |= 4), (workInProgress.flags |= 2048), (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = 0), - (returnFiber.passiveEffectDuration = 0), + (returnFiber.effectDuration = -0), + (returnFiber.passiveEffectDuration = -0), reconcileChildren( current, workInProgress, @@ -8627,16 +8613,35 @@ __DEV__ && popProvider(CacheContext, interruptedWork); } } - function shouldProfile$1(current) { + function shouldProfile(current) { return 0 !== (current.mode & 2); } function commitHookLayoutEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } + function commitHookLayoutUnmountEffects( + finishedWork, + nearestMountedAncestor, + hookFlags + ) { + shouldProfile(finishedWork) + ? (startEffectTimer(), + commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ), + recordEffectDuration()) + : commitHookEffectListUnmount( + hookFlags, + finishedWork, + nearestMountedAncestor + ); + } function commitHookEffectListMount(flags, finishedWork) { try { var updateQueue = finishedWork.updateQueue, @@ -8734,10 +8739,10 @@ __DEV__ && } } function commitHookPassiveMountEffects(finishedWork, hookFlags) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork); } function commitHookPassiveUnmountEffects( @@ -8745,14 +8750,14 @@ __DEV__ && nearestMountedAncestor, hookFlags ) { - shouldProfile$1(finishedWork) - ? ((passiveEffectStartTime = now()), + shouldProfile(finishedWork) + ? (startEffectTimer(), commitHookEffectListUnmount( hookFlags, finishedWork, nearestMountedAncestor ), - recordPassiveEffectDuration(finishedWork)) + recordEffectDuration()) : commitHookEffectListUnmount( hookFlags, finishedWork, @@ -8857,8 +8862,8 @@ __DEV__ && current.elementType === current.type ); instance.state = current.memoizedState; - shouldProfile$1(current) - ? (startLayoutEffectTimer(), + shouldProfile(current) + ? (startEffectTimer(), runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -8866,7 +8871,7 @@ __DEV__ && nearestMountedAncestor, instance ), - recordLayoutEffectDuration(current)) + recordEffectDuration()) : runWithFiberInDEV( current, callComponentWillUnmountInDEV, @@ -8890,12 +8895,12 @@ __DEV__ && } 21 === finishedWork.tag && (instanceToUse = instance); if ("function" === typeof ref) - if (shouldProfile$1(finishedWork)) + if (shouldProfile(finishedWork)) try { - startLayoutEffectTimer(), + startEffectTimer(), (finishedWork.refCleanup = ref(instanceToUse)); } finally { - recordLayoutEffectDuration(finishedWork); + recordEffectDuration(); } else finishedWork.refCleanup = ref(instanceToUse); else @@ -8920,12 +8925,11 @@ __DEV__ && if (null !== ref) if ("function" === typeof refCleanup) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), - runWithFiberInDEV(current, refCleanup); + startEffectTimer(), runWithFiberInDEV(current, refCleanup); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, refCleanup); } catch (error$18) { @@ -8937,11 +8941,11 @@ __DEV__ && } else if ("function" === typeof ref) try { - if (shouldProfile$1(current)) + if (shouldProfile(current)) try { - startLayoutEffectTimer(), runWithFiberInDEV(current, ref, null); + startEffectTimer(), runWithFiberInDEV(current, ref, null); } finally { - recordLayoutEffectDuration(current); + recordEffectDuration(current); } else runWithFiberInDEV(current, ref, null); } catch (error$19) { @@ -9182,15 +9186,15 @@ __DEV__ && "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )), - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, finishedWork, finishedRoot ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidMountInDEV, @@ -9217,8 +9221,8 @@ __DEV__ && "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance" )); - shouldProfile$1(finishedWork) - ? (startLayoutEffectTimer(), + shouldProfile(finishedWork) + ? (startEffectTimer(), runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -9228,7 +9232,7 @@ __DEV__ && current, finishedRoot.__reactInternalSnapshotBeforeUpdate ), - recordLayoutEffectDuration(finishedWork)) + recordEffectDuration()) : runWithFiberInDEV( finishedWork, callComponentDidUpdateInDEV, @@ -9243,29 +9247,28 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 3: + current = pushNestedEffectDurations(); recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if ( flags & 64 && ((flags = finishedWork.updateQueue), null !== flags) ) { - finishedRoot = null; + prevProps = null; if (null !== finishedWork.child) switch (finishedWork.child.tag) { case 27: case 5: - finishedRoot = getPublicInstance( - finishedWork.child.stateNode - ); + prevProps = getPublicInstance(finishedWork.child.stateNode); break; case 1: - finishedRoot = finishedWork.child.stateNode; + prevProps = finishedWork.child.stateNode; } try { runWithFiberInDEV( finishedWork, commitCallbacks, flags, - finishedRoot + prevProps ); } catch (error$15) { captureCommitPhaseError( @@ -9275,6 +9278,7 @@ __DEV__ && ); } } + finishedRoot.effectDuration += popNestedEffectDurations(current); break; case 26: case 27: @@ -9284,9 +9288,11 @@ __DEV__ && flags & 512 && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); if (flags & 4) { - flags = finishedWork.stateNode.effectDuration; + flags = pushNestedEffectDurations(); + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + finishedRoot = finishedWork.stateNode; + finishedRoot.effectDuration += bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( finishedWork, @@ -9294,7 +9300,7 @@ __DEV__ && finishedWork, current, commitTime, - flags + finishedRoot.effectDuration ); } catch (error$20) { captureCommitPhaseError( @@ -9303,19 +9309,7 @@ __DEV__ && error$20 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += flags; - break a; - case 12: - finishedWork.stateNode.effectDuration += flags; - break a; - } - finishedWork = finishedWork.return; - } - } + } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); @@ -9483,53 +9477,17 @@ __DEV__ && case 11: case 14: case 15: - _prevHostParent = deletedFiber.updateQueue; - if ( - null !== _prevHostParent && - ((_prevHostParent = _prevHostParent.lastEffect), - null !== _prevHostParent) - ) { - _prevHostParentIsContainer = _prevHostParent = _prevHostParent.next; - do { - var tag = _prevHostParentIsContainer.tag, - inst = _prevHostParentIsContainer.inst, - destroy = inst.destroy; - void 0 !== destroy && - ((tag & Insertion) !== NoFlags - ? ((isRunningInsertionEffect = !0), - (inst.destroy = void 0), - runWithFiberInDEV( - deletedFiber, - callDestroyInDEV, - deletedFiber, - nearestMountedAncestor, - destroy - ), - (isRunningInsertionEffect = !1)) - : offscreenSubtreeWasHidden || - (tag & Layout) === NoFlags || - (0 !== (deletedFiber.mode & 2) - ? (startLayoutEffectTimer(), - (inst.destroy = void 0), - runWithFiberInDEV( - deletedFiber, - callDestroyInDEV, - deletedFiber, - nearestMountedAncestor, - destroy - ), - recordLayoutEffectDuration(deletedFiber)) - : ((inst.destroy = void 0), - runWithFiberInDEV( - deletedFiber, - callDestroyInDEV, - deletedFiber, - nearestMountedAncestor, - destroy - )))); - _prevHostParentIsContainer = _prevHostParentIsContainer.next; - } while (_prevHostParentIsContainer !== _prevHostParent); - } + commitHookEffectListUnmount( + Insertion, + deletedFiber, + nearestMountedAncestor + ); + offscreenSubtreeWasHidden || + commitHookLayoutUnmountEffects( + deletedFiber, + nearestMountedAncestor, + Layout + ); recursivelyTraverseDeletionEffects( finishedRoot, nearestMountedAncestor, @@ -9672,19 +9630,11 @@ __DEV__ && finishedWork.return ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), - 0 !== (finishedWork.mode & 2) - ? (startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - ), - recordLayoutEffectDuration(finishedWork)) - : commitHookEffectListUnmount( - Layout | HasEffect, - finishedWork, - finishedWork.return - )); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout | HasEffect + )); break; case 1: recursivelyTraverseMutationEffects(root, finishedWork); @@ -9790,13 +9740,22 @@ __DEV__ && } break; case 3: + flags = pushNestedEffectDurations(); recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); + root.effectDuration += popNestedEffectDurations(flags); break; case 4: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 12: + flags = pushNestedEffectDurations(); + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + finishedWork.stateNode.effectDuration += + bubbleNestedEffectDurations(flags); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -9996,23 +9955,11 @@ __DEV__ && case 11: case 14: case 15: - if (0 !== (finishedWork.mode & 2)) - try { - startLayoutEffectTimer(), - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); - } finally { - recordLayoutEffectDuration(finishedWork); - } - else - commitHookEffectListUnmount( - Layout, - finishedWork, - finishedWork.return - ); + commitHookLayoutUnmountEffects( + finishedWork, + finishedWork.return, + Layout + ); recursivelyTraverseDisappearLayoutEffects(finishedWork); break; case 1: @@ -10110,42 +10057,38 @@ __DEV__ && safelyAttachRef(finishedWork, finishedWork.return); break; case 12: - recursivelyTraverseReappearLayoutEffects( - finishedRoot, - finishedWork, - includeWorkInProgressEffects - ); if (includeWorkInProgressEffects && flags & 4) { - includeWorkInProgressEffects = - finishedWork.stateNode.effectDuration; - flags = finishedWork; + flags = pushNestedEffectDurations(); + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects = finishedWork.stateNode; + includeWorkInProgressEffects.effectDuration += + bubbleNestedEffectDurations(flags); try { runWithFiberInDEV( - flags, + finishedWork, commitProfiler, - flags, + finishedWork, current, commitTime, - includeWorkInProgressEffects + includeWorkInProgressEffects.effectDuration ); } catch (error$20) { - captureCommitPhaseError(flags, flags.return, error$20); + captureCommitPhaseError( + finishedWork, + finishedWork.return, + error$20 + ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - case 12: - finishedWork.stateNode.effectDuration += - includeWorkInProgressEffects; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); break; case 13: recursivelyTraverseReappearLayoutEffects( @@ -10232,6 +10175,7 @@ __DEV__ && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect); break; case 3: + var prevEffectDuration = pushNestedEffectDurations(); recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -10239,23 +10183,28 @@ __DEV__ && committedTransitions ); flags & 2048 && - ((finishedRoot = null), + ((committedLanes = null), null !== finishedWork.alternate && - (finishedRoot = finishedWork.alternate.memoizedState.cache), + (committedLanes = finishedWork.alternate.memoizedState.cache), (finishedWork = finishedWork.memoizedState.cache), - finishedWork !== finishedRoot && + finishedWork !== committedLanes && (retainCache(finishedWork), - null != finishedRoot && releaseCache(finishedRoot))); + null != committedLanes && releaseCache(committedLanes))); + finishedRoot.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); break; case 12: - recursivelyTraversePassiveMountEffects( - finishedRoot, - finishedWork, - committedLanes, - committedTransitions - ); if (flags & 2048) { - finishedRoot = finishedWork.stateNode.passiveEffectDuration; + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + finishedRoot = finishedWork.stateNode; + finishedRoot.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); try { runWithFiberInDEV( finishedWork, @@ -10263,7 +10212,7 @@ __DEV__ && finishedWork, finishedWork.alternate, commitTime, - finishedRoot + finishedRoot.passiveEffectDuration ); } catch (error$21) { captureCommitPhaseError( @@ -10272,26 +10221,20 @@ __DEV__ && error$21 ); } - finishedWork = finishedWork.return; - a: for (; null !== finishedWork; ) { - switch (finishedWork.tag) { - case 3: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - case 12: - finishedWork.stateNode.passiveEffectDuration += finishedRoot; - break a; - } - finishedWork = finishedWork.return; - } - } + } else + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); break; case 23: break; case 22: - var _instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState - ? _instance._visibility & 4 + ? prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, @@ -10302,14 +10245,14 @@ __DEV__ && finishedRoot, finishedWork ) - : _instance._visibility & 4 + : prevEffectDuration._visibility & 4 ? recursivelyTraversePassiveMountEffects( finishedRoot, finishedWork, committedLanes, committedTransitions ) - : ((_instance._visibility |= 4), + : ((prevEffectDuration._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10554,12 +10497,24 @@ __DEV__ && Passive | HasEffect ); break; + case 3: + var prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + popNestedEffectDurations(prevEffectDuration); + break; + case 12: + prevEffectDuration = pushNestedEffectDurations(); + recursivelyTraversePassiveUnmountEffects(finishedWork); + finishedWork.stateNode.passiveEffectDuration += + bubbleNestedEffectDurations(prevEffectDuration); + break; case 22: - var instance = finishedWork.stateNode; + prevEffectDuration = finishedWork.stateNode; null !== finishedWork.memoizedState && - instance._visibility & 4 && + prevEffectDuration._visibility & 4 && (null === finishedWork.return || 13 !== finishedWork.return.tag) - ? ((instance._visibility &= -5), + ? ((prevEffectDuration._visibility &= -5), recursivelyTraverseDisconnectPassiveEffects(finishedWork)) : recursivelyTraversePassiveUnmountEffects(finishedWork); break; @@ -12641,7 +12596,7 @@ __DEV__ && this.hydrationCallbacks = null; this.formState = formState; this.incompleteTransitions = new Map(); - this.passiveEffectDuration = this.effectDuration = 0; + this.passiveEffectDuration = this.effectDuration = -0; this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()"; } function testStringCoercion(value) { @@ -14541,10 +14496,9 @@ __DEV__ && return rerenderOptimistic(passthrough, reducer); }; var now = Scheduler$1.unstable_now, - commitTime = 0, - layoutEffectStartTime = -1, - profilerStartTime = -1, - passiveEffectStartTime = -1, + commitTime = -0, + profilerStartTime = -1.1, + profilerEffectDuration = -0, currentUpdateIsNested = !1, nestedUpdateScheduled = !1, fakeInternalInstance = {}; @@ -15020,11 +14974,11 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.0.0-www-modern-7b56a542-20240917", + version: "19.0.0-www-modern-4549be0f-20240917", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getInstanceFromNode, - reconcilerVersion: "19.0.0-www-modern-7b56a542-20240917" + reconcilerVersion: "19.0.0-www-modern-4549be0f-20240917" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15044,7 +14998,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1119, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1098, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15159,5 +15113,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.0.0-www-modern-7b56a542-20240917"; + exports.version = "19.0.0-www-modern-4549be0f-20240917"; })(); diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index c6733b9a0d..2f30bbe4f5 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.0.0-www-classic-7b56a542-20240917 \ No newline at end of file +19.0.0-www-classic-4549be0f-20240917 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index 3d4c14d530..3765270a8f 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.0.0-www-modern-7b56a542-20240917 \ No newline at end of file +19.0.0-www-modern-4549be0f-20240917 \ No newline at end of file