diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index dd0e5b2079..3334697981 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.2.0-native-fb-17f88c80-20250422 \ No newline at end of file +19.2.0-native-fb-3ef31d19-20250422 \ No newline at end of file diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js index 4d196e36ef..7769435757 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<0b6590522eb4cf48244a47f0ae7bfc8f>> + * @generated SignedSource<> */ "use strict"; @@ -404,5 +404,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-native-fb-17f88c80-20250422"; + exports.version = "19.2.0-native-fb-3ef31d19-20250422"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js index d0ec7c9bc8..cfe06e4415 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<2fafd8b44adafd221fec21bb898ac76c>> + * @generated SignedSource<> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js index d0ec7c9bc8..cfe06e4415 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<2fafd8b44adafd221fec21bb898ac76c>> + * @generated SignedSource<> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js index 1b534dd5cf..47b6b41bdb 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<9d13782b98a9874b7d41d61be121c254>> */ /* @@ -144,6 +144,16 @@ __DEV__ && } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -1245,6 +1255,16 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -4452,6 +4472,11 @@ __DEV__ && content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -4523,6 +4548,21 @@ __DEV__ && (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -4570,6 +4610,12 @@ __DEV__ && siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -4693,6 +4739,7 @@ __DEV__ && for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -4700,8 +4747,6 @@ __DEV__ && case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -4743,20 +4788,26 @@ __DEV__ && ); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -6652,6 +6703,11 @@ __DEV__ && ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -9014,6 +9070,7 @@ __DEV__ && currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & ConcurrentMode && @@ -9368,31 +9425,31 @@ __DEV__ && if ((workInProgress.mode & ConcurrentMode) === NoMode) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), null !== current && pushTransition(workInProgress, null), - reuseHiddenContextOnStack(workInProgress); - else { - if (0 === (renderLanes & 536870912) || isHydrating) - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, + reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - } - pushOffscreenSuspenseHandler(workInProgress); + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -9430,6 +9487,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -9907,23 +10000,24 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2443; - var JSCompiler_object_inline_stack_2444 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2493; + var JSCompiler_object_inline_stack_2494 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2443 = didSuspend) || - (JSCompiler_object_inline_digest_2443 = + var JSCompiler_object_inline_message_2492 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_digest_2493 = didSuspend) || + (JSCompiler_object_inline_digest_2493 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2443 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2443 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2493 && + ((JSCompiler_object_inline_message_2492 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_digest_2493 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_message_2492 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); (renderLanes = nextHydratableInstance) @@ -9936,25 +10030,18 @@ __DEV__ && ? current : null), null !== current && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { + ((JSCompiler_object_inline_digest_2493 = { dehydrated: current, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, + treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), - (JSCompiler_object_inline_digest_2443 = createFiber( - 18, - null, - null, - NoMode - )), - (JSCompiler_object_inline_digest_2443.stateNode = current), - (JSCompiler_object_inline_digest_2443.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_digest_2443), + (workInProgress.memoizedState = + JSCompiler_object_inline_digest_2493), + (JSCompiler_object_inline_digest_2493 = + createFiberFromDehydratedFragment(current)), + (JSCompiler_object_inline_digest_2493.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_2493), (hydrationParentFiber = workInProgress), (nextHydratableInstance = null))) : (current = null); @@ -9968,337 +10055,299 @@ __DEV__ && : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_componentStack_2445 = - JSCompiler_object_inline_stack_2444.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2444.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_2494.children, + nextFallbackChildren = JSCompiler_object_inline_stack_2494.fallback; + if (JSCompiler_object_inline_message_2492) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2444 = + (JSCompiler_object_inline_stack_2494 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2445, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2445 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2445.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2445.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2443, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2493, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2444 + JSCompiler_object_inline_stack_2494 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2444.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2494.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2444 = + (JSCompiler_object_inline_stack_2494 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2445, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2445 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2445.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2445.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2443, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2493, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2444 + JSCompiler_object_inline_stack_2494 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_componentStack_2445 + nextPrimaryChildren ); } - var JSCompiler_object_inline_message_2442 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_message_2442 && - ((JSCompiler_object_inline_componentStack_2445 = - JSCompiler_object_inline_message_2442.dehydrated), - null !== JSCompiler_object_inline_componentStack_2445) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2445 = - JSCompiler_object_inline_stack_2444.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2444 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2444.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_componentStack_2445 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2445, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_componentStack_2495 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_2495) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2494.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_2494 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2494.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2445.flags |= 2), - (JSCompiler_object_inline_stack_2444.return = workInProgress), - (JSCompiler_object_inline_componentStack_2445.return = - workInProgress), - (JSCompiler_object_inline_stack_2444.sibling = - JSCompiler_object_inline_componentStack_2445), - (workInProgress.child = JSCompiler_object_inline_stack_2444), - (workInProgress.mode & ConcurrentMode) !== NoMode && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2444 = workInProgress.child), - (JSCompiler_object_inline_stack_2444.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2444.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2443, - renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = - JSCompiler_object_inline_componentStack_2445)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback( - JSCompiler_object_inline_componentStack_2445 - )) - ) { - JSCompiler_object_inline_digest_2443 = - JSCompiler_object_inline_componentStack_2445.nextSibling && - JSCompiler_object_inline_componentStack_2445.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2443) { - nextFallbackChildren = JSCompiler_object_inline_digest_2443.dgst; - var message = JSCompiler_object_inline_digest_2443.msg; - var componentStack = JSCompiler_object_inline_digest_2443.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_digest_2443.cstck; - } - JSCompiler_object_inline_message_2442 = message; - JSCompiler_object_inline_digest_2443 = nextFallbackChildren; - JSCompiler_object_inline_stack_2444 = componentStack; - JSCompiler_object_inline_componentStack_2445 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_message_2442; - componentStack = JSCompiler_object_inline_componentStack_2445; - JSCompiler_object_inline_componentStack_2445 = nextFallbackChildren - ? Error(nextFallbackChildren) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2494.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2494.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2494), + (workInProgress.mode & ConcurrentMode) !== NoMode && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (JSCompiler_object_inline_stack_2494 = workInProgress.child), + (JSCompiler_object_inline_stack_2494.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2494.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2493, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_2495 + )) + ) { + JSCompiler_object_inline_digest_2493 = + JSCompiler_object_inline_componentStack_2495.nextSibling && + JSCompiler_object_inline_componentStack_2495.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2493) { + nextPrimaryChildren = JSCompiler_object_inline_digest_2493.dgst; + var message = JSCompiler_object_inline_digest_2493.msg; + nextFallbackChildren = JSCompiler_object_inline_digest_2493.stck; + var componentStack = JSCompiler_object_inline_digest_2493.cstck; + } + JSCompiler_object_inline_message_2492 = message; + JSCompiler_object_inline_digest_2493 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2494 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_2495 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_2492; + nextFallbackChildren = JSCompiler_object_inline_componentStack_2495; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_2494 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2493; + JSCompiler_object_inline_digest_2493 = + void 0 === nextFallbackChildren ? null : nextFallbackChildren; + JSCompiler_object_inline_stack_2494 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_2493 + }; + "string" === typeof JSCompiler_object_inline_digest_2493 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_2494 ); - JSCompiler_object_inline_componentStack_2445.stack = - JSCompiler_object_inline_stack_2444 || ""; - JSCompiler_object_inline_componentStack_2445.digest = - JSCompiler_object_inline_digest_2443; - JSCompiler_object_inline_digest_2443 = - void 0 === componentStack ? null : componentStack; - JSCompiler_object_inline_stack_2444 = { - value: JSCompiler_object_inline_componentStack_2445, - source: null, - stack: JSCompiler_object_inline_digest_2443 - }; - "string" === typeof JSCompiler_object_inline_digest_2443 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2445, - JSCompiler_object_inline_stack_2444 - ); - queueHydrationError(JSCompiler_object_inline_stack_2444); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + queueHydrationError(JSCompiler_object_inline_stack_2494); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_digest_2443 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2443) - ) { - JSCompiler_object_inline_digest_2443 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_digest_2443 && - ((JSCompiler_object_inline_stack_2444 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2444 = - 0 !== (JSCompiler_object_inline_stack_2444 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2444 - )), - (JSCompiler_object_inline_stack_2444 = - 0 !== - (JSCompiler_object_inline_stack_2444 & - (JSCompiler_object_inline_digest_2443.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2444), - 0 !== JSCompiler_object_inline_stack_2444 && - JSCompiler_object_inline_stack_2444 !== - JSCompiler_object_inline_message_2442.retryLane) - ) - throw ( - ((JSCompiler_object_inline_message_2442.retryLane = - JSCompiler_object_inline_stack_2444), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2444 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2443, - current, - JSCompiler_object_inline_stack_2444 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_componentStack_2445.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_componentStack_2445.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((renderLanes = - JSCompiler_object_inline_message_2442.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_componentStack_2445.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== renderLanes && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2444.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_digest_2493 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_digest_2493) + ) { + JSCompiler_object_inline_digest_2493 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_digest_2493 && + ((JSCompiler_object_inline_stack_2494 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_2493, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2494 && + JSCompiler_object_inline_stack_2494 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2494), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2494 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_digest_2493, + current, + JSCompiler_object_inline_stack_2494 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_componentStack_2495.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_componentStack_2495.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((renderLanes = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_componentStack_2495.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2494.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_message_2492) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2445 = - JSCompiler_object_inline_stack_2444.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2494.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_message_2442 = { + (JSCompiler_object_inline_componentStack_2495 = + componentStack.sibling), + (JSCompiler_object_inline_message_2492 = { mode: "hidden", - children: JSCompiler_object_inline_stack_2444.children + children: JSCompiler_object_inline_stack_2494.children }), (nextFallbackChildren & ConcurrentMode) === NoMode && workInProgress.child !== componentStack - ? ((JSCompiler_object_inline_stack_2444 = workInProgress.child), - (JSCompiler_object_inline_stack_2444.childLanes = 0), - (JSCompiler_object_inline_stack_2444.pendingProps = - JSCompiler_object_inline_message_2442), + ? ((JSCompiler_object_inline_stack_2494 = workInProgress.child), + (JSCompiler_object_inline_stack_2494.childLanes = 0), + (JSCompiler_object_inline_stack_2494.pendingProps = + JSCompiler_object_inline_message_2492), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2444.actualDuration = -0), - (JSCompiler_object_inline_stack_2444.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2444.selfBaseDuration = + ((JSCompiler_object_inline_stack_2494.actualDuration = -0), + (JSCompiler_object_inline_stack_2494.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2494.selfBaseDuration = componentStack.selfBaseDuration), - (JSCompiler_object_inline_stack_2444.treeBaseDuration = + (JSCompiler_object_inline_stack_2494.treeBaseDuration = componentStack.treeBaseDuration)), (workInProgress.deletions = null)) - : ((JSCompiler_object_inline_stack_2444 = createWorkInProgress( + : ((JSCompiler_object_inline_stack_2494 = createWorkInProgress( componentStack, - JSCompiler_object_inline_message_2442 + JSCompiler_object_inline_message_2492 )), - (JSCompiler_object_inline_stack_2444.subtreeFlags = + (JSCompiler_object_inline_stack_2494.subtreeFlags = componentStack.subtreeFlags & 65011712)), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2445 = - createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_componentStack_2445 - )) - : ((JSCompiler_object_inline_componentStack_2445 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2445, - nextFallbackChildren, - renderLanes, - null - )), - (JSCompiler_object_inline_componentStack_2445.flags |= 2)), - (JSCompiler_object_inline_componentStack_2445.return = - workInProgress), - (JSCompiler_object_inline_stack_2444.return = workInProgress), - (JSCompiler_object_inline_stack_2444.sibling = - JSCompiler_object_inline_componentStack_2445), - (workInProgress.child = JSCompiler_object_inline_stack_2444), - (JSCompiler_object_inline_stack_2444 = - JSCompiler_object_inline_componentStack_2445), - (JSCompiler_object_inline_componentStack_2445 = workInProgress.child), + null !== JSCompiler_object_inline_componentStack_2495 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_componentStack_2495, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + nextFallbackChildren, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2494.return = workInProgress), + (JSCompiler_object_inline_stack_2494.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2494), + (JSCompiler_object_inline_stack_2494 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_componentStack_2495 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_componentStack_2495 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_componentStack_2495, + pool: JSCompiler_object_inline_componentStack_2495 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10306,40 +10355,38 @@ __DEV__ && baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_componentStack_2445.memoizedState = - nextFallbackChildren), - (JSCompiler_object_inline_componentStack_2445.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2443, - renderLanes - )), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2493, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2444 + JSCompiler_object_inline_stack_2494 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2443 = current.child; - current = JSCompiler_object_inline_digest_2443.sibling; - JSCompiler_object_inline_digest_2443 = createWorkInProgress( - JSCompiler_object_inline_digest_2443, + JSCompiler_object_inline_digest_2493 = current.child; + current = JSCompiler_object_inline_digest_2493.sibling; + JSCompiler_object_inline_digest_2493 = createWorkInProgress( + JSCompiler_object_inline_digest_2493, { mode: "visible", - children: JSCompiler_object_inline_stack_2444.children + children: JSCompiler_object_inline_stack_2494.children } ); (workInProgress.mode & ConcurrentMode) === NoMode && - (JSCompiler_object_inline_digest_2443.lanes = renderLanes); - JSCompiler_object_inline_digest_2443.return = workInProgress; - JSCompiler_object_inline_digest_2443.sibling = null; + (JSCompiler_object_inline_digest_2493.lanes = renderLanes); + JSCompiler_object_inline_digest_2493.return = workInProgress; + JSCompiler_object_inline_digest_2493.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2443; + workInProgress.child = JSCompiler_object_inline_digest_2493; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2443; + return JSCompiler_object_inline_digest_2493; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = mountWorkInProgressOffscreenFiber( @@ -10719,6 +10766,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -10797,7 +10852,7 @@ __DEV__ && } function beginWork(current, workInProgress, renderLanes) { if (workInProgress._debugNeedsRemount && null !== current) { - renderLanes = createFiberFromTypeAndProps( + var copiedFiber = createFiberFromTypeAndProps( workInProgress.type, workInProgress.key, workInProgress.pendingProps, @@ -10805,19 +10860,19 @@ __DEV__ && workInProgress.mode, workInProgress.lanes ); - renderLanes._debugStack = workInProgress._debugStack; - renderLanes._debugTask = workInProgress._debugTask; + copiedFiber._debugStack = workInProgress._debugStack; + copiedFiber._debugTask = workInProgress._debugTask; var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; workInProgress.alternate = null; - renderLanes.index = workInProgress.index; - renderLanes.sibling = workInProgress.sibling; - renderLanes.return = workInProgress.return; - renderLanes.ref = workInProgress.ref; - renderLanes._debugInfo = workInProgress._debugInfo; + copiedFiber.index = workInProgress.index; + copiedFiber.sibling = workInProgress.sibling; + copiedFiber.return = workInProgress.return; + copiedFiber.ref = workInProgress.ref; + copiedFiber._debugInfo = workInProgress._debugInfo; if (workInProgress === returnFiber.child) - returnFiber.child = renderLanes; + returnFiber.child = copiedFiber; else { var prevSibling = returnFiber.child; if (null === prevSibling) @@ -10825,14 +10880,14 @@ __DEV__ && for (; prevSibling.sibling !== workInProgress; ) if (((prevSibling = prevSibling.sibling), null === prevSibling)) throw Error("Expected to find the previous sibling."); - prevSibling.sibling = renderLanes; + prevSibling.sibling = copiedFiber; } - workInProgress = returnFiber.deletions; - null === workInProgress + var deletions = returnFiber.deletions; + null === deletions ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) - : workInProgress.push(current); - renderLanes.flags |= 2; - return renderLanes; + : deletions.push(current); + copiedFiber.flags |= 2; + return copiedFiber; } if (null !== current) if ( @@ -10858,94 +10913,97 @@ __DEV__ && } else { didReceiveUpdate = !1; - if ((returnFiber = isHydrating)) + var JSCompiler_temp; + if ((JSCompiler_temp = isHydrating)) warnIfNotHydrating(), - (returnFiber = 0 !== (workInProgress.flags & 1048576)); - returnFiber && - ((returnFiber = workInProgress.index), - warnIfNotHydrating(), - pushTreeId(workInProgress, treeForkCount, returnFiber)); + (JSCompiler_temp = 0 !== (workInProgress.flags & 1048576)); + if (JSCompiler_temp) { + var slotIndex = workInProgress.index; + warnIfNotHydrating(); + pushTreeId(workInProgress, treeForkCount, slotIndex); + } } workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - a: if ( - ((prevSibling = workInProgress.elementType), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(prevSibling)), - (workInProgress.type = current), - "function" === typeof current) - ) - shouldConstruct(current) - ? ((returnFiber = resolveClassComponentProps( - current, - returnFiber - )), - (workInProgress.tag = 1), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateClassComponent( + a: { + var elementType = workInProgress.elementType; + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); + var props = workInProgress.pendingProps; + var Component = callLazyInitInDEV(elementType); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props + ); + workInProgress.tag = 1; + workInProgress.type = Component = + resolveFunctionForHotReloading(Component); + var JSCompiler_inline_result = updateClassComponent( null, workInProgress, - current, - returnFiber, - renderLanes - ))) - : ((workInProgress.tag = 0), - validateFunctionComponentInDev(workInProgress, current), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ))); - else { - if (void 0 !== current && null !== current) - if ( - ((prevSibling = current.$$typeof), - prevSibling === REACT_FORWARD_REF_TYPE) - ) { - workInProgress.tag = 11; - workInProgress.type = current = - resolveForwardRefForHotReloading(current); - workInProgress = updateForwardRef( - null, - workInProgress, - current, - returnFiber, + Component, + resolvedProps, renderLanes ); - break a; - } else if (prevSibling === REACT_MEMO_TYPE) { - workInProgress.tag = 14; - workInProgress = updateMemoComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ); - break a; + } else + (workInProgress.tag = 0), + validateFunctionComponentInDev(workInProgress, Component), + (workInProgress.type = Component = + resolveFunctionForHotReloading(Component)), + (JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + props, + renderLanes + )); + else { + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = 11; + workInProgress.type = Component = + resolveForwardRefForHotReloading(Component); + JSCompiler_inline_result = updateForwardRef( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + JSCompiler_inline_result = updateMemoComponent( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } } - workInProgress = ""; - null !== current && - "object" === typeof current && - current.$$typeof === REACT_LAZY_TYPE && - (workInProgress = - " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - current + - ". Lazy element type must resolve to a class or function." + - workInProgress - ); + var hint = ""; + null !== Component && + "object" === typeof Component && + Component.$$typeof === REACT_LAZY_TYPE && + (hint = + " Did you wrap a component in React.lazy() more than once?"); + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + loggedComponent + + ". Lazy element type must resolve to a class or function." + + hint + ); + } } - return workInProgress; + return JSCompiler_inline_result; case 0: return updateFunctionComponent( current, @@ -10955,19 +11013,17 @@ __DEV__ && renderLanes ); case 1: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component = workInProgress.type, + _resolvedProps4 = resolveClassComponentProps( + _Component, workInProgress.pendingProps - )), - updateClassComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + ); + return updateClassComponent( + current, + workInProgress, + _Component, + _resolvedProps4, + renderLanes ); case 3: a: { @@ -10976,15 +11032,15 @@ __DEV__ && throw Error( "Should have a current fiber. This is a bug in React." ); - returnFiber = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - prevSibling = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, returnFiber, null, renderLanes); - var nextState = workInProgress.memoizedState; - returnFiber = nextState.cache; - pushProvider(workInProgress, CacheContext, returnFiber); - returnFiber !== prevState.cache && + processUpdateQueue(workInProgress, nextProps, null, renderLanes); + var nextState = workInProgress.memoizedState, + nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -10992,296 +11048,303 @@ __DEV__ && !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - returnFiber = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: returnFiber, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (returnFiber !== prevSibling) { - prevSibling = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error( "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering." ), workInProgress ); - queueHydrationError(prevSibling); - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; didSuspendOrErrorDEV = !1; hydrationDiffRootDEV = null; rootOrSingletonContext = !0; - current = mountChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - ); - for (workInProgress.child = current; current; ) - (current.flags = (current.flags & -3) | 4096), - (current = current.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), + (node = node.sibling); } - else { + } else { resetHydrationState(); - if (returnFiber === prevSibling) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = + bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } reconcileChildren( current, workInProgress, - returnFiber, + nextChildren, renderLanes ); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (current = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = current) - : isHydrating || - ((current = workInProgress.type), - (renderLanes = workInProgress.pendingProps), - (returnFiber = requiredContext( - rootInstanceStackCursor.current - )), - (returnFiber = - getOwnerDocumentFromRootContainer( - returnFiber - ).createElement(current)), - (returnFiber[internalInstanceKey] = workInProgress), - (returnFiber[internalPropsKey] = renderLanes), - setInitialProperties(returnFiber, current, renderLanes), - markNodeAsHoistable(returnFiber), - (workInProgress.stateNode = returnFiber)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + rootContainerInstance = requiredContext( + rootInstanceStackCursor.current + ), + domElement = getOwnerDocumentFromRootContainer( + rootContainerInstance + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((returnFiber = requiredContext(rootInstanceStackCursor.current)), - (prevSibling = getHostContext()), - (returnFiber = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, - returnFiber, - prevSibling, - !1 - )), - didSuspendOrErrorDEV || - ((prevSibling = diffHydratedProperties( - returnFiber, - workInProgress.type, - workInProgress.pendingProps, - prevSibling - )), - null !== prevSibling && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevSibling)), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (prevSibling = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = prevSibling), - (nextHydratableInstance = getNextHydratable( - returnFiber.firstChild - ))) - : (nextHydratableInstance = prevSibling)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child - ); - case 5: - return ( - null === current && - isHydrating && - ((prevState = getHostContext()), - (returnFiber = validateDOMNesting( + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var currentRootContainer = requiredContext( + rootInstanceStackCursor.current + ), + currentHostContext = getHostContext(), + instance = (workInProgress.stateNode = resolveSingletonInstance( workInProgress.type, - prevState.ancestorInfo - )), - (prevSibling = nextHydratableInstance), - (nextState = !prevSibling) || - ((nextState = canHydrateInstance( - prevSibling, - workInProgress.type, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== nextState - ? ((workInProgress.stateNode = nextState), - didSuspendOrErrorDEV || - ((prevState = diffHydratedProperties( - nextState, - workInProgress.type, - workInProgress.pendingProps, - prevState - )), - null !== prevState && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevState)), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - nextState.firstChild - )), - (rootOrSingletonContext = !1), - (prevState = !0)) - : (prevState = !1), - (nextState = !prevState)), - nextState && - (returnFiber && - warnNonHydratedInstance(workInProgress, prevSibling), - throwOnHydrationMismatch(workInProgress))), - pushHostContext(workInProgress), - (prevSibling = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (returnFiber = prevState.children), - shouldSetTextContent(prevSibling, prevState) - ? (returnFiber = null) - : null !== nextState && - shouldSetTextContent(prevSibling, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((prevSibling = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes - )), - (HostTransitionContext._currentValue = prevSibling)), - markRef(current, workInProgress), - reconcileChildren( + workInProgress.pendingProps, + currentRootContainer, + currentHostContext, + !1 + )); + if (!didSuspendOrErrorDEV) { + var differences = diffHydratedProperties( + instance, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext + ); + null !== differences && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences); + } + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable( + instance.firstChild + ))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; + case 5: + if (null === current && isHydrating) { + var currentHostContext$jscomp$0 = getHostContext(), + shouldKeepWarning = validateDOMNesting( + workInProgress.type, + currentHostContext$jscomp$0.ancestorInfo + ), + nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if (!(JSCompiler_temp$jscomp$0 = !nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== instance$jscomp$0) { + workInProgress.stateNode = instance$jscomp$0; + if (!didSuspendOrErrorDEV) { + var differences$jscomp$0 = diffHydratedProperties( + instance$jscomp$0, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext$jscomp$0 + ); + null !== differences$jscomp$0 && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences$jscomp$0); + } + hydrationParentFiber = workInProgress; + nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + ); + rootOrSingletonContext = !1; + var JSCompiler_inline_result$jscomp$1 = !0; + } else JSCompiler_inline_result$jscomp$1 = !1; + JSCompiler_temp$jscomp$0 = !JSCompiler_inline_result$jscomp$1; + } + JSCompiler_temp$jscomp$0 && + (shouldKeepWarning && + warnNonHydratedInstance(workInProgress, nextInstance), + throwOnHydrationMismatch(workInProgress)); + } + pushHostContext(workInProgress); + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && + (workInProgress.flags |= 32); + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, - returnFiber, + TransitionAwareHostComponent, + null, + null, renderLanes - ), - workInProgress.child + ); + HostTransitionContext._currentValue = newState; + } + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes ); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - ((current = workInProgress.pendingProps), - (renderLanes = getHostContext()), - (returnFiber = renderLanes.ancestorInfo.current), - (current = - null != returnFiber - ? validateTextNesting( - current, - returnFiber.tag, - renderLanes.ancestorInfo.implicitRootScope - ) - : !0), - (renderLanes = nextHydratableInstance), - (returnFiber = !renderLanes) || - ((returnFiber = canHydrateTextInstance( - renderLanes, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== returnFiber - ? ((workInProgress.stateNode = returnFiber), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (returnFiber = !0)) - : (returnFiber = !1), - (returnFiber = !returnFiber)), - returnFiber && - (current && - warnNonHydratedInstance(workInProgress, renderLanes), - throwOnHydrationMismatch(workInProgress))), - null - ); + if (null === current && isHydrating) { + var text = workInProgress.pendingProps, + currentHostContext$jscomp$1 = getHostContext(), + ancestor = currentHostContext$jscomp$1.ancestorInfo.current; + var shouldKeepWarning$jscomp$0 = + null != ancestor + ? validateTextNesting( + text, + ancestor.tag, + currentHostContext$jscomp$1.ancestorInfo.implicitRootScope + ) + : !0; + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$1; + if (!(JSCompiler_temp$jscomp$1 = !nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== textInstance) { + workInProgress.stateNode = textInstance; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + var JSCompiler_inline_result$jscomp$2 = !0; + } else JSCompiler_inline_result$jscomp$2 = !1; + JSCompiler_temp$jscomp$1 = !JSCompiler_inline_result$jscomp$2; + } + JSCompiler_temp$jscomp$1 && + (shouldKeepWarning$jscomp$0 && + warnNonHydratedInstance(workInProgress, nextInstance$jscomp$0), + throwOnHydrationMismatch(workInProgress)); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (returnFiber = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - )) - : reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo ); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: return updateForwardRef( current, @@ -11311,66 +11374,55 @@ __DEV__ && workInProgress.child ); case 12: - return ( - (workInProgress.flags |= 4), - (workInProgress.flags |= 2048), - (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = -0), - (returnFiber.passiveEffectDuration = -0), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + workInProgress.flags |= 4; + workInProgress.flags |= 2048; + var stateNode = workInProgress.stateNode; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 10: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevState = prevSibling.value), - "value" in prevSibling || - hasWarnedAboutUsingNoValuePropOnContextProvider || - ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), - console.error( - "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )), - pushProvider(workInProgress, returnFiber, prevState), - reconcileChildren( - current, - workInProgress, - prevSibling.children, - renderLanes - ), - workInProgress.child + var context = workInProgress.type; + var newProps = workInProgress.pendingProps, + newValue = newProps.value; + "value" in newProps || + hasWarnedAboutUsingNoValuePropOnContextProvider || + ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), + console.error( + "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" + )); + pushProvider(workInProgress, context, newValue); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes ); + return workInProgress.child; case 9: - return ( - (prevSibling = workInProgress.type._context), - (returnFiber = workInProgress.pendingProps.children), - "function" !== typeof returnFiber && - console.error( - "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." - ), - prepareToReadContext(workInProgress), - (prevSibling = readContext(prevSibling)), - markComponentRenderStarted(workInProgress), - (returnFiber = callComponentInDEV( - returnFiber, - prevSibling, - void 0 - )), - markComponentRenderStopped(), - (workInProgress.flags |= 1), - reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + var context$jscomp$0 = workInProgress.type._context; + var render = workInProgress.pendingProps.children; + "function" !== typeof render && + console.error( + "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." + ); + prepareToReadContext(workInProgress); + var newValue$jscomp$0 = readContext(context$jscomp$0); + markComponentRenderStarted(workInProgress); + var newChildren = callComponentInDEV( + render, + newValue$jscomp$0, + void 0 ); + markComponentRenderStopped(); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: return updateMemoComponent( current, @@ -11388,50 +11440,47 @@ __DEV__ && renderLanes ); case 17: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component2 = workInProgress.type, + _resolvedProps7 = resolveClassComponentProps( + _Component2, workInProgress.pendingProps - )), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (workInProgress.tag = 1), - isContextProvider(returnFiber) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1), - prepareToReadContext(workInProgress), - constructClassInstance(workInProgress, returnFiber, prevSibling), - mountClassInstance( - workInProgress, - returnFiber, - prevSibling, - renderLanes - ), - finishClassComponent( - null, - workInProgress, - returnFiber, - !0, - current, - renderLanes - ) + ); + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); + workInProgress.tag = 1; + if (isContextProvider(_Component2)) { + var hasContext = !0; + pushContextProvider(workInProgress); + } else hasContext = !1; + prepareToReadContext(workInProgress); + constructClassInstance(workInProgress, _Component2, _resolvedProps7); + mountClassInstance( + workInProgress, + _Component2, + _resolvedProps7, + renderLanes + ); + return finishClassComponent( + null, + workInProgress, + _Component2, + !0, + hasContext, + renderLanes ); case 28: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component3 = workInProgress.type, + _resolvedProps8 = resolveClassComponentProps( + _Component3, workInProgress.pendingProps - )), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (workInProgress.tag = 0), - updateFunctionComponent( - null, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + ); + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); + workInProgress.tag = 0; + return updateFunctionComponent( + null, + workInProgress, + _Component3, + _resolvedProps8, + renderLanes ); case 19: return updateSuspenseListComponent( @@ -11440,64 +11489,163 @@ __DEV__ && renderLanes ); case 31: - returnFiber = workInProgress.pendingProps; - renderLanes = returnFiber.hidden; - void 0 !== renderLanes && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === renderLanes - ? "hidden" - : !1 === renderLanes - ? "hidden={false}" - : "hidden={...}", - renderLanes ? 'mode="hidden"' : 'mode="visible"' - ); - renderLanes = workInProgress.mode; - returnFiber = { - mode: returnFiber.mode, - children: returnFiber.children - }; - if (null === current) { - if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((prevSibling = canHydrateHydrationBoundary( - current, + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, rootOrSingletonContext - )), - (prevSibling = - null !== prevSibling && - prevSibling.data === ACTIVITY_START_DATA - ? prevSibling - : null), - null !== prevSibling && - ((workInProgress.stateNode = prevSibling), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - prevSibling.nextSibling - )))) - : (prevSibling = null), - null === prevSibling) - ) - throw ( - (warnNonHydratedInstance(workInProgress, current), - throwOnHydrationMismatch(workInProgress)) + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 ); - current = mountWorkInProgressOffscreenFiber( - returnFiber, - renderLanes - ); - current.ref = workInProgress.ref; - workInProgress.child = current; - current.return = workInProgress; - workInProgress = current; - } else - (current = createWorkInProgress(current.child, returnFiber)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current); - return workInProgress; + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$3; case 22: return updateOffscreenComponent( current, @@ -11506,59 +11654,60 @@ __DEV__ && workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (returnFiber = readContext(CacheContext)), - null === current - ? ((prevSibling = peekCacheFromPool()), - null === prevSibling && - ((prevSibling = workInProgressRoot), - (prevState = createCache()), - (prevSibling.pooledCache = prevState), - retainCache(prevState), - null !== prevState && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = prevState)), - (workInProgress.memoizedState = { - parent: returnFiber, - cache: prevSibling - }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, prevSibling)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (prevSibling = current.memoizedState), - (prevState = workInProgress.memoizedState), - prevSibling.parent !== returnFiber - ? ((prevSibling = { - parent: returnFiber, - cache: returnFiber - }), - (workInProgress.memoizedState = prevSibling), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - prevSibling), - pushProvider(workInProgress, CacheContext, returnFiber)) - : ((returnFiber = prevState.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) var freshCache = cacheFromPool; + else { + var root$jscomp$0 = workInProgressRoot, + freshCache$jscomp$0 = createCache(); + root$jscomp$0.pooledCache = freshCache$jscomp$0; + retainCache(freshCache$jscomp$0); + null !== freshCache$jscomp$0 && + (root$jscomp$0.pooledCacheLanes |= renderLanes); + freshCache = freshCache$jscomp$0; + } + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 29: throw workInProgress.pendingProps; } @@ -12041,11 +12190,62 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12053,23 +12253,25 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12077,11 +12279,11 @@ __DEV__ && emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12345,6 +12547,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12410,6 +12628,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13351,6 +13573,11 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -13647,6 +13874,35 @@ __DEV__ && } popComponentEffectStart(prevEffectStart); } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + current + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -13679,6 +13935,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -14089,6 +14346,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -14447,6 +14713,16 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -14612,6 +14888,14 @@ __DEV__ && committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -16750,6 +17034,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -20731,6 +21016,9 @@ __DEV__ && function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -21710,12 +21998,21 @@ __DEV__ && (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -21818,6 +22115,7 @@ __DEV__ && } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -21863,8 +22161,11 @@ __DEV__ && targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -22113,22 +22414,22 @@ __DEV__ && ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -25935,11 +26236,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-native-fb-17f88c80-20250422" !== isomorphicReactPackageVersion) + if ("19.2.0-native-fb-3ef31d19-20250422" !== 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.2.0-native-fb-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-native-fb-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -25976,10 +26277,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -26123,5 +26424,5 @@ __DEV__ && listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.2.0-native-fb-17f88c80-20250422"; + exports.version = "19.2.0-native-fb-3ef31d19-20250422"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js index 45420c7627..b65b13067a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ /* @@ -71,6 +71,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -836,6 +846,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -2777,6 +2795,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -2854,6 +2877,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -2951,6 +2982,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2958,8 +2990,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -2985,20 +3015,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -4384,6 +4417,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -6189,6 +6227,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -6505,31 +6544,29 @@ function updateOffscreenComponent( if (0 === (workInProgress.mode & 1)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), null !== current && pushTransition(workInProgress, null), - reuseHiddenContextOnStack(); - else { - if (0 === (renderLanes & 536870912) || isHydrating) - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, + reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - } - pushOffscreenSuspenseHandler(workInProgress); + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes + ) + ); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -6564,6 +6601,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6958,8 +7017,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (current = createFiber(18, null, null, 0)), - (current.stateNode = renderLanes), + (current = createFiberFromDehydratedFragment(renderLanes)), (current.return = workInProgress), (workInProgress.child = current), (hydrationParentFiber = workInProgress), @@ -7039,14 +7097,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7099,15 +7157,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7136,12 +7186,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== renderLanes && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, renderLanes), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7153,17 +7198,18 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), (didSuspend = { mode: "hidden", children: nextProps.children }), - 0 === (nextFallbackChildren & 1) && workInProgress.child !== showFallback + 0 === (showFallback & 1) && workInProgress.child !== nextFallbackChildren ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = didSuspend), (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(showFallback, didSuspend)), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712)), + : ((nextProps = createWorkInProgress(nextFallbackChildren, didSuspend)), + (nextProps.subtreeFlags = + nextFallbackChildren.subtreeFlags & 65011712)), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7171,7 +7217,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7182,22 +7228,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7475,10 +7521,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$107 = workInProgress.memoizedState; + if (null !== state$107) { + if (null !== state$107.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -7498,17 +7552,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$107 = 0 !== (renderLanes & workInProgress.childLanes); + state$107 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$107 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$107) return updateSuspenseListComponent( current, workInProgress, @@ -7522,7 +7576,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$107) break; else return null; case 22: return ( @@ -8007,39 +8061,109 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - elementType = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - elementType = { mode: elementType.mode, children: elementType.children }; - if (null === current) { + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, - rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) + ((prevState = elementType.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber( - elementType, - renderLanes - ); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, elementType)), + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = elementType.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), (renderLanes.ref = workInProgress.ref), (workInProgress.child = renderLanes), (renderLanes.return = workInProgress), @@ -8167,14 +8291,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$123 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$123 = lastTailNode), + for (var lastTailNode$124 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$124 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$123 + null === lastTailNode$124 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$123.sibling = null); + : (lastTailNode$124.sibling = null); } } function bubbleProperties(completedWork) { @@ -8184,19 +8308,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$124 = completedWork.child; null !== child$124; ) - (newChildLanes |= child$124.lanes | child$124.childLanes), - (subtreeFlags |= child$124.subtreeFlags & 65011712), - (subtreeFlags |= child$124.flags & 65011712), - (child$124.return = completedWork), - (child$124 = child$124.sibling); + for (var child$125 = completedWork.child; null !== child$125; ) + (newChildLanes |= child$125.lanes | child$125.childLanes), + (subtreeFlags |= child$125.subtreeFlags & 65011712), + (subtreeFlags |= child$125.flags & 65011712), + (child$125.return = completedWork), + (child$125 = child$125.sibling); else - for (child$124 = completedWork.child; null !== child$124; ) - (newChildLanes |= child$124.lanes | child$124.childLanes), - (subtreeFlags |= child$124.subtreeFlags), - (subtreeFlags |= child$124.flags), - (child$124.return = completedWork), - (child$124 = child$124.sibling); + for (child$125 = completedWork.child; null !== child$125; ) + (newChildLanes |= child$125.lanes | child$125.childLanes), + (subtreeFlags |= child$125.subtreeFlags), + (subtreeFlags |= child$125.flags), + (child$125.return = completedWork), + (child$125 = child$125.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8467,11 +8591,40 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8717,6 +8870,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8775,6 +8939,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8922,8 +9090,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$155) { - captureCommitPhaseError(current, nearestMountedAncestor, error$155); + } catch (error$159) { + captureCommitPhaseError(current, nearestMountedAncestor, error$159); } else ref.current = null; } @@ -9262,11 +9430,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$154) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$154 + error$158 ); } } @@ -9309,6 +9477,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -9565,6 +9737,31 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -9592,6 +9789,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9933,6 +10131,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10115,20 +10322,20 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent); break; case 5: - var parent$156 = hostParentFiber.stateNode; + var parent$160 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$156, ""), (hostParentFiber.flags &= -33)); - var before$157 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$157, parent$156); + (setTextContent(parent$160, ""), (hostParentFiber.flags &= -33)); + var before$161 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$161, parent$160); break; case 3: case 4: - var parent$158 = hostParentFiber.stateNode.containerInfo, - before$159 = getHostSibling(finishedWork); + var parent$162 = hostParentFiber.stateNode.containerInfo, + before$163 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$159, - parent$158 + before$163, + parent$162 ); break; default: @@ -10279,6 +10486,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10422,6 +10639,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11369,8 +11594,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$179) { - handleThrow(root, thrownValue$179); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); lanes && root.shellSuspendCounter++; @@ -11489,8 +11714,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$181) { - handleThrow(root, thrownValue$181); + } catch (thrownValue$186) { + handleThrow(root, thrownValue$186); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -12095,6 +12320,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -12136,14 +12362,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$186 = firstScheduledRoot; null !== root$186; ) { - if (!onlyLegacy || 0 === root$186.tag) + for (var root$191 = firstScheduledRoot; null !== root$191; ) { + if (!onlyLegacy || 0 === root$191.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$186.pendingLanes; + var pendingLanes = root$191.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$186.suspendedLanes, - pingedLanes = root$186.pingedLanes; + var suspendedLanes = root$191.suspendedLanes, + pingedLanes = root$191.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12157,20 +12383,20 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$186, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$191, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$186, - root$186 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$186.cancelPendingCommit || - -1 !== root$186.timeoutHandle + root$191, + root$191 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$191.cancelPendingCommit || + -1 !== root$191.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$186, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$191, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$186, JSCompiler_inline_result)); - root$186 = root$186.next; + performSyncWorkOnRoot(root$191, JSCompiler_inline_result)); + root$191 = root$191.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12447,20 +12673,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1553 = 0; - i$jscomp$inline_1553 < simpleEventPluginEvents.length; - i$jscomp$inline_1553++ + var i$jscomp$inline_1585 = 0; + i$jscomp$inline_1585 < simpleEventPluginEvents.length; + i$jscomp$inline_1585++ ) { - var eventName$jscomp$inline_1554 = - simpleEventPluginEvents[i$jscomp$inline_1553], - domEventName$jscomp$inline_1555 = - eventName$jscomp$inline_1554.toLowerCase(), - capitalizedEvent$jscomp$inline_1556 = - eventName$jscomp$inline_1554[0].toUpperCase() + - eventName$jscomp$inline_1554.slice(1); + var eventName$jscomp$inline_1586 = + simpleEventPluginEvents[i$jscomp$inline_1585], + domEventName$jscomp$inline_1587 = + eventName$jscomp$inline_1586.toLowerCase(), + capitalizedEvent$jscomp$inline_1588 = + eventName$jscomp$inline_1586[0].toUpperCase() + + eventName$jscomp$inline_1586.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1555, - "on" + capitalizedEvent$jscomp$inline_1556 + domEventName$jscomp$inline_1587, + "on" + capitalizedEvent$jscomp$inline_1588 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13703,34 +13929,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$200 = props[hasSrc]; - if (null != propValue$200) + var propValue$205 = props[hasSrc]; + if (null != propValue$205) switch (hasSrc) { case "name": - hasSrcSet = propValue$200; + hasSrcSet = propValue$205; break; case "type": - propValue = propValue$200; + propValue = propValue$205; break; case "checked": - checked = propValue$200; + checked = propValue$205; break; case "defaultChecked": - defaultChecked = propValue$200; + defaultChecked = propValue$205; break; case "value": - propKey = propValue$200; + propKey = propValue$205; break; case "defaultValue": - defaultValue = propValue$200; + defaultValue = propValue$205; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$200) + if (null != propValue$205) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$200, props, null); + setProp(domElement, tag, hasSrc, propValue$205, props, null); } } initInput( @@ -13869,14 +14095,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$200 in props) - props.hasOwnProperty(propValue$200) && - ((hasSrc = props[propValue$200]), + for (propValue$205 in props) + props.hasOwnProperty(propValue$205) && + ((hasSrc = props[propValue$205]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$200, + propValue$205, hasSrc, props, void 0 @@ -13924,14 +14150,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$217 in nextProps) { - var propKey = nextProps[propKey$217]; - lastProp = lastProps[propKey$217]; + for (var propKey$222 in nextProps) { + var propKey = nextProps[propKey$222]; + lastProp = lastProps[propKey$222]; if ( - nextProps.hasOwnProperty(propKey$217) && + nextProps.hasOwnProperty(propKey$222) && (null != propKey || null != lastProp) ) - switch (propKey$217) { + switch (propKey$222) { case "type": type = propKey; break; @@ -13960,7 +14186,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$217, + propKey$222, propKey, nextProps, lastProp @@ -13979,7 +14205,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$217 = null; + propKey = value = defaultValue = propKey$222 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14010,7 +14236,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$217 = type; + propKey$222 = type; break; case "defaultValue": defaultValue = type; @@ -14031,15 +14257,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$217 - ? updateOptions(domElement, !!lastProps, propKey$217, !1) + null != propKey$222 + ? updateOptions(domElement, !!lastProps, propKey$222, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$217 = null; + propKey = propKey$222 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14063,7 +14289,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$217 = name; + propKey$222 = name; break; case "defaultValue": propKey = name; @@ -14077,17 +14303,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$217, propKey); + updateTextarea(domElement, propKey$222, propKey); return; case "option": - for (var propKey$233 in lastProps) + for (var propKey$238 in lastProps) if ( - ((propKey$217 = lastProps[propKey$233]), - lastProps.hasOwnProperty(propKey$233) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$233)) + ((propKey$222 = lastProps[propKey$238]), + lastProps.hasOwnProperty(propKey$238) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$238)) ) - switch (propKey$233) { + switch (propKey$238) { case "selected": domElement.selected = !1; break; @@ -14095,33 +14321,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$233, + propKey$238, null, nextProps, - propKey$217 + propKey$222 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$217 = nextProps[lastDefaultValue]), + ((propKey$222 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$217 !== propKey && - (null != propKey$217 || null != propKey)) + propKey$222 !== propKey && + (null != propKey$222 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$217 && - "function" !== typeof propKey$217 && - "symbol" !== typeof propKey$217; + propKey$222 && + "function" !== typeof propKey$222 && + "symbol" !== typeof propKey$222; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$217, + propKey$222, nextProps, propKey ); @@ -14142,24 +14368,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$238 in lastProps) - (propKey$217 = lastProps[propKey$238]), - lastProps.hasOwnProperty(propKey$238) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$238) && - setProp(domElement, tag, propKey$238, null, nextProps, propKey$217); + for (var propKey$243 in lastProps) + (propKey$222 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$243) && + setProp(domElement, tag, propKey$243, null, nextProps, propKey$222); for (checked in nextProps) if ( - ((propKey$217 = nextProps[checked]), + ((propKey$222 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$217 !== propKey && - (null != propKey$217 || null != propKey)) + propKey$222 !== propKey && + (null != propKey$222 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$217) + if (null != propKey$222) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14167,7 +14393,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$217, + propKey$222, nextProps, propKey ); @@ -14175,49 +14401,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$243 in lastProps) - (propKey$217 = lastProps[propKey$243]), - lastProps.hasOwnProperty(propKey$243) && - void 0 !== propKey$217 && - !nextProps.hasOwnProperty(propKey$243) && + for (var propKey$248 in lastProps) + (propKey$222 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + void 0 !== propKey$222 && + !nextProps.hasOwnProperty(propKey$248) && setPropOnCustomElement( domElement, tag, - propKey$243, + propKey$248, void 0, nextProps, - propKey$217 + propKey$222 ); for (defaultChecked in nextProps) - (propKey$217 = nextProps[defaultChecked]), + (propKey$222 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$217 === propKey || - (void 0 === propKey$217 && void 0 === propKey) || + propKey$222 === propKey || + (void 0 === propKey$222 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$217, + propKey$222, nextProps, propKey ); return; } } - for (var propKey$248 in lastProps) - (propKey$217 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$248) && - setProp(domElement, tag, propKey$248, null, nextProps, propKey$217); + for (var propKey$253 in lastProps) + (propKey$222 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$253) && + setProp(domElement, tag, propKey$253, null, nextProps, propKey$222); for (lastProp in nextProps) - (propKey$217 = nextProps[lastProp]), + (propKey$222 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$217 === propKey || - (null == propKey$217 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$217, nextProps, propKey); + propKey$222 === propKey || + (null == propKey$222 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$222, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14862,26 +15088,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$259 = getResourcesFromRoot( + var styles$264 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$260 = styles$259.get(type); - resource$260 || + resource$265 = styles$264.get(type); + resource$265 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$260 = { + (resource$265 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$259.set(type, resource$260), - (styles$259 = JSCompiler_inline_result.querySelector( + styles$264.set(type, resource$265), + (styles$264 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$259._p && - ((resource$260.instance = styles$259), - (resource$260.state.loading = 5)), + !styles$264._p && + ((resource$265.instance = styles$264), + (resource$265.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14894,16 +15120,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$259 || + styles$264 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$260.state + resource$265.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$260; + return resource$265; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15000,37 +15226,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$265 = hoistableRoot.querySelector( + var instance$270 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$265) + if (instance$270) return ( (resource.state.loading |= 4), - (resource.instance = instance$265), - markNodeAsHoistable(instance$265), - instance$265 + (resource.instance = instance$270), + markNodeAsHoistable(instance$270), + instance$270 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$265 = ( + instance$270 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$265); - var linkInstance = instance$265; + markNodeAsHoistable(instance$270); + var linkInstance = instance$270; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$265, "link", instance); + setInitialProperties(instance$270, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$265, props.precedence, hoistableRoot); - return (resource.instance = instance$265); + insertStylesheet(instance$270, props.precedence, hoistableRoot); + return (resource.instance = instance$270); case "script": - instance$265 = getScriptKey(props.src); + instance$270 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$265) + getScriptSelectorFromKey(instance$270) )) ) return ( @@ -15039,7 +15265,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$265))) + if ((styleProps = preloadPropsMap.get(instance$270))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -15481,12 +15707,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -15577,6 +15812,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -15623,8 +15859,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -15884,19 +16123,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -16090,16 +16332,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1807 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1838 = React.version; if ( - "19.2.0-native-fb-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_1807 + "19.2.0-native-fb-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_1838 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1807, - "19.2.0-native-fb-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_1838, + "19.2.0-native-fb-3ef31d19-20250422" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16119,24 +16361,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2275 = { +var internals$jscomp$inline_2316 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2276 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2317 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2276.isDisabled && - hook$jscomp$inline_2276.supportsFiber + !hook$jscomp$inline_2317.isDisabled && + hook$jscomp$inline_2317.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2276.inject( - internals$jscomp$inline_2275 + (rendererID = hook$jscomp$inline_2317.inject( + internals$jscomp$inline_2316 )), - (injectedHook = hook$jscomp$inline_2276); + (injectedHook = hook$jscomp$inline_2317); } catch (err) {} } exports.createRoot = function (container, options) { @@ -16228,4 +16470,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js index b999e0e3be..d473d9ce88 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<132fd0fa73d4f6cf74cfb2a8f90455ae>> + * @generated SignedSource<<9d7709d7f037e02c11b3263d8352d7a1>> */ /* @@ -71,6 +71,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -884,6 +894,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -2871,6 +2889,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -2948,6 +2971,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -3045,6 +3076,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -3052,8 +3084,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -3079,20 +3109,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -4543,6 +4576,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -6357,6 +6395,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -6675,31 +6714,29 @@ function updateOffscreenComponent( if (0 === (workInProgress.mode & 1)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), null !== current && pushTransition(workInProgress, null), - reuseHiddenContextOnStack(); - else { - if (0 === (renderLanes & 536870912) || isHydrating) - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, + reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - } - pushOffscreenSuspenseHandler(workInProgress); + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes + ) + ); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -6734,6 +6771,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7139,8 +7198,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (current = createFiber(18, null, null, 0)), - (current.stateNode = renderLanes), + (current = createFiberFromDehydratedFragment(renderLanes)), (current.return = workInProgress), (workInProgress.child = current), (hydrationParentFiber = workInProgress), @@ -7220,14 +7278,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7280,15 +7338,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7317,12 +7367,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== renderLanes && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, renderLanes), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7334,22 +7379,25 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), (didSuspend = { mode: "hidden", children: nextProps.children }), - 0 === (nextFallbackChildren & 1) && workInProgress.child !== showFallback + 0 === (showFallback & 1) && workInProgress.child !== nextFallbackChildren ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = didSuspend), workInProgress.mode & 2 && ((nextProps.actualDuration = -0), (nextProps.actualStartTime = -1.1), - (nextProps.selfBaseDuration = showFallback.selfBaseDuration), - (nextProps.treeBaseDuration = showFallback.treeBaseDuration)), + (nextProps.selfBaseDuration = + nextFallbackChildren.selfBaseDuration), + (nextProps.treeBaseDuration = + nextFallbackChildren.treeBaseDuration)), (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(showFallback, didSuspend)), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712)), + : ((nextProps = createWorkInProgress(nextFallbackChildren, didSuspend)), + (nextProps.subtreeFlags = + nextFallbackChildren.subtreeFlags & 65011712)), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7357,7 +7405,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7368,22 +7416,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7675,6 +7723,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -8214,39 +8270,109 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - elementType = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - elementType = { mode: elementType.mode, children: elementType.children }; - if (null === current) { + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, - rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) + ((prevState = elementType.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber( - elementType, - renderLanes - ); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, elementType)), + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = elementType.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), (renderLanes.ref = workInProgress.ref), (workInProgress.child = renderLanes), (renderLanes.return = workInProgress), @@ -8374,14 +8500,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$126 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$126 = lastTailNode), + for (var lastTailNode$127 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$127 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$126 + null === lastTailNode$127 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$126.sibling = null); + : (lastTailNode$127.sibling = null); } } function bubbleProperties(completedWork) { @@ -8393,53 +8519,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$128 = completedWork.selfBaseDuration, - child$129 = completedWork.child; - null !== child$129; + var treeBaseDuration$129 = completedWork.selfBaseDuration, + child$130 = completedWork.child; + null !== child$130; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags & 65011712), - (subtreeFlags |= child$129.flags & 65011712), - (treeBaseDuration$128 += child$129.treeBaseDuration), - (child$129 = child$129.sibling); - completedWork.treeBaseDuration = treeBaseDuration$128; + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags & 65011712), + (subtreeFlags |= child$130.flags & 65011712), + (treeBaseDuration$129 += child$130.treeBaseDuration), + (child$130 = child$130.sibling); + completedWork.treeBaseDuration = treeBaseDuration$129; } else for ( - treeBaseDuration$128 = completedWork.child; - null !== treeBaseDuration$128; + treeBaseDuration$129 = completedWork.child; + null !== treeBaseDuration$129; ) (newChildLanes |= - treeBaseDuration$128.lanes | treeBaseDuration$128.childLanes), - (subtreeFlags |= treeBaseDuration$128.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$128.flags & 65011712), - (treeBaseDuration$128.return = completedWork), - (treeBaseDuration$128 = treeBaseDuration$128.sibling); + treeBaseDuration$129.lanes | treeBaseDuration$129.childLanes), + (subtreeFlags |= treeBaseDuration$129.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$129.flags & 65011712), + (treeBaseDuration$129.return = completedWork), + (treeBaseDuration$129 = treeBaseDuration$129.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$128 = completedWork.actualDuration; - child$129 = completedWork.selfBaseDuration; + treeBaseDuration$129 = completedWork.actualDuration; + child$130 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$128 += child.actualDuration), - (child$129 += child.treeBaseDuration), + (treeBaseDuration$129 += child.actualDuration), + (child$130 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$128; - completedWork.treeBaseDuration = child$129; + completedWork.actualDuration = treeBaseDuration$129; + completedWork.treeBaseDuration = child$130; } else for ( - treeBaseDuration$128 = completedWork.child; - null !== treeBaseDuration$128; + treeBaseDuration$129 = completedWork.child; + null !== treeBaseDuration$129; ) (newChildLanes |= - treeBaseDuration$128.lanes | treeBaseDuration$128.childLanes), - (subtreeFlags |= treeBaseDuration$128.subtreeFlags), - (subtreeFlags |= treeBaseDuration$128.flags), - (treeBaseDuration$128.return = completedWork), - (treeBaseDuration$128 = treeBaseDuration$128.sibling); + treeBaseDuration$129.lanes | treeBaseDuration$129.childLanes), + (subtreeFlags |= treeBaseDuration$129.subtreeFlags), + (subtreeFlags |= treeBaseDuration$129.flags), + (treeBaseDuration$129.return = completedWork), + (treeBaseDuration$129 = treeBaseDuration$129.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8710,11 +8836,52 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8722,28 +8889,30 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) throw Error(formatProdErrorMessage(318)); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) throw Error(formatProdErrorMessage(317)); - type[internalInstanceKey] = workInProgress; + if (!nextResource) throw Error(formatProdErrorMessage(318)); + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error(formatProdErrorMessage(317)); + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); } else resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -8984,6 +9153,20 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9048,6 +9231,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9262,8 +9449,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$165) { - captureCommitPhaseError(current, nearestMountedAncestor, error$165); + } catch (error$171) { + captureCommitPhaseError(current, nearestMountedAncestor, error$171); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -9325,8 +9512,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$166) { - captureCommitPhaseError(current, nearestMountedAncestor, error$166); + } catch (error$172) { + captureCommitPhaseError(current, nearestMountedAncestor, error$172); } else ref.current = null; } @@ -9690,11 +9877,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$162) { + } catch (error$168) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$162 + error$168 ); } else { @@ -9711,11 +9898,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$163) { + } catch (error$169) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$163 + error$169 ); } recordEffectDuration(); @@ -9726,11 +9913,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$164) { + } catch (error$170) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$170 ); } } @@ -9783,6 +9970,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -10042,6 +10233,31 @@ function commitDeletionEffectsOnFiber( } popComponentEffectStart(prevEffectStart); } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -10069,6 +10285,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10424,6 +10641,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10608,20 +10834,20 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent); break; case 5: - var parent$167 = hostParentFiber.stateNode; + var parent$173 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$167, ""), (hostParentFiber.flags &= -33)); - var before$168 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$168, parent$167); + (setTextContent(parent$173, ""), (hostParentFiber.flags &= -33)); + var before$174 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$174, parent$173); break; case 3: case 4: - var parent$169 = hostParentFiber.stateNode.containerInfo, - before$170 = getHostSibling(finishedWork); + var parent$175 = hostParentFiber.stateNode.containerInfo, + before$176 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$170, - parent$169 + before$176, + parent$175 ); break; default: @@ -10790,6 +11016,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10944,6 +11180,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11951,8 +12195,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$194) { - handleThrow(root, thrownValue$194); + } catch (thrownValue$201) { + handleThrow(root, thrownValue$201); } while (1); lanes && root.shellSuspendCounter++; @@ -12079,8 +12323,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$196) { - handleThrow(root, thrownValue$196); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -12768,6 +13012,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -12815,14 +13060,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$201 = firstScheduledRoot; null !== root$201; ) { - if (!onlyLegacy || 0 === root$201.tag) + for (var root$208 = firstScheduledRoot; null !== root$208; ) { + if (!onlyLegacy || 0 === root$208.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$201.pendingLanes; + var pendingLanes = root$208.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$201.suspendedLanes, - pingedLanes = root$201.pingedLanes; + var suspendedLanes = root$208.suspendedLanes, + pingedLanes = root$208.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12836,20 +13081,20 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$201, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$208, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$201, - root$201 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$201.cancelPendingCommit || - -1 !== root$201.timeoutHandle + root$208, + root$208 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$208.cancelPendingCommit || + -1 !== root$208.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$201, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$208, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$201, JSCompiler_inline_result)); - root$201 = root$201.next; + performSyncWorkOnRoot(root$208, JSCompiler_inline_result)); + root$208 = root$208.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -13129,20 +13374,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1648 = 0; - i$jscomp$inline_1648 < simpleEventPluginEvents.length; - i$jscomp$inline_1648++ + var i$jscomp$inline_1686 = 0; + i$jscomp$inline_1686 < simpleEventPluginEvents.length; + i$jscomp$inline_1686++ ) { - var eventName$jscomp$inline_1649 = - simpleEventPluginEvents[i$jscomp$inline_1648], - domEventName$jscomp$inline_1650 = - eventName$jscomp$inline_1649.toLowerCase(), - capitalizedEvent$jscomp$inline_1651 = - eventName$jscomp$inline_1649[0].toUpperCase() + - eventName$jscomp$inline_1649.slice(1); + var eventName$jscomp$inline_1687 = + simpleEventPluginEvents[i$jscomp$inline_1686], + domEventName$jscomp$inline_1688 = + eventName$jscomp$inline_1687.toLowerCase(), + capitalizedEvent$jscomp$inline_1689 = + eventName$jscomp$inline_1687[0].toUpperCase() + + eventName$jscomp$inline_1687.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1650, - "on" + capitalizedEvent$jscomp$inline_1651 + domEventName$jscomp$inline_1688, + "on" + capitalizedEvent$jscomp$inline_1689 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14385,34 +14630,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$215 = props[hasSrc]; - if (null != propValue$215) + var propValue$222 = props[hasSrc]; + if (null != propValue$222) switch (hasSrc) { case "name": - hasSrcSet = propValue$215; + hasSrcSet = propValue$222; break; case "type": - propValue = propValue$215; + propValue = propValue$222; break; case "checked": - checked = propValue$215; + checked = propValue$222; break; case "defaultChecked": - defaultChecked = propValue$215; + defaultChecked = propValue$222; break; case "value": - propKey = propValue$215; + propKey = propValue$222; break; case "defaultValue": - defaultValue = propValue$215; + defaultValue = propValue$222; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$215) + if (null != propValue$222) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$215, props, null); + setProp(domElement, tag, hasSrc, propValue$222, props, null); } } initInput( @@ -14551,14 +14796,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$215 in props) - props.hasOwnProperty(propValue$215) && - ((hasSrc = props[propValue$215]), + for (propValue$222 in props) + props.hasOwnProperty(propValue$222) && + ((hasSrc = props[propValue$222]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$215, + propValue$222, hasSrc, props, void 0 @@ -14606,14 +14851,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$232 in nextProps) { - var propKey = nextProps[propKey$232]; - lastProp = lastProps[propKey$232]; + for (var propKey$239 in nextProps) { + var propKey = nextProps[propKey$239]; + lastProp = lastProps[propKey$239]; if ( - nextProps.hasOwnProperty(propKey$232) && + nextProps.hasOwnProperty(propKey$239) && (null != propKey || null != lastProp) ) - switch (propKey$232) { + switch (propKey$239) { case "type": type = propKey; break; @@ -14642,7 +14887,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$232, + propKey$239, propKey, nextProps, lastProp @@ -14661,7 +14906,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$232 = null; + propKey = value = defaultValue = propKey$239 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14692,7 +14937,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$232 = type; + propKey$239 = type; break; case "defaultValue": defaultValue = type; @@ -14713,15 +14958,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$232 - ? updateOptions(domElement, !!lastProps, propKey$232, !1) + null != propKey$239 + ? updateOptions(domElement, !!lastProps, propKey$239, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$232 = null; + propKey = propKey$239 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14745,7 +14990,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$232 = name; + propKey$239 = name; break; case "defaultValue": propKey = name; @@ -14759,17 +15004,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$232, propKey); + updateTextarea(domElement, propKey$239, propKey); return; case "option": - for (var propKey$248 in lastProps) + for (var propKey$255 in lastProps) if ( - ((propKey$232 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$248)) + ((propKey$239 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + null != propKey$239 && + !nextProps.hasOwnProperty(propKey$255)) ) - switch (propKey$248) { + switch (propKey$255) { case "selected": domElement.selected = !1; break; @@ -14777,33 +15022,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$248, + propKey$255, null, nextProps, - propKey$232 + propKey$239 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$232 = nextProps[lastDefaultValue]), + ((propKey$239 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$239 !== propKey && + (null != propKey$239 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$232 && - "function" !== typeof propKey$232 && - "symbol" !== typeof propKey$232; + propKey$239 && + "function" !== typeof propKey$239 && + "symbol" !== typeof propKey$239; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$232, + propKey$239, nextProps, propKey ); @@ -14824,24 +15069,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$253 in lastProps) - (propKey$232 = lastProps[propKey$253]), - lastProps.hasOwnProperty(propKey$253) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$253) && - setProp(domElement, tag, propKey$253, null, nextProps, propKey$232); + for (var propKey$260 in lastProps) + (propKey$239 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + null != propKey$239 && + !nextProps.hasOwnProperty(propKey$260) && + setProp(domElement, tag, propKey$260, null, nextProps, propKey$239); for (checked in nextProps) if ( - ((propKey$232 = nextProps[checked]), + ((propKey$239 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$239 !== propKey && + (null != propKey$239 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$232) + if (null != propKey$239) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14849,7 +15094,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$232, + propKey$239, nextProps, propKey ); @@ -14857,49 +15102,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$258 in lastProps) - (propKey$232 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - void 0 !== propKey$232 && - !nextProps.hasOwnProperty(propKey$258) && + for (var propKey$265 in lastProps) + (propKey$239 = lastProps[propKey$265]), + lastProps.hasOwnProperty(propKey$265) && + void 0 !== propKey$239 && + !nextProps.hasOwnProperty(propKey$265) && setPropOnCustomElement( domElement, tag, - propKey$258, + propKey$265, void 0, nextProps, - propKey$232 + propKey$239 ); for (defaultChecked in nextProps) - (propKey$232 = nextProps[defaultChecked]), + (propKey$239 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$232 === propKey || - (void 0 === propKey$232 && void 0 === propKey) || + propKey$239 === propKey || + (void 0 === propKey$239 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$232, + propKey$239, nextProps, propKey ); return; } } - for (var propKey$263 in lastProps) - (propKey$232 = lastProps[propKey$263]), - lastProps.hasOwnProperty(propKey$263) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$263) && - setProp(domElement, tag, propKey$263, null, nextProps, propKey$232); + for (var propKey$270 in lastProps) + (propKey$239 = lastProps[propKey$270]), + lastProps.hasOwnProperty(propKey$270) && + null != propKey$239 && + !nextProps.hasOwnProperty(propKey$270) && + setProp(domElement, tag, propKey$270, null, nextProps, propKey$239); for (lastProp in nextProps) - (propKey$232 = nextProps[lastProp]), + (propKey$239 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$232 === propKey || - (null == propKey$232 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$232, nextProps, propKey); + propKey$239 === propKey || + (null == propKey$239 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$239, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15544,26 +15789,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$274 = getResourcesFromRoot( + var styles$281 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$275 = styles$274.get(type); - resource$275 || + resource$282 = styles$281.get(type); + resource$282 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$275 = { + (resource$282 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$274.set(type, resource$275), - (styles$274 = JSCompiler_inline_result.querySelector( + styles$281.set(type, resource$282), + (styles$281 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$274._p && - ((resource$275.instance = styles$274), - (resource$275.state.loading = 5)), + !styles$281._p && + ((resource$282.instance = styles$281), + (resource$282.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15576,16 +15821,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$274 || + styles$281 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$275.state + resource$282.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$275; + return resource$282; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15682,37 +15927,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$280 = hoistableRoot.querySelector( + var instance$287 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$280) + if (instance$287) return ( (resource.state.loading |= 4), - (resource.instance = instance$280), - markNodeAsHoistable(instance$280), - instance$280 + (resource.instance = instance$287), + markNodeAsHoistable(instance$287), + instance$287 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$280 = ( + instance$287 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$280); - var linkInstance = instance$280; + markNodeAsHoistable(instance$287); + var linkInstance = instance$287; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$280, "link", instance); + setInitialProperties(instance$287, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$280, props.precedence, hoistableRoot); - return (resource.instance = instance$280); + insertStylesheet(instance$287, props.precedence, hoistableRoot); + return (resource.instance = instance$287); case "script": - instance$280 = getScriptKey(props.src); + instance$287 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$280) + getScriptSelectorFromKey(instance$287) )) ) return ( @@ -15721,7 +15966,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$280))) + if ((styleProps = preloadPropsMap.get(instance$287))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16171,12 +16416,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -16267,6 +16521,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -16313,8 +16568,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -16574,19 +16832,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -16780,16 +17041,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1904 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1941 = React.version; if ( - "19.2.0-native-fb-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_1904 + "19.2.0-native-fb-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_1941 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1904, - "19.2.0-native-fb-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_1941, + "19.2.0-native-fb-3ef31d19-20250422" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16809,17 +17070,17 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1911 = { +var internals$jscomp$inline_1948 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422", + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$297 = 0; - 31 > index$297; - index$297++ + var map = new Map(), lane = 1, index$304 = 0; + 31 > index$304; + index$304++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16832,16 +17093,16 @@ var internals$jscomp$inline_1911 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2337 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2384 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2337.isDisabled && - hook$jscomp$inline_2337.supportsFiber + !hook$jscomp$inline_2384.isDisabled && + hook$jscomp$inline_2384.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2337.inject( - internals$jscomp$inline_1911 + (rendererID = hook$jscomp$inline_2384.inject( + internals$jscomp$inline_1948 )), - (injectedHook = hook$jscomp$inline_2337); + (injectedHook = hook$jscomp$inline_2384); } catch (err) {} } exports.createRoot = function (container, options) { @@ -16933,4 +17194,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js index 10066b529a..fa51c4cdb1 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<81f4dc56d9464f5c802f96b3dca83f26>> + * @generated SignedSource<> */ /* @@ -144,6 +144,16 @@ __DEV__ && } return null; } + function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; + } function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); @@ -1253,6 +1263,16 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) + ? 1 + : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -4460,6 +4480,11 @@ __DEV__ && content.lanes = lanes; return content; } + function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, NoMode); + fiber.stateNode = dehydratedNode; + return fiber; + } function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -4531,6 +4556,21 @@ __DEV__ && (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } + function getSuspendedTreeContext() { + warnIfNotHydrating(); + return null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null; + } + function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + warnIfNotHydrating(); + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; + } function warnIfNotHydrating() { isHydrating || console.error( @@ -4578,6 +4618,12 @@ __DEV__ && siblings.push(distanceFromLeaf); return distanceFromLeaf; } + function warnIfHydrating() { + isHydrating && + console.error( + "We should not be hydrating here. This is a bug in React. Please file a bug." + ); + } function warnNonHydratedInstance(fiber, rejectedCandidate) { didSuspendOrErrorDEV || ((fiber = buildHydrationDiffNode(fiber, 0)), @@ -4701,6 +4747,7 @@ __DEV__ && for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -4708,8 +4755,6 @@ __DEV__ && case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -4751,20 +4796,26 @@ __DEV__ && ); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) + throw Error( + "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." + ); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -6660,6 +6711,11 @@ __DEV__ && ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -9022,6 +9078,7 @@ __DEV__ && currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & ConcurrentMode && @@ -9376,31 +9433,31 @@ __DEV__ && if ((workInProgress.mode & ConcurrentMode) === NoMode) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), null !== current && pushTransition(workInProgress, null), - reuseHiddenContextOnStack(workInProgress); - else { - if (0 === (renderLanes & 536870912) || isHydrating) - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, + reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(workInProgress), + pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(workInProgress); - } - pushOffscreenSuspenseHandler(workInProgress); + null !== prevState + ? prevState.baseLanes | renderLanes + : renderLanes, + renderLanes + ) + ); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -9438,6 +9495,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -9915,23 +10008,24 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2448; - var JSCompiler_object_inline_stack_2449 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2498; + var JSCompiler_object_inline_stack_2499 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var showFallback = !1, - didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2448 = didSuspend) || - (JSCompiler_object_inline_digest_2448 = + var JSCompiler_object_inline_message_2497 = !1; + var didSuspend = 0 !== (workInProgress.flags & 128); + (JSCompiler_object_inline_digest_2498 = didSuspend) || + (JSCompiler_object_inline_digest_2498 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2448 && - ((showFallback = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2448 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2498 && + ((JSCompiler_object_inline_message_2497 = !0), + (workInProgress.flags &= -129)); + JSCompiler_object_inline_digest_2498 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - showFallback + JSCompiler_object_inline_message_2497 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); (renderLanes = nextHydratableInstance) @@ -9944,25 +10038,18 @@ __DEV__ && ? current : null), null !== current && - (warnIfNotHydrating(), - (workInProgress.memoizedState = { + ((JSCompiler_object_inline_digest_2498 = { dehydrated: current, - treeContext: - null !== treeContextProvider - ? { id: treeContextId, overflow: treeContextOverflow } - : null, + treeContext: getSuspendedTreeContext(), retryLane: 536870912, hydrationErrors: null }), - (JSCompiler_object_inline_digest_2448 = createFiber( - 18, - null, - null, - NoMode - )), - (JSCompiler_object_inline_digest_2448.stateNode = current), - (JSCompiler_object_inline_digest_2448.return = workInProgress), - (workInProgress.child = JSCompiler_object_inline_digest_2448), + (workInProgress.memoizedState = + JSCompiler_object_inline_digest_2498), + (JSCompiler_object_inline_digest_2498 = + createFiberFromDehydratedFragment(current)), + (JSCompiler_object_inline_digest_2498.return = workInProgress), + (workInProgress.child = JSCompiler_object_inline_digest_2498), (hydrationParentFiber = workInProgress), (nextHydratableInstance = null))) : (current = null); @@ -9976,337 +10063,299 @@ __DEV__ && : (workInProgress.lanes = 536870912); return null; } - var JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.children; - var nextFallbackChildren = JSCompiler_object_inline_stack_2449.fallback; - if (showFallback) + var nextPrimaryChildren = JSCompiler_object_inline_stack_2499.children, + nextFallbackChildren = JSCompiler_object_inline_stack_2499.fallback; + if (JSCompiler_object_inline_message_2497) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2449 = + (JSCompiler_object_inline_stack_2499 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2450, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2450 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2450.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2450.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2448, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2498, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2499 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2449.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2499.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2449 = + (JSCompiler_object_inline_stack_2499 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_componentStack_2450, + nextPrimaryChildren, nextFallbackChildren, renderLanes )), - (JSCompiler_object_inline_componentStack_2450 = - workInProgress.child), - (JSCompiler_object_inline_componentStack_2450.memoizedState = + (nextPrimaryChildren = workInProgress.child), + (nextPrimaryChildren.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2450.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2448, - renderLanes - )), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2498, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2499 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_componentStack_2450 + nextPrimaryChildren ); } - var JSCompiler_object_inline_message_2447 = current.memoizedState; - if ( - null !== JSCompiler_object_inline_message_2447 && - ((JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_message_2447.dehydrated), - null !== JSCompiler_object_inline_componentStack_2450) - ) { - if (didSuspend) - workInProgress.flags & 256 - ? (pushPrimaryTreeSuspenseHandler(workInProgress), - (workInProgress.flags &= -257), - (workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ))) - : null !== workInProgress.memoizedState - ? (reuseSuspenseHandlerOnStack(workInProgress), - (workInProgress.child = current.child), - (workInProgress.flags |= 128), - (workInProgress = null)) - : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.fallback), - (nextFallbackChildren = workInProgress.mode), - (JSCompiler_object_inline_stack_2449 = - mountWorkInProgressOffscreenFiber( - { - mode: "visible", - children: JSCompiler_object_inline_stack_2449.children - }, - nextFallbackChildren - )), - (JSCompiler_object_inline_componentStack_2450 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2450, + var prevState = current.memoizedState; + if (null !== prevState) { + var JSCompiler_object_inline_componentStack_2500 = prevState.dehydrated; + if (null !== JSCompiler_object_inline_componentStack_2500) { + if (didSuspend) + workInProgress.flags & 256 + ? (pushPrimaryTreeSuspenseHandler(workInProgress), + (workInProgress.flags &= -257), + (workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ))) + : null !== workInProgress.memoizedState + ? (reuseSuspenseHandlerOnStack(workInProgress), + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null)) + : (reuseSuspenseHandlerOnStack(workInProgress), + (nextPrimaryChildren = + JSCompiler_object_inline_stack_2499.fallback), + (nextFallbackChildren = workInProgress.mode), + (JSCompiler_object_inline_stack_2499 = + mountWorkInProgressOffscreenFiber( + { + mode: "visible", + children: JSCompiler_object_inline_stack_2499.children + }, + nextFallbackChildren + )), + (nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, nextFallbackChildren, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2450.flags |= 2), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (JSCompiler_object_inline_componentStack_2450.return = - workInProgress), - (JSCompiler_object_inline_stack_2449.sibling = - JSCompiler_object_inline_componentStack_2450), - (workInProgress.child = JSCompiler_object_inline_stack_2449), - (workInProgress.mode & ConcurrentMode) !== NoMode && - reconcileChildFibers( - workInProgress, - current.child, - null, - renderLanes - ), - (JSCompiler_object_inline_stack_2449 = workInProgress.child), - (JSCompiler_object_inline_stack_2449.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2449.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2448, - renderLanes - )), - (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = - JSCompiler_object_inline_componentStack_2450)); - else if ( - (pushPrimaryTreeSuspenseHandler(workInProgress), - isHydrating && - console.error( - "We should not be hydrating here. This is a bug in React. Please file a bug." - ), - isSuspenseInstanceFallback( - JSCompiler_object_inline_componentStack_2450 - )) - ) { - JSCompiler_object_inline_digest_2448 = - JSCompiler_object_inline_componentStack_2450.nextSibling && - JSCompiler_object_inline_componentStack_2450.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2448) { - nextFallbackChildren = JSCompiler_object_inline_digest_2448.dgst; - var message = JSCompiler_object_inline_digest_2448.msg; - var componentStack = JSCompiler_object_inline_digest_2448.stck; - var componentStack$jscomp$0 = - JSCompiler_object_inline_digest_2448.cstck; - } - JSCompiler_object_inline_message_2447 = message; - JSCompiler_object_inline_digest_2448 = nextFallbackChildren; - JSCompiler_object_inline_stack_2449 = componentStack; - JSCompiler_object_inline_componentStack_2450 = - componentStack$jscomp$0; - nextFallbackChildren = JSCompiler_object_inline_message_2447; - componentStack = JSCompiler_object_inline_componentStack_2450; - JSCompiler_object_inline_componentStack_2450 = nextFallbackChildren - ? Error(nextFallbackChildren) - : Error( - "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + (nextPrimaryChildren.flags |= 2), + (JSCompiler_object_inline_stack_2499.return = workInProgress), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2499.sibling = + nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2499), + (workInProgress.mode & ConcurrentMode) !== NoMode && + reconcileChildFibers( + workInProgress, + current.child, + null, + renderLanes + ), + (JSCompiler_object_inline_stack_2499 = workInProgress.child), + (JSCompiler_object_inline_stack_2499.memoizedState = + mountSuspenseOffscreenState(renderLanes)), + (JSCompiler_object_inline_stack_2499.childLanes = + getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2498, + renderLanes + )), + (workInProgress.memoizedState = SUSPENDED_MARKER), + (workInProgress = nextPrimaryChildren)); + else if ( + (pushPrimaryTreeSuspenseHandler(workInProgress), + warnIfHydrating(), + isSuspenseInstanceFallback( + JSCompiler_object_inline_componentStack_2500 + )) + ) { + JSCompiler_object_inline_digest_2498 = + JSCompiler_object_inline_componentStack_2500.nextSibling && + JSCompiler_object_inline_componentStack_2500.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2498) { + nextPrimaryChildren = JSCompiler_object_inline_digest_2498.dgst; + var message = JSCompiler_object_inline_digest_2498.msg; + nextFallbackChildren = JSCompiler_object_inline_digest_2498.stck; + var componentStack = JSCompiler_object_inline_digest_2498.cstck; + } + JSCompiler_object_inline_message_2497 = message; + JSCompiler_object_inline_digest_2498 = nextPrimaryChildren; + JSCompiler_object_inline_stack_2499 = nextFallbackChildren; + JSCompiler_object_inline_componentStack_2500 = componentStack; + nextPrimaryChildren = JSCompiler_object_inline_message_2497; + nextFallbackChildren = JSCompiler_object_inline_componentStack_2500; + nextPrimaryChildren = nextPrimaryChildren + ? Error(nextPrimaryChildren) + : Error( + "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." + ); + nextPrimaryChildren.stack = + JSCompiler_object_inline_stack_2499 || ""; + nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2498; + JSCompiler_object_inline_digest_2498 = + void 0 === nextFallbackChildren ? null : nextFallbackChildren; + JSCompiler_object_inline_stack_2499 = { + value: nextPrimaryChildren, + source: null, + stack: JSCompiler_object_inline_digest_2498 + }; + "string" === typeof JSCompiler_object_inline_digest_2498 && + CapturedStacks.set( + nextPrimaryChildren, + JSCompiler_object_inline_stack_2499 ); - JSCompiler_object_inline_componentStack_2450.stack = - JSCompiler_object_inline_stack_2449 || ""; - JSCompiler_object_inline_componentStack_2450.digest = - JSCompiler_object_inline_digest_2448; - JSCompiler_object_inline_digest_2448 = - void 0 === componentStack ? null : componentStack; - JSCompiler_object_inline_stack_2449 = { - value: JSCompiler_object_inline_componentStack_2450, - source: null, - stack: JSCompiler_object_inline_digest_2448 - }; - "string" === typeof JSCompiler_object_inline_digest_2448 && - CapturedStacks.set( - JSCompiler_object_inline_componentStack_2450, - JSCompiler_object_inline_stack_2449 - ); - queueHydrationError(JSCompiler_object_inline_stack_2449); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else if ( - (didReceiveUpdate || - propagateParentContextChanges( + queueHydrationError(JSCompiler_object_inline_stack_2499); + workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, - renderLanes, - !1 - ), - (JSCompiler_object_inline_digest_2448 = - 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2448) - ) { - JSCompiler_object_inline_digest_2448 = workInProgressRoot; - if ( - null !== JSCompiler_object_inline_digest_2448 && - ((JSCompiler_object_inline_stack_2449 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2449 = - 0 !== (JSCompiler_object_inline_stack_2449 & 42) - ? 1 - : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2449 - )), - (JSCompiler_object_inline_stack_2449 = - 0 !== - (JSCompiler_object_inline_stack_2449 & - (JSCompiler_object_inline_digest_2448.suspendedLanes | - renderLanes)) - ? 0 - : JSCompiler_object_inline_stack_2449), - 0 !== JSCompiler_object_inline_stack_2449 && - JSCompiler_object_inline_stack_2449 !== - JSCompiler_object_inline_message_2447.retryLane) - ) - throw ( - ((JSCompiler_object_inline_message_2447.retryLane = - JSCompiler_object_inline_stack_2449), - enqueueConcurrentRenderForLane( - current, - JSCompiler_object_inline_stack_2449 - ), - scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2448, - current, - JSCompiler_object_inline_stack_2449 - ), - SelectiveHydrationException) + renderLanes ); - JSCompiler_object_inline_componentStack_2450.data === - SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); - workInProgress = retrySuspenseComponentWithoutHydrating( - current, - workInProgress, - renderLanes - ); - } else - JSCompiler_object_inline_componentStack_2450.data === - SUSPENSE_PENDING_START_DATA - ? ((workInProgress.flags |= 192), - (workInProgress.child = current.child), - (workInProgress = null)) - : ((renderLanes = - JSCompiler_object_inline_message_2447.treeContext), - (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_componentStack_2450.nextSibling - )), - (hydrationParentFiber = workInProgress), - (isHydrating = !0), - (hydrationErrors = null), - (didSuspendOrErrorDEV = !1), - (hydrationDiffRootDEV = null), - (rootOrSingletonContext = !1), - null !== renderLanes && - (warnIfNotHydrating(), - (idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), - (treeContextProvider = workInProgress)), - (workInProgress = mountSuspensePrimaryChildren( + } else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, workInProgress, - JSCompiler_object_inline_stack_2449.children + renderLanes, + !1 + ), + (JSCompiler_object_inline_digest_2498 = + 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || JSCompiler_object_inline_digest_2498) + ) { + JSCompiler_object_inline_digest_2498 = workInProgressRoot; + if ( + null !== JSCompiler_object_inline_digest_2498 && + ((JSCompiler_object_inline_stack_2499 = getBumpedLaneForHydration( + JSCompiler_object_inline_digest_2498, + renderLanes )), - (workInProgress.flags |= 4096)); - return workInProgress; + 0 !== JSCompiler_object_inline_stack_2499 && + JSCompiler_object_inline_stack_2499 !== prevState.retryLane) + ) + throw ( + ((prevState.retryLane = JSCompiler_object_inline_stack_2499), + enqueueConcurrentRenderForLane( + current, + JSCompiler_object_inline_stack_2499 + ), + scheduleUpdateOnFiber( + JSCompiler_object_inline_digest_2498, + current, + JSCompiler_object_inline_stack_2499 + ), + SelectiveHydrationException) + ); + JSCompiler_object_inline_componentStack_2500.data === + SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); + workInProgress = retrySuspenseComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + JSCompiler_object_inline_componentStack_2500.data === + SUSPENSE_PENDING_START_DATA + ? ((workInProgress.flags |= 192), + (workInProgress.child = current.child), + (workInProgress = null)) + : ((renderLanes = prevState.treeContext), + (nextHydratableInstance = getNextHydratable( + JSCompiler_object_inline_componentStack_2500.nextSibling + )), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (didSuspendOrErrorDEV = !1), + (hydrationDiffRootDEV = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountSuspensePrimaryChildren( + workInProgress, + JSCompiler_object_inline_stack_2499.children + )), + (workInProgress.flags |= 4096)); + return workInProgress; + } } - if (showFallback) + if (JSCompiler_object_inline_message_2497) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2450 = - JSCompiler_object_inline_stack_2449.fallback), + (nextPrimaryChildren = JSCompiler_object_inline_stack_2499.fallback), (nextFallbackChildren = workInProgress.mode), (componentStack = current.child), - (componentStack$jscomp$0 = componentStack.sibling), - (JSCompiler_object_inline_message_2447 = { + (JSCompiler_object_inline_componentStack_2500 = + componentStack.sibling), + (JSCompiler_object_inline_message_2497 = { mode: "hidden", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2499.children }), (nextFallbackChildren & ConcurrentMode) === NoMode && workInProgress.child !== componentStack - ? ((JSCompiler_object_inline_stack_2449 = workInProgress.child), - (JSCompiler_object_inline_stack_2449.childLanes = 0), - (JSCompiler_object_inline_stack_2449.pendingProps = - JSCompiler_object_inline_message_2447), + ? ((JSCompiler_object_inline_stack_2499 = workInProgress.child), + (JSCompiler_object_inline_stack_2499.childLanes = 0), + (JSCompiler_object_inline_stack_2499.pendingProps = + JSCompiler_object_inline_message_2497), workInProgress.mode & ProfileMode && - ((JSCompiler_object_inline_stack_2449.actualDuration = -0), - (JSCompiler_object_inline_stack_2449.actualStartTime = -1.1), - (JSCompiler_object_inline_stack_2449.selfBaseDuration = + ((JSCompiler_object_inline_stack_2499.actualDuration = -0), + (JSCompiler_object_inline_stack_2499.actualStartTime = -1.1), + (JSCompiler_object_inline_stack_2499.selfBaseDuration = componentStack.selfBaseDuration), - (JSCompiler_object_inline_stack_2449.treeBaseDuration = + (JSCompiler_object_inline_stack_2499.treeBaseDuration = componentStack.treeBaseDuration)), (workInProgress.deletions = null)) - : ((JSCompiler_object_inline_stack_2449 = createWorkInProgress( + : ((JSCompiler_object_inline_stack_2499 = createWorkInProgress( componentStack, - JSCompiler_object_inline_message_2447 + JSCompiler_object_inline_message_2497 )), - (JSCompiler_object_inline_stack_2449.subtreeFlags = + (JSCompiler_object_inline_stack_2499.subtreeFlags = componentStack.subtreeFlags & 65011712)), - null !== componentStack$jscomp$0 - ? (JSCompiler_object_inline_componentStack_2450 = - createWorkInProgress( - componentStack$jscomp$0, - JSCompiler_object_inline_componentStack_2450 - )) - : ((JSCompiler_object_inline_componentStack_2450 = - createFiberFromFragment( - JSCompiler_object_inline_componentStack_2450, - nextFallbackChildren, - renderLanes, - null - )), - (JSCompiler_object_inline_componentStack_2450.flags |= 2)), - (JSCompiler_object_inline_componentStack_2450.return = - workInProgress), - (JSCompiler_object_inline_stack_2449.return = workInProgress), - (JSCompiler_object_inline_stack_2449.sibling = - JSCompiler_object_inline_componentStack_2450), - (workInProgress.child = JSCompiler_object_inline_stack_2449), - (JSCompiler_object_inline_stack_2449 = - JSCompiler_object_inline_componentStack_2450), - (JSCompiler_object_inline_componentStack_2450 = workInProgress.child), + null !== JSCompiler_object_inline_componentStack_2500 + ? (nextPrimaryChildren = createWorkInProgress( + JSCompiler_object_inline_componentStack_2500, + nextPrimaryChildren + )) + : ((nextPrimaryChildren = createFiberFromFragment( + nextPrimaryChildren, + nextFallbackChildren, + renderLanes, + null + )), + (nextPrimaryChildren.flags |= 2)), + (nextPrimaryChildren.return = workInProgress), + (JSCompiler_object_inline_stack_2499.return = workInProgress), + (JSCompiler_object_inline_stack_2499.sibling = nextPrimaryChildren), + (workInProgress.child = JSCompiler_object_inline_stack_2499), + (JSCompiler_object_inline_stack_2499 = nextPrimaryChildren), + (nextPrimaryChildren = workInProgress.child), (nextFallbackChildren = current.child.memoizedState), null === nextFallbackChildren ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) : ((componentStack = nextFallbackChildren.cachePool), null !== componentStack - ? ((componentStack$jscomp$0 = CacheContext._currentValue), + ? ((JSCompiler_object_inline_componentStack_2500 = + CacheContext._currentValue), (componentStack = - componentStack.parent !== componentStack$jscomp$0 + componentStack.parent !== + JSCompiler_object_inline_componentStack_2500 ? { - parent: componentStack$jscomp$0, - pool: componentStack$jscomp$0 + parent: JSCompiler_object_inline_componentStack_2500, + pool: JSCompiler_object_inline_componentStack_2500 } : componentStack)) : (componentStack = getSuspendedCache()), @@ -10314,40 +10363,38 @@ __DEV__ && baseLanes: nextFallbackChildren.baseLanes | renderLanes, cachePool: componentStack })), - (JSCompiler_object_inline_componentStack_2450.memoizedState = - nextFallbackChildren), - (JSCompiler_object_inline_componentStack_2450.childLanes = - getRemainingWorkInPrimaryTree( - current, - JSCompiler_object_inline_digest_2448, - renderLanes - )), + (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + current, + JSCompiler_object_inline_digest_2498, + renderLanes + )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2449 + JSCompiler_object_inline_stack_2499 ); pushPrimaryTreeSuspenseHandler(workInProgress); - JSCompiler_object_inline_digest_2448 = current.child; - current = JSCompiler_object_inline_digest_2448.sibling; - JSCompiler_object_inline_digest_2448 = createWorkInProgress( - JSCompiler_object_inline_digest_2448, + JSCompiler_object_inline_digest_2498 = current.child; + current = JSCompiler_object_inline_digest_2498.sibling; + JSCompiler_object_inline_digest_2498 = createWorkInProgress( + JSCompiler_object_inline_digest_2498, { mode: "visible", - children: JSCompiler_object_inline_stack_2449.children + children: JSCompiler_object_inline_stack_2499.children } ); (workInProgress.mode & ConcurrentMode) === NoMode && - (JSCompiler_object_inline_digest_2448.lanes = renderLanes); - JSCompiler_object_inline_digest_2448.return = workInProgress; - JSCompiler_object_inline_digest_2448.sibling = null; + (JSCompiler_object_inline_digest_2498.lanes = renderLanes); + JSCompiler_object_inline_digest_2498.return = workInProgress; + JSCompiler_object_inline_digest_2498.sibling = null; null !== current && ((renderLanes = workInProgress.deletions), null === renderLanes ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) : renderLanes.push(current)); - workInProgress.child = JSCompiler_object_inline_digest_2448; + workInProgress.child = JSCompiler_object_inline_digest_2498; workInProgress.memoizedState = null; - return JSCompiler_object_inline_digest_2448; + return JSCompiler_object_inline_digest_2498; } function mountSuspensePrimaryChildren(workInProgress, primaryChildren) { primaryChildren = mountWorkInProgressOffscreenFiber( @@ -10727,6 +10774,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -10805,7 +10860,7 @@ __DEV__ && } function beginWork(current, workInProgress, renderLanes) { if (workInProgress._debugNeedsRemount && null !== current) { - renderLanes = createFiberFromTypeAndProps( + var copiedFiber = createFiberFromTypeAndProps( workInProgress.type, workInProgress.key, workInProgress.pendingProps, @@ -10813,19 +10868,19 @@ __DEV__ && workInProgress.mode, workInProgress.lanes ); - renderLanes._debugStack = workInProgress._debugStack; - renderLanes._debugTask = workInProgress._debugTask; + copiedFiber._debugStack = workInProgress._debugStack; + copiedFiber._debugTask = workInProgress._debugTask; var returnFiber = workInProgress.return; if (null === returnFiber) throw Error("Cannot swap the root fiber."); current.alternate = null; workInProgress.alternate = null; - renderLanes.index = workInProgress.index; - renderLanes.sibling = workInProgress.sibling; - renderLanes.return = workInProgress.return; - renderLanes.ref = workInProgress.ref; - renderLanes._debugInfo = workInProgress._debugInfo; + copiedFiber.index = workInProgress.index; + copiedFiber.sibling = workInProgress.sibling; + copiedFiber.return = workInProgress.return; + copiedFiber.ref = workInProgress.ref; + copiedFiber._debugInfo = workInProgress._debugInfo; if (workInProgress === returnFiber.child) - returnFiber.child = renderLanes; + returnFiber.child = copiedFiber; else { var prevSibling = returnFiber.child; if (null === prevSibling) @@ -10833,14 +10888,14 @@ __DEV__ && for (; prevSibling.sibling !== workInProgress; ) if (((prevSibling = prevSibling.sibling), null === prevSibling)) throw Error("Expected to find the previous sibling."); - prevSibling.sibling = renderLanes; + prevSibling.sibling = copiedFiber; } - workInProgress = returnFiber.deletions; - null === workInProgress + var deletions = returnFiber.deletions; + null === deletions ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16)) - : workInProgress.push(current); - renderLanes.flags |= 2; - return renderLanes; + : deletions.push(current); + copiedFiber.flags |= 2; + return copiedFiber; } if (null !== current) if ( @@ -10866,94 +10921,97 @@ __DEV__ && } else { didReceiveUpdate = !1; - if ((returnFiber = isHydrating)) + var JSCompiler_temp; + if ((JSCompiler_temp = isHydrating)) warnIfNotHydrating(), - (returnFiber = 0 !== (workInProgress.flags & 1048576)); - returnFiber && - ((returnFiber = workInProgress.index), - warnIfNotHydrating(), - pushTreeId(workInProgress, treeForkCount, returnFiber)); + (JSCompiler_temp = 0 !== (workInProgress.flags & 1048576)); + if (JSCompiler_temp) { + var slotIndex = workInProgress.index; + warnIfNotHydrating(); + pushTreeId(workInProgress, treeForkCount, slotIndex); + } } workInProgress.lanes = 0; switch (workInProgress.tag) { case 16: - a: if ( - ((prevSibling = workInProgress.elementType), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (returnFiber = workInProgress.pendingProps), - (current = callLazyInitInDEV(prevSibling)), - (workInProgress.type = current), - "function" === typeof current) - ) - shouldConstruct(current) - ? ((returnFiber = resolveClassComponentProps( - current, - returnFiber - )), - (workInProgress.tag = 1), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateClassComponent( + a: { + var elementType = workInProgress.elementType; + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); + var props = workInProgress.pendingProps; + var Component = callLazyInitInDEV(elementType); + workInProgress.type = Component; + if ("function" === typeof Component) + if (shouldConstruct(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props + ); + workInProgress.tag = 1; + workInProgress.type = Component = + resolveFunctionForHotReloading(Component); + var JSCompiler_inline_result = updateClassComponent( null, workInProgress, - current, - returnFiber, - renderLanes - ))) - : ((workInProgress.tag = 0), - validateFunctionComponentInDev(workInProgress, current), - (workInProgress.type = current = - resolveFunctionForHotReloading(current)), - (workInProgress = updateFunctionComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ))); - else { - if (void 0 !== current && null !== current) - if ( - ((prevSibling = current.$$typeof), - prevSibling === REACT_FORWARD_REF_TYPE) - ) { - workInProgress.tag = 11; - workInProgress.type = current = - resolveForwardRefForHotReloading(current); - workInProgress = updateForwardRef( - null, - workInProgress, - current, - returnFiber, + Component, + resolvedProps, renderLanes ); - break a; - } else if (prevSibling === REACT_MEMO_TYPE) { - workInProgress.tag = 14; - workInProgress = updateMemoComponent( - null, - workInProgress, - current, - returnFiber, - renderLanes - ); - break a; + } else + (workInProgress.tag = 0), + validateFunctionComponentInDev(workInProgress, Component), + (workInProgress.type = Component = + resolveFunctionForHotReloading(Component)), + (JSCompiler_inline_result = updateFunctionComponent( + null, + workInProgress, + Component, + props, + renderLanes + )); + else { + if (void 0 !== Component && null !== Component) { + var $$typeof = Component.$$typeof; + if ($$typeof === REACT_FORWARD_REF_TYPE) { + workInProgress.tag = 11; + workInProgress.type = Component = + resolveForwardRefForHotReloading(Component); + JSCompiler_inline_result = updateForwardRef( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } else if ($$typeof === REACT_MEMO_TYPE) { + workInProgress.tag = 14; + JSCompiler_inline_result = updateMemoComponent( + null, + workInProgress, + Component, + props, + renderLanes + ); + break a; + } } - workInProgress = ""; - null !== current && - "object" === typeof current && - current.$$typeof === REACT_LAZY_TYPE && - (workInProgress = - " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; - throw Error( - "Element type is invalid. Received a promise that resolves to: " + - current + - ". Lazy element type must resolve to a class or function." + - workInProgress - ); + var hint = ""; + null !== Component && + "object" === typeof Component && + Component.$$typeof === REACT_LAZY_TYPE && + (hint = + " Did you wrap a component in React.lazy() more than once?"); + var loggedComponent = + getComponentNameFromType(Component) || Component; + throw Error( + "Element type is invalid. Received a promise that resolves to: " + + loggedComponent + + ". Lazy element type must resolve to a class or function." + + hint + ); + } } - return workInProgress; + return JSCompiler_inline_result; case 0: return updateFunctionComponent( current, @@ -10963,19 +11021,17 @@ __DEV__ && renderLanes ); case 1: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component = workInProgress.type, + _resolvedProps4 = resolveClassComponentProps( + _Component, workInProgress.pendingProps - )), - updateClassComponent( - current, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + ); + return updateClassComponent( + current, + workInProgress, + _Component, + _resolvedProps4, + renderLanes ); case 3: a: { @@ -10984,15 +11040,15 @@ __DEV__ && throw Error( "Should have a current fiber. This is a bug in React." ); - returnFiber = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - prevSibling = prevState.element; + var nextProps = workInProgress.pendingProps, + prevState = workInProgress.memoizedState, + prevChildren = prevState.element; cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, returnFiber, null, renderLanes); - var nextState = workInProgress.memoizedState; - returnFiber = nextState.cache; - pushProvider(workInProgress, CacheContext, returnFiber); - returnFiber !== prevState.cache && + processUpdateQueue(workInProgress, nextProps, null, renderLanes); + var nextState = workInProgress.memoizedState, + nextCache = nextState.cache; + pushProvider(workInProgress, CacheContext, nextCache); + nextCache !== prevState.cache && propagateContextChanges( workInProgress, [CacheContext], @@ -11000,296 +11056,303 @@ __DEV__ && !0 ); suspendIfUpdateReadFromEntangledAsyncAction(); - returnFiber = nextState.element; - if (prevState.isDehydrated) - if ( - ((prevState = { - element: returnFiber, - isDehydrated: !1, - cache: nextState.cache - }), - (workInProgress.updateQueue.baseState = prevState), - (workInProgress.memoizedState = prevState), - workInProgress.flags & 256) - ) { - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + var nextChildren = nextState.element; + if (prevState.isDehydrated) { + var overrideState = { + element: nextChildren, + isDehydrated: !1, + cache: nextState.cache + }; + workInProgress.updateQueue.baseState = overrideState; + workInProgress.memoizedState = overrideState; + if (workInProgress.flags & 256) { + var JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; - } else if (returnFiber !== prevSibling) { - prevSibling = createCapturedValueAtFiber( + } else if (nextChildren !== prevChildren) { + var recoverableError = createCapturedValueAtFiber( Error( "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering." ), workInProgress ); - queueHydrationError(prevSibling); - workInProgress = mountHostRootWithoutHydrating( - current, - workInProgress, - returnFiber, - renderLanes - ); + queueHydrationError(recoverableError); + JSCompiler_inline_result$jscomp$0 = + mountHostRootWithoutHydrating( + current, + workInProgress, + nextChildren, + renderLanes + ); break a; } else { - current = workInProgress.stateNode.containerInfo; - switch (current.nodeType) { + var parentContainer = workInProgress.stateNode.containerInfo; + switch (parentContainer.nodeType) { case 9: - current = current.body; + var parentElement = parentContainer.body; break; default: - current = - "HTML" === current.nodeName - ? current.ownerDocument.body - : current; + parentElement = + "HTML" === parentContainer.nodeName + ? parentContainer.ownerDocument.body + : parentContainer; } - nextHydratableInstance = getNextHydratable(current.firstChild); + nextHydratableInstance = getNextHydratable( + parentElement.firstChild + ); hydrationParentFiber = workInProgress; isHydrating = !0; hydrationErrors = null; didSuspendOrErrorDEV = !1; hydrationDiffRootDEV = null; rootOrSingletonContext = !0; - current = mountChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - ); - for (workInProgress.child = current; current; ) - (current.flags = (current.flags & -3) | 4096), - (current = current.sibling); + for ( + var child = mountChildFibers( + workInProgress, + null, + nextChildren, + renderLanes + ), + node = (workInProgress.child = child); + node; + + ) + (node.flags = (node.flags & -3) | 4096), + (node = node.sibling); } - else { + } else { resetHydrationState(); - if (returnFiber === prevSibling) { - workInProgress = bailoutOnAlreadyFinishedWork( - current, - workInProgress, - renderLanes - ); + if (nextChildren === prevChildren) { + JSCompiler_inline_result$jscomp$0 = + bailoutOnAlreadyFinishedWork( + current, + workInProgress, + renderLanes + ); break a; } reconcileChildren( current, workInProgress, - returnFiber, + nextChildren, renderLanes ); } - workInProgress = workInProgress.child; + JSCompiler_inline_result$jscomp$0 = workInProgress.child; } - return workInProgress; + return JSCompiler_inline_result$jscomp$0; case 26: - return ( - markRef(current, workInProgress), - null === current - ? (current = getResource( - workInProgress.type, - null, - workInProgress.pendingProps, - null - )) - ? (workInProgress.memoizedState = current) - : isHydrating || - ((current = workInProgress.type), - (renderLanes = workInProgress.pendingProps), - (returnFiber = requiredContext( - rootInstanceStackCursor.current - )), - (returnFiber = - getOwnerDocumentFromRootContainer( - returnFiber - ).createElement(current)), - (returnFiber[internalInstanceKey] = workInProgress), - (returnFiber[internalPropsKey] = renderLanes), - setInitialProperties(returnFiber, current, renderLanes), - markNodeAsHoistable(returnFiber), - (workInProgress.stateNode = returnFiber)) - : (workInProgress.memoizedState = getResource( - workInProgress.type, - current.memoizedProps, - workInProgress.pendingProps, - current.memoizedState - )), - null - ); + markRef(current, workInProgress); + if (null === current) { + var resource = getResource( + workInProgress.type, + null, + workInProgress.pendingProps, + null + ); + if (resource) workInProgress.memoizedState = resource; + else if (!isHydrating) { + var type = workInProgress.type, + props$jscomp$0 = workInProgress.pendingProps, + rootContainerInstance = requiredContext( + rootInstanceStackCursor.current + ), + domElement = getOwnerDocumentFromRootContainer( + rootContainerInstance + ).createElement(type); + domElement[internalInstanceKey] = workInProgress; + domElement[internalPropsKey] = props$jscomp$0; + setInitialProperties(domElement, type, props$jscomp$0); + markNodeAsHoistable(domElement); + workInProgress.stateNode = domElement; + } + } else + workInProgress.memoizedState = getResource( + workInProgress.type, + current.memoizedProps, + workInProgress.pendingProps, + current.memoizedState + ); + return null; case 27: - return ( - pushHostContext(workInProgress), - null === current && - isHydrating && - ((returnFiber = requiredContext(rootInstanceStackCursor.current)), - (prevSibling = getHostContext()), - (returnFiber = workInProgress.stateNode = - resolveSingletonInstance( - workInProgress.type, - workInProgress.pendingProps, - returnFiber, - prevSibling, - !1 - )), - didSuspendOrErrorDEV || - ((prevSibling = diffHydratedProperties( - returnFiber, - workInProgress.type, - workInProgress.pendingProps, - prevSibling - )), - null !== prevSibling && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevSibling)), - (hydrationParentFiber = workInProgress), - (rootOrSingletonContext = !0), - (prevSibling = nextHydratableInstance), - isSingletonScope(workInProgress.type) - ? ((previousHydratableOnEnteringScopedSingleton = prevSibling), - (nextHydratableInstance = getNextHydratable( - returnFiber.firstChild - ))) - : (nextHydratableInstance = prevSibling)), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - markRef(current, workInProgress), - null === current && (workInProgress.flags |= 4194304), - workInProgress.child - ); - case 5: - return ( - null === current && - isHydrating && - ((prevState = getHostContext()), - (returnFiber = validateDOMNesting( + pushHostContext(workInProgress); + if (null === current && isHydrating) { + var currentRootContainer = requiredContext( + rootInstanceStackCursor.current + ), + currentHostContext = getHostContext(), + instance = (workInProgress.stateNode = resolveSingletonInstance( workInProgress.type, - prevState.ancestorInfo - )), - (prevSibling = nextHydratableInstance), - (nextState = !prevSibling) || - ((nextState = canHydrateInstance( - prevSibling, - workInProgress.type, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== nextState - ? ((workInProgress.stateNode = nextState), - didSuspendOrErrorDEV || - ((prevState = diffHydratedProperties( - nextState, - workInProgress.type, - workInProgress.pendingProps, - prevState - )), - null !== prevState && - (buildHydrationDiffNode(workInProgress, 0).serverProps = - prevState)), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - nextState.firstChild - )), - (rootOrSingletonContext = !1), - (prevState = !0)) - : (prevState = !1), - (nextState = !prevState)), - nextState && - (returnFiber && - warnNonHydratedInstance(workInProgress, prevSibling), - throwOnHydrationMismatch(workInProgress))), - pushHostContext(workInProgress), - (prevSibling = workInProgress.type), - (prevState = workInProgress.pendingProps), - (nextState = null !== current ? current.memoizedProps : null), - (returnFiber = prevState.children), - shouldSetTextContent(prevSibling, prevState) - ? (returnFiber = null) - : null !== nextState && - shouldSetTextContent(prevSibling, nextState) && - (workInProgress.flags |= 32), - null !== workInProgress.memoizedState && - ((prevSibling = renderWithHooks( - current, - workInProgress, - TransitionAwareHostComponent, - null, - null, - renderLanes - )), - (HostTransitionContext._currentValue = prevSibling)), - markRef(current, workInProgress), - reconcileChildren( + workInProgress.pendingProps, + currentRootContainer, + currentHostContext, + !1 + )); + if (!didSuspendOrErrorDEV) { + var differences = diffHydratedProperties( + instance, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext + ); + null !== differences && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences); + } + hydrationParentFiber = workInProgress; + rootOrSingletonContext = !0; + var currentHydratableInstance = nextHydratableInstance; + isSingletonScope(workInProgress.type) + ? ((previousHydratableOnEnteringScopedSingleton = + currentHydratableInstance), + (nextHydratableInstance = getNextHydratable( + instance.firstChild + ))) + : (nextHydratableInstance = currentHydratableInstance); + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ); + markRef(current, workInProgress); + null === current && (workInProgress.flags |= 4194304); + return workInProgress.child; + case 5: + if (null === current && isHydrating) { + var currentHostContext$jscomp$0 = getHostContext(), + shouldKeepWarning = validateDOMNesting( + workInProgress.type, + currentHostContext$jscomp$0.ancestorInfo + ), + nextInstance = nextHydratableInstance, + JSCompiler_temp$jscomp$0; + if (!(JSCompiler_temp$jscomp$0 = !nextInstance)) { + var instance$jscomp$0 = canHydrateInstance( + nextInstance, + workInProgress.type, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== instance$jscomp$0) { + workInProgress.stateNode = instance$jscomp$0; + if (!didSuspendOrErrorDEV) { + var differences$jscomp$0 = diffHydratedProperties( + instance$jscomp$0, + workInProgress.type, + workInProgress.pendingProps, + currentHostContext$jscomp$0 + ); + null !== differences$jscomp$0 && + (buildHydrationDiffNode(workInProgress, 0).serverProps = + differences$jscomp$0); + } + hydrationParentFiber = workInProgress; + nextHydratableInstance = getNextHydratable( + instance$jscomp$0.firstChild + ); + rootOrSingletonContext = !1; + var JSCompiler_inline_result$jscomp$1 = !0; + } else JSCompiler_inline_result$jscomp$1 = !1; + JSCompiler_temp$jscomp$0 = !JSCompiler_inline_result$jscomp$1; + } + JSCompiler_temp$jscomp$0 && + (shouldKeepWarning && + warnNonHydratedInstance(workInProgress, nextInstance), + throwOnHydrationMismatch(workInProgress)); + } + pushHostContext(workInProgress); + var type$jscomp$0 = workInProgress.type, + nextProps$jscomp$0 = workInProgress.pendingProps, + prevProps = null !== current ? current.memoizedProps : null, + nextChildren$jscomp$0 = nextProps$jscomp$0.children; + shouldSetTextContent(type$jscomp$0, nextProps$jscomp$0) + ? (nextChildren$jscomp$0 = null) + : null !== prevProps && + shouldSetTextContent(type$jscomp$0, prevProps) && + (workInProgress.flags |= 32); + if (null !== workInProgress.memoizedState) { + var newState = renderWithHooks( current, workInProgress, - returnFiber, + TransitionAwareHostComponent, + null, + null, renderLanes - ), - workInProgress.child + ); + HostTransitionContext._currentValue = newState; + } + markRef(current, workInProgress); + reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$0, + renderLanes ); + return workInProgress.child; case 6: - return ( - null === current && - isHydrating && - ((current = workInProgress.pendingProps), - (renderLanes = getHostContext()), - (returnFiber = renderLanes.ancestorInfo.current), - (current = - null != returnFiber - ? validateTextNesting( - current, - returnFiber.tag, - renderLanes.ancestorInfo.implicitRootScope - ) - : !0), - (renderLanes = nextHydratableInstance), - (returnFiber = !renderLanes) || - ((returnFiber = canHydrateTextInstance( - renderLanes, - workInProgress.pendingProps, - rootOrSingletonContext - )), - null !== returnFiber - ? ((workInProgress.stateNode = returnFiber), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = null), - (returnFiber = !0)) - : (returnFiber = !1), - (returnFiber = !returnFiber)), - returnFiber && - (current && - warnNonHydratedInstance(workInProgress, renderLanes), - throwOnHydrationMismatch(workInProgress))), - null - ); + if (null === current && isHydrating) { + var text = workInProgress.pendingProps, + currentHostContext$jscomp$1 = getHostContext(), + ancestor = currentHostContext$jscomp$1.ancestorInfo.current; + var shouldKeepWarning$jscomp$0 = + null != ancestor + ? validateTextNesting( + text, + ancestor.tag, + currentHostContext$jscomp$1.ancestorInfo.implicitRootScope + ) + : !0; + var nextInstance$jscomp$0 = nextHydratableInstance, + JSCompiler_temp$jscomp$1; + if (!(JSCompiler_temp$jscomp$1 = !nextInstance$jscomp$0)) { + var textInstance = canHydrateTextInstance( + nextInstance$jscomp$0, + workInProgress.pendingProps, + rootOrSingletonContext + ); + if (null !== textInstance) { + workInProgress.stateNode = textInstance; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + var JSCompiler_inline_result$jscomp$2 = !0; + } else JSCompiler_inline_result$jscomp$2 = !1; + JSCompiler_temp$jscomp$1 = !JSCompiler_inline_result$jscomp$2; + } + JSCompiler_temp$jscomp$1 && + (shouldKeepWarning$jscomp$0 && + warnNonHydratedInstance(workInProgress, nextInstance$jscomp$0), + throwOnHydrationMismatch(workInProgress)); + } + return null; case 13: return updateSuspenseComponent(current, workInProgress, renderLanes); case 4: - return ( - pushHostContainer( - workInProgress, - workInProgress.stateNode.containerInfo - ), - (returnFiber = workInProgress.pendingProps), - null === current - ? (workInProgress.child = reconcileChildFibers( - workInProgress, - null, - returnFiber, - renderLanes - )) - : reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + pushHostContainer( + workInProgress, + workInProgress.stateNode.containerInfo ); + var nextChildren$jscomp$1 = workInProgress.pendingProps; + null === current + ? (workInProgress.child = reconcileChildFibers( + workInProgress, + null, + nextChildren$jscomp$1, + renderLanes + )) + : reconcileChildren( + current, + workInProgress, + nextChildren$jscomp$1, + renderLanes + ); + return workInProgress.child; case 11: return updateForwardRef( current, @@ -11319,66 +11382,55 @@ __DEV__ && workInProgress.child ); case 12: - return ( - (workInProgress.flags |= 4), - (workInProgress.flags |= 2048), - (returnFiber = workInProgress.stateNode), - (returnFiber.effectDuration = -0), - (returnFiber.passiveEffectDuration = -0), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + workInProgress.flags |= 4; + workInProgress.flags |= 2048; + var stateNode = workInProgress.stateNode; + stateNode.effectDuration = -0; + stateNode.passiveEffectDuration = -0; + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 10: - return ( - (returnFiber = workInProgress.type), - (prevSibling = workInProgress.pendingProps), - (prevState = prevSibling.value), - "value" in prevSibling || - hasWarnedAboutUsingNoValuePropOnContextProvider || - ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), - console.error( - "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" - )), - pushProvider(workInProgress, returnFiber, prevState), - reconcileChildren( - current, - workInProgress, - prevSibling.children, - renderLanes - ), - workInProgress.child + var context = workInProgress.type; + var newProps = workInProgress.pendingProps, + newValue = newProps.value; + "value" in newProps || + hasWarnedAboutUsingNoValuePropOnContextProvider || + ((hasWarnedAboutUsingNoValuePropOnContextProvider = !0), + console.error( + "The `value` prop is required for the ``. Did you misspell it or forget to pass it?" + )); + pushProvider(workInProgress, context, newValue); + reconcileChildren( + current, + workInProgress, + newProps.children, + renderLanes ); + return workInProgress.child; case 9: - return ( - (prevSibling = workInProgress.type._context), - (returnFiber = workInProgress.pendingProps.children), - "function" !== typeof returnFiber && - console.error( - "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." - ), - prepareToReadContext(workInProgress), - (prevSibling = readContext(prevSibling)), - markComponentRenderStarted(workInProgress), - (returnFiber = callComponentInDEV( - returnFiber, - prevSibling, - void 0 - )), - markComponentRenderStopped(), - (workInProgress.flags |= 1), - reconcileChildren( - current, - workInProgress, - returnFiber, - renderLanes - ), - workInProgress.child + var context$jscomp$0 = workInProgress.type._context; + var render = workInProgress.pendingProps.children; + "function" !== typeof render && + console.error( + "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it." + ); + prepareToReadContext(workInProgress); + var newValue$jscomp$0 = readContext(context$jscomp$0); + markComponentRenderStarted(workInProgress); + var newChildren = callComponentInDEV( + render, + newValue$jscomp$0, + void 0 ); + markComponentRenderStopped(); + workInProgress.flags |= 1; + reconcileChildren(current, workInProgress, newChildren, renderLanes); + return workInProgress.child; case 14: return updateMemoComponent( current, @@ -11396,50 +11448,47 @@ __DEV__ && renderLanes ); case 17: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component2 = workInProgress.type, + _resolvedProps7 = resolveClassComponentProps( + _Component2, workInProgress.pendingProps - )), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (workInProgress.tag = 1), - isContextProvider(returnFiber) - ? ((current = !0), pushContextProvider(workInProgress)) - : (current = !1), - prepareToReadContext(workInProgress), - constructClassInstance(workInProgress, returnFiber, prevSibling), - mountClassInstance( - workInProgress, - returnFiber, - prevSibling, - renderLanes - ), - finishClassComponent( - null, - workInProgress, - returnFiber, - !0, - current, - renderLanes - ) + ); + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); + workInProgress.tag = 1; + if (isContextProvider(_Component2)) { + var hasContext = !0; + pushContextProvider(workInProgress); + } else hasContext = !1; + prepareToReadContext(workInProgress); + constructClassInstance(workInProgress, _Component2, _resolvedProps7); + mountClassInstance( + workInProgress, + _Component2, + _resolvedProps7, + renderLanes + ); + return finishClassComponent( + null, + workInProgress, + _Component2, + !0, + hasContext, + renderLanes ); case 28: - return ( - (returnFiber = workInProgress.type), - (prevSibling = resolveClassComponentProps( - returnFiber, + var _Component3 = workInProgress.type, + _resolvedProps8 = resolveClassComponentProps( + _Component3, workInProgress.pendingProps - )), - resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), - (workInProgress.tag = 0), - updateFunctionComponent( - null, - workInProgress, - returnFiber, - prevSibling, - renderLanes - ) + ); + resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); + workInProgress.tag = 0; + return updateFunctionComponent( + null, + workInProgress, + _Component3, + _resolvedProps8, + renderLanes ); case 19: return updateSuspenseListComponent( @@ -11448,64 +11497,163 @@ __DEV__ && renderLanes ); case 31: - returnFiber = workInProgress.pendingProps; - renderLanes = returnFiber.hidden; - void 0 !== renderLanes && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === renderLanes - ? "hidden" - : !1 === renderLanes - ? "hidden={false}" - : "hidden={...}", - renderLanes ? 'mode="hidden"' : 'mode="visible"' - ); - renderLanes = workInProgress.mode; - returnFiber = { - mode: returnFiber.mode, - children: returnFiber.children - }; - if (null === current) { - if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((prevSibling = canHydrateHydrationBoundary( - current, + var nextProps$jscomp$1 = workInProgress.pendingProps, + didSuspend = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === nextProps$jscomp$1.mode) + mountActivityChildren(workInProgress, nextProps$jscomp$1); + else { + pushDehydratedActivitySuspenseHandler(workInProgress); + var nextInstance$jscomp$1 = nextHydratableInstance; + if (nextInstance$jscomp$1) { + var hydratableInstance = canHydrateHydrationBoundary( + nextInstance$jscomp$1, rootOrSingletonContext - )), - (prevSibling = - null !== prevSibling && - prevSibling.data === ACTIVITY_START_DATA - ? prevSibling - : null), - null !== prevSibling && - ((workInProgress.stateNode = prevSibling), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - prevSibling.nextSibling - )))) - : (prevSibling = null), - null === prevSibling) - ) - throw ( - (warnNonHydratedInstance(workInProgress, current), - throwOnHydrationMismatch(workInProgress)) + ); + var activityInstance = + null !== hydratableInstance && + hydratableInstance.data === ACTIVITY_START_DATA + ? hydratableInstance + : null; + if (null !== activityInstance) { + var activityState = { + dehydrated: activityInstance, + treeContext: getSuspendedTreeContext(), + retryLane: 536870912, + hydrationErrors: null + }; + workInProgress.memoizedState = activityState; + var dehydratedFragment = + createFiberFromDehydratedFragment(activityInstance); + dehydratedFragment.return = workInProgress; + workInProgress.child = dehydratedFragment; + hydrationParentFiber = workInProgress; + nextHydratableInstance = null; + } + var JSCompiler_temp$jscomp$2 = activityInstance; + } else JSCompiler_temp$jscomp$2 = null; + if (null === JSCompiler_temp$jscomp$2) + throw ( + (warnNonHydratedInstance( + workInProgress, + nextInstance$jscomp$1 + ), + throwOnHydrationMismatch(workInProgress)) + ); + } + workInProgress.lanes = 536870912; + var JSCompiler_inline_result$jscomp$3 = null; + } else + JSCompiler_inline_result$jscomp$3 = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 ); - current = mountWorkInProgressOffscreenFiber( - returnFiber, - renderLanes - ); - current.ref = workInProgress.ref; - workInProgress.child = current; - current.return = workInProgress; - workInProgress = current; - } else - (current = createWorkInProgress(current.child, returnFiber)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current); - return workInProgress; + else { + var prevState$jscomp$0 = current.memoizedState; + if (null !== prevState$jscomp$0) { + var activityInstance$jscomp$0 = prevState$jscomp$0.dehydrated; + pushDehydratedActivitySuspenseHandler(workInProgress); + if (didSuspend) + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + var JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (JSCompiler_inline_result$jscomp$4 = null); + else + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + else { + warnIfHydrating(); + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + var hasContextChanged = + 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || hasContextChanged) { + var root = workInProgressRoot; + if (null !== root) { + var attemptHydrationAtLane = getBumpedLaneForHydration( + root, + renderLanes + ); + if ( + 0 !== attemptHydrationAtLane && + attemptHydrationAtLane !== prevState$jscomp$0.retryLane + ) + throw ( + ((prevState$jscomp$0.retryLane = + attemptHydrationAtLane), + enqueueConcurrentRenderForLane( + current, + attemptHydrationAtLane + ), + scheduleUpdateOnFiber( + root, + current, + attemptHydrationAtLane + ), + SelectiveHydrationException) + ); + } + renderDidSuspendDelayIfPossible(); + JSCompiler_inline_result$jscomp$4 = + retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else { + var treeContext = prevState$jscomp$0.treeContext; + nextHydratableInstance = getNextHydratable( + activityInstance$jscomp$0.nextSibling + ); + hydrationParentFiber = workInProgress; + isHydrating = !0; + hydrationErrors = null; + didSuspendOrErrorDEV = !1; + hydrationDiffRootDEV = null; + rootOrSingletonContext = !1; + null !== treeContext && + restoreSuspendedTreeContext(workInProgress, treeContext); + var primaryChildFragment = mountActivityChildren( + workInProgress, + nextProps$jscomp$1 + ); + primaryChildFragment.flags |= 4096; + JSCompiler_inline_result$jscomp$4 = primaryChildFragment; + } + } + JSCompiler_inline_result$jscomp$3 = + JSCompiler_inline_result$jscomp$4; + } else { + var primaryChildFragment$jscomp$0 = createWorkInProgress( + current.child, + { + mode: nextProps$jscomp$1.mode, + children: nextProps$jscomp$1.children + } + ); + primaryChildFragment$jscomp$0.ref = workInProgress.ref; + workInProgress.child = primaryChildFragment$jscomp$0; + primaryChildFragment$jscomp$0.return = workInProgress; + JSCompiler_inline_result$jscomp$3 = primaryChildFragment$jscomp$0; + } + } + return JSCompiler_inline_result$jscomp$3; case 22: return updateOffscreenComponent( current, @@ -11514,59 +11662,60 @@ __DEV__ && workInProgress.pendingProps ); case 24: - return ( - prepareToReadContext(workInProgress), - (returnFiber = readContext(CacheContext)), - null === current - ? ((prevSibling = peekCacheFromPool()), - null === prevSibling && - ((prevSibling = workInProgressRoot), - (prevState = createCache()), - (prevSibling.pooledCache = prevState), - retainCache(prevState), - null !== prevState && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = prevState)), - (workInProgress.memoizedState = { - parent: returnFiber, - cache: prevSibling - }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, prevSibling)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (prevSibling = current.memoizedState), - (prevState = workInProgress.memoizedState), - prevSibling.parent !== returnFiber - ? ((prevSibling = { - parent: returnFiber, - cache: returnFiber - }), - (workInProgress.memoizedState = prevSibling), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - prevSibling), - pushProvider(workInProgress, CacheContext, returnFiber)) - : ((returnFiber = prevState.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child + prepareToReadContext(workInProgress); + var parentCache = readContext(CacheContext); + if (null === current) { + var cacheFromPool = peekCacheFromPool(); + if (null !== cacheFromPool) var freshCache = cacheFromPool; + else { + var root$jscomp$0 = workInProgressRoot, + freshCache$jscomp$0 = createCache(); + root$jscomp$0.pooledCache = freshCache$jscomp$0; + retainCache(freshCache$jscomp$0); + null !== freshCache$jscomp$0 && + (root$jscomp$0.pooledCacheLanes |= renderLanes); + freshCache = freshCache$jscomp$0; + } + workInProgress.memoizedState = { + parent: parentCache, + cache: freshCache + }; + initializeUpdateQueue(workInProgress); + pushProvider(workInProgress, CacheContext, freshCache); + } else { + 0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()); + var prevState$jscomp$1 = current.memoizedState, + nextState$jscomp$0 = workInProgress.memoizedState; + if (prevState$jscomp$1.parent !== parentCache) { + var derivedState = { parent: parentCache, cache: parentCache }; + workInProgress.memoizedState = derivedState; + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + derivedState); + pushProvider(workInProgress, CacheContext, parentCache); + } else { + var nextCache$jscomp$0 = nextState$jscomp$0.cache; + pushProvider(workInProgress, CacheContext, nextCache$jscomp$0); + nextCache$jscomp$0 !== prevState$jscomp$1.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ); + } + } + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes ); + return workInProgress.child; case 29: throw workInProgress.pendingProps; } @@ -12049,11 +12198,62 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) + throw Error( + "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue." + ); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + } else + emitPendingHydrationWarnings(), + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + (workInProgress.mode & ProfileMode) !== NoMode && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -12061,23 +12261,25 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) + if (!nextResource) throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." ); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - type[internalInstanceKey] = workInProgress; + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -12085,11 +12287,11 @@ __DEV__ && emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), (workInProgress.mode & ProfileMode) !== NoMode && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= @@ -12353,6 +12555,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + (workInProgress.mode & ProfileMode) !== NoMode && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -12418,6 +12636,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -13359,6 +13581,11 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && @@ -13655,6 +13882,35 @@ __DEV__ && } popComponentEffectStart(prevEffectStart); } + function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + runWithFiberInDEV( + finishedWork, + commitHydratedActivityInstance, + current + ); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } + } function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -13687,6 +13943,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -14097,6 +14354,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -14455,6 +14721,16 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -14620,6 +14896,14 @@ __DEV__ && committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -16762,6 +17046,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -20743,6 +21028,9 @@ __DEV__ && function commitHydratedContainer(container) { retryIfBlockedOn(container); } + function commitHydratedActivityInstance(activityInstance) { + retryIfBlockedOn(activityInstance); + } function commitHydratedSuspenseInstance(suspenseInstance) { retryIfBlockedOn(suspenseInstance); } @@ -21739,12 +22027,21 @@ __DEV__ && (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } + function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } + } function getCurrentFiberForDevTools() { return current; } @@ -21847,6 +22144,7 @@ __DEV__ && } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -21892,8 +22190,11 @@ __DEV__ && targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -22142,22 +22443,22 @@ __DEV__ && ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane( - nearestMounted, - lane - ); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -25996,11 +26297,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-native-fb-17f88c80-20250422" !== isomorphicReactPackageVersion) + if ("19.2.0-native-fb-3ef31d19-20250422" !== 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.2.0-native-fb-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-native-fb-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -26037,10 +26338,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -26500,7 +26801,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-native-fb-17f88c80-20250422"; + exports.version = "19.2.0-native-fb-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js index b44e32dbd7..593fd282ae 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<2219005f3565b43ddb89b447bed592f7>> + * @generated SignedSource<> */ /* @@ -71,6 +71,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -836,6 +846,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -2777,6 +2795,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -2854,6 +2877,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -2951,6 +2982,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -2958,8 +2990,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -2985,20 +3015,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -4384,6 +4417,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -6189,6 +6227,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -6505,31 +6544,29 @@ function updateOffscreenComponent( if (0 === (workInProgress.mode & 1)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), null !== current && pushTransition(workInProgress, null), - reuseHiddenContextOnStack(); - else { - if (0 === (renderLanes & 536870912) || isHydrating) - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, + reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - } - pushOffscreenSuspenseHandler(workInProgress); + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes + ) + ); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -6564,6 +6601,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6958,8 +7017,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (current = createFiber(18, null, null, 0)), - (current.stateNode = renderLanes), + (current = createFiberFromDehydratedFragment(renderLanes)), (current.return = workInProgress), (workInProgress.child = current), (hydrationParentFiber = workInProgress), @@ -7039,14 +7097,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7099,15 +7157,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7136,12 +7186,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== renderLanes && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, renderLanes), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7153,17 +7198,18 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), (didSuspend = { mode: "hidden", children: nextProps.children }), - 0 === (nextFallbackChildren & 1) && workInProgress.child !== showFallback + 0 === (showFallback & 1) && workInProgress.child !== nextFallbackChildren ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = didSuspend), (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(showFallback, didSuspend)), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712)), + : ((nextProps = createWorkInProgress(nextFallbackChildren, didSuspend)), + (nextProps.subtreeFlags = + nextFallbackChildren.subtreeFlags & 65011712)), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7171,7 +7217,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7182,22 +7228,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7475,10 +7521,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$107 = workInProgress.memoizedState; + if (null !== state$107) { + if (null !== state$107.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -7498,17 +7552,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$107 = 0 !== (renderLanes & workInProgress.childLanes); + state$107 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$107 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$107) return updateSuspenseListComponent( current, workInProgress, @@ -7522,7 +7576,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$107) break; else return null; case 22: return ( @@ -8007,39 +8061,109 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - elementType = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - elementType = { mode: elementType.mode, children: elementType.children }; - if (null === current) { + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, - rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) + ((prevState = elementType.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber( - elementType, - renderLanes - ); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, elementType)), + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = elementType.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), (renderLanes.ref = workInProgress.ref), (workInProgress.child = renderLanes), (renderLanes.return = workInProgress), @@ -8167,14 +8291,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$123 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$123 = lastTailNode), + for (var lastTailNode$124 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$124 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$123 + null === lastTailNode$124 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$123.sibling = null); + : (lastTailNode$124.sibling = null); } } function bubbleProperties(completedWork) { @@ -8184,19 +8308,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$124 = completedWork.child; null !== child$124; ) - (newChildLanes |= child$124.lanes | child$124.childLanes), - (subtreeFlags |= child$124.subtreeFlags & 65011712), - (subtreeFlags |= child$124.flags & 65011712), - (child$124.return = completedWork), - (child$124 = child$124.sibling); + for (var child$125 = completedWork.child; null !== child$125; ) + (newChildLanes |= child$125.lanes | child$125.childLanes), + (subtreeFlags |= child$125.subtreeFlags & 65011712), + (subtreeFlags |= child$125.flags & 65011712), + (child$125.return = completedWork), + (child$125 = child$125.sibling); else - for (child$124 = completedWork.child; null !== child$124; ) - (newChildLanes |= child$124.lanes | child$124.childLanes), - (subtreeFlags |= child$124.subtreeFlags), - (subtreeFlags |= child$124.flags), - (child$124.return = completedWork), - (child$124 = child$124.sibling); + for (child$125 = completedWork.child; null !== child$125; ) + (newChildLanes |= child$125.lanes | child$125.childLanes), + (subtreeFlags |= child$125.subtreeFlags), + (subtreeFlags |= child$125.flags), + (child$125.return = completedWork), + (child$125 = child$125.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8467,11 +8591,40 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null), + (workInProgress.flags |= 4); + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8717,6 +8870,17 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8775,6 +8939,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8922,8 +9090,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$155) { - captureCommitPhaseError(current, nearestMountedAncestor, error$155); + } catch (error$159) { + captureCommitPhaseError(current, nearestMountedAncestor, error$159); } else ref.current = null; } @@ -9262,11 +9430,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$154) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$154 + error$158 ); } } @@ -9309,6 +9477,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -9565,6 +9737,31 @@ function commitDeletionEffectsOnFiber( ); } } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -9592,6 +9789,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9933,6 +10131,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10115,20 +10322,20 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent); break; case 5: - var parent$156 = hostParentFiber.stateNode; + var parent$160 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$156, ""), (hostParentFiber.flags &= -33)); - var before$157 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$157, parent$156); + (setTextContent(parent$160, ""), (hostParentFiber.flags &= -33)); + var before$161 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$161, parent$160); break; case 3: case 4: - var parent$158 = hostParentFiber.stateNode.containerInfo, - before$159 = getHostSibling(finishedWork); + var parent$162 = hostParentFiber.stateNode.containerInfo, + before$163 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$159, - parent$158 + before$163, + parent$162 ); break; default: @@ -10279,6 +10486,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10422,6 +10639,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11369,8 +11594,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$179) { - handleThrow(root, thrownValue$179); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); lanes && root.shellSuspendCounter++; @@ -11489,8 +11714,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$181) { - handleThrow(root, thrownValue$181); + } catch (thrownValue$186) { + handleThrow(root, thrownValue$186); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -12095,6 +12320,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -12136,14 +12362,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$186 = firstScheduledRoot; null !== root$186; ) { - if (!onlyLegacy || 0 === root$186.tag) + for (var root$191 = firstScheduledRoot; null !== root$191; ) { + if (!onlyLegacy || 0 === root$191.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$186.pendingLanes; + var pendingLanes = root$191.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$186.suspendedLanes, - pingedLanes = root$186.pingedLanes; + var suspendedLanes = root$191.suspendedLanes, + pingedLanes = root$191.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12157,20 +12383,20 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$186, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$191, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$186, - root$186 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$186.cancelPendingCommit || - -1 !== root$186.timeoutHandle + root$191, + root$191 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$191.cancelPendingCommit || + -1 !== root$191.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$186, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$191, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$186, JSCompiler_inline_result)); - root$186 = root$186.next; + performSyncWorkOnRoot(root$191, JSCompiler_inline_result)); + root$191 = root$191.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -12447,20 +12673,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1554 = 0; - i$jscomp$inline_1554 < simpleEventPluginEvents.length; - i$jscomp$inline_1554++ + var i$jscomp$inline_1586 = 0; + i$jscomp$inline_1586 < simpleEventPluginEvents.length; + i$jscomp$inline_1586++ ) { - var eventName$jscomp$inline_1555 = - simpleEventPluginEvents[i$jscomp$inline_1554], - domEventName$jscomp$inline_1556 = - eventName$jscomp$inline_1555.toLowerCase(), - capitalizedEvent$jscomp$inline_1557 = - eventName$jscomp$inline_1555[0].toUpperCase() + - eventName$jscomp$inline_1555.slice(1); + var eventName$jscomp$inline_1587 = + simpleEventPluginEvents[i$jscomp$inline_1586], + domEventName$jscomp$inline_1588 = + eventName$jscomp$inline_1587.toLowerCase(), + capitalizedEvent$jscomp$inline_1589 = + eventName$jscomp$inline_1587[0].toUpperCase() + + eventName$jscomp$inline_1587.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1556, - "on" + capitalizedEvent$jscomp$inline_1557 + domEventName$jscomp$inline_1588, + "on" + capitalizedEvent$jscomp$inline_1589 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -13703,34 +13929,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$200 = props[hasSrc]; - if (null != propValue$200) + var propValue$205 = props[hasSrc]; + if (null != propValue$205) switch (hasSrc) { case "name": - hasSrcSet = propValue$200; + hasSrcSet = propValue$205; break; case "type": - propValue = propValue$200; + propValue = propValue$205; break; case "checked": - checked = propValue$200; + checked = propValue$205; break; case "defaultChecked": - defaultChecked = propValue$200; + defaultChecked = propValue$205; break; case "value": - propKey = propValue$200; + propKey = propValue$205; break; case "defaultValue": - defaultValue = propValue$200; + defaultValue = propValue$205; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$200) + if (null != propValue$205) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$200, props, null); + setProp(domElement, tag, hasSrc, propValue$205, props, null); } } initInput( @@ -13869,14 +14095,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$200 in props) - props.hasOwnProperty(propValue$200) && - ((hasSrc = props[propValue$200]), + for (propValue$205 in props) + props.hasOwnProperty(propValue$205) && + ((hasSrc = props[propValue$205]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$200, + propValue$205, hasSrc, props, void 0 @@ -13924,14 +14150,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$217 in nextProps) { - var propKey = nextProps[propKey$217]; - lastProp = lastProps[propKey$217]; + for (var propKey$222 in nextProps) { + var propKey = nextProps[propKey$222]; + lastProp = lastProps[propKey$222]; if ( - nextProps.hasOwnProperty(propKey$217) && + nextProps.hasOwnProperty(propKey$222) && (null != propKey || null != lastProp) ) - switch (propKey$217) { + switch (propKey$222) { case "type": type = propKey; break; @@ -13960,7 +14186,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$217, + propKey$222, propKey, nextProps, lastProp @@ -13979,7 +14205,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$217 = null; + propKey = value = defaultValue = propKey$222 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14010,7 +14236,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$217 = type; + propKey$222 = type; break; case "defaultValue": defaultValue = type; @@ -14031,15 +14257,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$217 - ? updateOptions(domElement, !!lastProps, propKey$217, !1) + null != propKey$222 + ? updateOptions(domElement, !!lastProps, propKey$222, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$217 = null; + propKey = propKey$222 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14063,7 +14289,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$217 = name; + propKey$222 = name; break; case "defaultValue": propKey = name; @@ -14077,17 +14303,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$217, propKey); + updateTextarea(domElement, propKey$222, propKey); return; case "option": - for (var propKey$233 in lastProps) + for (var propKey$238 in lastProps) if ( - ((propKey$217 = lastProps[propKey$233]), - lastProps.hasOwnProperty(propKey$233) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$233)) + ((propKey$222 = lastProps[propKey$238]), + lastProps.hasOwnProperty(propKey$238) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$238)) ) - switch (propKey$233) { + switch (propKey$238) { case "selected": domElement.selected = !1; break; @@ -14095,33 +14321,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$233, + propKey$238, null, nextProps, - propKey$217 + propKey$222 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$217 = nextProps[lastDefaultValue]), + ((propKey$222 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$217 !== propKey && - (null != propKey$217 || null != propKey)) + propKey$222 !== propKey && + (null != propKey$222 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$217 && - "function" !== typeof propKey$217 && - "symbol" !== typeof propKey$217; + propKey$222 && + "function" !== typeof propKey$222 && + "symbol" !== typeof propKey$222; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$217, + propKey$222, nextProps, propKey ); @@ -14142,24 +14368,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$238 in lastProps) - (propKey$217 = lastProps[propKey$238]), - lastProps.hasOwnProperty(propKey$238) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$238) && - setProp(domElement, tag, propKey$238, null, nextProps, propKey$217); + for (var propKey$243 in lastProps) + (propKey$222 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$243) && + setProp(domElement, tag, propKey$243, null, nextProps, propKey$222); for (checked in nextProps) if ( - ((propKey$217 = nextProps[checked]), + ((propKey$222 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$217 !== propKey && - (null != propKey$217 || null != propKey)) + propKey$222 !== propKey && + (null != propKey$222 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$217) + if (null != propKey$222) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14167,7 +14393,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$217, + propKey$222, nextProps, propKey ); @@ -14175,49 +14401,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$243 in lastProps) - (propKey$217 = lastProps[propKey$243]), - lastProps.hasOwnProperty(propKey$243) && - void 0 !== propKey$217 && - !nextProps.hasOwnProperty(propKey$243) && + for (var propKey$248 in lastProps) + (propKey$222 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + void 0 !== propKey$222 && + !nextProps.hasOwnProperty(propKey$248) && setPropOnCustomElement( domElement, tag, - propKey$243, + propKey$248, void 0, nextProps, - propKey$217 + propKey$222 ); for (defaultChecked in nextProps) - (propKey$217 = nextProps[defaultChecked]), + (propKey$222 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$217 === propKey || - (void 0 === propKey$217 && void 0 === propKey) || + propKey$222 === propKey || + (void 0 === propKey$222 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$217, + propKey$222, nextProps, propKey ); return; } } - for (var propKey$248 in lastProps) - (propKey$217 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$217 && - !nextProps.hasOwnProperty(propKey$248) && - setProp(domElement, tag, propKey$248, null, nextProps, propKey$217); + for (var propKey$253 in lastProps) + (propKey$222 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + null != propKey$222 && + !nextProps.hasOwnProperty(propKey$253) && + setProp(domElement, tag, propKey$253, null, nextProps, propKey$222); for (lastProp in nextProps) - (propKey$217 = nextProps[lastProp]), + (propKey$222 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$217 === propKey || - (null == propKey$217 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$217, nextProps, propKey); + propKey$222 === propKey || + (null == propKey$222 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$222, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -14862,26 +15088,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$259 = getResourcesFromRoot( + var styles$264 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$260 = styles$259.get(type); - resource$260 || + resource$265 = styles$264.get(type); + resource$265 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$260 = { + (resource$265 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$259.set(type, resource$260), - (styles$259 = JSCompiler_inline_result.querySelector( + styles$264.set(type, resource$265), + (styles$264 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$259._p && - ((resource$260.instance = styles$259), - (resource$260.state.loading = 5)), + !styles$264._p && + ((resource$265.instance = styles$264), + (resource$265.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -14894,16 +15120,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$259 || + styles$264 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$260.state + resource$265.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$260; + return resource$265; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15000,37 +15226,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$265 = hoistableRoot.querySelector( + var instance$270 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$265) + if (instance$270) return ( (resource.state.loading |= 4), - (resource.instance = instance$265), - markNodeAsHoistable(instance$265), - instance$265 + (resource.instance = instance$270), + markNodeAsHoistable(instance$270), + instance$270 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$265 = ( + instance$270 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$265); - var linkInstance = instance$265; + markNodeAsHoistable(instance$270); + var linkInstance = instance$270; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$265, "link", instance); + setInitialProperties(instance$270, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$265, props.precedence, hoistableRoot); - return (resource.instance = instance$265); + insertStylesheet(instance$270, props.precedence, hoistableRoot); + return (resource.instance = instance$270); case "script": - instance$265 = getScriptKey(props.src); + instance$270 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$265) + getScriptSelectorFromKey(instance$270) )) ) return ( @@ -15039,7 +15265,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$265))) + if ((styleProps = preloadPropsMap.get(instance$270))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -15492,12 +15718,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -15588,6 +15823,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -15634,8 +15870,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -15895,19 +16134,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -16101,16 +16343,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1808 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1839 = React.version; if ( - "19.2.0-native-fb-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_1808 + "19.2.0-native-fb-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_1839 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1808, - "19.2.0-native-fb-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_1839, + "19.2.0-native-fb-3ef31d19-20250422" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16130,24 +16372,24 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_2278 = { +var internals$jscomp$inline_2319 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2279 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2320 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2279.isDisabled && - hook$jscomp$inline_2279.supportsFiber + !hook$jscomp$inline_2320.isDisabled && + hook$jscomp$inline_2320.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2279.inject( - internals$jscomp$inline_2278 + (rendererID = hook$jscomp$inline_2320.inject( + internals$jscomp$inline_2319 )), - (injectedHook = hook$jscomp$inline_2279); + (injectedHook = hook$jscomp$inline_2320); } catch (err) {} } function noop() {} @@ -16393,4 +16635,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js index 9f71899d03..1af9931b7b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<10de40f59bda518a7f152230e5ac8006>> + * @generated SignedSource<<1f40b96c85aae18f9df88e7417de3a95>> */ /* @@ -75,6 +75,16 @@ function getSuspenseInstanceFromFiber(fiber) { } return null; } +function getActivityInstanceFromFiber(fiber) { + if (31 === fiber.tag) { + var activityState = fiber.memoizedState; + null === activityState && + ((fiber = fiber.alternate), + null !== fiber && (activityState = fiber.memoizedState)); + if (null !== activityState) return activityState.dehydrated; + } + return null; +} function assertIsMounted(fiber) { if (getNearestMountedFiber(fiber) !== fiber) throw Error(formatProdErrorMessage(188)); @@ -888,6 +898,14 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + renderLane = + 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function getBumpedLaneForHydrationByLane(lane) { switch (lane) { case 2: @@ -2875,6 +2893,11 @@ function createFiberFromText(content, mode, lanes) { content.lanes = lanes; return content; } +function createFiberFromDehydratedFragment(dehydratedNode) { + var fiber = createFiber(18, null, null, 0); + fiber.stateNode = dehydratedNode; + return fiber; +} function createFiberFromPortal(portal, mode, lanes) { mode = createFiber( 4, @@ -2952,6 +2975,14 @@ function popTreeContext(workInProgress) { (treeContextId = idStack[--idStackIndex]), (idStack[idStackIndex] = null); } +function restoreSuspendedTreeContext(workInProgress, suspendedContext) { + idStack[idStackIndex++] = treeContextId; + idStack[idStackIndex++] = treeContextOverflow; + idStack[idStackIndex++] = treeContextProvider; + treeContextId = suspendedContext.id; + treeContextOverflow = suspendedContext.overflow; + treeContextProvider = workInProgress; +} var hydrationParentFiber = null, nextHydratableInstance = null, isHydrating = !1, @@ -3049,6 +3080,7 @@ function popToNextHostParent(fiber) { for (hydrationParentFiber = fiber.return; hydrationParentFiber; ) switch (hydrationParentFiber.tag) { case 5: + case 31: case 13: rootOrSingletonContext = !1; return; @@ -3056,8 +3088,6 @@ function popToNextHostParent(fiber) { case 3: rootOrSingletonContext = !0; return; - case 31: - return; default: hydrationParentFiber = hydrationParentFiber.return; } @@ -3083,20 +3113,23 @@ function popHydrationState(fiber) { if (!fiber) throw Error(formatProdErrorMessage(317)); nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber); + } else if (31 === tag) { + fiber = fiber.memoizedState; + fiber = null !== fiber ? fiber.dehydrated : null; + if (!fiber) throw Error(formatProdErrorMessage(317)); + nextHydratableInstance = + getNextHydratableInstanceAfterHydrationBoundary(fiber); } else - 31 === tag - ? (nextHydratableInstance = - getNextHydratableInstanceAfterHydrationBoundary(fiber.stateNode)) - : 27 === tag - ? ((tag = nextHydratableInstance), - isSingletonScope(fiber.type) - ? ((fiber = previousHydratableOnEnteringScopedSingleton), - (previousHydratableOnEnteringScopedSingleton = null), - (nextHydratableInstance = fiber)) - : (nextHydratableInstance = tag)) - : (nextHydratableInstance = hydrationParentFiber - ? getNextHydratable(fiber.stateNode.nextSibling) - : null); + 27 === tag + ? ((tag = nextHydratableInstance), + isSingletonScope(fiber.type) + ? ((fiber = previousHydratableOnEnteringScopedSingleton), + (previousHydratableOnEnteringScopedSingleton = null), + (nextHydratableInstance = fiber)) + : (nextHydratableInstance = tag)) + : (nextHydratableInstance = hydrationParentFiber + ? getNextHydratable(fiber.stateNode.nextSibling) + : null); return !0; } function resetHydrationState() { @@ -4547,6 +4580,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -6361,6 +6399,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -6679,31 +6718,29 @@ function updateOffscreenComponent( if (0 === (workInProgress.mode & 1)) (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), null !== current && pushTransition(workInProgress, null), - reuseHiddenContextOnStack(); - else { - if (0 === (renderLanes & 536870912) || isHydrating) - return ( - (workInProgress.lanes = workInProgress.childLanes = 536870912), - deferHiddenOffscreenComponent( - current, + reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else if (0 !== (renderLanes & 536870912)) + (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }), + null !== current && + pushTransition( workInProgress, - null !== prevState - ? prevState.baseLanes | renderLanes - : renderLanes, - renderLanes - ) - ); - workInProgress.memoizedState = { baseLanes: 0, cachePool: null }; - null !== current && - pushTransition( + null !== prevState ? prevState.cachePool : null + ), + null !== prevState + ? pushHiddenContext(workInProgress, prevState) + : reuseHiddenContextOnStack(), + pushOffscreenSuspenseHandler(workInProgress); + else + return ( + (workInProgress.lanes = workInProgress.childLanes = 536870912), + deferHiddenOffscreenComponent( + current, workInProgress, - null !== prevState ? prevState.cachePool : null - ); - null !== prevState - ? pushHiddenContext(workInProgress, prevState) - : reuseHiddenContextOnStack(); - } - pushOffscreenSuspenseHandler(workInProgress); + null !== prevState ? prevState.baseLanes | renderLanes : renderLanes, + renderLanes + ) + ); } else null !== prevState ? (pushTransition(workInProgress, prevState.cachePool), @@ -6738,6 +6775,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7143,8 +7202,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { retryLane: 536870912, hydrationErrors: null }), - (current = createFiber(18, null, null, 0)), - (current.stateNode = renderLanes), + (current = createFiberFromDehydratedFragment(renderLanes)), (current.return = workInProgress), (workInProgress.child = current), (hydrationParentFiber = workInProgress), @@ -7224,14 +7282,14 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), + (showFallback = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - nextFallbackChildren + showFallback )), (nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7284,15 +7342,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { JSCompiler_temp = workInProgressRoot; if ( null !== JSCompiler_temp && - ((nextProps = renderLanes & -renderLanes), - (nextProps = - 0 !== (nextProps & 42) - ? 1 - : getBumpedLaneForHydrationByLane(nextProps)), - (nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps), + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), 0 !== nextProps && nextProps !== nextFallbackChildren.retryLane) ) throw ( @@ -7321,12 +7371,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (hydrationErrors = null), (rootOrSingletonContext = !1), null !== renderLanes && - ((idStack[idStackIndex++] = treeContextId), - (idStack[idStackIndex++] = treeContextOverflow), - (idStack[idStackIndex++] = treeContextProvider), - (treeContextId = renderLanes.id), - (treeContextOverflow = renderLanes.overflow), - (treeContextProvider = workInProgress)), + restoreSuspendedTreeContext(workInProgress, renderLanes), (workInProgress = mountSuspensePrimaryChildren( workInProgress, nextProps.children @@ -7338,22 +7383,25 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { return ( reuseSuspenseHandlerOnStack(workInProgress), (nextPrimaryChildren = nextProps.fallback), - (nextFallbackChildren = workInProgress.mode), - (showFallback = current.child), - (digest = showFallback.sibling), + (showFallback = workInProgress.mode), + (nextFallbackChildren = current.child), + (digest = nextFallbackChildren.sibling), (didSuspend = { mode: "hidden", children: nextProps.children }), - 0 === (nextFallbackChildren & 1) && workInProgress.child !== showFallback + 0 === (showFallback & 1) && workInProgress.child !== nextFallbackChildren ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = didSuspend), workInProgress.mode & 2 && ((nextProps.actualDuration = -0), (nextProps.actualStartTime = -1.1), - (nextProps.selfBaseDuration = showFallback.selfBaseDuration), - (nextProps.treeBaseDuration = showFallback.treeBaseDuration)), + (nextProps.selfBaseDuration = + nextFallbackChildren.selfBaseDuration), + (nextProps.treeBaseDuration = + nextFallbackChildren.treeBaseDuration)), (workInProgress.deletions = null)) - : ((nextProps = createWorkInProgress(showFallback, didSuspend)), - (nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712)), + : ((nextProps = createWorkInProgress(nextFallbackChildren, didSuspend)), + (nextProps.subtreeFlags = + nextFallbackChildren.subtreeFlags & 65011712)), null !== digest ? (nextPrimaryChildren = createWorkInProgress( digest, @@ -7361,7 +7409,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { )) : ((nextPrimaryChildren = createFiberFromFragment( nextPrimaryChildren, - nextFallbackChildren, + showFallback, renderLanes, null )), @@ -7372,22 +7420,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.child = nextProps), (nextProps = nextPrimaryChildren), (nextPrimaryChildren = workInProgress.child), - (nextFallbackChildren = current.child.memoizedState), - null === nextFallbackChildren - ? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes)) - : ((showFallback = nextFallbackChildren.cachePool), - null !== showFallback + (showFallback = current.child.memoizedState), + null === showFallback + ? (showFallback = mountSuspenseOffscreenState(renderLanes)) + : ((nextFallbackChildren = showFallback.cachePool), + null !== nextFallbackChildren ? ((digest = CacheContext._currentValue), - (showFallback = - showFallback.parent !== digest + (nextFallbackChildren = + nextFallbackChildren.parent !== digest ? { parent: digest, pool: digest } - : showFallback)) - : (showFallback = getSuspendedCache()), - (nextFallbackChildren = { - baseLanes: nextFallbackChildren.baseLanes | renderLanes, - cachePool: showFallback + : nextFallbackChildren)) + : (nextFallbackChildren = getSuspendedCache()), + (showFallback = { + baseLanes: showFallback.baseLanes | renderLanes, + cachePool: nextFallbackChildren })), - (nextPrimaryChildren.memoizedState = nextFallbackChildren), + (nextPrimaryChildren.memoizedState = showFallback), (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, @@ -7679,6 +7727,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -8218,39 +8274,109 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - elementType = workInProgress.pendingProps; - renderLanes = workInProgress.mode; - elementType = { mode: elementType.mode, children: elementType.children }; - if (null === current) { + init = workInProgress.pendingProps; + nextState = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + if (isHydrating) { + if ("hidden" === init.mode) + mountActivityChildren(workInProgress, init); + else if ( + (pushDehydratedActivitySuspenseHandler(workInProgress), + (renderLanes = nextHydratableInstance) + ? ((renderLanes = canHydrateHydrationBoundary( + renderLanes, + rootOrSingletonContext + )), + (renderLanes = + null !== renderLanes && "&" === renderLanes.data + ? renderLanes + : null), + null !== renderLanes && + ((workInProgress.memoizedState = { + dehydrated: renderLanes, + treeContext: + null !== treeContextProvider + ? { id: treeContextId, overflow: treeContextOverflow } + : null, + retryLane: 536870912, + hydrationErrors: null + }), + (current = createFiberFromDehydratedFragment(renderLanes)), + (current.return = workInProgress), + (workInProgress.child = current), + (hydrationParentFiber = workInProgress), + (nextHydratableInstance = null))) + : (renderLanes = null), + null === renderLanes) + ) + throw throwOnHydrationMismatch(workInProgress); + workInProgress.lanes = 536870912; + workInProgress = null; + } else workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) if ( - isHydrating && - ((current = nextHydratableInstance) - ? ((current = canHydrateHydrationBoundary( - current, - rootOrSingletonContext - )), - (current = - null !== current && "&" === current.data ? current : null), - null !== current && - ((workInProgress.stateNode = current), - (hydrationParentFiber = workInProgress), - (nextHydratableInstance = getNextHydratable( - current.nextSibling - )))) - : (current = null), - null === current) + ((prevState = elementType.dehydrated), + pushDehydratedActivitySuspenseHandler(workInProgress), + nextState) ) - throw throwOnHydrationMismatch(workInProgress); - renderLanes = mountWorkInProgressOffscreenFiber( - elementType, - renderLanes - ); - renderLanes.ref = workInProgress.ref; - workInProgress.child = renderLanes; - renderLanes.return = workInProgress; - workInProgress = renderLanes; - } else - (renderLanes = createWorkInProgress(current.child, elementType)), + if (workInProgress.flags & 256) + (workInProgress.flags &= -257), + (workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + )); + else if (null !== workInProgress.memoizedState) + (workInProgress.child = current.child), + (workInProgress.flags |= 128), + (workInProgress = null); + else throw Error(formatProdErrorMessage(558)); + else if ( + (didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ), + (nextState = 0 !== (renderLanes & current.childLanes)), + didReceiveUpdate || nextState) + ) { + init = workInProgressRoot; + if ( + null !== init && + ((prevState = getBumpedLaneForHydration(init, renderLanes)), + 0 !== prevState && prevState !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = prevState), + enqueueConcurrentRenderForLane(current, prevState), + scheduleUpdateOnFiber(init, current, prevState), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (renderLanes = elementType.treeContext), + (nextHydratableInstance = getNextHydratable(prevState.nextSibling)), + (hydrationParentFiber = workInProgress), + (isHydrating = !0), + (hydrationErrors = null), + (rootOrSingletonContext = !1), + null !== renderLanes && + restoreSuspendedTreeContext(workInProgress, renderLanes), + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), (renderLanes.ref = workInProgress.ref), (workInProgress.child = renderLanes), (renderLanes.return = workInProgress), @@ -8378,14 +8504,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$126 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$126 = lastTailNode), + for (var lastTailNode$127 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$127 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$126 + null === lastTailNode$127 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$126.sibling = null); + : (lastTailNode$127.sibling = null); } } function bubbleProperties(completedWork) { @@ -8397,53 +8523,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$128 = completedWork.selfBaseDuration, - child$129 = completedWork.child; - null !== child$129; + var treeBaseDuration$129 = completedWork.selfBaseDuration, + child$130 = completedWork.child; + null !== child$130; ) - (newChildLanes |= child$129.lanes | child$129.childLanes), - (subtreeFlags |= child$129.subtreeFlags & 65011712), - (subtreeFlags |= child$129.flags & 65011712), - (treeBaseDuration$128 += child$129.treeBaseDuration), - (child$129 = child$129.sibling); - completedWork.treeBaseDuration = treeBaseDuration$128; + (newChildLanes |= child$130.lanes | child$130.childLanes), + (subtreeFlags |= child$130.subtreeFlags & 65011712), + (subtreeFlags |= child$130.flags & 65011712), + (treeBaseDuration$129 += child$130.treeBaseDuration), + (child$130 = child$130.sibling); + completedWork.treeBaseDuration = treeBaseDuration$129; } else for ( - treeBaseDuration$128 = completedWork.child; - null !== treeBaseDuration$128; + treeBaseDuration$129 = completedWork.child; + null !== treeBaseDuration$129; ) (newChildLanes |= - treeBaseDuration$128.lanes | treeBaseDuration$128.childLanes), - (subtreeFlags |= treeBaseDuration$128.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$128.flags & 65011712), - (treeBaseDuration$128.return = completedWork), - (treeBaseDuration$128 = treeBaseDuration$128.sibling); + treeBaseDuration$129.lanes | treeBaseDuration$129.childLanes), + (subtreeFlags |= treeBaseDuration$129.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$129.flags & 65011712), + (treeBaseDuration$129.return = completedWork), + (treeBaseDuration$129 = treeBaseDuration$129.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$128 = completedWork.actualDuration; - child$129 = completedWork.selfBaseDuration; + treeBaseDuration$129 = completedWork.actualDuration; + child$130 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$128 += child.actualDuration), - (child$129 += child.treeBaseDuration), + (treeBaseDuration$129 += child.actualDuration), + (child$130 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$128; - completedWork.treeBaseDuration = child$129; + completedWork.actualDuration = treeBaseDuration$129; + completedWork.treeBaseDuration = child$130; } else for ( - treeBaseDuration$128 = completedWork.child; - null !== treeBaseDuration$128; + treeBaseDuration$129 = completedWork.child; + null !== treeBaseDuration$129; ) (newChildLanes |= - treeBaseDuration$128.lanes | treeBaseDuration$128.childLanes), - (subtreeFlags |= treeBaseDuration$128.subtreeFlags), - (subtreeFlags |= treeBaseDuration$128.flags), - (treeBaseDuration$128.return = completedWork), - (treeBaseDuration$128 = treeBaseDuration$128.sibling); + treeBaseDuration$129.lanes | treeBaseDuration$129.childLanes), + (subtreeFlags |= treeBaseDuration$129.subtreeFlags), + (subtreeFlags |= treeBaseDuration$129.flags), + (treeBaseDuration$129.return = completedWork), + (treeBaseDuration$129 = treeBaseDuration$129.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8714,11 +8840,52 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return ( - null === current && popHydrationState(workInProgress), - bubbleProperties(workInProgress), - null - ); + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + newProps = popHydrationState(workInProgress); + if (null !== renderLanes) { + if (null === current) { + if (!newProps) throw Error(formatProdErrorMessage(318)); + current = workInProgress.memoizedState; + current = null !== current ? current.dehydrated : null; + if (!current) throw Error(formatProdErrorMessage(557)); + current[internalInstanceKey] = workInProgress; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + } else + resetHydrationState(), + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null), + (workInProgress.flags |= 4), + bubbleProperties(workInProgress), + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error(formatProdErrorMessage(558)); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8726,28 +8893,30 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - type = popHydrationState(workInProgress); - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + nextResource = popHydrationState(workInProgress); + if (null !== type && null !== type.dehydrated) { if (null === current) { - if (!type) throw Error(formatProdErrorMessage(318)); - type = workInProgress.memoizedState; - type = null !== type ? type.dehydrated : null; - if (!type) throw Error(formatProdErrorMessage(317)); - type[internalInstanceKey] = workInProgress; + if (!nextResource) throw Error(formatProdErrorMessage(318)); + nextResource = workInProgress.memoizedState; + nextResource = + null !== nextResource ? nextResource.dehydrated : null; + if (!nextResource) throw Error(formatProdErrorMessage(317)); + nextResource[internalInstanceKey] = workInProgress; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); } else resetHydrationState(), 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null), + (type = workInProgress.memoizedState = null), (workInProgress.flags |= 4), bubbleProperties(workInProgress), 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -8988,6 +9157,20 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if (null !== workInProgress.memoizedState) { + popSuspenseHandler(workInProgress); + if (null === workInProgress.alternate) + throw Error(formatProdErrorMessage(340)); + resetHydrationState(); + } + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9052,6 +9235,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9266,8 +9453,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$165) { - captureCommitPhaseError(current, nearestMountedAncestor, error$165); + } catch (error$171) { + captureCommitPhaseError(current, nearestMountedAncestor, error$171); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -9329,8 +9516,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$166) { - captureCommitPhaseError(current, nearestMountedAncestor, error$166); + } catch (error$172) { + captureCommitPhaseError(current, nearestMountedAncestor, error$172); } else ref.current = null; } @@ -9694,11 +9881,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$162) { + } catch (error$168) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$162 + error$168 ); } else { @@ -9715,11 +9902,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$163) { + } catch (error$169) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$163 + error$169 ); } recordEffectDuration(); @@ -9730,11 +9917,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$164) { + } catch (error$170) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$170 ); } } @@ -9787,6 +9974,10 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); @@ -10046,6 +10237,31 @@ function commitDeletionEffectsOnFiber( } popComponentEffectStart(prevEffectStart); } +function commitActivityHydrationCallbacks(finishedRoot, finishedWork) { + if (null === finishedWork.memoizedState) { + var current = finishedWork.alternate; + if ( + null !== current && + ((current = current.memoizedState), null !== current) + ) { + current = current.dehydrated; + try { + retryIfBlockedOn(current); + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + try { + var hydrationCallbacks = finishedRoot.hydrationCallbacks; + if (null !== hydrationCallbacks) { + var onHydrated = hydrationCallbacks.onHydrated; + onHydrated && onHydrated(current); + } + } catch (error) { + captureCommitPhaseError(finishedWork, finishedWork.return, error); + } + } + } +} function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { if (null === finishedWork.memoizedState) { var current = finishedWork.alternate; @@ -10073,6 +10289,7 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10428,6 +10645,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10612,20 +10838,20 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent); break; case 5: - var parent$167 = hostParentFiber.stateNode; + var parent$173 = hostParentFiber.stateNode; hostParentFiber.flags & 32 && - (setTextContent(parent$167, ""), (hostParentFiber.flags &= -33)); - var before$168 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$168, parent$167); + (setTextContent(parent$173, ""), (hostParentFiber.flags &= -33)); + var before$174 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$174, parent$173); break; case 3: case 4: - var parent$169 = hostParentFiber.stateNode.containerInfo, - before$170 = getHostSibling(finishedWork); + var parent$175 = hostParentFiber.stateNode.containerInfo, + before$176 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$170, - parent$169 + before$176, + parent$175 ); break; default: @@ -10794,6 +11020,16 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + includeWorkInProgressEffects && + flags & 4 && + commitActivityHydrationCallbacks(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10948,6 +11184,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -11955,8 +12199,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$194) { - handleThrow(root, thrownValue$194); + } catch (thrownValue$201) { + handleThrow(root, thrownValue$201); } while (1); lanes && root.shellSuspendCounter++; @@ -12083,8 +12327,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$196) { - handleThrow(root, thrownValue$196); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -12772,6 +13016,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -12819,14 +13064,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$201 = firstScheduledRoot; null !== root$201; ) { - if (!onlyLegacy || 0 === root$201.tag) + for (var root$208 = firstScheduledRoot; null !== root$208; ) { + if (!onlyLegacy || 0 === root$208.tag) if (0 !== syncTransitionLanes) { - var pendingLanes = root$201.pendingLanes; + var pendingLanes = root$208.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$201.suspendedLanes, - pingedLanes = root$201.pingedLanes; + var suspendedLanes = root$208.suspendedLanes, + pingedLanes = root$208.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -12840,20 +13085,20 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$201, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$208, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$201, - root$201 === workInProgressRoot ? JSCompiler_inline_result : 0, - null !== root$201.cancelPendingCommit || - -1 !== root$201.timeoutHandle + root$208, + root$208 === workInProgressRoot ? JSCompiler_inline_result : 0, + null !== root$208.cancelPendingCommit || + -1 !== root$208.timeoutHandle )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$201, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$208, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$201, JSCompiler_inline_result)); - root$201 = root$201.next; + performSyncWorkOnRoot(root$208, JSCompiler_inline_result)); + root$208 = root$208.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -13133,20 +13378,20 @@ function debounceScrollEnd(targetInst, nativeEvent, nativeEventTarget) { (nativeEventTarget[internalScrollTimer] = targetInst)); } for ( - var i$jscomp$inline_1649 = 0; - i$jscomp$inline_1649 < simpleEventPluginEvents.length; - i$jscomp$inline_1649++ + var i$jscomp$inline_1687 = 0; + i$jscomp$inline_1687 < simpleEventPluginEvents.length; + i$jscomp$inline_1687++ ) { - var eventName$jscomp$inline_1650 = - simpleEventPluginEvents[i$jscomp$inline_1649], - domEventName$jscomp$inline_1651 = - eventName$jscomp$inline_1650.toLowerCase(), - capitalizedEvent$jscomp$inline_1652 = - eventName$jscomp$inline_1650[0].toUpperCase() + - eventName$jscomp$inline_1650.slice(1); + var eventName$jscomp$inline_1688 = + simpleEventPluginEvents[i$jscomp$inline_1687], + domEventName$jscomp$inline_1689 = + eventName$jscomp$inline_1688.toLowerCase(), + capitalizedEvent$jscomp$inline_1690 = + eventName$jscomp$inline_1688[0].toUpperCase() + + eventName$jscomp$inline_1688.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1651, - "on" + capitalizedEvent$jscomp$inline_1652 + domEventName$jscomp$inline_1689, + "on" + capitalizedEvent$jscomp$inline_1690 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14389,34 +14634,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$215 = props[hasSrc]; - if (null != propValue$215) + var propValue$222 = props[hasSrc]; + if (null != propValue$222) switch (hasSrc) { case "name": - hasSrcSet = propValue$215; + hasSrcSet = propValue$222; break; case "type": - propValue = propValue$215; + propValue = propValue$222; break; case "checked": - checked = propValue$215; + checked = propValue$222; break; case "defaultChecked": - defaultChecked = propValue$215; + defaultChecked = propValue$222; break; case "value": - propKey = propValue$215; + propKey = propValue$222; break; case "defaultValue": - defaultValue = propValue$215; + defaultValue = propValue$222; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$215) + if (null != propValue$222) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$215, props, null); + setProp(domElement, tag, hasSrc, propValue$222, props, null); } } initInput( @@ -14555,14 +14800,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$215 in props) - props.hasOwnProperty(propValue$215) && - ((hasSrc = props[propValue$215]), + for (propValue$222 in props) + props.hasOwnProperty(propValue$222) && + ((hasSrc = props[propValue$222]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$215, + propValue$222, hasSrc, props, void 0 @@ -14610,14 +14855,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$232 in nextProps) { - var propKey = nextProps[propKey$232]; - lastProp = lastProps[propKey$232]; + for (var propKey$239 in nextProps) { + var propKey = nextProps[propKey$239]; + lastProp = lastProps[propKey$239]; if ( - nextProps.hasOwnProperty(propKey$232) && + nextProps.hasOwnProperty(propKey$239) && (null != propKey || null != lastProp) ) - switch (propKey$232) { + switch (propKey$239) { case "type": type = propKey; break; @@ -14646,7 +14891,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$232, + propKey$239, propKey, nextProps, lastProp @@ -14665,7 +14910,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$232 = null; + propKey = value = defaultValue = propKey$239 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14696,7 +14941,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$232 = type; + propKey$239 = type; break; case "defaultValue": defaultValue = type; @@ -14717,15 +14962,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$232 - ? updateOptions(domElement, !!lastProps, propKey$232, !1) + null != propKey$239 + ? updateOptions(domElement, !!lastProps, propKey$239, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$232 = null; + propKey = propKey$239 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -14749,7 +14994,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$232 = name; + propKey$239 = name; break; case "defaultValue": propKey = name; @@ -14763,17 +15008,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$232, propKey); + updateTextarea(domElement, propKey$239, propKey); return; case "option": - for (var propKey$248 in lastProps) + for (var propKey$255 in lastProps) if ( - ((propKey$232 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$248)) + ((propKey$239 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + null != propKey$239 && + !nextProps.hasOwnProperty(propKey$255)) ) - switch (propKey$248) { + switch (propKey$255) { case "selected": domElement.selected = !1; break; @@ -14781,33 +15026,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$248, + propKey$255, null, nextProps, - propKey$232 + propKey$239 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$232 = nextProps[lastDefaultValue]), + ((propKey$239 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$239 !== propKey && + (null != propKey$239 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$232 && - "function" !== typeof propKey$232 && - "symbol" !== typeof propKey$232; + propKey$239 && + "function" !== typeof propKey$239 && + "symbol" !== typeof propKey$239; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$232, + propKey$239, nextProps, propKey ); @@ -14828,24 +15073,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$253 in lastProps) - (propKey$232 = lastProps[propKey$253]), - lastProps.hasOwnProperty(propKey$253) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$253) && - setProp(domElement, tag, propKey$253, null, nextProps, propKey$232); + for (var propKey$260 in lastProps) + (propKey$239 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + null != propKey$239 && + !nextProps.hasOwnProperty(propKey$260) && + setProp(domElement, tag, propKey$260, null, nextProps, propKey$239); for (checked in nextProps) if ( - ((propKey$232 = nextProps[checked]), + ((propKey$239 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$239 !== propKey && + (null != propKey$239 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$232) + if (null != propKey$239) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -14853,7 +15098,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$232, + propKey$239, nextProps, propKey ); @@ -14861,49 +15106,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$258 in lastProps) - (propKey$232 = lastProps[propKey$258]), - lastProps.hasOwnProperty(propKey$258) && - void 0 !== propKey$232 && - !nextProps.hasOwnProperty(propKey$258) && + for (var propKey$265 in lastProps) + (propKey$239 = lastProps[propKey$265]), + lastProps.hasOwnProperty(propKey$265) && + void 0 !== propKey$239 && + !nextProps.hasOwnProperty(propKey$265) && setPropOnCustomElement( domElement, tag, - propKey$258, + propKey$265, void 0, nextProps, - propKey$232 + propKey$239 ); for (defaultChecked in nextProps) - (propKey$232 = nextProps[defaultChecked]), + (propKey$239 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$232 === propKey || - (void 0 === propKey$232 && void 0 === propKey) || + propKey$239 === propKey || + (void 0 === propKey$239 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$232, + propKey$239, nextProps, propKey ); return; } } - for (var propKey$263 in lastProps) - (propKey$232 = lastProps[propKey$263]), - lastProps.hasOwnProperty(propKey$263) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$263) && - setProp(domElement, tag, propKey$263, null, nextProps, propKey$232); + for (var propKey$270 in lastProps) + (propKey$239 = lastProps[propKey$270]), + lastProps.hasOwnProperty(propKey$270) && + null != propKey$239 && + !nextProps.hasOwnProperty(propKey$270) && + setProp(domElement, tag, propKey$270, null, nextProps, propKey$239); for (lastProp in nextProps) - (propKey$232 = nextProps[lastProp]), + (propKey$239 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$232 === propKey || - (null == propKey$232 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$232, nextProps, propKey); + propKey$239 === propKey || + (null == propKey$239 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$239, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15548,26 +15793,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$274 = getResourcesFromRoot( + var styles$281 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$275 = styles$274.get(type); - resource$275 || + resource$282 = styles$281.get(type); + resource$282 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$275 = { + (resource$282 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$274.set(type, resource$275), - (styles$274 = JSCompiler_inline_result.querySelector( + styles$281.set(type, resource$282), + (styles$281 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$274._p && - ((resource$275.instance = styles$274), - (resource$275.state.loading = 5)), + !styles$281._p && + ((resource$282.instance = styles$281), + (resource$282.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15580,16 +15825,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$274 || + styles$281 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$275.state + resource$282.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$275; + return resource$282; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15686,37 +15931,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$280 = hoistableRoot.querySelector( + var instance$287 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$280) + if (instance$287) return ( (resource.state.loading |= 4), - (resource.instance = instance$280), - markNodeAsHoistable(instance$280), - instance$280 + (resource.instance = instance$287), + markNodeAsHoistable(instance$287), + instance$287 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$280 = ( + instance$287 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$280); - var linkInstance = instance$280; + markNodeAsHoistable(instance$287); + var linkInstance = instance$287; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$280, "link", instance); + setInitialProperties(instance$287, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$280, props.precedence, hoistableRoot); - return (resource.instance = instance$280); + insertStylesheet(instance$287, props.precedence, hoistableRoot); + return (resource.instance = instance$287); case "script": - instance$280 = getScriptKey(props.src); + instance$287 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$280) + getScriptSelectorFromKey(instance$287) )) ) return ( @@ -15725,7 +15970,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$280))) + if ((styleProps = preloadPropsMap.get(instance$287))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16186,12 +16431,21 @@ function markRetryLaneIfNotHydrated(fiber, retryLane) { (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane); } function attemptContinuousHydration(fiber) { - if (13 === fiber.tag) { + if (13 === fiber.tag || 31 === fiber.tag) { var root = enqueueConcurrentRenderForLane(fiber, 67108864); null !== root && scheduleUpdateOnFiber(root, fiber, 67108864); markRetryLaneIfNotHydrated(fiber, 67108864); } } +function attemptHydrationAtCurrentPriority(fiber) { + if (13 === fiber.tag || 31 === fiber.tag) { + var lane = requestUpdateLane(fiber); + lane = getBumpedLaneForHydrationByLane(lane); + var root = enqueueConcurrentRenderForLane(fiber, lane); + null !== root && scheduleUpdateOnFiber(root, fiber, lane); + markRetryLaneIfNotHydrated(fiber, lane); + } +} var _enabled = !0; function dispatchDiscreteEvent( domEventName, @@ -16282,6 +16536,7 @@ function dispatchEvent( } } break; + case 31: case 13: (root = enqueueConcurrentRenderForLane(fiber, 2)), null !== root && scheduleUpdateOnFiber(root, fiber, 2), @@ -16328,8 +16583,11 @@ function findInstanceBlockingTarget(targetNode) { targetNode = getSuspenseInstanceFromFiber(nearestMounted); if (null !== targetNode) return targetNode; targetNode = null; - } else if (31 === tag) targetNode = null; - else if (3 === tag) { + } else if (31 === tag) { + targetNode = getActivityInstanceFromFiber(nearestMounted); + if (null !== targetNode) return targetNode; + targetNode = null; + } else if (3 === tag) { if (nearestMounted.stateNode.current.memoizedState.isDehydrated) return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo @@ -16589,19 +16847,22 @@ function attemptExplicitHydrationTarget(queuedTarget) { ) { queuedTarget.blockedOn = targetInst; runWithPriority(queuedTarget.priority, function () { - if (13 === nearestMounted.tag) { - var lane = requestUpdateLane(nearestMounted); - lane = getBumpedLaneForHydrationByLane(lane); - var root = enqueueConcurrentRenderForLane(nearestMounted, lane); - null !== root && - scheduleUpdateOnFiber(root, nearestMounted, lane); - markRetryLaneIfNotHydrated(nearestMounted, lane); - } + attemptHydrationAtCurrentPriority(nearestMounted); + }); + return; + } + } else if (31 === targetInst) { + if ( + ((targetInst = getActivityInstanceFromFiber(nearestMounted)), + null !== targetInst) + ) { + queuedTarget.blockedOn = targetInst; + runWithPriority(queuedTarget.priority, function () { + attemptHydrationAtCurrentPriority(nearestMounted); }); return; } } else if ( - 31 !== targetInst && 3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated ) { @@ -16795,16 +17056,16 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { 0 === i && attemptExplicitHydrationTarget(target); } }; -var isomorphicReactPackageVersion$jscomp$inline_1905 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1942 = React.version; if ( - "19.2.0-native-fb-17f88c80-20250422" !== - isomorphicReactPackageVersion$jscomp$inline_1905 + "19.2.0-native-fb-3ef31d19-20250422" !== + isomorphicReactPackageVersion$jscomp$inline_1942 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1905, - "19.2.0-native-fb-17f88c80-20250422" + isomorphicReactPackageVersion$jscomp$inline_1942, + "19.2.0-native-fb-3ef31d19-20250422" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -16824,17 +17085,17 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { null === componentOrElement ? null : componentOrElement.stateNode; return componentOrElement; }; -var internals$jscomp$inline_1912 = { +var internals$jscomp$inline_1949 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422", + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$297 = 0; - 31 > index$297; - index$297++ + var map = new Map(), lane = 1, index$304 = 0; + 31 > index$304; + index$304++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -16847,16 +17108,16 @@ var internals$jscomp$inline_1912 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2340 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2387 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2340.isDisabled && - hook$jscomp$inline_2340.supportsFiber + !hook$jscomp$inline_2387.isDisabled && + hook$jscomp$inline_2387.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2340.inject( - internals$jscomp$inline_1912 + (rendererID = hook$jscomp$inline_2387.inject( + internals$jscomp$inline_1949 )), - (injectedHook = hook$jscomp$inline_2340); + (injectedHook = hook$jscomp$inline_2387); } catch (err) {} } function noop() {} @@ -17102,7 +17363,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index 785da8398b..72ae8c2868 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,13 +7,13 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1139() { + function JSCompiler_object_inline_createNodeMock_1148() { return null; } function findHook(fiber, id) { @@ -715,6 +715,50 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function lanesToEventPriority(lanes) { lanes &= -lanes; return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes @@ -4008,6 +4052,11 @@ __DEV__ && ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -6169,6 +6218,7 @@ __DEV__ && currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -6545,6 +6595,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7032,10 +7118,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7052,10 +7138,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7090,22 +7176,22 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -7123,31 +7209,32 @@ __DEV__ && renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isSuspenseInstanceFallback()) ) - (showFallback = getSuspenseInstanceFallbackErrorDetails()), - (JSCompiler_temp = showFallback.digest), - (nextPrimaryChildren = showFallback.message), - (nextProps = showFallback.stack), - (showFallback = showFallback.componentStack), - (nextPrimaryChildren = nextPrimaryChildren - ? Error(nextPrimaryChildren) + (nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()), + (JSCompiler_temp = nextPrimaryChildren.digest), + (showFallback = nextPrimaryChildren.message), + (nextProps = nextPrimaryChildren.stack), + (nextPrimaryChildren = nextPrimaryChildren.componentStack), + (showFallback = showFallback + ? Error(showFallback) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (nextPrimaryChildren.stack = nextProps || ""), - (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = void 0 === showFallback ? null : showFallback), + (showFallback.stack = nextProps || ""), + (showFallback.digest = JSCompiler_temp), + (JSCompiler_temp = + void 0 === nextPrimaryChildren ? null : nextPrimaryChildren), (nextProps = { - value: nextPrimaryChildren, + value: showFallback, source: null, stack: JSCompiler_temp }), "string" === typeof JSCompiler_temp && - CapturedStacks.set(nextPrimaryChildren, nextProps), + CapturedStacks.set(showFallback, nextProps), null === hydrationErrors ? (hydrationErrors = [nextProps]) : hydrationErrors.push(nextProps), @@ -7168,58 +7255,20 @@ __DEV__ && didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); isSuspenseInstancePending() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -7240,12 +7289,12 @@ __DEV__ && } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -7258,27 +7307,27 @@ __DEV__ && : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -7289,12 +7338,12 @@ __DEV__ && } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7698,6 +7747,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -7907,10 +7964,10 @@ __DEV__ && current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; + renderLanes = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - current + + renderLanes + ". Lazy element type must resolve to a class or function." + workInProgress ); @@ -8183,40 +8240,83 @@ __DEV__ && renderLanes ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, prevSibling); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((nextProps = getBumpedLaneForHydration( + prevSibling, + renderLanes + )), + 0 !== nextProps && nextProps !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(prevSibling, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -8504,7 +8604,48 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + emitPendingHydrationWarnings(); + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -8512,7 +8653,8 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + child = newProps; + if (null !== child && null !== child.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -8523,11 +8665,11 @@ __DEV__ && } emitPendingHydrationWarnings(); 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (child = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== child && ((child = workInProgress.child), null !== child && (workInProgress.treeBaseDuration -= child.treeBaseDuration)); @@ -8779,6 +8921,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), + null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8844,6 +9002,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -9608,6 +9770,9 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -9841,6 +10006,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10047,6 +10213,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -10355,6 +10530,13 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -10517,6 +10699,14 @@ __DEV__ && committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -12445,6 +12635,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -15439,10 +15630,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15464,7 +15655,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1139, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1148, isConcurrent = !1, isStrictMode = !1; "object" === typeof options && @@ -15587,5 +15778,5 @@ __DEV__ && flushSyncWorkAcrossRoots_impl(0, !0)); } }; - exports.version = "19.2.0-native-fb-17f88c80-20250422"; + exports.version = "19.2.0-native-fb-3ef31d19-20250422"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index fb6a62e5d6..c645166c23 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<18a669f5e961eede4c0dce450c0bdd8c>> + * @generated SignedSource<> */ "use strict"; @@ -547,6 +547,50 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function lanesToEventPriority(lanes) { lanes &= -lanes; return 2 < lanes @@ -2631,6 +2675,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -4267,6 +4316,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -4617,6 +4667,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -4986,10 +5058,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5006,10 +5077,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5038,22 +5108,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -5071,7 +5141,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$1())) (JSCompiler_temp = shim$1().digest), (nextProps = Error( @@ -5095,58 +5165,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); shim$1() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -5167,12 +5196,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -5180,27 +5209,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -5211,12 +5240,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5492,10 +5521,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$73 = workInProgress.memoizedState; + if (null !== state$73) { + if (null !== state$73.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -5515,17 +5552,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$73 = 0 !== (renderLanes & workInProgress.childLanes); + state$73 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$73 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$73) return updateSuspenseListComponent( current, workInProgress, @@ -5539,7 +5576,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$73) break; else return null; case 22: return ( @@ -5862,29 +5899,75 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (elementType = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (elementType = { - mode: elementType.mode, - children: elementType.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - elementType, + init = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, elementType)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + ); + } else + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -5973,14 +6056,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$89 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$89 = lastTailNode), + for (var lastTailNode$90 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$90 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$89 + null === lastTailNode$90 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$89.sibling = null); + : (lastTailNode$90.sibling = null); } } function bubbleProperties(completedWork) { @@ -5990,19 +6073,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$90 = completedWork.child; null !== child$90; ) - (newChildLanes |= child$90.lanes | child$90.childLanes), - (subtreeFlags |= child$90.subtreeFlags & 65011712), - (subtreeFlags |= child$90.flags & 65011712), - (child$90.return = completedWork), - (child$90 = child$90.sibling); + for (var child$91 = completedWork.child; null !== child$91; ) + (newChildLanes |= child$91.lanes | child$91.childLanes), + (subtreeFlags |= child$91.subtreeFlags & 65011712), + (subtreeFlags |= child$91.flags & 65011712), + (child$91.return = completedWork), + (child$91 = child$91.sibling); else - for (child$90 = completedWork.child; null !== child$90; ) - (newChildLanes |= child$90.lanes | child$90.childLanes), - (subtreeFlags |= child$90.subtreeFlags), - (subtreeFlags |= child$90.flags), - (child$90.return = completedWork), - (child$90 = child$90.sibling); + for (child$91 = completedWork.child; null !== child$91; ) + (newChildLanes |= child$91.lanes | child$91.childLanes), + (subtreeFlags |= child$91.subtreeFlags), + (subtreeFlags |= child$91.flags), + (child$91.return = completedWork), + (child$91 = child$91.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6120,7 +6203,41 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -6167,11 +6284,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$95 = null; + var cache$98 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$95 = newProps.memoizedState.cachePool.pool); - cache$95 !== index && (newProps.flags |= 2048); + (cache$98 = newProps.memoizedState.cachePool.pool); + cache$98 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -6196,8 +6313,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$95 = index.rendering; - if (null === cache$95) + cache$98 = index.rendering; + if (null === cache$98) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -6205,11 +6322,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$95 = findFirstSuspended(current); - if (null !== cache$95) { + cache$98 = findFirstSuspended(current); + if (null !== cache$98) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$95.updateQueue; + current = cache$98.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6234,7 +6351,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$95)), null !== current)) { + if (((current = findFirstSuspended(cache$98)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6244,7 +6361,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$95.alternate) + !cache$98.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6256,13 +6373,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$95.sibling = workInProgress.child), - (workInProgress.child = cache$95)) + ? ((cache$98.sibling = workInProgress.child), + (workInProgress.child = cache$98)) : ((current = index.last), null !== current - ? (current.sibling = cache$95) - : (workInProgress.child = cache$95), - (index.last = cache$95)); + ? (current.sibling = cache$98) + : (workInProgress.child = cache$98), + (index.last = cache$98)); } if (null !== index.tail) return ( @@ -6357,6 +6474,18 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -6417,6 +6546,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -6446,9 +6579,9 @@ function commitHookEffectListMount(flags, finishedWork) { do { if ((updateQueue.tag & flags) === flags) { lastEffect = void 0; - var create$111 = updateQueue.create, + var create$115 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$111(); + lastEffect = create$115(); inst.destroy = lastEffect; } updateQueue = updateQueue.next; @@ -6564,8 +6697,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$113) { - captureCommitPhaseError(current, nearestMountedAncestor, error$113); + } catch (error$117) { + captureCommitPhaseError(current, nearestMountedAncestor, error$117); } else ref.current = null; } @@ -6725,11 +6858,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$112) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$116 ); } } @@ -6768,6 +6901,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -6968,6 +7104,7 @@ function commitDeletionEffectsOnFiber( } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -7122,6 +7259,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -7279,12 +7425,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$114 = hostParentFiber.stateNode.containerInfo, - before$115 = getHostSibling(finishedWork); + var parent$118 = hostParentFiber.stateNode.containerInfo, + before$119 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$115, - parent$114 + before$119, + parent$118 ); break; default: @@ -7421,6 +7567,13 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -7561,6 +7714,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -8445,8 +8606,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$129) { - handleThrow(root, thrownValue$129); + } catch (thrownValue$134) { + handleThrow(root, thrownValue$134); } while (1); lanes && root.shellSuspendCounter++; @@ -8561,8 +8722,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$131) { - handleThrow(root, thrownValue$131); + } catch (thrownValue$136) { + handleThrow(root, thrownValue$136); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -9071,6 +9232,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -9721,24 +9883,24 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var internals$jscomp$inline_1422 = { +var internals$jscomp$inline_1439 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1423 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1440 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1423.isDisabled && - hook$jscomp$inline_1423.supportsFiber + !hook$jscomp$inline_1440.isDisabled && + hook$jscomp$inline_1440.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1423.inject( - internals$jscomp$inline_1422 + (rendererID = hook$jscomp$inline_1440.inject( + internals$jscomp$inline_1439 )), - (injectedHook = hook$jscomp$inline_1423); + (injectedHook = hook$jscomp$inline_1440); } catch (err) {} } exports._Scheduler = Scheduler; @@ -9862,4 +10024,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 99941fe21b..cf9033f8d1 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8b8618533c9d803de0ea5139ba1e5479>> + * @generated SignedSource<<95833321888af4636e84de6c88293cb7>> */ "use strict"; @@ -595,6 +595,50 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function lanesToEventPriority(lanes) { lanes &= -lanes; return 2 < lanes @@ -2747,6 +2791,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -4391,6 +4440,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -4743,6 +4793,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -5123,10 +5195,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5143,10 +5214,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5175,22 +5245,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -5208,7 +5278,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$1())) (JSCompiler_temp = shim$1().digest), (nextProps = Error( @@ -5232,58 +5302,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); shim$1() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -5304,12 +5333,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -5322,27 +5351,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -5353,12 +5382,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -5648,6 +5677,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -6025,29 +6062,75 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (elementType = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (elementType = { - mode: elementType.mode, - children: elementType.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - elementType, + init = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, elementType)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + ); + } else + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -6136,14 +6219,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$90 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$90 = lastTailNode), + for (var lastTailNode$91 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$91 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$90 + null === lastTailNode$91 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$90.sibling = null); + : (lastTailNode$91.sibling = null); } } function bubbleProperties(completedWork) { @@ -6155,53 +6238,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$92 = completedWork.selfBaseDuration, - child$93 = completedWork.child; - null !== child$93; + var treeBaseDuration$93 = completedWork.selfBaseDuration, + child$94 = completedWork.child; + null !== child$94; ) - (newChildLanes |= child$93.lanes | child$93.childLanes), - (subtreeFlags |= child$93.subtreeFlags & 65011712), - (subtreeFlags |= child$93.flags & 65011712), - (treeBaseDuration$92 += child$93.treeBaseDuration), - (child$93 = child$93.sibling); - completedWork.treeBaseDuration = treeBaseDuration$92; + (newChildLanes |= child$94.lanes | child$94.childLanes), + (subtreeFlags |= child$94.subtreeFlags & 65011712), + (subtreeFlags |= child$94.flags & 65011712), + (treeBaseDuration$93 += child$94.treeBaseDuration), + (child$94 = child$94.sibling); + completedWork.treeBaseDuration = treeBaseDuration$93; } else for ( - treeBaseDuration$92 = completedWork.child; - null !== treeBaseDuration$92; + treeBaseDuration$93 = completedWork.child; + null !== treeBaseDuration$93; ) (newChildLanes |= - treeBaseDuration$92.lanes | treeBaseDuration$92.childLanes), - (subtreeFlags |= treeBaseDuration$92.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$92.flags & 65011712), - (treeBaseDuration$92.return = completedWork), - (treeBaseDuration$92 = treeBaseDuration$92.sibling); + treeBaseDuration$93.lanes | treeBaseDuration$93.childLanes), + (subtreeFlags |= treeBaseDuration$93.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$93.flags & 65011712), + (treeBaseDuration$93.return = completedWork), + (treeBaseDuration$93 = treeBaseDuration$93.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$92 = completedWork.actualDuration; - child$93 = completedWork.selfBaseDuration; + treeBaseDuration$93 = completedWork.actualDuration; + child$94 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$92 += child.actualDuration), - (child$93 += child.treeBaseDuration), + (treeBaseDuration$93 += child.actualDuration), + (child$94 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$92; - completedWork.treeBaseDuration = child$93; + completedWork.actualDuration = treeBaseDuration$93; + completedWork.treeBaseDuration = child$94; } else for ( - treeBaseDuration$92 = completedWork.child; - null !== treeBaseDuration$92; + treeBaseDuration$93 = completedWork.child; + null !== treeBaseDuration$93; ) (newChildLanes |= - treeBaseDuration$92.lanes | treeBaseDuration$92.childLanes), - (subtreeFlags |= treeBaseDuration$92.subtreeFlags), - (subtreeFlags |= treeBaseDuration$92.flags), - (treeBaseDuration$92.return = completedWork), - (treeBaseDuration$92 = treeBaseDuration$92.sibling); + treeBaseDuration$93.lanes | treeBaseDuration$93.childLanes), + (subtreeFlags |= treeBaseDuration$93.subtreeFlags), + (subtreeFlags |= treeBaseDuration$93.flags), + (treeBaseDuration$93.return = completedWork), + (treeBaseDuration$93 = treeBaseDuration$93.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6319,7 +6402,46 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -6327,7 +6449,8 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + index = newProps; + if (null !== index && null !== index.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -6337,11 +6460,11 @@ function completeWork(current, workInProgress, renderLanes) { ); } 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (index = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== index && ((index = workInProgress.child), null !== index && (workInProgress.treeBaseDuration -= index.treeBaseDuration)); @@ -6376,11 +6499,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$101 = null; + var cache$106 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$101 = newProps.memoizedState.cachePool.pool); - cache$101 !== index && (newProps.flags |= 2048); + (cache$106 = newProps.memoizedState.cachePool.pool); + cache$106 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -6410,8 +6533,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$101 = index.rendering; - if (null === cache$101) + cache$106 = index.rendering; + if (null === cache$106) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -6419,11 +6542,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$101 = findFirstSuspended(current); - if (null !== cache$101) { + cache$106 = findFirstSuspended(current); + if (null !== cache$106) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$101.updateQueue; + current = cache$106.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6448,7 +6571,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$101)), null !== current)) { + if (((current = findFirstSuspended(cache$106)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6458,7 +6581,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$101.alternate) + !cache$106.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6470,13 +6593,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$101.sibling = workInProgress.child), - (workInProgress.child = cache$101)) + ? ((cache$106.sibling = workInProgress.child), + (workInProgress.child = cache$106)) : ((current = index.last), null !== current - ? (current.sibling = cache$101) - : (workInProgress.child = cache$101), - (index.last = cache$101)); + ? (current.sibling = cache$106) + : (workInProgress.child = cache$106), + (index.last = cache$106)); } if (null !== index.tail) return ( @@ -6574,6 +6697,21 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -6640,6 +6778,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -6712,9 +6854,9 @@ function commitHookEffectListMount(flags, finishedWork) { finishedWork ); lastEffect = void 0; - var create$117 = updateQueue.create, + var create$123 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$117(); + lastEffect = create$123(); inst.destroy = lastEffect; 0 !== (flags & 8) ? null !== injectedProfilingHooks && @@ -6854,8 +6996,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$121) { - captureCommitPhaseError(current, nearestMountedAncestor, error$121); + } catch (error$127) { + captureCommitPhaseError(current, nearestMountedAncestor, error$127); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -6917,8 +7059,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$122) { - captureCommitPhaseError(current, nearestMountedAncestor, error$122); + } catch (error$128) { + captureCommitPhaseError(current, nearestMountedAncestor, error$128); } else ref.current = null; } @@ -7101,11 +7243,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$118) { + } catch (error$124) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$118 + error$124 ); } else { @@ -7122,11 +7264,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$119) { + } catch (error$125) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$119 + error$125 ); } recordEffectDuration(); @@ -7137,11 +7279,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$120) { + } catch (error$126) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$120 + error$126 ); } } @@ -7190,6 +7332,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -7393,6 +7538,7 @@ function commitDeletionEffectsOnFiber( } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -7555,6 +7701,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -7714,12 +7869,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$123 = hostParentFiber.stateNode.containerInfo, - before$124 = getHostSibling(finishedWork); + var parent$129 = hostParentFiber.stateNode.containerInfo, + before$130 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$124, - parent$123 + before$130, + parent$129 ); break; default: @@ -7875,6 +8030,13 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -8026,6 +8188,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -8960,8 +9130,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$142) { - handleThrow(root, thrownValue$142); + } catch (thrownValue$149) { + handleThrow(root, thrownValue$149); } while (1); lanes && root.shellSuspendCounter++; @@ -9078,8 +9248,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$144) { - handleThrow(root, thrownValue$144); + } catch (thrownValue$151) { + handleThrow(root, thrownValue$151); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -9662,6 +9832,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -10329,17 +10500,17 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var internals$jscomp$inline_1229 = { +var internals$jscomp$inline_1247 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422", + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422", getLaneLabelMap: function () { for ( - var map = new Map(), lane = 1, index$148 = 0; - 31 > index$148; - index$148++ + var map = new Map(), lane = 1, index$155 = 0; + 31 > index$155; + index$155++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -10352,16 +10523,16 @@ var internals$jscomp$inline_1229 = { } }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1482 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1505 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1482.isDisabled && - hook$jscomp$inline_1482.supportsFiber + !hook$jscomp$inline_1505.isDisabled && + hook$jscomp$inline_1505.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1482.inject( - internals$jscomp$inline_1229 + (rendererID = hook$jscomp$inline_1505.inject( + internals$jscomp$inline_1247 )), - (injectedHook = hook$jscomp$inline_1482); + (injectedHook = hook$jscomp$inline_1505); } catch (err) {} } exports._Scheduler = Scheduler; @@ -10485,4 +10656,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index b8e4b05e00..33edbf917e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<94dcbb359a45c5c73c7e3be45faa50ef>> + * @generated SignedSource<<6f4909cfbb5b2f0a7671d23954235942>> */ "use strict"; @@ -1412,7 +1412,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.2.0-native-fb-17f88c80-20250422"; + exports.version = "19.2.0-native-fb-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index 887a4cccf4..331cb4dc1f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<9544a908fcba7316c3c3e12020e06f64>> */ "use strict"; @@ -587,4 +587,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index 780f20065f..b35dc04ecc 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<0dccd0c23701e93e1314106030bab224>> */ "use strict"; @@ -591,7 +591,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-native-fb-17f88c80-20250422"; +exports.version = "19.2.0-native-fb-3ef31d19-20250422"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index 82d917ecd5..a609ff4ba8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -17f88c80ed20b4e5f21255d9e1268542a2fbc1bd +3ef31d196a83e45d4c70b300a265a9c657c386b4 diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 855394a82c..def1a28e6c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<5754cca2d1255ac615656e4737b87dea>> */ "use strict"; @@ -1881,6 +1881,50 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { @@ -4903,6 +4947,11 @@ __DEV__ && ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -7017,6 +7066,7 @@ __DEV__ && currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -7393,6 +7443,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -7880,10 +7966,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7900,10 +7986,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7938,22 +8024,22 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -7971,31 +8057,32 @@ __DEV__ && renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isSuspenseInstanceFallback()) ) - (showFallback = getSuspenseInstanceFallbackErrorDetails()), - (JSCompiler_temp = showFallback.digest), - (nextPrimaryChildren = showFallback.message), - (nextProps = showFallback.stack), - (showFallback = showFallback.componentStack), - (nextPrimaryChildren = nextPrimaryChildren - ? Error(nextPrimaryChildren) + (nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()), + (JSCompiler_temp = nextPrimaryChildren.digest), + (showFallback = nextPrimaryChildren.message), + (nextProps = nextPrimaryChildren.stack), + (nextPrimaryChildren = nextPrimaryChildren.componentStack), + (showFallback = showFallback + ? Error(showFallback) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (nextPrimaryChildren.stack = nextProps || ""), - (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = void 0 === showFallback ? null : showFallback), + (showFallback.stack = nextProps || ""), + (showFallback.digest = JSCompiler_temp), + (JSCompiler_temp = + void 0 === nextPrimaryChildren ? null : nextPrimaryChildren), (nextProps = { - value: nextPrimaryChildren, + value: showFallback, source: null, stack: JSCompiler_temp }), "string" === typeof JSCompiler_temp && - CapturedStacks.set(nextPrimaryChildren, nextProps), + CapturedStacks.set(showFallback, nextProps), null === hydrationErrors ? (hydrationErrors = [nextProps]) : hydrationErrors.push(nextProps), @@ -8016,58 +8103,20 @@ __DEV__ && didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); isSuspenseInstancePending() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8088,12 +8137,12 @@ __DEV__ && } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -8106,27 +8155,27 @@ __DEV__ && : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -8137,12 +8186,12 @@ __DEV__ && } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -8546,6 +8595,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -8755,10 +8812,10 @@ __DEV__ && current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; + renderLanes = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - current + + renderLanes + ". Lazy element type must resolve to a class or function." + workInProgress ); @@ -9031,40 +9088,83 @@ __DEV__ && renderLanes ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, prevSibling); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((nextProps = getBumpedLaneForHydration( + prevSibling, + renderLanes + )), + 0 !== nextProps && nextProps !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(prevSibling, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -9493,7 +9593,7 @@ __DEV__ && workInProgress ); enableLazyPublicInstanceInFabric - ? (newProps = { + ? (current = { node: keepChildren, canonical: { nativeTag: current, @@ -9511,7 +9611,7 @@ __DEV__ && workInProgress, renderLanes.publicInstance )), - (newProps = { + (current = { node: keepChildren, canonical: { nativeTag: current, @@ -9522,8 +9622,8 @@ __DEV__ && } })); markCloned(workInProgress); - appendAllChildren(newProps, workInProgress, !1, !1); - workInProgress.stateNode = newProps; + appendAllChildren(current, workInProgress, !1, !1); + workInProgress.stateNode = current; } bubbleProperties(workInProgress); workInProgress.flags &= -16777217; @@ -9563,7 +9663,48 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + newProps = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== newProps) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + emitPendingHydrationWarnings(); + 0 === (workInProgress.flags & 128) && + (newProps = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== newProps && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (newProps = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = newProps), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -9571,7 +9712,8 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + _type2 = newProps; + if (null !== _type2 && null !== _type2.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -9582,11 +9724,11 @@ __DEV__ && } emitPendingHydrationWarnings(); 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (_type2 = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== _type2 && ((_type2 = workInProgress.child), null !== _type2 && (workInProgress.treeBaseDuration -= _type2.treeBaseDuration)); @@ -9636,9 +9778,9 @@ __DEV__ && bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && newProps && - ((newProps = workInProgress.child), - null !== newProps && - (workInProgress.treeBaseDuration -= newProps.treeBaseDuration)); + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); return null; case 4: return ( @@ -9678,14 +9820,14 @@ __DEV__ && if (null !== keepChildren) { workInProgress.flags |= 128; cutOffTailIfNeeded(_type2, !1); - newProps = keepChildren.updateQueue; - workInProgress.updateQueue = newProps; - scheduleRetryEffect(workInProgress, newProps); + current = keepChildren.updateQueue; + workInProgress.updateQueue = current; + scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; - newProps = renderLanes; - for (current = workInProgress.child; null !== current; ) - resetWorkInProgress(current, newProps), - (current = current.sibling); + current = renderLanes; + for (newProps = workInProgress.child; null !== newProps; ) + resetWorkInProgress(newProps, current), + (newProps = newProps.sibling); push( suspenseStackCursor, (suspenseStackCursor.current & @@ -9840,6 +9982,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), + null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9905,6 +10063,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -10585,6 +10747,9 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -10791,6 +10956,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -10945,6 +11111,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((root = finishedWork.updateQueue), + null !== root && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, root))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -11185,6 +11360,13 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -11347,6 +11529,14 @@ __DEV__ && committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -13309,6 +13499,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -17156,10 +17347,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 40512ba066..75410a18b2 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<03241a570bc9dd4dca371a4ae7758542>> + * @generated SignedSource<<9fc1ce3cfcc10981145f460fa861c321>> */ "use strict"; @@ -1245,7 +1245,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_280 = { +var injectedNamesToPlugins$jscomp$inline_286 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1291,32 +1291,32 @@ var injectedNamesToPlugins$jscomp$inline_280 = { } } }, - isOrderingDirty$jscomp$inline_281 = !1, - pluginName$jscomp$inline_282; -for (pluginName$jscomp$inline_282 in injectedNamesToPlugins$jscomp$inline_280) + isOrderingDirty$jscomp$inline_287 = !1, + pluginName$jscomp$inline_288; +for (pluginName$jscomp$inline_288 in injectedNamesToPlugins$jscomp$inline_286) if ( - injectedNamesToPlugins$jscomp$inline_280.hasOwnProperty( - pluginName$jscomp$inline_282 + injectedNamesToPlugins$jscomp$inline_286.hasOwnProperty( + pluginName$jscomp$inline_288 ) ) { - var pluginModule$jscomp$inline_283 = - injectedNamesToPlugins$jscomp$inline_280[pluginName$jscomp$inline_282]; + var pluginModule$jscomp$inline_289 = + injectedNamesToPlugins$jscomp$inline_286[pluginName$jscomp$inline_288]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_282) || - namesToPlugins[pluginName$jscomp$inline_282] !== - pluginModule$jscomp$inline_283 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_288) || + namesToPlugins[pluginName$jscomp$inline_288] !== + pluginModule$jscomp$inline_289 ) { - if (namesToPlugins[pluginName$jscomp$inline_282]) + if (namesToPlugins[pluginName$jscomp$inline_288]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_282 + "`.") + (pluginName$jscomp$inline_288 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_282] = - pluginModule$jscomp$inline_283; - isOrderingDirty$jscomp$inline_281 = !0; + namesToPlugins[pluginName$jscomp$inline_288] = + pluginModule$jscomp$inline_289; + isOrderingDirty$jscomp$inline_287 = !0; } } -isOrderingDirty$jscomp$inline_281 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_287 && recomputePluginOrdering(); var emptyObject = {}, removedKeys = null, removedKeyCount = 0, @@ -1906,6 +1906,50 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function lanesToEventPriority(lanes) { lanes &= -lanes; return 2 < lanes @@ -3872,6 +3916,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5502,6 +5551,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -5852,6 +5902,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6221,10 +6293,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6241,10 +6312,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6273,22 +6343,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -6306,7 +6376,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$1())) (JSCompiler_temp = shim$1().digest), (nextProps = Error( @@ -6330,58 +6400,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); shim$1() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -6402,12 +6431,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -6415,27 +6444,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -6446,12 +6475,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6727,10 +6756,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$78 = workInProgress.memoizedState; + if (null !== state$78) { + if (null !== state$78.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -6750,17 +6787,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$78 = 0 !== (renderLanes & workInProgress.childLanes); + state$78 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$78 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$78) return updateSuspenseListComponent( current, workInProgress, @@ -6774,7 +6811,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$78) break; else return null; case 22: return ( @@ -7097,29 +7134,75 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (elementType = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (elementType = { - mode: elementType.mode, - children: elementType.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - elementType, + init = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, elementType)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + ); + } else + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -7328,14 +7411,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$96 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$96 = lastTailNode), + for (var lastTailNode$97 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$97 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$96 + null === lastTailNode$97 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$96.sibling = null); + : (lastTailNode$97.sibling = null); } } function bubbleProperties(completedWork) { @@ -7345,19 +7428,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$97 = completedWork.child; null !== child$97; ) - (newChildLanes |= child$97.lanes | child$97.childLanes), - (subtreeFlags |= child$97.subtreeFlags & 65011712), - (subtreeFlags |= child$97.flags & 65011712), - (child$97.return = completedWork), - (child$97 = child$97.sibling); + for (var child$98 = completedWork.child; null !== child$98; ) + (newChildLanes |= child$98.lanes | child$98.childLanes), + (subtreeFlags |= child$98.subtreeFlags & 65011712), + (subtreeFlags |= child$98.flags & 65011712), + (child$98.return = completedWork), + (child$98 = child$98.sibling); else - for (child$97 = completedWork.child; null !== child$97; ) - (newChildLanes |= child$97.lanes | child$97.childLanes), - (subtreeFlags |= child$97.subtreeFlags), - (subtreeFlags |= child$97.flags), - (child$97.return = completedWork), - (child$97 = child$97.sibling); + for (child$98 = completedWork.child; null !== child$98; ) + (newChildLanes |= child$98.lanes | child$98.childLanes), + (subtreeFlags |= child$98.subtreeFlags), + (subtreeFlags |= child$98.flags), + (child$98.return = completedWork), + (child$98 = child$98.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7494,7 +7577,7 @@ function completeWork(current, workInProgress, renderLanes) { workInProgress ); enableLazyPublicInstanceInFabric - ? (newProps = { + ? (current = { node: oldProps, canonical: { nativeTag: current, @@ -7511,7 +7594,7 @@ function completeWork(current, workInProgress, renderLanes) { workInProgress, renderLanes.publicInstance )), - (newProps = { + (current = { node: oldProps, canonical: { nativeTag: current, @@ -7522,8 +7605,8 @@ function completeWork(current, workInProgress, renderLanes) { } })); markCloned(workInProgress); - appendAllChildren(newProps, workInProgress, !1, !1); - workInProgress.stateNode = newProps; + appendAllChildren(current, workInProgress, !1, !1); + workInProgress.stateNode = current; } bubbleProperties(workInProgress); workInProgress.flags &= -16777217; @@ -7560,7 +7643,41 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + newProps = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== newProps) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + current = !1; + } else + (newProps = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = newProps), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -7654,14 +7771,14 @@ function completeWork(current, workInProgress, renderLanes) { if (null !== oldProps) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - newProps = oldProps.updateQueue; - workInProgress.updateQueue = newProps; - scheduleRetryEffect(workInProgress, newProps); + current = oldProps.updateQueue; + workInProgress.updateQueue = current; + scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; - newProps = renderLanes; - for (current = workInProgress.child; null !== current; ) - resetWorkInProgress(current, newProps), - (current = current.sibling); + current = renderLanes; + for (newProps = workInProgress.child; null !== newProps; ) + resetWorkInProgress(newProps, current), + (newProps = newProps.sibling); push( suspenseStackCursor, (suspenseStackCursor.current & 1) | 2 @@ -7802,6 +7919,18 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -7862,6 +7991,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -7891,9 +8024,9 @@ function commitHookEffectListMount(flags, finishedWork) { do { if ((updateQueue.tag & flags) === flags) { lastEffect = void 0; - var create$120 = updateQueue.create, + var create$124 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$120(); + lastEffect = create$124(); inst.destroy = lastEffect; } updateQueue = updateQueue.next; @@ -8009,8 +8142,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$122) { - captureCommitPhaseError(current, nearestMountedAncestor, error$122); + } catch (error$126) { + captureCommitPhaseError(current, nearestMountedAncestor, error$126); } else ref.current = null; } @@ -8140,11 +8273,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$121) { + } catch (error$125) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$121 + error$125 ); } } @@ -8184,6 +8317,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -8358,6 +8494,7 @@ function commitDeletionEffectsOnFiber( } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -8479,6 +8616,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -8690,6 +8836,13 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -8830,6 +8983,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -9725,8 +9886,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$134) { - handleThrow(root, thrownValue$134); + } catch (thrownValue$139) { + handleThrow(root, thrownValue$139); } while (1); lanes && root.shellSuspendCounter++; @@ -9841,8 +10002,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$136) { - handleThrow(root, thrownValue$136); + } catch (thrownValue$141) { + handleThrow(root, thrownValue$141); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -10355,6 +10516,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -10931,26 +11093,26 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1223 = { + internals$jscomp$inline_1235 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1223.rendererConfig = extraDevToolsConfig); + (internals$jscomp$inline_1235.rendererConfig = extraDevToolsConfig); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1536 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1553 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1536.isDisabled && - hook$jscomp$inline_1536.supportsFiber + !hook$jscomp$inline_1553.isDisabled && + hook$jscomp$inline_1553.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1536.inject( - internals$jscomp$inline_1223 + (rendererID = hook$jscomp$inline_1553.inject( + internals$jscomp$inline_1235 )), - (injectedHook = hook$jscomp$inline_1536); + (injectedHook = hook$jscomp$inline_1553); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 7dd2ce2826..bd9465c34f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<8e5d50cba591328e019d978d314ecedf>> */ "use strict"; @@ -1249,7 +1249,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_296 = { +var injectedNamesToPlugins$jscomp$inline_304 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1295,32 +1295,32 @@ var injectedNamesToPlugins$jscomp$inline_296 = { } } }, - isOrderingDirty$jscomp$inline_297 = !1, - pluginName$jscomp$inline_298; -for (pluginName$jscomp$inline_298 in injectedNamesToPlugins$jscomp$inline_296) + isOrderingDirty$jscomp$inline_305 = !1, + pluginName$jscomp$inline_306; +for (pluginName$jscomp$inline_306 in injectedNamesToPlugins$jscomp$inline_304) if ( - injectedNamesToPlugins$jscomp$inline_296.hasOwnProperty( - pluginName$jscomp$inline_298 + injectedNamesToPlugins$jscomp$inline_304.hasOwnProperty( + pluginName$jscomp$inline_306 ) ) { - var pluginModule$jscomp$inline_299 = - injectedNamesToPlugins$jscomp$inline_296[pluginName$jscomp$inline_298]; + var pluginModule$jscomp$inline_307 = + injectedNamesToPlugins$jscomp$inline_304[pluginName$jscomp$inline_306]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_298) || - namesToPlugins[pluginName$jscomp$inline_298] !== - pluginModule$jscomp$inline_299 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_306) || + namesToPlugins[pluginName$jscomp$inline_306] !== + pluginModule$jscomp$inline_307 ) { - if (namesToPlugins[pluginName$jscomp$inline_298]) + if (namesToPlugins[pluginName$jscomp$inline_306]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_298 + "`.") + (pluginName$jscomp$inline_306 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_298] = - pluginModule$jscomp$inline_299; - isOrderingDirty$jscomp$inline_297 = !0; + namesToPlugins[pluginName$jscomp$inline_306] = + pluginModule$jscomp$inline_307; + isOrderingDirty$jscomp$inline_305 = !0; } } -isOrderingDirty$jscomp$inline_297 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_305 && recomputePluginOrdering(); var emptyObject = {}, removedKeys = null, removedKeyCount = 0, @@ -1958,6 +1958,50 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { @@ -4022,6 +4066,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5661,6 +5710,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -6013,6 +6063,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6393,10 +6465,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6413,10 +6484,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6445,22 +6515,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -6478,7 +6548,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$1())) (JSCompiler_temp = shim$1().digest), (nextProps = Error( @@ -6502,58 +6572,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); shim$1() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -6574,12 +6603,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -6592,27 +6621,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue2), (didSuspend = @@ -6623,12 +6652,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6918,6 +6947,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -7295,29 +7332,75 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (elementType = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (elementType = { - mode: elementType.mode, - children: elementType.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - elementType, + init = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, elementType)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + ); + } else + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -7526,14 +7609,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$99 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$99 = lastTailNode), + for (var lastTailNode$100 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$100 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$99 + null === lastTailNode$100 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$99.sibling = null); + : (lastTailNode$100.sibling = null); } } function bubbleProperties(completedWork) { @@ -7545,53 +7628,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$101 = completedWork.selfBaseDuration, - child$102 = completedWork.child; - null !== child$102; + var treeBaseDuration$102 = completedWork.selfBaseDuration, + child$103 = completedWork.child; + null !== child$103; ) - (newChildLanes |= child$102.lanes | child$102.childLanes), - (subtreeFlags |= child$102.subtreeFlags & 65011712), - (subtreeFlags |= child$102.flags & 65011712), - (treeBaseDuration$101 += child$102.treeBaseDuration), - (child$102 = child$102.sibling); - completedWork.treeBaseDuration = treeBaseDuration$101; + (newChildLanes |= child$103.lanes | child$103.childLanes), + (subtreeFlags |= child$103.subtreeFlags & 65011712), + (subtreeFlags |= child$103.flags & 65011712), + (treeBaseDuration$102 += child$103.treeBaseDuration), + (child$103 = child$103.sibling); + completedWork.treeBaseDuration = treeBaseDuration$102; } else for ( - treeBaseDuration$101 = completedWork.child; - null !== treeBaseDuration$101; + treeBaseDuration$102 = completedWork.child; + null !== treeBaseDuration$102; ) (newChildLanes |= - treeBaseDuration$101.lanes | treeBaseDuration$101.childLanes), - (subtreeFlags |= treeBaseDuration$101.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$101.flags & 65011712), - (treeBaseDuration$101.return = completedWork), - (treeBaseDuration$101 = treeBaseDuration$101.sibling); + treeBaseDuration$102.lanes | treeBaseDuration$102.childLanes), + (subtreeFlags |= treeBaseDuration$102.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$102.flags & 65011712), + (treeBaseDuration$102.return = completedWork), + (treeBaseDuration$102 = treeBaseDuration$102.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$101 = completedWork.actualDuration; - child$102 = completedWork.selfBaseDuration; + treeBaseDuration$102 = completedWork.actualDuration; + child$103 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$101 += child.actualDuration), - (child$102 += child.treeBaseDuration), + (treeBaseDuration$102 += child.actualDuration), + (child$103 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$101; - completedWork.treeBaseDuration = child$102; + completedWork.actualDuration = treeBaseDuration$102; + completedWork.treeBaseDuration = child$103; } else for ( - treeBaseDuration$101 = completedWork.child; - null !== treeBaseDuration$101; + treeBaseDuration$102 = completedWork.child; + null !== treeBaseDuration$102; ) (newChildLanes |= - treeBaseDuration$101.lanes | treeBaseDuration$101.childLanes), - (subtreeFlags |= treeBaseDuration$101.subtreeFlags), - (subtreeFlags |= treeBaseDuration$101.flags), - (treeBaseDuration$101.return = completedWork), - (treeBaseDuration$101 = treeBaseDuration$101.sibling); + treeBaseDuration$102.lanes | treeBaseDuration$102.childLanes), + (subtreeFlags |= treeBaseDuration$102.subtreeFlags), + (subtreeFlags |= treeBaseDuration$102.flags), + (treeBaseDuration$102.return = completedWork), + (treeBaseDuration$102 = treeBaseDuration$102.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7794,7 +7877,46 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + newProps = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== newProps) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + 0 === (workInProgress.flags & 128) && + (newProps = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== newProps && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + current = !1; + } else + (newProps = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = newProps), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -7802,7 +7924,8 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + if (null !== type && null !== type.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -7812,11 +7935,11 @@ function completeWork(current, workInProgress, renderLanes) { ); } 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (type = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -8054,6 +8177,21 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8120,6 +8258,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8192,9 +8334,9 @@ function commitHookEffectListMount(flags, finishedWork) { finishedWork ); lastEffect = void 0; - var create$128 = updateQueue.create, + var create$134 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$128(); + lastEffect = create$134(); inst.destroy = lastEffect; 0 !== (flags & 8) ? null !== injectedProfilingHooks && @@ -8334,8 +8476,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$132) { - captureCommitPhaseError(current, nearestMountedAncestor, error$132); + } catch (error$138) { + captureCommitPhaseError(current, nearestMountedAncestor, error$138); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8397,8 +8539,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$133) { - captureCommitPhaseError(current, nearestMountedAncestor, error$133); + } catch (error$139) { + captureCommitPhaseError(current, nearestMountedAncestor, error$139); } else ref.current = null; } @@ -8553,11 +8695,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$129) { + } catch (error$135) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$129 + error$135 ); } else { @@ -8574,11 +8716,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$130) { + } catch (error$136) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$130 + error$136 ); } recordEffectDuration(); @@ -8589,11 +8731,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$131) { + } catch (error$137) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$131 + error$137 ); } } @@ -8643,6 +8785,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -8820,6 +8965,7 @@ function commitDeletionEffectsOnFiber( } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -8960,6 +9106,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((root = finishedWork.updateQueue), + null !== root && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, root))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -9191,6 +9346,13 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -9342,6 +9504,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10297,8 +10467,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$149) { - handleThrow(root, thrownValue$149); + } catch (thrownValue$156) { + handleThrow(root, thrownValue$156); } while (1); lanes && root.shellSuspendCounter++; @@ -10421,8 +10591,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$151) { - handleThrow(root, thrownValue$151); + } catch (thrownValue$158) { + handleThrow(root, thrownValue$158); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -11018,6 +11188,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -11623,20 +11794,20 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1318 = { + internals$jscomp$inline_1336 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1318.rendererConfig = extraDevToolsConfig); -internals$jscomp$inline_1318.getLaneLabelMap = function () { + (internals$jscomp$inline_1336.rendererConfig = extraDevToolsConfig); +internals$jscomp$inline_1336.getLaneLabelMap = function () { for ( - var map = new Map(), lane = 1, index$155 = 0; - 31 > index$155; - index$155++ + var map = new Map(), lane = 1, index$162 = 0; + 31 > index$162; + index$162++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -11644,20 +11815,20 @@ internals$jscomp$inline_1318.getLaneLabelMap = function () { } return map; }; -internals$jscomp$inline_1318.injectProfilingHooks = function (profilingHooks) { +internals$jscomp$inline_1336.injectProfilingHooks = function (profilingHooks) { injectedProfilingHooks = profilingHooks; }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1597 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1620 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1597.isDisabled && - hook$jscomp$inline_1597.supportsFiber + !hook$jscomp$inline_1620.isDisabled && + hook$jscomp$inline_1620.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1597.inject( - internals$jscomp$inline_1318 + (rendererID = hook$jscomp$inline_1620.inject( + internals$jscomp$inline_1336 )), - (injectedHook = hook$jscomp$inline_1597); + (injectedHook = hook$jscomp$inline_1620); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 533f085030..70dd21d9d2 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<5766de66d75c0edf7da351d3a588c452>> */ "use strict"; @@ -1975,6 +1975,50 @@ __DEV__ && rootEntangledLanes &= ~lane; } } + function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; + } function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { @@ -5027,6 +5071,11 @@ __DEV__ && ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } + function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current, fiber); + push(suspenseHandlerStackCursor, fiber, fiber); + null === shellBoundary && (shellBoundary = fiber); + } function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), @@ -7141,6 +7190,7 @@ __DEV__ && currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -7517,6 +7567,42 @@ __DEV__ && propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } + function mountActivityChildren(workInProgress, nextProps) { + var hiddenProp = nextProps.hidden; + void 0 !== hiddenProp && + console.error( + ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', + !0 === hiddenProp + ? "hidden" + : !1 === hiddenProp + ? "hidden={false}" + : "hidden={...}", + hiddenProp ? 'mode="hidden"' : 'mode="visible"' + ); + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; + } + function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren( + workInProgress, + workInProgress.pendingProps + ); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; + } function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -8004,10 +8090,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -8024,10 +8110,10 @@ __DEV__ && didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -8062,22 +8148,22 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -8095,31 +8181,32 @@ __DEV__ && renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isSuspenseInstanceFallback()) ) - (showFallback = getSuspenseInstanceFallbackErrorDetails()), - (JSCompiler_temp = showFallback.digest), - (nextPrimaryChildren = showFallback.message), - (nextProps = showFallback.stack), - (showFallback = showFallback.componentStack), - (nextPrimaryChildren = nextPrimaryChildren - ? Error(nextPrimaryChildren) + (nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()), + (JSCompiler_temp = nextPrimaryChildren.digest), + (showFallback = nextPrimaryChildren.message), + (nextProps = nextPrimaryChildren.stack), + (nextPrimaryChildren = nextPrimaryChildren.componentStack), + (showFallback = showFallback + ? Error(showFallback) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (nextPrimaryChildren.stack = nextProps || ""), - (nextPrimaryChildren.digest = JSCompiler_temp), - (JSCompiler_temp = void 0 === showFallback ? null : showFallback), + (showFallback.stack = nextProps || ""), + (showFallback.digest = JSCompiler_temp), + (JSCompiler_temp = + void 0 === nextPrimaryChildren ? null : nextPrimaryChildren), (nextProps = { - value: nextPrimaryChildren, + value: showFallback, source: null, stack: JSCompiler_temp }), "string" === typeof JSCompiler_temp && - CapturedStacks.set(nextPrimaryChildren, nextProps), + CapturedStacks.set(showFallback, nextProps), null === hydrationErrors ? (hydrationErrors = [nextProps]) : hydrationErrors.push(nextProps), @@ -8140,58 +8227,20 @@ __DEV__ && didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration( + JSCompiler_temp, + renderLanes + )), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); isSuspenseInstancePending() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -8212,12 +8261,12 @@ __DEV__ && } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -8230,27 +8279,27 @@ __DEV__ && : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue), (didSuspend = @@ -8261,12 +8310,12 @@ __DEV__ && } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -8670,6 +8719,14 @@ __DEV__ && stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -8879,10 +8936,10 @@ __DEV__ && current.$$typeof === REACT_LAZY_TYPE && (workInProgress = " Did you wrap a component in React.lazy() more than once?"); - current = getComponentNameFromType(current) || current; + renderLanes = getComponentNameFromType(current) || current; throw Error( "Element type is invalid. Received a promise that resolves to: " + - current + + renderLanes + ". Lazy element type must resolve to a class or function." + workInProgress ); @@ -9155,40 +9212,83 @@ __DEV__ && renderLanes ); case 31: - return ( - (renderLanes = workInProgress.pendingProps), - (returnFiber = renderLanes.hidden), - void 0 !== returnFiber && - console.error( - ' doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- \n+ ', - !0 === returnFiber - ? "hidden" - : !1 === returnFiber - ? "hidden={false}" - : "hidden={...}", - returnFiber ? 'mode="hidden"' : 'mode="visible"' - ), - (returnFiber = workInProgress.mode), - (renderLanes = { - mode: renderLanes.mode, - children: renderLanes.children - }), - null === current - ? ((current = mountWorkInProgressOffscreenFiber( + prevSibling = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, prevSibling); + else if ( + ((returnFiber = current.memoizedState), null !== returnFiber) + ) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, renderLanes, - returnFiber + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + prevSibling = workInProgressRoot; + if ( + null !== prevSibling && + ((nextProps = getBumpedLaneForHydration( + prevSibling, + renderLanes + )), + 0 !== nextProps && nextProps !== returnFiber.retryLane) + ) + throw ( + ((returnFiber.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(prevSibling, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + } else + (workInProgress = mountActivityChildren( + workInProgress, + prevSibling )), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)) - : ((current = createWorkInProgress(current.child, renderLanes)), - (current.ref = workInProgress.ref), - (workInProgress.child = current), - (current.return = workInProgress), - (workInProgress = current)), - workInProgress - ); + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: prevSibling.mode, + children: prevSibling.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -9494,7 +9594,48 @@ __DEV__ && bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + emitPendingHydrationWarnings(); + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= + current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -9502,7 +9643,8 @@ __DEV__ && (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + key = newProps; + if (null !== key && null !== key.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -9513,11 +9655,11 @@ __DEV__ && } emitPendingHydrationWarnings(); 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (key = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== key && ((key = workInProgress.child), null !== key && (workInProgress.treeBaseDuration -= key.treeBaseDuration)); @@ -9772,6 +9914,22 @@ __DEV__ && case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), + null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -9837,6 +9995,10 @@ __DEV__ && case 4: popHostContainer(interruptedWork); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -10648,6 +10810,9 @@ __DEV__ && } } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -10895,6 +11060,7 @@ __DEV__ && } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -11113,6 +11279,15 @@ __DEV__ && finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -11459,6 +11634,13 @@ __DEV__ && includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -11621,6 +11803,14 @@ __DEV__ && committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -13590,6 +13780,7 @@ __DEV__ && function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -17373,11 +17564,11 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; var isomorphicReactPackageVersion = React.version; - if ("19.2.0-native-fb-17f88c80-20250422" !== isomorphicReactPackageVersion) + if ("19.2.0-native-fb-3ef31d19-20250422" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.2.0-native-fb-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.2.0-native-fb-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -17403,10 +17594,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 8473b67fc5..ac7c6a58f1 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7cfad95784e7f37ec4510fa84f839770>> + * @generated SignedSource<<60721fd4efdec1604e530302fb948b0a>> */ "use strict"; @@ -1236,7 +1236,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_285 = { +var injectedNamesToPlugins$jscomp$inline_291 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1282,32 +1282,32 @@ var injectedNamesToPlugins$jscomp$inline_285 = { } } }, - isOrderingDirty$jscomp$inline_286 = !1, - pluginName$jscomp$inline_287; -for (pluginName$jscomp$inline_287 in injectedNamesToPlugins$jscomp$inline_285) + isOrderingDirty$jscomp$inline_292 = !1, + pluginName$jscomp$inline_293; +for (pluginName$jscomp$inline_293 in injectedNamesToPlugins$jscomp$inline_291) if ( - injectedNamesToPlugins$jscomp$inline_285.hasOwnProperty( - pluginName$jscomp$inline_287 + injectedNamesToPlugins$jscomp$inline_291.hasOwnProperty( + pluginName$jscomp$inline_293 ) ) { - var pluginModule$jscomp$inline_288 = - injectedNamesToPlugins$jscomp$inline_285[pluginName$jscomp$inline_287]; + var pluginModule$jscomp$inline_294 = + injectedNamesToPlugins$jscomp$inline_291[pluginName$jscomp$inline_293]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_287) || - namesToPlugins[pluginName$jscomp$inline_287] !== - pluginModule$jscomp$inline_288 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_293) || + namesToPlugins[pluginName$jscomp$inline_293] !== + pluginModule$jscomp$inline_294 ) { - if (namesToPlugins[pluginName$jscomp$inline_287]) + if (namesToPlugins[pluginName$jscomp$inline_293]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_287 + "`.") + (pluginName$jscomp$inline_293 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_287] = - pluginModule$jscomp$inline_288; - isOrderingDirty$jscomp$inline_286 = !0; + namesToPlugins[pluginName$jscomp$inline_293] = + pluginModule$jscomp$inline_294; + isOrderingDirty$jscomp$inline_292 = !0; } } -isOrderingDirty$jscomp$inline_286 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_292 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -2108,6 +2108,50 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function lanesToEventPriority(lanes) { lanes &= -lanes; return 2 < lanes @@ -4036,6 +4080,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5666,6 +5715,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -6016,6 +6066,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6385,10 +6457,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6405,10 +6476,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6437,22 +6507,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -6470,7 +6540,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$1())) (JSCompiler_temp = shim$1().digest), (nextProps = Error( @@ -6494,58 +6564,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); shim$1() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -6566,12 +6595,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -6579,27 +6608,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue), (didSuspend = @@ -6610,12 +6639,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6891,10 +6920,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate( workInProgress.memoizedProps.value ); break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: - var state = workInProgress.memoizedState; - if (null !== state) { - if (null !== state.dehydrated) + var state$79 = workInProgress.memoizedState; + if (null !== state$79) { + if (null !== state$79.dehydrated) return ( pushPrimaryTreeSuspenseHandler(workInProgress), (workInProgress.flags |= 128), @@ -6914,17 +6951,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate( break; case 19: var didSuspendBefore = 0 !== (current.flags & 128); - state = 0 !== (renderLanes & workInProgress.childLanes); - state || + state$79 = 0 !== (renderLanes & workInProgress.childLanes); + state$79 || (propagateParentContextChanges( current, workInProgress, renderLanes, !1 ), - (state = 0 !== (renderLanes & workInProgress.childLanes))); + (state$79 = 0 !== (renderLanes & workInProgress.childLanes))); if (didSuspendBefore) { - if (state) + if (state$79) return updateSuspenseListComponent( current, workInProgress, @@ -6938,7 +6975,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate( (didSuspendBefore.tail = null), (didSuspendBefore.lastEffect = null)); push(suspenseStackCursor, suspenseStackCursor.current); - if (state) break; + if (state$79) break; else return null; case 22: return ( @@ -7261,29 +7298,75 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (elementType = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (elementType = { - mode: elementType.mode, - children: elementType.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - elementType, + init = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, elementType)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + ); + } else + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -7373,14 +7456,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$95 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$95 = lastTailNode), + for (var lastTailNode$96 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$96 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$95 + null === lastTailNode$96 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$95.sibling = null); + : (lastTailNode$96.sibling = null); } } function bubbleProperties(completedWork) { @@ -7390,19 +7473,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$96 = completedWork.child; null !== child$96; ) - (newChildLanes |= child$96.lanes | child$96.childLanes), - (subtreeFlags |= child$96.subtreeFlags & 65011712), - (subtreeFlags |= child$96.flags & 65011712), - (child$96.return = completedWork), - (child$96 = child$96.sibling); + for (var child$97 = completedWork.child; null !== child$97; ) + (newChildLanes |= child$97.lanes | child$97.childLanes), + (subtreeFlags |= child$97.subtreeFlags & 65011712), + (subtreeFlags |= child$97.flags & 65011712), + (child$97.return = completedWork), + (child$97 = child$97.sibling); else - for (child$96 = completedWork.child; null !== child$96; ) - (newChildLanes |= child$96.lanes | child$96.childLanes), - (subtreeFlags |= child$96.subtreeFlags), - (subtreeFlags |= child$96.flags), - (child$96.return = completedWork), - (child$96 = child$96.sibling); + for (child$97 = completedWork.child; null !== child$97; ) + (newChildLanes |= child$97.lanes | child$97.childLanes), + (subtreeFlags |= child$97.subtreeFlags), + (subtreeFlags |= child$97.flags), + (child$97.return = completedWork), + (child$97 = child$97.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7537,7 +7620,41 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + 0 === (workInProgress.flags & 128) && + (workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -7778,6 +7895,18 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -7838,6 +7967,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -7867,9 +8000,9 @@ function commitHookEffectListMount(flags, finishedWork) { do { if ((updateQueue.tag & flags) === flags) { lastEffect = void 0; - var create$119 = updateQueue.create, + var create$123 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$119(); + lastEffect = create$123(); inst.destroy = lastEffect; } updateQueue = updateQueue.next; @@ -7985,8 +8118,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$121) { - captureCommitPhaseError(current, nearestMountedAncestor, error$121); + } catch (error$125) { + captureCommitPhaseError(current, nearestMountedAncestor, error$125); } else ref.current = null; } @@ -8196,11 +8329,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$120) { + } catch (error$124) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$120 + error$124 ); } } @@ -8239,6 +8372,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { case 12: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -8465,6 +8601,7 @@ function commitDeletionEffectsOnFiber( } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -8639,6 +8776,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -8844,12 +8990,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$122 = hostParentFiber.stateNode.containerInfo, - before$123 = getHostSibling(finishedWork); + var parent$126 = hostParentFiber.stateNode.containerInfo, + before$127 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$123, - parent$122 + before$127, + parent$126 ); break; default: @@ -8986,6 +9132,13 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -9126,6 +9279,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10023,8 +10184,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$137) { - handleThrow(root, thrownValue$137); + } catch (thrownValue$142) { + handleThrow(root, thrownValue$142); } while (1); lanes && root.shellSuspendCounter++; @@ -10139,8 +10300,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$139) { - handleThrow(root, thrownValue$139); + } catch (thrownValue$144) { + handleThrow(root, thrownValue$144); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -10653,6 +10814,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -11035,11 +11197,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.2.0-native-fb-17f88c80-20250422" !== isomorphicReactPackageVersion) +if ("19.2.0-native-fb-3ef31d19-20250422" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.2.0-native-fb-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.2.0-native-fb-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11086,26 +11248,26 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1286 = { + internals$jscomp$inline_1298 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1286.rendererConfig = extraDevToolsConfig); + (internals$jscomp$inline_1298.rendererConfig = extraDevToolsConfig); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1627 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1644 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1627.isDisabled && - hook$jscomp$inline_1627.supportsFiber + !hook$jscomp$inline_1644.isDisabled && + hook$jscomp$inline_1644.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1627.inject( - internals$jscomp$inline_1286 + (rendererID = hook$jscomp$inline_1644.inject( + internals$jscomp$inline_1298 )), - (injectedHook = hook$jscomp$inline_1627); + (injectedHook = hook$jscomp$inline_1644); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 9543e42444..b70e7e0cc2 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<18f8c983be0fd26198908340ac3a6a48>> + * @generated SignedSource<<881e881b2539a7fdf36025e8d9f53ba5>> */ "use strict"; @@ -1240,7 +1240,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_301 = { +var injectedNamesToPlugins$jscomp$inline_309 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -1286,32 +1286,32 @@ var injectedNamesToPlugins$jscomp$inline_301 = { } } }, - isOrderingDirty$jscomp$inline_302 = !1, - pluginName$jscomp$inline_303; -for (pluginName$jscomp$inline_303 in injectedNamesToPlugins$jscomp$inline_301) + isOrderingDirty$jscomp$inline_310 = !1, + pluginName$jscomp$inline_311; +for (pluginName$jscomp$inline_311 in injectedNamesToPlugins$jscomp$inline_309) if ( - injectedNamesToPlugins$jscomp$inline_301.hasOwnProperty( - pluginName$jscomp$inline_303 + injectedNamesToPlugins$jscomp$inline_309.hasOwnProperty( + pluginName$jscomp$inline_311 ) ) { - var pluginModule$jscomp$inline_304 = - injectedNamesToPlugins$jscomp$inline_301[pluginName$jscomp$inline_303]; + var pluginModule$jscomp$inline_312 = + injectedNamesToPlugins$jscomp$inline_309[pluginName$jscomp$inline_311]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_303) || - namesToPlugins[pluginName$jscomp$inline_303] !== - pluginModule$jscomp$inline_304 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_311) || + namesToPlugins[pluginName$jscomp$inline_311] !== + pluginModule$jscomp$inline_312 ) { - if (namesToPlugins[pluginName$jscomp$inline_303]) + if (namesToPlugins[pluginName$jscomp$inline_311]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_303 + "`.") + (pluginName$jscomp$inline_311 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_303] = - pluginModule$jscomp$inline_304; - isOrderingDirty$jscomp$inline_302 = !0; + namesToPlugins[pluginName$jscomp$inline_311] = + pluginModule$jscomp$inline_312; + isOrderingDirty$jscomp$inline_310 = !0; } } -isOrderingDirty$jscomp$inline_302 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_310 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -2160,6 +2160,50 @@ function markRootEntangled(root, entangledLanes) { rootEntangledLanes &= ~lane; } } +function getBumpedLaneForHydration(root, renderLanes) { + var renderLane = renderLanes & -renderLanes; + if (0 !== (renderLane & 42)) renderLane = 1; + else + switch (renderLane) { + case 2: + renderLane = 1; + break; + case 8: + renderLane = 4; + break; + case 32: + renderLane = 16; + break; + case 256: + case 512: + case 1024: + case 2048: + case 4096: + case 8192: + case 16384: + case 32768: + case 65536: + case 131072: + case 262144: + case 524288: + case 1048576: + case 2097152: + case 4194304: + case 8388608: + case 16777216: + case 33554432: + renderLane = 128; + break; + case 268435456: + renderLane = 134217728; + break; + default: + renderLane = 0; + } + return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) + ? 0 + : renderLane; +} function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { @@ -4186,6 +4230,11 @@ function pushPrimaryTreeSuspenseHandler(handler) { ? (shellBoundary = handler) : null !== current.memoizedState && (shellBoundary = handler)); } +function pushDehydratedActivitySuspenseHandler(fiber) { + push(suspenseStackCursor, suspenseStackCursor.current); + push(suspenseHandlerStackCursor, fiber); + null === shellBoundary && (shellBoundary = fiber); +} function pushOffscreenSuspenseHandler(fiber) { 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current), @@ -5825,6 +5874,7 @@ function throwException( currentSourceFiber = suspenseHandlerStackCursor.current; if (null !== currentSourceFiber) { switch (currentSourceFiber.tag) { + case 31: case 13: return ( sourceFiber.mode & 1 && @@ -6177,6 +6227,28 @@ function deferHiddenOffscreenComponent( propagateParentContextChanges(current, workInProgress, renderLanes, !0); return null; } +function mountActivityChildren(workInProgress, nextProps) { + nextProps = mountWorkInProgressOffscreenFiber( + { mode: nextProps.mode, children: nextProps.children }, + workInProgress.mode + ); + nextProps.ref = workInProgress.ref; + workInProgress.child = nextProps; + nextProps.return = workInProgress; + return nextProps; +} +function retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes +) { + reconcileChildFibers(workInProgress, current.child, null, renderLanes); + current = mountActivityChildren(workInProgress, workInProgress.pendingProps); + current.flags |= 2; + popSuspenseHandler(workInProgress); + workInProgress.memoizedState = null; + return current; +} function markRef(current, workInProgress) { var ref = workInProgress.ref; if (null === ref) @@ -6557,10 +6629,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6577,10 +6648,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didSuspend, renderLanes )), - (nextPrimaryChildren = workInProgress.child), - (nextPrimaryChildren.memoizedState = - mountSuspenseOffscreenState(renderLanes)), - (nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + (showFallback = workInProgress.child), + (showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)), + (showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -6609,22 +6679,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (nextPrimaryChildren = nextProps.fallback), - (showFallback = workInProgress.mode), + (showFallback = nextProps.fallback), + (nextPrimaryChildren = workInProgress.mode), (nextProps = mountWorkInProgressOffscreenFiber( { mode: "visible", children: nextProps.children }, - showFallback + nextPrimaryChildren )), - (nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + (showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2), + (showFallback.flags |= 2), (nextProps.return = workInProgress), - (nextPrimaryChildren.return = workInProgress), - (nextProps.sibling = nextPrimaryChildren), + (showFallback.return = workInProgress), + (nextProps.sibling = showFallback), (workInProgress.child = nextProps), 0 !== (workInProgress.mode & 1) && reconcileChildFibers( @@ -6642,7 +6712,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = nextPrimaryChildren)); + (workInProgress = showFallback)); else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$1())) (JSCompiler_temp = shim$1().digest), (nextProps = Error( @@ -6666,58 +6736,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { didReceiveUpdate || JSCompiler_temp) ) { JSCompiler_temp = workInProgressRoot; - if (null !== JSCompiler_temp) { - nextProps = renderLanes & -renderLanes; - if (0 !== (nextProps & 42)) nextProps = 1; - else - switch (nextProps) { - case 2: - nextProps = 1; - break; - case 8: - nextProps = 4; - break; - case 32: - nextProps = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - nextProps = 128; - break; - case 268435456: - nextProps = 134217728; - break; - default: - nextProps = 0; - } - nextProps = - 0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes)) - ? 0 - : nextProps; - if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) - throw ( - ((nextPrimaryChildren.retryLane = nextProps), - enqueueConcurrentRenderForLane(current, nextProps), - scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), - SelectiveHydrationException) - ); - } + if ( + null !== JSCompiler_temp && + ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)), + 0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane) + ) + throw ( + ((nextPrimaryChildren.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps), + SelectiveHydrationException) + ); shim$1() || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -6738,12 +6767,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } if (showFallback) { reuseSuspenseHandlerOnStack(workInProgress); - nextPrimaryChildren = nextProps.fallback; - showFallback = workInProgress.mode; + showFallback = nextProps.fallback; + nextPrimaryChildren = workInProgress.mode; didSuspend = current.child; var currentFallbackChildFragment = didSuspend.sibling, primaryChildProps = { mode: "hidden", children: nextProps.children }; - 0 === (showFallback & 1) && workInProgress.child !== didSuspend + 0 === (nextPrimaryChildren & 1) && workInProgress.child !== didSuspend ? ((nextProps = workInProgress.child), (nextProps.childLanes = 0), (nextProps.pendingProps = primaryChildProps), @@ -6756,27 +6785,27 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { : ((nextProps = createWorkInProgress(didSuspend, primaryChildProps)), (nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712)); null !== currentFallbackChildFragment - ? (nextPrimaryChildren = createWorkInProgress( + ? (showFallback = createWorkInProgress( currentFallbackChildFragment, - nextPrimaryChildren + showFallback )) - : ((nextPrimaryChildren = createFiberFromFragment( - nextPrimaryChildren, + : ((showFallback = createFiberFromFragment( showFallback, + nextPrimaryChildren, renderLanes, null )), - (nextPrimaryChildren.flags |= 2)); - nextPrimaryChildren.return = workInProgress; + (showFallback.flags |= 2)); + showFallback.return = workInProgress; nextProps.return = workInProgress; - nextProps.sibling = nextPrimaryChildren; + nextProps.sibling = showFallback; workInProgress.child = nextProps; - nextProps = nextPrimaryChildren; - nextPrimaryChildren = workInProgress.child; - showFallback = current.child.memoizedState; - null === showFallback - ? (showFallback = mountSuspenseOffscreenState(renderLanes)) - : ((didSuspend = showFallback.cachePool), + nextProps = showFallback; + showFallback = workInProgress.child; + nextPrimaryChildren = current.child.memoizedState; + null === nextPrimaryChildren + ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes)) + : ((didSuspend = nextPrimaryChildren.cachePool), null !== didSuspend ? ((currentFallbackChildFragment = CacheContext._currentValue), (didSuspend = @@ -6787,12 +6816,12 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { } : didSuspend)) : (didSuspend = getSuspendedCache()), - (showFallback = { - baseLanes: showFallback.baseLanes | renderLanes, + (nextPrimaryChildren = { + baseLanes: nextPrimaryChildren.baseLanes | renderLanes, cachePool: didSuspend })); - nextPrimaryChildren.memoizedState = showFallback; - nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree( + showFallback.memoizedState = nextPrimaryChildren; + showFallback.childLanes = getRemainingWorkInPrimaryTree( current, JSCompiler_temp, renderLanes @@ -7082,6 +7111,14 @@ function attemptEarlyBailoutIfNoScheduledUpdate( stateNode.effectDuration = -0; stateNode.passiveEffectDuration = -0; break; + case 31: + if (null !== workInProgress.memoizedState) + return ( + (workInProgress.flags |= 128), + pushDehydratedActivitySuspenseHandler(workInProgress), + null + ); + break; case 13: stateNode = workInProgress.memoizedState; if (null !== stateNode) { @@ -7459,29 +7496,75 @@ function beginWork(current, workInProgress, renderLanes) { case 19: return updateSuspenseListComponent(current, workInProgress, renderLanes); case 31: - return ( - (elementType = workInProgress.pendingProps), - (renderLanes = workInProgress.mode), - (elementType = { - mode: elementType.mode, - children: elementType.children - }), - null === current - ? ((renderLanes = mountWorkInProgressOffscreenFiber( - elementType, + init = workInProgress.pendingProps; + nextProps = 0 !== (workInProgress.flags & 128); + workInProgress.flags &= -129; + if (null === current) + workInProgress = mountActivityChildren(workInProgress, init); + else if (((elementType = current.memoizedState), null !== elementType)) + b: { + pushDehydratedActivitySuspenseHandler(workInProgress); + if (nextProps) { + if (workInProgress.flags & 256) { + workInProgress.flags &= -257; + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, + renderLanes + ); + break b; + } + if (null !== workInProgress.memoizedState) { + workInProgress.child = current.child; + workInProgress.flags |= 128; + workInProgress = null; + break b; + } + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + didReceiveUpdate || + propagateParentContextChanges( + current, + workInProgress, + renderLanes, + !1 + ); + nextProps = 0 !== (renderLanes & current.childLanes); + if (didReceiveUpdate || nextProps) { + init = workInProgressRoot; + if ( + null !== init && + ((nextProps = getBumpedLaneForHydration(init, renderLanes)), + 0 !== nextProps && nextProps !== elementType.retryLane) + ) + throw ( + ((elementType.retryLane = nextProps), + enqueueConcurrentRenderForLane(current, nextProps), + scheduleUpdateOnFiber(init, current, nextProps), + SelectiveHydrationException) + ); + renderDidSuspendDelayIfPossible(); + workInProgress = retryActivityComponentWithoutHydrating( + current, + workInProgress, renderLanes - )), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)) - : ((renderLanes = createWorkInProgress(current.child, elementType)), - (renderLanes.ref = workInProgress.ref), - (workInProgress.child = renderLanes), - (renderLanes.return = workInProgress), - (workInProgress = renderLanes)), - workInProgress - ); + ); + } else + (workInProgress = mountActivityChildren(workInProgress, init)), + (workInProgress.flags |= 4096); + } + else + (renderLanes = createWorkInProgress(current.child, { + mode: init.mode, + children: init.children + })), + (renderLanes.ref = workInProgress.ref), + (workInProgress.child = renderLanes), + (renderLanes.return = workInProgress), + (workInProgress = renderLanes); + return workInProgress; case 22: return updateOffscreenComponent( current, @@ -7571,14 +7654,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$98 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$98 = lastTailNode), + for (var lastTailNode$99 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$99 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$98 + null === lastTailNode$99 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$98.sibling = null); + : (lastTailNode$99.sibling = null); } } function bubbleProperties(completedWork) { @@ -7590,53 +7673,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$100 = completedWork.selfBaseDuration, - child$101 = completedWork.child; - null !== child$101; + var treeBaseDuration$101 = completedWork.selfBaseDuration, + child$102 = completedWork.child; + null !== child$102; ) - (newChildLanes |= child$101.lanes | child$101.childLanes), - (subtreeFlags |= child$101.subtreeFlags & 65011712), - (subtreeFlags |= child$101.flags & 65011712), - (treeBaseDuration$100 += child$101.treeBaseDuration), - (child$101 = child$101.sibling); - completedWork.treeBaseDuration = treeBaseDuration$100; + (newChildLanes |= child$102.lanes | child$102.childLanes), + (subtreeFlags |= child$102.subtreeFlags & 65011712), + (subtreeFlags |= child$102.flags & 65011712), + (treeBaseDuration$101 += child$102.treeBaseDuration), + (child$102 = child$102.sibling); + completedWork.treeBaseDuration = treeBaseDuration$101; } else for ( - treeBaseDuration$100 = completedWork.child; - null !== treeBaseDuration$100; + treeBaseDuration$101 = completedWork.child; + null !== treeBaseDuration$101; ) (newChildLanes |= - treeBaseDuration$100.lanes | treeBaseDuration$100.childLanes), - (subtreeFlags |= treeBaseDuration$100.subtreeFlags & 65011712), - (subtreeFlags |= treeBaseDuration$100.flags & 65011712), - (treeBaseDuration$100.return = completedWork), - (treeBaseDuration$100 = treeBaseDuration$100.sibling); + treeBaseDuration$101.lanes | treeBaseDuration$101.childLanes), + (subtreeFlags |= treeBaseDuration$101.subtreeFlags & 65011712), + (subtreeFlags |= treeBaseDuration$101.flags & 65011712), + (treeBaseDuration$101.return = completedWork), + (treeBaseDuration$101 = treeBaseDuration$101.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$100 = completedWork.actualDuration; - child$101 = completedWork.selfBaseDuration; + treeBaseDuration$101 = completedWork.actualDuration; + child$102 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$100 += child.actualDuration), - (child$101 += child.treeBaseDuration), + (treeBaseDuration$101 += child.actualDuration), + (child$102 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$100; - completedWork.treeBaseDuration = child$101; + completedWork.actualDuration = treeBaseDuration$101; + completedWork.treeBaseDuration = child$102; } else for ( - treeBaseDuration$100 = completedWork.child; - null !== treeBaseDuration$100; + treeBaseDuration$101 = completedWork.child; + null !== treeBaseDuration$101; ) (newChildLanes |= - treeBaseDuration$100.lanes | treeBaseDuration$100.childLanes), - (subtreeFlags |= treeBaseDuration$100.subtreeFlags), - (subtreeFlags |= treeBaseDuration$100.flags), - (treeBaseDuration$100.return = completedWork), - (treeBaseDuration$100 = treeBaseDuration$100.sibling); + treeBaseDuration$101.lanes | treeBaseDuration$101.childLanes), + (subtreeFlags |= treeBaseDuration$101.subtreeFlags), + (subtreeFlags |= treeBaseDuration$101.flags), + (treeBaseDuration$101.return = completedWork), + (treeBaseDuration$101 = treeBaseDuration$101.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7771,7 +7854,46 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); return null; case 31: - return bubbleProperties(workInProgress), null; + renderLanes = workInProgress.memoizedState; + if (null === current || null !== current.memoizedState) { + if (null !== renderLanes) { + if (null === current) { + throw Error( + "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." + ); + throw Error( + "Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue." + ); + } + 0 === (workInProgress.flags & 128) && + (renderLanes = workInProgress.memoizedState = null); + workInProgress.flags |= 4; + bubbleProperties(workInProgress); + 0 !== (workInProgress.mode & 2) && + null !== renderLanes && + ((current = workInProgress.child), + null !== current && + (workInProgress.treeBaseDuration -= current.treeBaseDuration)); + current = !1; + } else + (renderLanes = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = renderLanes), + (current = !0); + if (!current) { + if (workInProgress.flags & 256) + return popSuspenseHandler(workInProgress), workInProgress; + popSuspenseHandler(workInProgress); + return null; + } + if (0 !== (workInProgress.flags & 128)) + throw Error( + "Client rendering an Activity suspended it again. This is a bug in React." + ); + } + bubbleProperties(workInProgress); + return null; case 13: newProps = workInProgress.memoizedState; if ( @@ -7779,7 +7901,8 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current.memoizedState && null !== current.memoizedState.dehydrated) ) { - if (null !== newProps && null !== newProps.dehydrated) { + type = newProps; + if (null !== type && null !== type.dehydrated) { if (null === current) { throw Error( "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React." @@ -7789,11 +7912,11 @@ function completeWork(current, workInProgress, renderLanes) { ); } 0 === (workInProgress.flags & 128) && - (workInProgress.memoizedState = null); + (type = workInProgress.memoizedState = null); workInProgress.flags |= 4; bubbleProperties(workInProgress); 0 !== (workInProgress.mode & 2) && - null !== newProps && + null !== type && ((type = workInProgress.child), null !== type && (workInProgress.treeBaseDuration -= type.treeBaseDuration)); @@ -8030,6 +8153,21 @@ function unwindWork(current, workInProgress) { case 27: case 5: return popHostContext(workInProgress), null; + case 31: + if ( + null !== workInProgress.memoizedState && + (popSuspenseHandler(workInProgress), null === workInProgress.alternate) + ) + throw Error( + "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue." + ); + current = workInProgress.flags; + return current & 65536 + ? ((workInProgress.flags = (current & -65537) | 128), + 0 !== (workInProgress.mode & 2) && + transferActualDuration(workInProgress), + workInProgress) + : null; case 13: popSuspenseHandler(workInProgress); current = workInProgress.memoizedState; @@ -8096,6 +8234,10 @@ function unwindInterruptedWork(current, interruptedWork) { case 4: popHostContainer(); break; + case 31: + null !== interruptedWork.memoizedState && + popSuspenseHandler(interruptedWork); + break; case 13: popSuspenseHandler(interruptedWork); break; @@ -8168,9 +8310,9 @@ function commitHookEffectListMount(flags, finishedWork) { finishedWork ); lastEffect = void 0; - var create$127 = updateQueue.create, + var create$133 = updateQueue.create, inst = updateQueue.inst; - lastEffect = create$127(); + lastEffect = create$133(); inst.destroy = lastEffect; 0 !== (flags & 8) ? null !== injectedProfilingHooks && @@ -8310,8 +8452,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$131) { - captureCommitPhaseError(current, nearestMountedAncestor, error$131); + } catch (error$137) { + captureCommitPhaseError(current, nearestMountedAncestor, error$137); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8373,8 +8515,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$132) { - captureCommitPhaseError(current, nearestMountedAncestor, error$132); + } catch (error$138) { + captureCommitPhaseError(current, nearestMountedAncestor, error$138); } else ref.current = null; } @@ -8609,11 +8751,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$128) { + } catch (error$134) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$128 + error$134 ); } else { @@ -8630,11 +8772,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$129) { + } catch (error$135) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$129 + error$135 ); } recordEffectDuration(); @@ -8645,11 +8787,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$130) { + } catch (error$136) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$130 + error$136 ); } } @@ -8698,6 +8840,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); break; + case 31: + recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); + break; case 13: recursivelyTraverseLayoutEffects(finishedRoot, finishedWork); flags & 64 && @@ -8927,6 +9072,7 @@ function commitDeletionEffectsOnFiber( } function getRetryCache(finishedWork) { switch (finishedWork.tag) { + case 31: case 13: case 19: var retryCache = finishedWork.stateNode; @@ -9118,6 +9264,15 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags); break; + case 31: + recursivelyTraverseMutationEffects(root, finishedWork); + commitReconciliationEffects(finishedWork); + flags & 4 && + ((flags = finishedWork.updateQueue), + null !== flags && + ((finishedWork.updateQueue = null), + attachSuspenseRetryListeners(finishedWork, flags))); + break; case 13: recursivelyTraverseMutationEffects(root, finishedWork); commitReconciliationEffects(finishedWork); @@ -9324,12 +9479,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$133 = hostParentFiber.stateNode.containerInfo, - before$134 = getHostSibling(finishedWork); + var parent$139 = hostParentFiber.stateNode.containerInfo, + before$140 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$134, - parent$133 + before$140, + parent$139 ); break; default: @@ -9485,6 +9640,13 @@ function recursivelyTraverseReappearLayoutEffects( includeWorkInProgressEffects ); break; + case 31: + recursivelyTraverseReappearLayoutEffects( + finishedRoot, + finishedWork, + includeWorkInProgressEffects + ); + break; case 13: recursivelyTraverseReappearLayoutEffects( finishedRoot, @@ -9636,6 +9798,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 31: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 13: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10593,8 +10763,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$152) { - handleThrow(root, thrownValue$152); + } catch (thrownValue$159) { + handleThrow(root, thrownValue$159); } while (1); lanes && root.shellSuspendCounter++; @@ -10717,8 +10887,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrentByScheduler(); break; - } catch (thrownValue$154) { - handleThrow(root, thrownValue$154); + } catch (thrownValue$161) { + handleThrow(root, thrownValue$161); } while (1); lastContextDependency = currentlyRenderingFiber$1 = null; @@ -11314,6 +11484,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) { function resolveRetryWakeable(boundaryFiber, wakeable) { var retryLane = 0; switch (boundaryFiber.tag) { + case 31: case 13: var retryCache = boundaryFiber.stateNode; var suspenseState = boundaryFiber.memoizedState; @@ -11725,11 +11896,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.2.0-native-fb-17f88c80-20250422" !== isomorphicReactPackageVersion) +if ("19.2.0-native-fb-3ef31d19-20250422" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.2.0-native-fb-17f88c80-20250422\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.2.0-native-fb-3ef31d19-20250422\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11776,20 +11947,20 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - internals$jscomp$inline_1381 = { + internals$jscomp$inline_1399 = { bundleType: 0, - version: "19.2.0-native-fb-17f88c80-20250422", + version: "19.2.0-native-fb-3ef31d19-20250422", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-17f88c80-20250422" + reconcilerVersion: "19.2.0-native-fb-3ef31d19-20250422" }; null !== extraDevToolsConfig && - (internals$jscomp$inline_1381.rendererConfig = extraDevToolsConfig); -internals$jscomp$inline_1381.getLaneLabelMap = function () { + (internals$jscomp$inline_1399.rendererConfig = extraDevToolsConfig); +internals$jscomp$inline_1399.getLaneLabelMap = function () { for ( - var map = new Map(), lane = 1, index$158 = 0; - 31 > index$158; - index$158++ + var map = new Map(), lane = 1, index$165 = 0; + 31 > index$165; + index$165++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -11797,20 +11968,20 @@ internals$jscomp$inline_1381.getLaneLabelMap = function () { } return map; }; -internals$jscomp$inline_1381.injectProfilingHooks = function (profilingHooks) { +internals$jscomp$inline_1399.injectProfilingHooks = function (profilingHooks) { injectedProfilingHooks = profilingHooks; }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1688 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1711 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1688.isDisabled && - hook$jscomp$inline_1688.supportsFiber + !hook$jscomp$inline_1711.isDisabled && + hook$jscomp$inline_1711.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1688.inject( - internals$jscomp$inline_1381 + (rendererID = hook$jscomp$inline_1711.inject( + internals$jscomp$inline_1399 )), - (injectedHook = hook$jscomp$inline_1688); + (injectedHook = hook$jscomp$inline_1711); } catch (err) {} } exports.createPortal = function (children, containerTag) {