From fee13cfe86eb39442af6fa8ad46b29cb81123944 Mon Sep 17 00:00:00 2001 From: 22388o <22388o@users.noreply.github.com> Date: Thu, 19 Dec 2024 06:12:20 -0800 Subject: [PATCH] [Flight] Reject any new Chunks not yet discovered at the time of reportGlobalError (#31851) Same as #31840 but for the Flight Client. DiffTrain build for [a9bbe34622885ef5667d33236d580fe7321c0d8b](https://github.com/facebook/react/commit/a9bbe34622885ef5667d33236d580fe7321c0d8b) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/REVISION_TRANSFORMS | 2 +- compiled/facebook-www/React-dev.classic.js | 2 +- compiled/facebook-www/React-dev.modern.js | 2 +- compiled/facebook-www/React-prod.classic.js | 2 +- compiled/facebook-www/React-prod.modern.js | 2 +- .../facebook-www/React-profiling.classic.js | 2 +- .../facebook-www/React-profiling.modern.js | 2 +- compiled/facebook-www/ReactART-dev.classic.js | 1566 +++++----- compiled/facebook-www/ReactART-dev.modern.js | 1566 +++++----- .../facebook-www/ReactART-prod.classic.js | 1542 +++++----- compiled/facebook-www/ReactART-prod.modern.js | 1542 +++++----- compiled/facebook-www/ReactDOM-dev.classic.js | 2318 ++++++++------- compiled/facebook-www/ReactDOM-dev.modern.js | 2320 ++++++++------- .../facebook-www/ReactDOM-prod.classic.js | 2290 +++++++-------- compiled/facebook-www/ReactDOM-prod.modern.js | 2290 +++++++-------- .../ReactDOM-profiling.classic.js | 1832 ++++++------ .../facebook-www/ReactDOM-profiling.modern.js | 1832 ++++++------ .../ReactDOMServer-dev.classic.js | 2 +- .../facebook-www/ReactDOMServer-dev.modern.js | 2 +- .../ReactDOMServer-prod.classic.js | 2 +- .../ReactDOMServer-prod.modern.js | 2 +- .../ReactDOMTesting-dev.classic.js | 2318 ++++++++------- .../ReactDOMTesting-dev.modern.js | 2320 ++++++++------- .../ReactDOMTesting-prod.classic.js | 2290 +++++++-------- .../ReactDOMTesting-prod.modern.js | 2290 +++++++-------- .../ReactReconciler-dev.classic.js | 2511 ++++++++--------- .../ReactReconciler-dev.modern.js | 2511 ++++++++--------- .../ReactReconciler-prod.classic.js | 1402 ++++----- .../ReactReconciler-prod.modern.js | 1402 ++++----- .../ReactTestRenderer-dev.classic.js | 2135 +++++++------- .../ReactTestRenderer-dev.modern.js | 2135 +++++++------- .../facebook-www/Scheduler-dev.classic.js | 22 +- compiled/facebook-www/Scheduler-dev.modern.js | 22 +- .../facebook-www/Scheduler-prod.classic.js | 21 +- .../facebook-www/Scheduler-prod.modern.js | 21 +- .../Scheduler-profiling.classic.js | 21 +- .../Scheduler-profiling.modern.js | 21 +- .../facebook-www/SchedulerMock-dev.classic.js | 9 - .../facebook-www/SchedulerMock-dev.modern.js | 9 - .../SchedulerMock-prod.classic.js | 9 - .../facebook-www/SchedulerMock-prod.modern.js | 9 - .../SchedulerPostTask-dev.classic.js | 5 - .../SchedulerPostTask-dev.modern.js | 5 - .../SchedulerPostTask-prod.classic.js | 5 - .../SchedulerPostTask-prod.modern.js | 5 - .../SchedulerPostTask-profiling.classic.js | 5 - .../SchedulerPostTask-profiling.modern.js | 5 - compiled/facebook-www/VERSION_CLASSIC | 2 +- compiled/facebook-www/VERSION_MODERN | 2 +- 50 files changed, 20278 insertions(+), 20356 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 38ba8aec4e512..b7f5bdda2aadc 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -d42872588282b9eef56b8fa02441b33d596fd197 +a9bbe34622885ef5667d33236d580fe7321c0d8b diff --git a/compiled/facebook-www/REVISION_TRANSFORMS b/compiled/facebook-www/REVISION_TRANSFORMS index 38ba8aec4e512..b7f5bdda2aadc 100644 --- a/compiled/facebook-www/REVISION_TRANSFORMS +++ b/compiled/facebook-www/REVISION_TRANSFORMS @@ -1 +1 @@ -d42872588282b9eef56b8fa02441b33d596fd197 +a9bbe34622885ef5667d33236d580fe7321c0d8b diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index fbc99ddb3b35c..99c9c02d4d9ed 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -1942,7 +1942,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.1.0-www-classic-d4287258-20241217"; + exports.version = "19.1.0-www-classic-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 7c0085ea7dc60..9760fa4745690 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -1942,7 +1942,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.1.0-www-modern-d4287258-20241217"; + exports.version = "19.1.0-www-modern-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index f393f48328a92..655a367a799a6 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -630,4 +630,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-classic-d4287258-20241217"; +exports.version = "19.1.0-www-classic-a9bbe346-20241219"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 88dc24c88a8b4..53b057e4888db 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -630,4 +630,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-modern-d4287258-20241217"; +exports.version = "19.1.0-www-modern-a9bbe346-20241219"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 523867ddd2807..94909e22a8638 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -634,7 +634,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-classic-d4287258-20241217"; +exports.version = "19.1.0-www-classic-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 6115cc4048f3a..f714ef2c527e4 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -634,7 +634,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.1.0-www-modern-d4287258-20241217"; +exports.version = "19.1.0-www-modern-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 364b48a469f23..3426e94d5d0e5 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -1984,88 +1984,253 @@ __DEV__ && )); return skipToNode + debugInfo + propName; } - function finishQueueingConcurrentUpdates() { + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; + } + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue2, providerFiber); + context._currentValue2 = nextValue; + push(renderer2CursorDEV, context._currentRenderer2, providerFiber); + void 0 !== context._currentRenderer2 && + null !== context._currentRenderer2 && + context._currentRenderer2 !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ); + context._currentRenderer2 = rendererSigil; + } + function popProvider(context, providerFiber) { + context._currentValue2 = valueCursor.current; + var currentRenderer2 = renderer2CursorDEV.current; + pop(renderer2CursorDEV, providerFiber); + context._currentRenderer2 = currentRenderer2; + pop(valueCursor, providerFiber); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; + function readContextForConsumer(consumer, context) { + var value = context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function pushNestedEffectDurations() { var prevEffectDuration = profilerEffectDuration; @@ -2320,66 +2485,307 @@ __DEV__ && }); scheduleCallback$3(ImmediatePriority, cb); } - function requestTransitionLane() { - 0 === currentEventTransitionLane && - (currentEventTransitionLane = claimNextTransitionLane()); - return currentEventTransitionLane; + function requestTransitionLane() { + 0 === currentEventTransitionLane && + (currentEventTransitionLane = claimNextTransitionLane()); + return currentEventTransitionLane; + } + function entangleAsyncAction(transition, thenable) { + if (null === currentEntangledListeners) { + var entangledListeners = (currentEntangledListeners = []); + currentEntangledPendingCount = 0; + currentEntangledLane = requestTransitionLane(); + currentEntangledActionThenable = { + status: "pending", + value: void 0, + then: function (resolve) { + entangledListeners.push(resolve); + } + }; + } + currentEntangledPendingCount++; + thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); + return thenable; + } + function pingEngtangledActionScope() { + if ( + 0 === --currentEntangledPendingCount && + null !== currentEntangledListeners + ) { + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } + } + function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); + } + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; + } + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; + } + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions, offscreenWorkInProgress) + : null === newTransitions + ? push( + transitionStack, + transitionStack.current, + offscreenWorkInProgress + ) + : push( + transitionStack, + transitionStack.current.concat(newTransitions), + offscreenWorkInProgress + )); + } + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack, workInProgress), + pop(resumedCache, workInProgress)); + } + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue2, pool: cacheFromPool }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; + } + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), + error$jscomp$0( + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop, noop), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop, noop); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error( + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); } - function entangleAsyncAction(transition, thenable) { - if (null === currentEntangledListeners) { - var entangledListeners = (currentEntangledListeners = []); - currentEntangledPendingCount = 0; - currentEntangledLane = requestTransitionLane(); - currentEntangledActionThenable = { - status: "pending", - value: void 0, - then: function (resolve) { - entangledListeners.push(resolve); - } - }; - } - currentEntangledPendingCount++; - thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); - return thenable; + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); } - function pingEngtangledActionScope() { - if ( - 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners - ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); - } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } - function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); + } + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; } function initializeUpdateQueue(fiber) { fiber.updateQueue = { @@ -2685,124 +3091,6 @@ __DEV__ && ) callCallback(callbacks[updateQueue], context); } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; - } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop, noop), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop, noop); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; - } - } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - } function pushHiddenContext(fiber, context) { var prevEntangledRenderLanes = entangledRenderLanes; push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); @@ -2835,9 +3123,7 @@ __DEV__ && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName) ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); if ( !didWarnAboutMismatchedHooksForComponent.has(componentName) && (didWarnAboutMismatchedHooksForComponent.add(componentName), @@ -2875,7 +3161,7 @@ __DEV__ && ); } function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), error$jscomp$0( @@ -2918,7 +3204,7 @@ __DEV__ && nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; hookTypesDev = null !== current ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -2929,9 +3215,7 @@ __DEV__ && "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component) ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), error$jscomp$0( @@ -2991,7 +3275,7 @@ __DEV__ && currentHookNameInDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; null !== current && @@ -3026,7 +3310,7 @@ __DEV__ && ))); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -3061,7 +3345,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function bailoutHooks(current, workInProgress, lanes) { @@ -3089,7 +3373,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -3106,26 +3390,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -3140,7 +3424,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -3154,7 +3438,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -3175,10 +3459,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -3196,7 +3480,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -3244,7 +3528,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3322,7 +3606,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -3343,7 +3627,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -3390,7 +3674,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (!didWarnUncachedGetSnapshot) { @@ -3430,7 +3714,7 @@ __DEV__ && return nextSnapshot; } function updateSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (!didWarnUncachedGetSnapshot) { @@ -3482,10 +3766,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3543,11 +3827,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -3564,7 +3844,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3728,14 +4008,14 @@ __DEV__ && stateHook.queue = stateQueue; stateHook = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateQueue ); stateQueue.dispatch = stateHook; stateQueue = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, stateQueue.queue ); @@ -3749,7 +4029,7 @@ __DEV__ && stateQueue.queue = actionQueue; stateHook = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, actionQueue, setPendingState, stateHook @@ -3785,7 +4065,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -3847,10 +4127,10 @@ __DEV__ && }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -3873,7 +4153,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -3889,7 +4169,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -3898,8 +4178,8 @@ __DEV__ && ))); } function mountEffect(create, deps) { - 0 !== (currentlyRenderingFiber$1.mode & 16) && - 0 === (currentlyRenderingFiber$1.mode & 64) + 0 !== (currentlyRenderingFiber.mode & 16) && + 0 === (currentlyRenderingFiber.mode & 64) ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } @@ -3911,12 +4191,12 @@ __DEV__ && destroy ) { if ( - 0 !== (currentlyRenderingFiber$1.mode & 16) && - 0 === (currentlyRenderingFiber$1.mode & 64) + 0 !== (currentlyRenderingFiber.mode & 16) && + 0 === (currentlyRenderingFiber.mode & 64) ) { var hookFlags = Passive, hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 142608384; + currentlyRenderingFiber.flags |= 142608384; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -3931,7 +4211,7 @@ __DEV__ && } else (hookFlags = Passive), (hook = mountWorkInProgressHook()), - (currentlyRenderingFiber$1.flags |= 8390656), + (currentlyRenderingFiber.flags |= 8390656), (inst = createEffectInstance()), (inst.destroy = destroy), (hook.memoizedState = pushResourceEffect( @@ -3987,7 +4267,7 @@ __DEV__ && } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= fiberFlags); + (currentlyRenderingFiber.flags |= fiberFlags); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? hookFlags : HasEffect | hookFlags, isUpdateDepsSame ? hookFlags : HasEffect | hookFlags, @@ -3999,11 +4279,11 @@ __DEV__ && ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -4037,7 +4317,7 @@ __DEV__ && } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - 0 !== (currentlyRenderingFiber$1.mode & 16) && (fiberFlags |= 67108864); + 0 !== (currentlyRenderingFiber.mode & 16) && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } function imperativeHandleEffect(create, ref) { @@ -4070,7 +4350,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - 0 !== (currentlyRenderingFiber$1.mode & 16) && (fiberFlags |= 67108864); + 0 !== (currentlyRenderingFiber.mode & 16) && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, Layout, @@ -4170,7 +4450,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -4185,7 +4465,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -4263,7 +4543,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -4305,7 +4585,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -4330,66 +4610,38 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, + args = requestUpdateLane(fiber); + var update = { + lane: args, revertLane: 0, action: action, hasEagerState: !1, eagerState: null, - next: null - }; - isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + next: null + }; + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -4474,8 +4726,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -8468,335 +8720,59 @@ __DEV__ && renderLanes, !0 ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current - ? ((returnFiber = enableTransitionTracing - ? transitionStack.current - : null), - null !== returnFiber && - ((returnFiber = { - tag: TransitionTracingMarker, - transitions: new Set(returnFiber), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = returnFiber), - (workInProgress.flags |= 2048))) - : current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ), - (returnFiber = workInProgress.stateNode), - null !== returnFiber && - pushMarkerInstance(workInProgress, returnFiber), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); - } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue2, providerFiber); - context._currentValue2 = nextValue; - push(renderer2CursorDEV, context._currentRenderer2, providerFiber); - void 0 !== context._currentRenderer2 && - null !== context._currentRenderer2 && - context._currentRenderer2 !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ); - context._currentRenderer2 = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue2 = valueCursor.current; - var currentRenderer2 = renderer2CursorDEV.current; - pop(renderer2CursorDEV, providerFiber); - context._currentRenderer2 = currentRenderer2; - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions, offscreenWorkInProgress) - : null === newTransitions - ? push( - transitionStack, - transitionStack.current, - offscreenWorkInProgress - ) - : push( - transitionStack, - transitionStack.current.concat(newTransitions), - offscreenWorkInProgress - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack, workInProgress), - pop(resumedCache, workInProgress)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue2, pool: cacheFromPool }; + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; + } + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } function collectScopedNodesFromChildren( startingChild, @@ -9049,9 +9025,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))), + upgradeHydrationErrorsToRecoverable()), bubbleProperties(workInProgress), enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -9196,9 +9170,12 @@ __DEV__ && fallthroughToNormalSuspensePath.treeBaseDuration)); fallthroughToNormalSuspensePath = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (fallthroughToNormalSuspensePath = + upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = + fallthroughToNormalSuspensePath), (fallthroughToNormalSuspensePath = !0); if (!fallthroughToNormalSuspensePath) { if (workInProgress.flags & 256) @@ -11732,6 +11709,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -12470,7 +12455,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = renderWasConcurrent; } @@ -12607,14 +12598,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -12797,7 +12780,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -13424,9 +13407,6 @@ __DEV__ && throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -13441,24 +13421,30 @@ __DEV__ && root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); 0 !== (finishedWork.subtreeFlags & 15990) || transitions ? ((transitions = ReactSharedInternals.T), (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), + (updatedLanes = currentUpdatePriority), (currentUpdatePriority = DiscreteEventPriority), - (updatedLanes = executionContext), + (suspendedRetryLanes = executionContext), (executionContext |= CommitContext), commitBeforeMutationEffects(root, finishedWork), commitMutationEffects(root, finishedWork, lanes), @@ -13477,12 +13463,12 @@ __DEV__ && typeof injectedProfilingHooks.markLayoutEffectsStopped && injectedProfilingHooks.markLayoutEffectsStopped(), requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), + (executionContext = suspendedRetryLanes), + (currentUpdatePriority = updatedLanes), (ReactSharedInternals.T = transitions)) : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), + (transitions = spawnedLane) + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : (releaseRootPooledCache(root, remainingLanes), @@ -13493,7 +13479,6 @@ __DEV__ && transitions || commitDoubleInvokeEffectsInDEV(root); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -13501,14 +13486,15 @@ __DEV__ && finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), + (spawnedLane = makeErrorInfo(remainingLanes.stack)), runWithFiberInDEV( remainingLanes.source, renderPriorityLevel, remainingLanes.value, - transitions + spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -13852,7 +13838,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -14794,9 +14780,42 @@ __DEV__ && needsEscaping = /["'&<>\n\t]|^\s|\s$/, hydrationDiffRootDEV = null, hydrationErrors = null, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var renderer2CursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler.unstable_now, commitStartTime = -0, profilerStartTime = -1.1, @@ -14815,14 +14834,17 @@ __DEV__ && currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -15040,6 +15062,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -15050,7 +15083,7 @@ __DEV__ && var ResourceEffectIdentityKind = 0, ResourceEffectUpdateKind = 1, renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -16532,55 +16565,13 @@ __DEV__ && var didWarnAboutTailOptions = {}; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var renderer2CursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), + hasWarnedAboutUsingNoValuePropOnContextProvider = !1, emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -16665,7 +16656,6 @@ __DEV__ && currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -16904,10 +16894,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-d4287258-20241217", + version: "19.1.0-www-classic-a9bbe346-20241219", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16941,7 +16931,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.1.0-www-classic-d4287258-20241217"; + exports.version = "19.1.0-www-classic-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index baf3017bf20ec..bc049cf00fbf8 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -1876,88 +1876,253 @@ __DEV__ && )); return skipToNode + debugInfo + propName; } - function finishQueueingConcurrentUpdates() { + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; + } + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue2, providerFiber); + context._currentValue2 = nextValue; + push(renderer2CursorDEV, context._currentRenderer2, providerFiber); + void 0 !== context._currentRenderer2 && + null !== context._currentRenderer2 && + context._currentRenderer2 !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ); + context._currentRenderer2 = rendererSigil; + } + function popProvider(context, providerFiber) { + context._currentValue2 = valueCursor.current; + var currentRenderer2 = renderer2CursorDEV.current; + pop(renderer2CursorDEV, providerFiber); + context._currentRenderer2 = currentRenderer2; + pop(valueCursor, providerFiber); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; + function readContextForConsumer(consumer, context) { + var value = context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function pushNestedEffectDurations() { var prevEffectDuration = profilerEffectDuration; @@ -2212,66 +2377,307 @@ __DEV__ && }); scheduleCallback$3(ImmediatePriority, cb); } - function requestTransitionLane() { - 0 === currentEventTransitionLane && - (currentEventTransitionLane = claimNextTransitionLane()); - return currentEventTransitionLane; + function requestTransitionLane() { + 0 === currentEventTransitionLane && + (currentEventTransitionLane = claimNextTransitionLane()); + return currentEventTransitionLane; + } + function entangleAsyncAction(transition, thenable) { + if (null === currentEntangledListeners) { + var entangledListeners = (currentEntangledListeners = []); + currentEntangledPendingCount = 0; + currentEntangledLane = requestTransitionLane(); + currentEntangledActionThenable = { + status: "pending", + value: void 0, + then: function (resolve) { + entangledListeners.push(resolve); + } + }; + } + currentEntangledPendingCount++; + thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); + return thenable; + } + function pingEngtangledActionScope() { + if ( + 0 === --currentEntangledPendingCount && + null !== currentEntangledListeners + ) { + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } + } + function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); + } + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; + } + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; + } + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions, offscreenWorkInProgress) + : null === newTransitions + ? push( + transitionStack, + transitionStack.current, + offscreenWorkInProgress + ) + : push( + transitionStack, + transitionStack.current.concat(newTransitions), + offscreenWorkInProgress + )); + } + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack, workInProgress), + pop(resumedCache, workInProgress)); + } + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue2, pool: cacheFromPool }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; + } + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), + error$jscomp$0( + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop, noop), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop, noop); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error( + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); } - function entangleAsyncAction(transition, thenable) { - if (null === currentEntangledListeners) { - var entangledListeners = (currentEntangledListeners = []); - currentEntangledPendingCount = 0; - currentEntangledLane = requestTransitionLane(); - currentEntangledActionThenable = { - status: "pending", - value: void 0, - then: function (resolve) { - entangledListeners.push(resolve); - } - }; - } - currentEntangledPendingCount++; - thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); - return thenable; + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); } - function pingEngtangledActionScope() { - if ( - 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners - ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); - } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } - function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); + } + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; } function initializeUpdateQueue(fiber) { fiber.updateQueue = { @@ -2577,124 +2983,6 @@ __DEV__ && ) callCallback(callbacks[updateQueue], context); } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; - } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop, noop), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop, noop); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; - } - } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - } function pushHiddenContext(fiber, context) { var prevEntangledRenderLanes = entangledRenderLanes; push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); @@ -2727,9 +3015,7 @@ __DEV__ && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName) ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); if ( !didWarnAboutMismatchedHooksForComponent.has(componentName) && (didWarnAboutMismatchedHooksForComponent.add(componentName), @@ -2767,7 +3053,7 @@ __DEV__ && ); } function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), error$jscomp$0( @@ -2810,7 +3096,7 @@ __DEV__ && nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; hookTypesDev = null !== current ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -2821,9 +3107,7 @@ __DEV__ && "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component) ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), error$jscomp$0( @@ -2883,7 +3167,7 @@ __DEV__ && currentHookNameInDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; null !== current && @@ -2918,7 +3202,7 @@ __DEV__ && ))); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2953,7 +3237,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function bailoutHooks(current, workInProgress, lanes) { @@ -2981,7 +3265,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -2998,26 +3282,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -3032,7 +3316,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -3046,7 +3330,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -3067,10 +3351,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -3088,7 +3372,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -3136,7 +3420,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3214,7 +3498,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -3235,7 +3519,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -3282,7 +3566,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (!didWarnUncachedGetSnapshot) { @@ -3322,7 +3606,7 @@ __DEV__ && return nextSnapshot; } function updateSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (!didWarnUncachedGetSnapshot) { @@ -3374,10 +3658,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3435,11 +3719,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -3456,7 +3736,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3620,14 +3900,14 @@ __DEV__ && stateHook.queue = stateQueue; stateHook = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateQueue ); stateQueue.dispatch = stateHook; stateQueue = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, stateQueue.queue ); @@ -3641,7 +3921,7 @@ __DEV__ && stateQueue.queue = actionQueue; stateHook = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, actionQueue, setPendingState, stateHook @@ -3677,7 +3957,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -3739,10 +4019,10 @@ __DEV__ && }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -3765,7 +4045,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -3781,7 +4061,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -3790,8 +4070,8 @@ __DEV__ && ))); } function mountEffect(create, deps) { - 0 !== (currentlyRenderingFiber$1.mode & 16) && - 0 === (currentlyRenderingFiber$1.mode & 64) + 0 !== (currentlyRenderingFiber.mode & 16) && + 0 === (currentlyRenderingFiber.mode & 64) ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } @@ -3803,12 +4083,12 @@ __DEV__ && destroy ) { if ( - 0 !== (currentlyRenderingFiber$1.mode & 16) && - 0 === (currentlyRenderingFiber$1.mode & 64) + 0 !== (currentlyRenderingFiber.mode & 16) && + 0 === (currentlyRenderingFiber.mode & 64) ) { var hookFlags = Passive, hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 142608384; + currentlyRenderingFiber.flags |= 142608384; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -3823,7 +4103,7 @@ __DEV__ && } else (hookFlags = Passive), (hook = mountWorkInProgressHook()), - (currentlyRenderingFiber$1.flags |= 8390656), + (currentlyRenderingFiber.flags |= 8390656), (inst = createEffectInstance()), (inst.destroy = destroy), (hook.memoizedState = pushResourceEffect( @@ -3879,7 +4159,7 @@ __DEV__ && } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= fiberFlags); + (currentlyRenderingFiber.flags |= fiberFlags); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? hookFlags : HasEffect | hookFlags, isUpdateDepsSame ? hookFlags : HasEffect | hookFlags, @@ -3891,11 +4171,11 @@ __DEV__ && ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -3929,7 +4209,7 @@ __DEV__ && } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - 0 !== (currentlyRenderingFiber$1.mode & 16) && (fiberFlags |= 67108864); + 0 !== (currentlyRenderingFiber.mode & 16) && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } function imperativeHandleEffect(create, ref) { @@ -3962,7 +4242,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - 0 !== (currentlyRenderingFiber$1.mode & 16) && (fiberFlags |= 67108864); + 0 !== (currentlyRenderingFiber.mode & 16) && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, Layout, @@ -4062,7 +4342,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -4077,7 +4357,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -4155,7 +4435,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -4197,7 +4477,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -4222,66 +4502,38 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, + args = requestUpdateLane(fiber); + var update = { + lane: args, revertLane: 0, action: action, hasEagerState: !1, eagerState: null, - next: null - }; - isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + next: null + }; + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -4366,8 +4618,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -8286,335 +8538,59 @@ __DEV__ && renderLanes, !0 ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current - ? ((returnFiber = enableTransitionTracing - ? transitionStack.current - : null), - null !== returnFiber && - ((returnFiber = { - tag: TransitionTracingMarker, - transitions: new Set(returnFiber), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = returnFiber), - (workInProgress.flags |= 2048))) - : current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ), - (returnFiber = workInProgress.stateNode), - null !== returnFiber && - pushMarkerInstance(workInProgress, returnFiber), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); - } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue2, providerFiber); - context._currentValue2 = nextValue; - push(renderer2CursorDEV, context._currentRenderer2, providerFiber); - void 0 !== context._currentRenderer2 && - null !== context._currentRenderer2 && - context._currentRenderer2 !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ); - context._currentRenderer2 = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue2 = valueCursor.current; - var currentRenderer2 = renderer2CursorDEV.current; - pop(renderer2CursorDEV, providerFiber); - context._currentRenderer2 = currentRenderer2; - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions, offscreenWorkInProgress) - : null === newTransitions - ? push( - transitionStack, - transitionStack.current, - offscreenWorkInProgress - ) - : push( - transitionStack, - transitionStack.current.concat(newTransitions), - offscreenWorkInProgress - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack, workInProgress), - pop(resumedCache, workInProgress)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue2, pool: cacheFromPool }; + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; + } + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } function collectScopedNodesFromChildren( startingChild, @@ -8861,9 +8837,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))), + upgradeHydrationErrorsToRecoverable()), bubbleProperties(workInProgress), enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -9008,9 +8982,12 @@ __DEV__ && fallthroughToNormalSuspensePath.treeBaseDuration)); fallthroughToNormalSuspensePath = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (fallthroughToNormalSuspensePath = + upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = + fallthroughToNormalSuspensePath), (fallthroughToNormalSuspensePath = !0); if (!fallthroughToNormalSuspensePath) { if (workInProgress.flags & 256) @@ -11536,6 +11513,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -12274,7 +12259,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = renderWasConcurrent; } @@ -12411,14 +12402,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -12601,7 +12584,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -13224,9 +13207,6 @@ __DEV__ && throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -13241,24 +13221,30 @@ __DEV__ && root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); 0 !== (finishedWork.subtreeFlags & 15990) || transitions ? ((transitions = ReactSharedInternals.T), (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), + (updatedLanes = currentUpdatePriority), (currentUpdatePriority = DiscreteEventPriority), - (updatedLanes = executionContext), + (suspendedRetryLanes = executionContext), (executionContext |= CommitContext), commitBeforeMutationEffects(root, finishedWork), commitMutationEffects(root, finishedWork, lanes), @@ -13277,12 +13263,12 @@ __DEV__ && typeof injectedProfilingHooks.markLayoutEffectsStopped && injectedProfilingHooks.markLayoutEffectsStopped(), requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), + (executionContext = suspendedRetryLanes), + (currentUpdatePriority = updatedLanes), (ReactSharedInternals.T = transitions)) : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), + (transitions = spawnedLane) + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : (releaseRootPooledCache(root, remainingLanes), @@ -13293,7 +13279,6 @@ __DEV__ && transitions || commitDoubleInvokeEffectsInDEV(root); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -13301,14 +13286,15 @@ __DEV__ && finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), + (spawnedLane = makeErrorInfo(remainingLanes.stack)), runWithFiberInDEV( remainingLanes.source, renderPriorityLevel, remainingLanes.value, - transitions + spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -13652,7 +13638,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -14547,9 +14533,42 @@ __DEV__ && needsEscaping = /["'&<>\n\t]|^\s|\s$/, hydrationDiffRootDEV = null, hydrationErrors = null, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var renderer2CursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler.unstable_now, commitStartTime = -0, profilerStartTime = -1.1, @@ -14568,14 +14587,17 @@ __DEV__ && currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -14793,6 +14815,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -14803,7 +14836,7 @@ __DEV__ && var ResourceEffectIdentityKind = 0, ResourceEffectUpdateKind = 1, renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -16295,55 +16328,13 @@ __DEV__ && var didWarnAboutTailOptions = {}; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var renderer2CursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), + hasWarnedAboutUsingNoValuePropOnContextProvider = !1, emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -16428,7 +16419,6 @@ __DEV__ && currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -16667,10 +16657,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-d4287258-20241217", + version: "19.1.0-www-modern-a9bbe346-20241219", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -16704,7 +16694,7 @@ __DEV__ && exports.Shape = Shape; exports.Surface = Surface; exports.Text = Text; - exports.version = "19.1.0-www-modern-d4287258-20241217"; + exports.version = "19.1.0-www-modern-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index b168691167c58..1801b07ef3fb9 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -1110,82 +1110,228 @@ function popHostContext(fiber) { } var hydrationErrors = null; Error(formatProdErrorMessage(519)); -var concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0; -function finishQueueingConcurrentUpdates() { +function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; +} +var valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null; +function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue2); + context._currentValue2 = nextValue; +} +function popProvider(context) { + context._currentValue2 = valueCursor.current; + pop(valueCursor); +} +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } +} +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } +} +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } -function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } -function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); +function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } -function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); +function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } -function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } -function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +function readContextForConsumer(consumer, context) { + var value = context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; +} +var AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; +} +function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } var firstScheduledRoot = null, lastScheduledRoot = null, @@ -1394,44 +1540,265 @@ function entangleAsyncAction(transition, thenable) { thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); return thenable; } -function pingEngtangledActionScope() { - if ( - 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners - ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); - } +function pingEngtangledActionScope() { + if ( + 0 === --currentEntangledPendingCount && + null !== currentEntangledListeners + ) { + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } +} +function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); + } + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; +} +var prevOnStartTransitionFinish = ReactSharedInternals.S; +ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); +}; +var resumedCache = createCursor(null), + transitionStack = createCursor(null); +function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; +} +function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions +) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); +} +function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); +} +function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue2, pool: cacheFromPool }; +} +var hasOwnProperty = Object.prototype.hasOwnProperty; +function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; +} +var SuspenseException = Error(formatProdErrorMessage(460)), + SuspenseyCommitException = Error(formatProdErrorMessage(474)), + SuspenseActionException = Error(formatProdErrorMessage(542)), + noopSuspenseyCommitThenable = { then: function () {} }; +function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; +} +function noop() {} +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop, noop); + else { + thenableState = workInProgressRoot; + if (null !== thenableState && 100 < thenableState.shellSuspendCounter) + throw Error(formatProdErrorMessage(482)); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + throw SuspenseException; + } +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; +} +function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error(formatProdErrorMessage(483)); +} +var concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0; +function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } +} +function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); +} +function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); +} +function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); +} +function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } -function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; +function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; } var hasForceUpdate = !1; function initializeUpdateQueue(fiber) { @@ -1677,105 +2044,6 @@ function commitCallbacks(updateQueue, context) { ) callCallback(callbacks[updateQueue], context); } -var hasOwnProperty = Object.prototype.hasOwnProperty; -function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; -} -var SuspenseException = Error(formatProdErrorMessage(460)), - SuspenseyCommitException = Error(formatProdErrorMessage(474)), - SuspenseActionException = Error(formatProdErrorMessage(542)), - noopSuspenseyCommitThenable = { then: function () {} }; -function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; -} -function noop() {} -function trackUsedThenable(thenableState, thenable, index) { - index = thenableState[index]; - void 0 === index - ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop, noop); - else { - thenableState = workInProgressRoot; - if (null !== thenableState && 100 < thenableState.shellSuspendCounter) - throw Error(formatProdErrorMessage(482)); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - throw SuspenseException; - } -} -var suspendedThenable = null; -function getSuspendedThenable() { - if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); - var thenable = suspendedThenable; - suspendedThenable = null; - return thenable; -} -function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error(formatProdErrorMessage(483)); -} var currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0); function pushHiddenContext(fiber, context) { @@ -1794,7 +2062,7 @@ function popHiddenContext() { pop(prevEntangledRenderLanesCursor); } var renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -1821,7 +2089,7 @@ function renderWithHooks( nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -1846,7 +2114,7 @@ function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -1859,7 +2127,7 @@ function finishRenderingHooks(current) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -1889,7 +2157,7 @@ function TransitionAwareHostComponent() { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function bailoutHooks(current, workInProgress, lanes) { @@ -1911,7 +2179,7 @@ function resetHooksOnUnwind(workInProgress) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -1925,26 +2193,26 @@ function mountWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -1957,7 +2225,7 @@ function updateWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -1971,7 +2239,7 @@ function useThenable(thenable) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -1992,10 +2260,10 @@ function use(usable) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2013,7 +2281,7 @@ function useMemoCache(size) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -2055,7 +2323,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$20 = !1; + didReadFromEntangledAsyncAction$22 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2076,11 +2344,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$20 = !0); + (didReadFromEntangledAsyncAction$22 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$20 = !0); + (didReadFromEntangledAsyncAction$22 = !0); continue; } else (updateLane = { @@ -2095,7 +2363,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -2116,7 +2384,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -2126,7 +2394,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$20 && + didReadFromEntangledAsyncAction$22 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -2159,7 +2427,7 @@ function rerenderReducer(reducer) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(); var nextSnapshot = getSnapshot(); var snapshotChanged = !objectIs( @@ -2193,10 +2461,10 @@ function updateSyncExternalStore(subscribe, getSnapshot) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -2317,8 +2585,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$24) { - onActionError(actionQueue, node, error$24); + } catch (error$26) { + onActionError(actionQueue, node, error$26); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -2381,16 +2649,12 @@ function mountActionState(action, initialStateProp) { lastRenderedState: initialStateProp }; stateHook.queue = stateQueue; - stateHook = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - stateQueue - ); + stateHook = dispatchSetState.bind(null, currentlyRenderingFiber, stateQueue); stateQueue.dispatch = stateHook; stateQueue = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, stateQueue.queue ); @@ -2404,7 +2668,7 @@ function mountActionState(action, initialStateProp) { stateQueue.queue = actionQueue; stateHook = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, actionQueue, setPendingState, stateHook @@ -2440,7 +2704,7 @@ function updateActionStateImpl(stateHook, currentStateHook, action) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -2502,10 +2766,10 @@ function pushResourceEffect( }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -2526,7 +2790,7 @@ function updateRef() { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -2542,7 +2806,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -2558,7 +2822,7 @@ function updateEffect(create, deps) { } function mountResourceEffect(create, createDeps, update, updateDeps, destroy) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -2594,7 +2858,7 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -2606,11 +2870,11 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -2687,7 +2951,7 @@ function mountDeferredValueImpl(hook, value, initialValue) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -2702,7 +2966,7 @@ function updateDeferredValueImpl(hook, prevValue, value, initialValue) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -2882,8 +3146,8 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -2998,7 +3262,7 @@ var HooksDispatcherOnMount = { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3011,7 +3275,7 @@ var HooksDispatcherOnMount = { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -3024,7 +3288,7 @@ var HooksDispatcherOnMount = { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -3033,7 +3297,7 @@ var HooksDispatcherOnMount = { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349)); @@ -3078,7 +3342,7 @@ var HooksDispatcherOnMount = { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3089,7 +3353,7 @@ var HooksDispatcherOnMount = { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -4079,9 +4343,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$50 in Component) - void 0 === newProps[propName$50] && - (newProps[propName$50] = Component[propName$50]); + for (var propName$52 in Component) + void 0 === newProps[propName$52] && + (newProps[propName$52] = Component[propName$52]); } return newProps; } @@ -5077,7 +5341,12 @@ function pushHostRootContext(workInProgress) { pushTopLevelContextObject(workInProgress, root.context, !1); pushHostContainer(workInProgress, root.containerInfo); } -var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; +var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null +}; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; } @@ -5912,138 +6181,22 @@ function beginWork(current, workInProgress, renderLanes) { (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateForwardRef(current, workInProgress, props, init, renderLanes) - ); - case 7: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps, - renderLanes - ), - workInProgress.child - ); - case 8: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 12: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child - ); - case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); - case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + updateForwardRef(current, workInProgress, props, init, renderLanes) ); - case 19: - return updateSuspenseListComponent(current, workInProgress, renderLanes); - case 21: + case 7: return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps, + renderLanes + ), workInProgress.child ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 24: + case 8: return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (nextProps = createCache()), - (init.pooledCache = nextProps), - nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), reconcileChildren( current, workInProgress, @@ -6052,297 +6205,157 @@ function beginWork(current, workInProgress, renderLanes) { ), workInProgress.child ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); -} -var valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null; -function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue2); - context._currentValue2 = nextValue; -} -function popProvider(context) { - context._currentValue2 = valueCursor.current; - pop(valueCursor); -} -function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } -} -function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree -) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } -} -function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree -) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; -} -function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + case 12: + return ( + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 10: + return ( + (props = workInProgress.pendingProps), + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + props.value + ), + reconcileChildren(current, workInProgress, props.children, renderLanes), + workInProgress.child + ); + case 9: + return ( + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), + (props = workInProgress.pendingProps.children), + prepareToReadContext(workInProgress), + (init = readContext(init)), + (props = props(init)), + (workInProgress.flags |= 1), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 14: + return ( + (props = workInProgress.type), + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 19: + return updateSuspenseListComponent(current, workInProgress, renderLanes); + case 21: + return ( + (props = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 24: + return ( + prepareToReadContext(workInProgress), + (props = readContext(CacheContext)), + null === current + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), + (nextProps = createCache()), + (init.pooledCache = nextProps), + nextProps.refCount++, + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, init)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; -} -function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); -} -function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); -} -function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); -} -function readContextForConsumer(consumer, context) { - var value = context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; -} -var AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; -} -function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); -} -var prevOnStartTransitionFinish = ReactSharedInternals.S; -ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); -}; -var resumedCache = createCursor(null), - transitionStack = createCursor(null); -function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; -} -function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions -) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); -} -function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); -} -function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue2, pool: cacheFromPool }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } var emptyObject = {}; function collectScopedNodesFromChildren( @@ -6552,9 +6565,7 @@ function completeWork(current, workInProgress, renderLanes) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))), + upgradeHydrationErrorsToRecoverable()), bubbleProperties(workInProgress), enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -6657,8 +6668,10 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); instance = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)), + (instance = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = instance), (instance = !0); if (!instance) { if (workInProgress.flags & 256) @@ -6679,11 +6692,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$93 = null; + var cache$94 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$93 = newProps.memoizedState.cachePool.pool); - cache$93 !== instance && (newProps.flags |= 2048); + (cache$94 = newProps.memoizedState.cachePool.pool); + cache$94 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6711,8 +6724,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$93 = instance.rendering; - if (null === cache$93) + cache$94 = instance.rendering; + if (null === cache$94) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6720,11 +6733,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$93 = findFirstSuspended(current); - if (null !== cache$93) { + cache$94 = findFirstSuspended(current); + if (null !== cache$94) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$93.updateQueue; + current = cache$94.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6749,7 +6762,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$93)), null !== current)) { + if (((current = findFirstSuspended(cache$94)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6759,7 +6772,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$93.alternate) + !cache$94.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6771,13 +6784,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$93.sibling = workInProgress.child), - (workInProgress.child = cache$93)) + ? ((cache$94.sibling = workInProgress.child), + (workInProgress.child = cache$94)) : ((current = instance.last), null !== current - ? (current.sibling = cache$93) - : (workInProgress.child = cache$93), - (instance.last = cache$93)); + ? (current.sibling = cache$94) + : (workInProgress.child = cache$94), + (instance.last = cache$94)); } if (null !== instance.tail) return ( @@ -7028,10 +7041,10 @@ function commitHookEffectListMount(flags, finishedWork) { inst.destroy = lastEffect; } } else { - var create$110 = updateQueue.create, - inst$111 = updateQueue.inst; - lastEffect = create$110(); - inst$111.destroy = lastEffect; + var create$111 = updateQueue.create, + inst$112 = updateQueue.inst; + lastEffect = create$111(); + inst$112.destroy = lastEffect; } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -7186,8 +7199,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$113) { - captureCommitPhaseError(current, nearestMountedAncestor, error$113); + } catch (error$114) { + captureCommitPhaseError(current, nearestMountedAncestor, error$114); } else ref.current = null; } @@ -7412,11 +7425,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$112) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$113 ); } } @@ -8167,12 +8180,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$114 = JSCompiler_inline_result.stateNode.containerInfo, - before$115 = getHostSibling(finishedWork); + var parent$115 = JSCompiler_inline_result.stateNode.containerInfo, + before$116 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$115, - parent$114 + before$116, + parent$115 ); break; default: @@ -8518,6 +8531,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -8640,9 +8661,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$124 = finishedWork.stateNode; + var instance$125 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$124._visibility & 4 + ? instance$125._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8654,7 +8675,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$124._visibility |= 4), + : ((instance$125._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8667,7 +8688,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$124 + instance$125 ); break; case 24: @@ -9067,7 +9088,6 @@ function addTransitionProgressCallbackToPendingTransition( )); } var legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -9199,7 +9219,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -9297,14 +9322,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { } while (1); ensureRootIsScheduled(root$jscomp$0); } -function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); -} function commitRootWhenReady( root, finishedWork, @@ -9425,7 +9442,7 @@ function resetWorkInProgressStack() { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -9482,7 +9499,7 @@ function prepareFreshStack(root, lanes) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; if ( thrownValue === SuspenseException || @@ -9608,12 +9625,12 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$136) { - handleThrow(root, thrownValue$136); + } catch (thrownValue$137) { + handleThrow(root, thrownValue$137); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -9724,11 +9741,11 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$138) { - handleThrow(root, thrownValue$138); + } catch (thrownValue$139) { + handleThrow(root, thrownValue$139); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -9805,7 +9822,7 @@ function throwAndUnwindWorkLoop( thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -9934,9 +9951,6 @@ function commitRootImpl( root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -9951,42 +9965,47 @@ function commitRootImpl( root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); transitions = 0 !== (finishedWork.flags & 15990); 0 !== (finishedWork.subtreeFlags & 15990) || transitions ? ((transitions = ReactSharedInternals.T), (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), + (updatedLanes = currentUpdatePriority), (currentUpdatePriority = 2), - (updatedLanes = executionContext), + (suspendedRetryLanes = executionContext), (executionContext |= 4), commitBeforeMutationEffects(root, finishedWork), commitMutationEffectsOnFiber(finishedWork, root), (root.current = finishedWork), commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), + (executionContext = suspendedRetryLanes), + (currentUpdatePriority = updatedLanes), (ReactSharedInternals.T = transitions)) : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -9998,6 +10017,7 @@ function commitRootImpl( componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -10757,24 +10777,24 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1493 = { +var internals$jscomp$inline_1501 = { bundleType: 0, - version: "19.1.0-www-classic-d4287258-20241217", + version: "19.1.0-www-classic-a9bbe346-20241219", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1494 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1502 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1494.isDisabled && - hook$jscomp$inline_1494.supportsFiber + !hook$jscomp$inline_1502.isDisabled && + hook$jscomp$inline_1502.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1494.inject( - internals$jscomp$inline_1493 + (rendererID = hook$jscomp$inline_1502.inject( + internals$jscomp$inline_1501 )), - (injectedHook = hook$jscomp$inline_1494); + (injectedHook = hook$jscomp$inline_1502); } catch (err) {} } var Path = Mode$1.Path; @@ -10788,4 +10808,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.1.0-www-classic-d4287258-20241217"; +exports.version = "19.1.0-www-classic-a9bbe346-20241219"; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 47746cb983f55..b8191b924ff5d 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -957,82 +957,228 @@ function popHostContext(fiber) { } var hydrationErrors = null; Error(formatProdErrorMessage(519)); -var concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0; -function finishQueueingConcurrentUpdates() { +function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; +} +var valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null; +function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue2); + context._currentValue2 = nextValue; +} +function popProvider(context) { + context._currentValue2 = valueCursor.current; + pop(valueCursor); +} +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } +} +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } +} +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } -function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } -function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); +function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } -function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); +function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } -function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } -function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +function readContextForConsumer(consumer, context) { + var value = context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; +} +var AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; +} +function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } var firstScheduledRoot = null, lastScheduledRoot = null, @@ -1241,44 +1387,265 @@ function entangleAsyncAction(transition, thenable) { thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); return thenable; } -function pingEngtangledActionScope() { - if ( - 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners - ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); - } +function pingEngtangledActionScope() { + if ( + 0 === --currentEntangledPendingCount && + null !== currentEntangledListeners + ) { + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } +} +function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); + } + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; +} +var prevOnStartTransitionFinish = ReactSharedInternals.S; +ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); +}; +var resumedCache = createCursor(null), + transitionStack = createCursor(null); +function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; +} +function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions +) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); +} +function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); +} +function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue2, pool: cacheFromPool }; +} +var hasOwnProperty = Object.prototype.hasOwnProperty; +function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; +} +var SuspenseException = Error(formatProdErrorMessage(460)), + SuspenseyCommitException = Error(formatProdErrorMessage(474)), + SuspenseActionException = Error(formatProdErrorMessage(542)), + noopSuspenseyCommitThenable = { then: function () {} }; +function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; +} +function noop() {} +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop, noop), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop, noop); + else { + thenableState = workInProgressRoot; + if (null !== thenableState && 100 < thenableState.shellSuspendCounter) + throw Error(formatProdErrorMessage(482)); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + throw SuspenseException; + } +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; +} +function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error(formatProdErrorMessage(483)); +} +var concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0; +function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } +} +function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); +} +function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); +} +function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); +} +function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } -function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; +function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; } var hasForceUpdate = !1; function initializeUpdateQueue(fiber) { @@ -1524,105 +1891,6 @@ function commitCallbacks(updateQueue, context) { ) callCallback(callbacks[updateQueue], context); } -var hasOwnProperty = Object.prototype.hasOwnProperty; -function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; -} -var SuspenseException = Error(formatProdErrorMessage(460)), - SuspenseyCommitException = Error(formatProdErrorMessage(474)), - SuspenseActionException = Error(formatProdErrorMessage(542)), - noopSuspenseyCommitThenable = { then: function () {} }; -function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; -} -function noop() {} -function trackUsedThenable(thenableState, thenable, index) { - index = thenableState[index]; - void 0 === index - ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop, noop), (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop, noop); - else { - thenableState = workInProgressRoot; - if (null !== thenableState && 100 < thenableState.shellSuspendCounter) - throw Error(formatProdErrorMessage(482)); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - throw SuspenseException; - } -} -var suspendedThenable = null; -function getSuspendedThenable() { - if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); - var thenable = suspendedThenable; - suspendedThenable = null; - return thenable; -} -function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error(formatProdErrorMessage(483)); -} var currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0); function pushHiddenContext(fiber, context) { @@ -1641,7 +1909,7 @@ function popHiddenContext() { pop(prevEntangledRenderLanesCursor); } var renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -1668,7 +1936,7 @@ function renderWithHooks( nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -1693,7 +1961,7 @@ function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -1706,7 +1974,7 @@ function finishRenderingHooks(current) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -1736,7 +2004,7 @@ function TransitionAwareHostComponent() { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function bailoutHooks(current, workInProgress, lanes) { @@ -1758,7 +2026,7 @@ function resetHooksOnUnwind(workInProgress) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -1772,26 +2040,26 @@ function mountWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -1804,7 +2072,7 @@ function updateWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -1818,7 +2086,7 @@ function useThenable(thenable) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -1839,10 +2107,10 @@ function use(usable) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -1860,7 +2128,7 @@ function useMemoCache(size) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -1902,7 +2170,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$20 = !1; + didReadFromEntangledAsyncAction$22 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -1923,11 +2191,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$20 = !0); + (didReadFromEntangledAsyncAction$22 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$20 = !0); + (didReadFromEntangledAsyncAction$22 = !0); continue; } else (updateLane = { @@ -1942,7 +2210,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -1963,7 +2231,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -1973,7 +2241,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$20 && + didReadFromEntangledAsyncAction$22 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -2006,7 +2274,7 @@ function rerenderReducer(reducer) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(); var nextSnapshot = getSnapshot(); var snapshotChanged = !objectIs( @@ -2040,10 +2308,10 @@ function updateSyncExternalStore(subscribe, getSnapshot) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -2164,8 +2432,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$24) { - onActionError(actionQueue, node, error$24); + } catch (error$26) { + onActionError(actionQueue, node, error$26); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -2228,16 +2496,12 @@ function mountActionState(action, initialStateProp) { lastRenderedState: initialStateProp }; stateHook.queue = stateQueue; - stateHook = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - stateQueue - ); + stateHook = dispatchSetState.bind(null, currentlyRenderingFiber, stateQueue); stateQueue.dispatch = stateHook; stateQueue = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, stateQueue.queue ); @@ -2251,7 +2515,7 @@ function mountActionState(action, initialStateProp) { stateQueue.queue = actionQueue; stateHook = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, actionQueue, setPendingState, stateHook @@ -2287,7 +2551,7 @@ function updateActionStateImpl(stateHook, currentStateHook, action) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -2349,10 +2613,10 @@ function pushResourceEffect( }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -2373,7 +2637,7 @@ function updateRef() { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -2389,7 +2653,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -2405,7 +2669,7 @@ function updateEffect(create, deps) { } function mountResourceEffect(create, createDeps, update, updateDeps, destroy) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -2441,7 +2705,7 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -2453,11 +2717,11 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -2534,7 +2798,7 @@ function mountDeferredValueImpl(hook, value, initialValue) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -2549,7 +2813,7 @@ function updateDeferredValueImpl(hook, prevValue, value, initialValue) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -2729,8 +2993,8 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -2845,7 +3109,7 @@ var HooksDispatcherOnMount = { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -2858,7 +3122,7 @@ var HooksDispatcherOnMount = { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -2871,7 +3135,7 @@ var HooksDispatcherOnMount = { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -2880,7 +3144,7 @@ var HooksDispatcherOnMount = { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349)); @@ -2925,7 +3189,7 @@ var HooksDispatcherOnMount = { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -2936,7 +3200,7 @@ var HooksDispatcherOnMount = { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -3942,9 +4206,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$50 in Component) - void 0 === newProps[propName$50] && - (newProps[propName$50] = Component[propName$50]); + for (var propName$52 in Component) + void 0 === newProps[propName$52] && + (newProps[propName$52] = Component[propName$52]); } return newProps; } @@ -4863,7 +5127,12 @@ function updateClassComponent( )); return current; } -var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; +var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null +}; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; } @@ -5691,138 +5960,22 @@ function beginWork(current, workInProgress, renderLanes) { (init = disableDefaultPropsExceptForClasses || workInProgress.elementType === props - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - updateForwardRef(current, workInProgress, props, init, renderLanes) - ); - case 7: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps, - renderLanes - ), - workInProgress.child - ); - case 8: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 12: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child - ); - case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); - case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + updateForwardRef(current, workInProgress, props, init, renderLanes) ); - case 19: - return updateSuspenseListComponent(current, workInProgress, renderLanes); - case 21: + case 7: return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps, + renderLanes + ), workInProgress.child ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 24: + case 8: return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (nextProps = createCache()), - (init.pooledCache = nextProps), - nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), reconcileChildren( current, workInProgress, @@ -5831,297 +5984,157 @@ function beginWork(current, workInProgress, renderLanes) { ), workInProgress.child ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); -} -var valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null; -function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue2); - context._currentValue2 = nextValue; -} -function popProvider(context) { - context._currentValue2 = valueCursor.current; - pop(valueCursor); -} -function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } -} -function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree -) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } -} -function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree -) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; -} -function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + case 12: + return ( + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 10: + return ( + (props = workInProgress.pendingProps), + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + props.value + ), + reconcileChildren(current, workInProgress, props.children, renderLanes), + workInProgress.child + ); + case 9: + return ( + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), + (props = workInProgress.pendingProps.children), + prepareToReadContext(workInProgress), + (init = readContext(init)), + (props = props(init)), + (workInProgress.flags |= 1), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 14: + return ( + (props = workInProgress.type), + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 19: + return updateSuspenseListComponent(current, workInProgress, renderLanes); + case 21: + return ( + (props = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 24: + return ( + prepareToReadContext(workInProgress), + (props = readContext(CacheContext)), + null === current + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), + (nextProps = createCache()), + (init.pooledCache = nextProps), + nextProps.refCount++, + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, init)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; -} -function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); -} -function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); -} -function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); -} -function readContextForConsumer(consumer, context) { - var value = context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; -} -var AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; -} -function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); -} -var prevOnStartTransitionFinish = ReactSharedInternals.S; -ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); -}; -var resumedCache = createCursor(null), - transitionStack = createCursor(null); -function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; -} -function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions -) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); -} -function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); -} -function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue2, pool: cacheFromPool }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } var emptyObject = {}; function collectScopedNodesFromChildren( @@ -6324,9 +6337,7 @@ function completeWork(current, workInProgress, renderLanes) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))), + upgradeHydrationErrorsToRecoverable()), bubbleProperties(workInProgress), enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -6429,8 +6440,10 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); instance = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)), + (instance = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = instance), (instance = !0); if (!instance) { if (workInProgress.flags & 256) @@ -6451,11 +6464,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$93 = null; + var cache$94 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$93 = newProps.memoizedState.cachePool.pool); - cache$93 !== instance && (newProps.flags |= 2048); + (cache$94 = newProps.memoizedState.cachePool.pool); + cache$94 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6483,8 +6496,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$93 = instance.rendering; - if (null === cache$93) + cache$94 = instance.rendering; + if (null === cache$94) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6492,11 +6505,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$93 = findFirstSuspended(current); - if (null !== cache$93) { + cache$94 = findFirstSuspended(current); + if (null !== cache$94) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$93.updateQueue; + current = cache$94.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6521,7 +6534,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$93)), null !== current)) { + if (((current = findFirstSuspended(cache$94)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6531,7 +6544,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$93.alternate) + !cache$94.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6543,13 +6556,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$93.sibling = workInProgress.child), - (workInProgress.child = cache$93)) + ? ((cache$94.sibling = workInProgress.child), + (workInProgress.child = cache$94)) : ((current = instance.last), null !== current - ? (current.sibling = cache$93) - : (workInProgress.child = cache$93), - (instance.last = cache$93)); + ? (current.sibling = cache$94) + : (workInProgress.child = cache$94), + (instance.last = cache$94)); } if (null !== instance.tail) return ( @@ -6788,10 +6801,10 @@ function commitHookEffectListMount(flags, finishedWork) { inst.destroy = lastEffect; } } else { - var create$110 = updateQueue.create, - inst$111 = updateQueue.inst; - lastEffect = create$110(); - inst$111.destroy = lastEffect; + var create$111 = updateQueue.create, + inst$112 = updateQueue.inst; + lastEffect = create$111(); + inst$112.destroy = lastEffect; } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -6946,8 +6959,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$113) { - captureCommitPhaseError(current, nearestMountedAncestor, error$113); + } catch (error$114) { + captureCommitPhaseError(current, nearestMountedAncestor, error$114); } else ref.current = null; } @@ -7172,11 +7185,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$112) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$113 ); } } @@ -7927,12 +7940,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$114 = JSCompiler_inline_result.stateNode.containerInfo, - before$115 = getHostSibling(finishedWork); + var parent$115 = JSCompiler_inline_result.stateNode.containerInfo, + before$116 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$115, - parent$114 + before$116, + parent$115 ); break; default: @@ -8278,6 +8291,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -8400,9 +8421,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$124 = finishedWork.stateNode; + var instance$125 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$124._visibility & 4 + ? instance$125._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8414,7 +8435,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$124._visibility |= 4), + : ((instance$125._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8427,7 +8448,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$124 + instance$125 ); break; case 24: @@ -8827,7 +8848,6 @@ function addTransitionProgressCallbackToPendingTransition( )); } var legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -8959,7 +8979,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -9057,14 +9082,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { } while (1); ensureRootIsScheduled(root$jscomp$0); } -function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); -} function commitRootWhenReady( root, finishedWork, @@ -9185,7 +9202,7 @@ function resetWorkInProgressStack() { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -9242,7 +9259,7 @@ function prepareFreshStack(root, lanes) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; if ( thrownValue === SuspenseException || @@ -9368,12 +9385,12 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$136) { - handleThrow(root, thrownValue$136); + } catch (thrownValue$137) { + handleThrow(root, thrownValue$137); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -9484,11 +9501,11 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$138) { - handleThrow(root, thrownValue$138); + } catch (thrownValue$139) { + handleThrow(root, thrownValue$139); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -9561,7 +9578,7 @@ function throwAndUnwindWorkLoop( thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -9690,9 +9707,6 @@ function commitRootImpl( root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -9707,42 +9721,47 @@ function commitRootImpl( root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); transitions = 0 !== (finishedWork.flags & 15990); 0 !== (finishedWork.subtreeFlags & 15990) || transitions ? ((transitions = ReactSharedInternals.T), (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), + (updatedLanes = currentUpdatePriority), (currentUpdatePriority = 2), - (updatedLanes = executionContext), + (suspendedRetryLanes = executionContext), (executionContext |= 4), commitBeforeMutationEffects(root, finishedWork), commitMutationEffectsOnFiber(finishedWork, root), (root.current = finishedWork), commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), + (executionContext = suspendedRetryLanes), + (currentUpdatePriority = updatedLanes), (ReactSharedInternals.T = transitions)) : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -9754,6 +9773,7 @@ function commitRootImpl( componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -10473,24 +10493,24 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component); -var internals$jscomp$inline_1472 = { +var internals$jscomp$inline_1480 = { bundleType: 0, - version: "19.1.0-www-modern-d4287258-20241217", + version: "19.1.0-www-modern-a9bbe346-20241219", rendererPackageName: "react-art", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1473 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1481 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1473.isDisabled && - hook$jscomp$inline_1473.supportsFiber + !hook$jscomp$inline_1481.isDisabled && + hook$jscomp$inline_1481.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1473.inject( - internals$jscomp$inline_1472 + (rendererID = hook$jscomp$inline_1481.inject( + internals$jscomp$inline_1480 )), - (injectedHook = hook$jscomp$inline_1473); + (injectedHook = hook$jscomp$inline_1481); } catch (err) {} } var Path = Mode$1.Path; @@ -10504,4 +10524,4 @@ exports.RadialGradient = RadialGradient; exports.Shape = TYPES.SHAPE; exports.Surface = Surface; exports.Text = Text; -exports.version = "19.1.0-www-modern-d4287258-20241217"; +exports.version = "19.1.0-www-modern-a9bbe346-20241219"; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 0aca5e4c3b1c8..6ef387bbc5f82 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -2502,6 +2502,8 @@ __DEV__ && "hr" === tag || "option" === tag || "optgroup" === tag || + "script" === tag || + "template" === tag || "#text" === tag ); case "optgroup": @@ -3755,6 +3757,18 @@ __DEV__ && nextHydratableInstance = hydrationParentFiber = null; didSuspendOrErrorDEV = isHydrating = !1; } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) @@ -3771,88 +3785,241 @@ __DEV__ && diffRoot )); } - function finishQueueingConcurrentUpdates() { + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; + } + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + push(rendererCursorDEV, context._currentRenderer, providerFiber); + void 0 !== context._currentRenderer && + null !== context._currentRenderer && + context._currentRenderer !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ); + context._currentRenderer = rendererSigil; + } + function popProvider(context, providerFiber) { + context._currentValue = valueCursor.current; + var currentRenderer = rendererCursorDEV.current; + pop(rendererCursorDEV, providerFiber); + context._currentRenderer = currentRenderer; + pop(valueCursor, providerFiber); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); - } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); + } + function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function pushNestedEffectDurations() { var prevEffectDuration = profilerEffectDuration; @@ -4178,86 +4345,328 @@ __DEV__ && ); return thenableWithOverride; } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } - function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions, offscreenWorkInProgress) + : null === newTransitions + ? push( + transitionStack, + transitionStack.current, + offscreenWorkInProgress + ) + : push( + transitionStack, + transitionStack.current.concat(newTransitions), + offscreenWorkInProgress + )); } - function createUpdate(lane) { - return { - lane: lane, - tag: UpdateState, - payload: null, - callback: null, - next: null - }; + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack, workInProgress), + pop(resumedCache, workInProgress)); } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - currentlyProcessingQueue === updateQueue && - !didWarnUpdateInsideUpdate - ) { - var componentName = getComponentNameFromFiber(fiber); - error$jscomp$0( - "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", - componentName - ); - didWarnUpdateInsideUpdate = !0; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - if ((executionContext & RenderContext) !== NoContext) - return ( - (componentName = updateQueue.pending), - null === componentName - ? (update.next = update) - : ((update.next = componentName.next), - (componentName.next = update)), - (updateQueue.pending = update), - (update = getRootForUpdatedFiber(fiber)), - markUpdateLaneFromFiberToRoot(fiber, null, lane), - update - ); - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); + return !0; } - function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop$3() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), + error$jscomp$0( + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop$3, noop$3), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) + thenable.then(noop$3, noop$3); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; } } - function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error( + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); + } + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); + } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); + } + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; + } + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; + } + function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); + } + function createUpdate(lane) { + return { + lane: lane, + tag: UpdateState, + payload: null, + callback: null, + next: null + }; + } + function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if ( + currentlyProcessingQueue === updateQueue && + !didWarnUpdateInsideUpdate + ) { + var componentName = getComponentNameFromFiber(fiber); + error$jscomp$0( + "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", + componentName + ); + didWarnUpdateInsideUpdate = !0; + } + if ((executionContext & RenderContext) !== NoContext) + return ( + (componentName = updateQueue.pending), + null === componentName + ? (update.next = update) + : ((update.next = componentName.next), + (componentName.next = update)), + (updateQueue.pending = update), + (update = getRootForUpdatedFiber(fiber)), + markUpdateLaneFromFiberToRoot(fiber, null, lane), + update + ); + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } + } + function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { do { var clone = { lane: queue.lane, @@ -4482,198 +4891,77 @@ __DEV__ && ) callCallback(callbacks[updateQueue], context); } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; + function pushHiddenContext(fiber, context) { + var prevEntangledRenderLanes = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); + push(currentTreeHiddenStackCursor, context, fiber); + entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + } + function reuseHiddenContextOnStack(fiber) { + push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); + push( + currentTreeHiddenStackCursor, + currentTreeHiddenStackCursor.current, + fiber + ); + } + function popHiddenContext(fiber) { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor, fiber); + pop(prevEntangledRenderLanesCursor, fiber); + } + function mountHookTypesDev() { + var hookName = currentHookNameInDev; + null === hookTypesDev + ? (hookTypesDev = [hookName]) + : hookTypesDev.push(hookName); + } + function updateHookTypesDev() { + var hookName = currentHookNameInDev; if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; + null !== hookTypesDev && + (hookTypesUpdateIndexDev++, + hookTypesDev[hookTypesUpdateIndexDev] !== hookName) + ) { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; + !didWarnAboutMismatchedHooksForComponent.has(componentName) && + (didWarnAboutMismatchedHooksForComponent.add(componentName), + null !== hookTypesDev) + ) { + for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i], + newHookName = + i === hookTypesUpdateIndexDev ? hookName : oldHookName; + for ( + oldHookName = i + 1 + ". " + oldHookName; + 30 > oldHookName.length; + + ) + oldHookName += " "; + oldHookName += newHookName + "\n"; + table += oldHookName; + } + error$jscomp$0( + "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + componentName, + table + ); + } } - return !0; } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop$3() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop$3, noop$3), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) - thenable.then(noop$3, noop$3); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; - } - } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - } - function pushHiddenContext(fiber, context) { - var prevEntangledRenderLanes = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); - push(currentTreeHiddenStackCursor, context, fiber); - entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; - } - function reuseHiddenContextOnStack(fiber) { - push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); - push( - currentTreeHiddenStackCursor, - currentTreeHiddenStackCursor.current, - fiber - ); - } - function popHiddenContext(fiber) { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor, fiber); - pop(prevEntangledRenderLanesCursor, fiber); - } - function mountHookTypesDev() { - var hookName = currentHookNameInDev; - null === hookTypesDev - ? (hookTypesDev = [hookName]) - : hookTypesDev.push(hookName); - } - function updateHookTypesDev() { - var hookName = currentHookNameInDev; - if ( - null !== hookTypesDev && - (hookTypesUpdateIndexDev++, - hookTypesDev[hookTypesUpdateIndexDev] !== hookName) - ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); - if ( - !didWarnAboutMismatchedHooksForComponent.has(componentName) && - (didWarnAboutMismatchedHooksForComponent.add(componentName), - null !== hookTypesDev) - ) { - for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { - var oldHookName = hookTypesDev[i], - newHookName = - i === hookTypesUpdateIndexDev ? hookName : oldHookName; - for ( - oldHookName = i + 1 + ". " + oldHookName; - 30 > oldHookName.length; - - ) - oldHookName += " "; - oldHookName += newHookName + "\n"; - table += oldHookName; - } - error$jscomp$0( - "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - componentName, - table - ); - } - } - } - function checkDepsAreArrayDev(deps) { - void 0 === deps || - null === deps || - isArrayImpl(deps) || - error$jscomp$0( - "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", - currentHookNameInDev, - typeof deps - ); + function checkDepsAreArrayDev(deps) { + void 0 === deps || + null === deps || + isArrayImpl(deps) || + error$jscomp$0( + "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", + currentHookNameInDev, + typeof deps + ); } function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), error$jscomp$0( @@ -4716,7 +5004,7 @@ __DEV__ && nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; hookTypesDev = null !== current ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -4727,9 +5015,7 @@ __DEV__ && "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component) ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), error$jscomp$0( @@ -4789,7 +5075,7 @@ __DEV__ && currentHookNameInDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; null !== current && @@ -4824,7 +5110,7 @@ __DEV__ && ))); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -4859,7 +5145,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -4892,7 +5178,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -4909,26 +5195,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -4943,7 +5229,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -4957,7 +5243,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -4978,10 +5264,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -4999,7 +5285,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -5047,7 +5333,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -5125,7 +5411,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -5146,7 +5432,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -5193,7 +5479,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -5250,7 +5536,7 @@ __DEV__ && getSnapshot, getServerSnapshot ) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -5311,10 +5597,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -5372,11 +5658,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -5393,7 +5675,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -5549,7 +5831,7 @@ __DEV__ && var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var isMatching = currentlyRenderingFiber$1; + var isMatching = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -5605,14 +5887,14 @@ __DEV__ && ssrFormState.queue = isMatching; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, isMatching ); isMatching.dispatch = ssrFormState; isMatching = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, isMatching.queue ); @@ -5626,7 +5908,7 @@ __DEV__ && isMatching.queue = markerInstance; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, markerInstance, inRootOrSingleton, ssrFormState @@ -5662,7 +5944,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -5724,10 +6006,10 @@ __DEV__ && }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -5750,7 +6032,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -5766,7 +6048,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -5775,8 +6057,8 @@ __DEV__ && ))); } function mountEffect(create, deps) { - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } @@ -5788,12 +6070,12 @@ __DEV__ && destroy ) { if ( - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ) { var hookFlags = Passive, hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 142608384; + currentlyRenderingFiber.flags |= 142608384; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -5808,7 +6090,7 @@ __DEV__ && } else (hookFlags = Passive), (hook = mountWorkInProgressHook()), - (currentlyRenderingFiber$1.flags |= 8390656), + (currentlyRenderingFiber.flags |= 8390656), (inst = createEffectInstance()), (inst.destroy = destroy), (hook.memoizedState = pushResourceEffect( @@ -5864,7 +6146,7 @@ __DEV__ && } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= fiberFlags); + (currentlyRenderingFiber.flags |= fiberFlags); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? hookFlags : HasEffect | hookFlags, isUpdateDepsSame ? hookFlags : HasEffect | hookFlags, @@ -5876,11 +6158,11 @@ __DEV__ && ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -5914,7 +6196,7 @@ __DEV__ && } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } @@ -5948,7 +6230,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, @@ -6049,7 +6331,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -6064,7 +6346,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -6209,7 +6491,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -6263,7 +6545,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -6288,19 +6570,15 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, + args = requestUpdateLane(fiber); + var update = { + lane: args, revertLane: 0, action: action, hasEagerState: !1, @@ -6308,46 +6586,22 @@ __DEV__ && next: null }; isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -6432,8 +6686,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -9275,32 +9529,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2484; - var JSCompiler_object_inline_stack_2485 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2490; + var JSCompiler_object_inline_stack_2491 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2486 = !1; + var JSCompiler_object_inline_componentStack_2492 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2484 = didSuspend) || - (JSCompiler_object_inline_digest_2484 = + (JSCompiler_object_inline_digest_2490 = didSuspend) || + (JSCompiler_object_inline_digest_2490 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2484 && - ((JSCompiler_object_inline_componentStack_2486 = !0), + JSCompiler_object_inline_digest_2490 && + ((JSCompiler_object_inline_componentStack_2492 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2484 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2490 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2486 + JSCompiler_object_inline_componentStack_2492 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2483 = nextHydratableInstance; + var JSCompiler_object_inline_message_2489 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2483)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2489)) { c: { - var instance = JSCompiler_object_inline_message_2483; + var instance = JSCompiler_object_inline_message_2489; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9326,7 +9580,8 @@ __DEV__ && null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (instance = createFiber(18, null, null, NoMode)), (instance.stateNode = JSCompiler_temp), @@ -9341,46 +9596,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2483 + JSCompiler_object_inline_message_2489 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2483 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2489 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2483 && - ((JSCompiler_object_inline_message_2483 = - JSCompiler_object_inline_message_2483.dehydrated), - null !== JSCompiler_object_inline_message_2483) + null !== JSCompiler_object_inline_message_2489 && + ((JSCompiler_object_inline_message_2489 = + JSCompiler_object_inline_message_2489.dehydrated), + null !== JSCompiler_object_inline_message_2489) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2483) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2489) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2483 = - JSCompiler_object_inline_stack_2485.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2485.fallback; - if (JSCompiler_object_inline_componentStack_2486) + JSCompiler_object_inline_message_2489 = + JSCompiler_object_inline_stack_2491.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2491.fallback; + if (JSCompiler_object_inline_componentStack_2492) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2485 = + (JSCompiler_object_inline_stack_2491 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_message_2489, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2486 = + (JSCompiler_object_inline_componentStack_2492 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2486.memoizedState = + (JSCompiler_object_inline_componentStack_2492.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2486.childLanes = + (JSCompiler_object_inline_componentStack_2492.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2490, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9393,9 +9648,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2486.updateQueue), + JSCompiler_object_inline_componentStack_2492.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2486.updateQueue = + ? (JSCompiler_object_inline_componentStack_2492.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9403,46 +9658,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2491 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2485.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2491.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2485 = + (JSCompiler_object_inline_stack_2491 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_message_2489, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2486 = + (JSCompiler_object_inline_componentStack_2492 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2486.memoizedState = + (JSCompiler_object_inline_componentStack_2492.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2486.childLanes = + (JSCompiler_object_inline_componentStack_2492.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2490, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2491 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2483 + JSCompiler_object_inline_message_2489 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2483 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2483) + ((JSCompiler_object_inline_message_2489 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2489) ) { if (didSuspend) workInProgress.flags & 256 @@ -9459,94 +9714,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2486 = - JSCompiler_object_inline_stack_2485.fallback), - (JSCompiler_object_inline_message_2483 = workInProgress.mode), - (JSCompiler_object_inline_stack_2485 = + (JSCompiler_object_inline_componentStack_2492 = + JSCompiler_object_inline_stack_2491.fallback), + (JSCompiler_object_inline_message_2489 = workInProgress.mode), + (JSCompiler_object_inline_stack_2491 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2485.children + children: JSCompiler_object_inline_stack_2491.children }, - JSCompiler_object_inline_message_2483 + JSCompiler_object_inline_message_2489 )), - (JSCompiler_object_inline_componentStack_2486 = + (JSCompiler_object_inline_componentStack_2492 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2486, - JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_componentStack_2492, + JSCompiler_object_inline_message_2489, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2486.flags |= 2), - (JSCompiler_object_inline_stack_2485.return = workInProgress), - (JSCompiler_object_inline_componentStack_2486.return = + (JSCompiler_object_inline_componentStack_2492.flags |= 2), + (JSCompiler_object_inline_stack_2491.return = workInProgress), + (JSCompiler_object_inline_componentStack_2492.return = workInProgress), - (JSCompiler_object_inline_stack_2485.sibling = - JSCompiler_object_inline_componentStack_2486), - (workInProgress.child = JSCompiler_object_inline_stack_2485), + (JSCompiler_object_inline_stack_2491.sibling = + JSCompiler_object_inline_componentStack_2492), + (workInProgress.child = JSCompiler_object_inline_stack_2491), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2485 = workInProgress.child), - (JSCompiler_object_inline_stack_2485.memoizedState = + (JSCompiler_object_inline_stack_2491 = workInProgress.child), + (JSCompiler_object_inline_stack_2491.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2485.childLanes = + (JSCompiler_object_inline_stack_2491.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2490, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2486)); + JSCompiler_object_inline_componentStack_2492)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2483)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2489)) ) { - JSCompiler_object_inline_digest_2484 = - JSCompiler_object_inline_message_2483.nextSibling && - JSCompiler_object_inline_message_2483.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2484) { - JSCompiler_temp = JSCompiler_object_inline_digest_2484.dgst; - var message = JSCompiler_object_inline_digest_2484.msg; - instance = JSCompiler_object_inline_digest_2484.stck; - var componentStack = JSCompiler_object_inline_digest_2484.cstck; + JSCompiler_object_inline_digest_2490 = + JSCompiler_object_inline_message_2489.nextSibling && + JSCompiler_object_inline_message_2489.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2490) { + JSCompiler_temp = JSCompiler_object_inline_digest_2490.dgst; + var message = JSCompiler_object_inline_digest_2490.msg; + instance = JSCompiler_object_inline_digest_2490.stck; + var componentStack = JSCompiler_object_inline_digest_2490.cstck; } - JSCompiler_object_inline_message_2483 = message; - JSCompiler_object_inline_digest_2484 = JSCompiler_temp; - JSCompiler_object_inline_stack_2485 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2486 = + JSCompiler_object_inline_message_2489 = message; + JSCompiler_object_inline_digest_2490 = JSCompiler_temp; + JSCompiler_object_inline_stack_2491 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2492 = componentStack; - JSCompiler_object_inline_componentStack_2486 = - JSCompiler_object_inline_message_2483 - ? Error(JSCompiler_object_inline_message_2483) + JSCompiler_object_inline_componentStack_2492 = + JSCompiler_object_inline_message_2489 + ? Error(JSCompiler_object_inline_message_2489) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2486.stack = - JSCompiler_object_inline_stack_2485 || ""; - JSCompiler_object_inline_componentStack_2486.digest = - JSCompiler_object_inline_digest_2484; - JSCompiler_object_inline_digest_2484 = + JSCompiler_object_inline_componentStack_2492.stack = + JSCompiler_object_inline_stack_2491 || ""; + JSCompiler_object_inline_componentStack_2492.digest = + JSCompiler_object_inline_digest_2490; + JSCompiler_object_inline_digest_2490 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2485 = { - value: JSCompiler_object_inline_componentStack_2486, + JSCompiler_object_inline_stack_2491 = { + value: JSCompiler_object_inline_componentStack_2492, source: null, - stack: JSCompiler_object_inline_digest_2484 + stack: JSCompiler_object_inline_digest_2490 }; - "string" === typeof JSCompiler_object_inline_digest_2484 && + "string" === typeof JSCompiler_object_inline_digest_2490 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2486, - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_componentStack_2492, + JSCompiler_object_inline_stack_2491 ); - queueHydrationError(JSCompiler_object_inline_stack_2485); + queueHydrationError(JSCompiler_object_inline_stack_2491); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9560,44 +9815,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2484 = + (JSCompiler_object_inline_digest_2490 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2484) + didReceiveUpdate || JSCompiler_object_inline_digest_2490) ) { - JSCompiler_object_inline_digest_2484 = workInProgressRoot; + JSCompiler_object_inline_digest_2490 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2484 && - ((JSCompiler_object_inline_stack_2485 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2485 = - 0 !== (JSCompiler_object_inline_stack_2485 & 42) + null !== JSCompiler_object_inline_digest_2490 && + ((JSCompiler_object_inline_stack_2491 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2491 = + 0 !== (JSCompiler_object_inline_stack_2491 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2491 )), - (JSCompiler_object_inline_stack_2485 = + (JSCompiler_object_inline_stack_2491 = 0 !== - (JSCompiler_object_inline_stack_2485 & - (JSCompiler_object_inline_digest_2484.suspendedLanes | + (JSCompiler_object_inline_stack_2491 & + (JSCompiler_object_inline_digest_2490.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2485), - 0 !== JSCompiler_object_inline_stack_2485 && - JSCompiler_object_inline_stack_2485 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2491), + 0 !== JSCompiler_object_inline_stack_2491 && + JSCompiler_object_inline_stack_2491 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2485), + ((prevState.retryLane = JSCompiler_object_inline_stack_2491), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2491 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2490, current, - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2491 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2483.data === + JSCompiler_object_inline_message_2489.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9605,14 +9860,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2483.data === + JSCompiler_object_inline_message_2489.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2483.nextSibling + JSCompiler_object_inline_message_2489.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9630,57 +9885,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2485.children + JSCompiler_object_inline_stack_2491.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2486) + if (JSCompiler_object_inline_componentStack_2492) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2486 = - JSCompiler_object_inline_stack_2485.fallback), - (JSCompiler_object_inline_message_2483 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2492 = + JSCompiler_object_inline_stack_2491.fallback), + (JSCompiler_object_inline_message_2489 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2485 = createWorkInProgress( + (JSCompiler_object_inline_stack_2491 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2485.children + children: JSCompiler_object_inline_stack_2491.children } )), - (JSCompiler_object_inline_stack_2485.subtreeFlags = + (JSCompiler_object_inline_stack_2491.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2486 = + ? (JSCompiler_object_inline_componentStack_2492 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2486 + JSCompiler_object_inline_componentStack_2492 )) - : ((JSCompiler_object_inline_componentStack_2486 = + : ((JSCompiler_object_inline_componentStack_2492 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2486, - JSCompiler_object_inline_message_2483, + JSCompiler_object_inline_componentStack_2492, + JSCompiler_object_inline_message_2489, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2486.flags |= 2)), - (JSCompiler_object_inline_componentStack_2486.return = + (JSCompiler_object_inline_componentStack_2492.flags |= 2)), + (JSCompiler_object_inline_componentStack_2492.return = workInProgress), - (JSCompiler_object_inline_stack_2485.return = workInProgress), - (JSCompiler_object_inline_stack_2485.sibling = - JSCompiler_object_inline_componentStack_2486), - (workInProgress.child = JSCompiler_object_inline_stack_2485), - (JSCompiler_object_inline_stack_2485 = - JSCompiler_object_inline_componentStack_2486), - (JSCompiler_object_inline_componentStack_2486 = workInProgress.child), - (JSCompiler_object_inline_message_2483 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2483 - ? (JSCompiler_object_inline_message_2483 = + (JSCompiler_object_inline_stack_2491.return = workInProgress), + (JSCompiler_object_inline_stack_2491.sibling = + JSCompiler_object_inline_componentStack_2492), + (workInProgress.child = JSCompiler_object_inline_stack_2491), + (JSCompiler_object_inline_stack_2491 = + JSCompiler_object_inline_componentStack_2492), + (JSCompiler_object_inline_componentStack_2492 = workInProgress.child), + (JSCompiler_object_inline_message_2489 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2489 + ? (JSCompiler_object_inline_message_2489 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2483.cachePool), + JSCompiler_object_inline_message_2489.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9688,34 +9943,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2483 = { + (JSCompiler_object_inline_message_2489 = { baseLanes: - JSCompiler_object_inline_message_2483.baseLanes | renderLanes, + JSCompiler_object_inline_message_2489.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2486.memoizedState = - JSCompiler_object_inline_message_2483), + (JSCompiler_object_inline_componentStack_2492.memoizedState = + JSCompiler_object_inline_message_2489), enableTransitionTracing && - ((JSCompiler_object_inline_message_2483 = enableTransitionTracing + ((JSCompiler_object_inline_message_2489 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2483 && + null !== JSCompiler_object_inline_message_2489 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2486.updateQueue), + JSCompiler_object_inline_componentStack_2492.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2486.updateQueue = { - transitions: JSCompiler_object_inline_message_2483, + ? (JSCompiler_object_inline_componentStack_2492.updateQueue = { + transitions: JSCompiler_object_inline_message_2489, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2486.updateQueue = + ? (JSCompiler_object_inline_componentStack_2492.updateQueue = { - transitions: JSCompiler_object_inline_message_2483, + transitions: JSCompiler_object_inline_message_2489, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9723,32 +9978,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2483), + JSCompiler_object_inline_message_2489), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2486.childLanes = + (JSCompiler_object_inline_componentStack_2492.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2484, + JSCompiler_object_inline_digest_2490, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2485 + JSCompiler_object_inline_stack_2491 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2485.children + children: JSCompiler_object_inline_stack_2491.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2484 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2484 + ((JSCompiler_object_inline_digest_2490 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2490 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2484.push(current)); + : JSCompiler_object_inline_digest_2490.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10879,372 +11134,96 @@ __DEV__ && null === prevSibling && ((prevSibling = workInProgressRoot), (nextProps = createCache()), - (prevSibling.pooledCache = nextProps), - retainCache(nextProps), - null !== nextProps && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = nextProps)), - (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), - (nextProps = 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 = nextProps.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current - ? ((returnFiber = enableTransitionTracing - ? transitionStack.current - : null), - null !== returnFiber && - ((returnFiber = { - tag: TransitionTracingMarker, - transitions: new Set(returnFiber), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = returnFiber), - (workInProgress.flags |= 2048))) - : current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ), - (returnFiber = workInProgress.stateNode), - null !== returnFiber && - pushMarkerInstance(workInProgress, returnFiber), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); - } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue, providerFiber); - context._currentValue = nextValue; - push(rendererCursorDEV, context._currentRenderer, providerFiber); - void 0 !== context._currentRenderer && - null !== context._currentRenderer && - context._currentRenderer !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ); - context._currentRenderer = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue = valueCursor.current; - var currentRenderer = rendererCursorDEV.current; - pop(rendererCursorDEV, providerFiber); - context._currentRenderer = currentRenderer; - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions, offscreenWorkInProgress) - : null === newTransitions - ? push( - transitionStack, - transitionStack.current, - offscreenWorkInProgress - ) - : push( - transitionStack, - transitionStack.current.concat(newTransitions), - offscreenWorkInProgress - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack, workInProgress), - pop(resumedCache, workInProgress)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + (prevSibling.pooledCache = nextProps), + retainCache(nextProps), + null !== nextProps && + (prevSibling.pooledCacheLanes |= renderLanes), + (prevSibling = nextProps)), + (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), + (nextProps = 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 = nextProps.cache), + pushProvider(workInProgress, CacheContext, returnFiber), + returnFiber !== prevSibling.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; + } + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } function collectScopedNodesFromChildren( startingChild, @@ -11492,13 +11471,13 @@ __DEV__ && null ); case 3: - newProps = workInProgress.stateNode; + renderLanes = workInProgress.stateNode; enableTransitionTracing && null !== workInProgressTransitions && (workInProgress.flags |= 2048); - renderLanes = null; - null !== current && (renderLanes = current.memoizedState.cache); - workInProgress.memoizedState.cache !== renderLanes && + newProps = null; + null !== current && (newProps = current.memoizedState.cache); + workInProgress.memoizedState.cache !== newProps && (workInProgress.flags |= 2048); popProvider(CacheContext, workInProgress); enableTransitionTracing && @@ -11507,9 +11486,9 @@ __DEV__ && enableTransitionTracing && pop(transitionStack, workInProgress); popHostContainer(workInProgress); popTopLevelContextObject(workInProgress); - newProps.pendingContext && - ((newProps.context = newProps.pendingContext), - (newProps.pendingContext = null)); + renderLanes.pendingContext && + ((renderLanes.context = renderLanes.pendingContext), + (renderLanes.pendingContext = null)); if (null === current || null === current.child) popHydrationState(workInProgress) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress)) @@ -11517,9 +11496,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -11737,9 +11714,9 @@ __DEV__ && renderLanes = getHostContext(); if (popHydrationState(workInProgress)) { current = workInProgress.stateNode; - newProps = workInProgress.memoizedProps; + renderLanes = workInProgress.memoizedProps; _type = !didSuspendOrErrorDEV; - renderLanes = null; + newProps = null; var returnFiber = hydrationParentFiber; if (null !== returnFiber) switch (returnFiber.tag) { @@ -11747,8 +11724,8 @@ __DEV__ && _type && ((_type = diffHydratedTextForDevWarnings( current, - newProps, - renderLanes + renderLanes, + newProps )), null !== _type && (buildHydrationDiffNode(workInProgress, 0).serverProps = @@ -11756,12 +11733,12 @@ __DEV__ && break; case 27: case 5: - (renderLanes = returnFiber.memoizedProps), + (newProps = returnFiber.memoizedProps), _type && ((_type = diffHydratedTextForDevWarnings( current, - newProps, - renderLanes + renderLanes, + newProps )), null !== _type && (buildHydrationDiffNode( @@ -11771,10 +11748,10 @@ __DEV__ && } current[internalInstanceKey] = workInProgress; current = - current.nodeValue === newProps || - (null !== renderLanes && - !0 === renderLanes.suppressHydrationWarning) || - checkForUnmatchedText(current.nodeValue, newProps) + current.nodeValue === renderLanes || + (null !== newProps && + !0 === newProps.suppressHydrationWarning) || + checkForUnmatchedText(current.nodeValue, renderLanes) ? !0 : !1; !current && @@ -11836,9 +11813,10 @@ __DEV__ && _type.treeBaseDuration)); _type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (_type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = _type), (_type = !0); if (!_type) { if (workInProgress.flags & 256) @@ -11855,30 +11833,30 @@ __DEV__ && transferActualDuration(workInProgress), workInProgress ); - newProps = null !== newProps; + renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - newProps && - ((renderLanes = workInProgress.child), + renderLanes && + ((newProps = workInProgress.child), (_type = null), - null !== renderLanes.alternate && - null !== renderLanes.alternate.memoizedState && - null !== renderLanes.alternate.memoizedState.cachePool && - (_type = renderLanes.alternate.memoizedState.cachePool.pool), + null !== newProps.alternate && + null !== newProps.alternate.memoizedState && + null !== newProps.alternate.memoizedState.cachePool && + (_type = newProps.alternate.memoizedState.cachePool.pool), (returnFiber = null), - null !== renderLanes.memoizedState && - null !== renderLanes.memoizedState.cachePool && - (returnFiber = renderLanes.memoizedState.cachePool.pool), - returnFiber !== _type && (renderLanes.flags |= 2048)); - newProps !== current && + null !== newProps.memoizedState && + null !== newProps.memoizedState.cachePool && + (returnFiber = newProps.memoizedState.cachePool.pool), + returnFiber !== _type && (newProps.flags |= 2048)); + renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), - newProps && (workInProgress.child.flags |= 8192)); + renderLanes && (workInProgress.child.flags |= 8192)); scheduleRetryEffect(workInProgress, workInProgress.updateQueue); null !== workInProgress.updateQueue && null != workInProgress.memoizedProps.suspenseCallback && (workInProgress.flags |= 4); bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - newProps && + renderLanes && ((current = workInProgress.child), null !== current && (workInProgress.treeBaseDuration -= current.treeBaseDuration)); @@ -11927,9 +11905,13 @@ __DEV__ && scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; current = renderLanes; - for (newProps = workInProgress.child; null !== newProps; ) - resetWorkInProgress(newProps, current), - (newProps = newProps.sibling); + for ( + renderLanes = workInProgress.child; + null !== renderLanes; + + ) + resetWorkInProgress(renderLanes, current), + (renderLanes = renderLanes.sibling); push( suspenseStackCursor, (suspenseStackCursor.current & @@ -12034,27 +12016,27 @@ __DEV__ && workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192)) : bubbleProperties(workInProgress), - (newProps = workInProgress.updateQueue), - null !== newProps && - scheduleRetryEffect(workInProgress, newProps.retryQueue), - (newProps = null), + (renderLanes = workInProgress.updateQueue), + null !== renderLanes && + scheduleRetryEffect(workInProgress, renderLanes.retryQueue), + (renderLanes = null), null !== current && null !== current.memoizedState && null !== current.memoizedState.cachePool && - (newProps = current.memoizedState.cachePool.pool), - (renderLanes = null), + (renderLanes = current.memoizedState.cachePool.pool), + (newProps = null), null !== workInProgress.memoizedState && null !== workInProgress.memoizedState.cachePool && - (renderLanes = workInProgress.memoizedState.cachePool.pool), - renderLanes !== newProps && (workInProgress.flags |= 2048), + (newProps = workInProgress.memoizedState.cachePool.pool), + newProps !== renderLanes && (workInProgress.flags |= 2048), popTransition(workInProgress, current), null ); case 24: return ( - (newProps = null), - null !== current && (newProps = current.memoizedState.cache), - workInProgress.memoizedState.cache !== newProps && + (renderLanes = null), + null !== current && (renderLanes = current.memoizedState.cache), + workInProgress.memoizedState.cache !== renderLanes && (workInProgress.flags |= 2048), popProvider(CacheContext, workInProgress), bubbleProperties(workInProgress), @@ -14829,6 +14811,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -15602,7 +15592,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = errorRetryLanes$jscomp$0; } @@ -15718,14 +15714,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -15927,7 +15915,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -16588,9 +16576,6 @@ __DEV__ && throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -16605,58 +16590,64 @@ __DEV__ && root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - (suspendedRetryLanes = commitBeforeMutationEffects( - root, - finishedWork - )), - commitMutationEffects(root, finishedWork, lanes), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = DiscreteEventPriority; + suspendedRetryLanes = executionContext; + executionContext |= CommitContext; + var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffects(root, finishedWork, lanes); + shouldFireAfterActiveInstanceBlur && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + (transitions = spawnedLane) + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : (releaseRootPooledCache(root, remainingLanes), @@ -16668,7 +16659,6 @@ __DEV__ && onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -16676,14 +16666,15 @@ __DEV__ && finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), + (spawnedLane = makeErrorInfo(remainingLanes.stack)), runWithFiberInDEV( remainingLanes.source, renderPriorityLevel, remainingLanes.value, - transitions + spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -17045,7 +17036,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -24603,9 +24594,42 @@ __DEV__ && StrictLegacyMode = 8, StrictEffectsMode = 16, NoStrictPassiveEffectsMode = 64, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var rendererCursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, @@ -24625,14 +24649,17 @@ __DEV__ && currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, flushPendingUnsafeLifecycleWarnings: function () {}, @@ -24850,6 +24877,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -24860,7 +24898,7 @@ __DEV__ && var ResourceEffectIdentityKind = 0, ResourceEffectUpdateKind = 1, renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -26402,55 +26440,13 @@ __DEV__ && var didWarnAboutTailOptions = {}; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var rendererCursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), + hasWarnedAboutUsingNoValuePropOnContextProvider = !1, emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -26540,7 +26536,6 @@ __DEV__ && currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -27379,11 +27374,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-classic-d4287258-20241217" !== isomorphicReactPackageVersion) + if ("19.1.0-www-classic-a9bbe346-20241219" !== 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.1.0-www-classic-d4287258-20241217\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-classic-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27426,10 +27421,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-d4287258-20241217", + version: "19.1.0-www-classic-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27466,52 +27461,43 @@ __DEV__ && ); } ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = - function (children, JSCompiler_OptimizeArgumentsArray_p2) { + function (children) { var root = this._internalRoot; if (null === root) throw Error("Cannot update an unmounted root."); - "function" === typeof JSCompiler_OptimizeArgumentsArray_p2 + var args = arguments; + "function" === typeof args[1] ? error$jscomp$0( "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()." ) - : isValidContainer(JSCompiler_OptimizeArgumentsArray_p2) + : isValidContainer(args[1]) ? error$jscomp$0( "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root." ) - : "undefined" !== typeof JSCompiler_OptimizeArgumentsArray_p2 && + : "undefined" !== typeof args[1] && error$jscomp$0( "You passed a second argument to root.render(...) but it only accepts one argument." ); - JSCompiler_OptimizeArgumentsArray_p2 = root.current; - var lane = requestUpdateLane(JSCompiler_OptimizeArgumentsArray_p2); - updateContainerImpl( - JSCompiler_OptimizeArgumentsArray_p2, - lane, - children, - root, - null, - null - ); + args = children; + var current = root.current, + lane = requestUpdateLane(current); + updateContainerImpl(current, lane, args, root, null, null); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = - function (JSCompiler_OptimizeArgumentsArray_p3) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p3 && + function () { + var args = arguments; + "function" === typeof args[0] && error$jscomp$0( "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p3 = this._internalRoot; - if (null !== JSCompiler_OptimizeArgumentsArray_p3) { + args = this._internalRoot; + if (null !== args) { this._internalRoot = null; - var container = JSCompiler_OptimizeArgumentsArray_p3.containerInfo; + var container = args.containerInfo; (executionContext & (RenderContext | CommitContext)) !== NoContext && error$jscomp$0( "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition." ); - updateContainerSync( - null, - JSCompiler_OptimizeArgumentsArray_p3, - null, - null - ); + updateContainerSync(null, args, null, null); flushSyncWork$1(); container[internalContainerInstanceKey] = null; } @@ -28036,7 +28022,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-classic-d4287258-20241217"; + exports.version = "19.1.0-www-classic-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index ca64082a6e6c0..2d173bd2a0628 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -2488,6 +2488,8 @@ __DEV__ && "hr" === tag || "option" === tag || "optgroup" === tag || + "script" === tag || + "template" === tag || "#text" === tag ); case "optgroup": @@ -3642,6 +3644,18 @@ __DEV__ && nextHydratableInstance = hydrationParentFiber = null; didSuspendOrErrorDEV = isHydrating = !1; } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) @@ -3658,88 +3672,241 @@ __DEV__ && diffRoot )); } - function finishQueueingConcurrentUpdates() { + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; + } + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + push(rendererCursorDEV, context._currentRenderer, providerFiber); + void 0 !== context._currentRenderer && + null !== context._currentRenderer && + context._currentRenderer !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ); + context._currentRenderer = rendererSigil; + } + function popProvider(context, providerFiber) { + context._currentValue = valueCursor.current; + var currentRenderer = rendererCursorDEV.current; + pop(rendererCursorDEV, providerFiber); + context._currentRenderer = currentRenderer; + pop(valueCursor, providerFiber); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); - } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); + } + function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function pushNestedEffectDurations() { var prevEffectDuration = profilerEffectDuration; @@ -4065,86 +4232,328 @@ __DEV__ && ); return thenableWithOverride; } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } - function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions, offscreenWorkInProgress) + : null === newTransitions + ? push( + transitionStack, + transitionStack.current, + offscreenWorkInProgress + ) + : push( + transitionStack, + transitionStack.current.concat(newTransitions), + offscreenWorkInProgress + )); } - function createUpdate(lane) { - return { - lane: lane, - tag: UpdateState, - payload: null, - callback: null, - next: null - }; + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack, workInProgress), + pop(resumedCache, workInProgress)); } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - currentlyProcessingQueue === updateQueue && - !didWarnUpdateInsideUpdate - ) { - var componentName = getComponentNameFromFiber(fiber); - error$jscomp$0( - "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", - componentName - ); - didWarnUpdateInsideUpdate = !0; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - if ((executionContext & RenderContext) !== NoContext) - return ( - (componentName = updateQueue.pending), - null === componentName - ? (update.next = update) - : ((update.next = componentName.next), - (componentName.next = update)), - (updateQueue.pending = update), - (update = getRootForUpdatedFiber(fiber)), - markUpdateLaneFromFiberToRoot(fiber, null, lane), - update - ); - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); + return !0; } - function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop$3() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), + error$jscomp$0( + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop$3, noop$3), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) + thenable.then(noop$3, noop$3); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; } } - function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error( + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); + } + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); + } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); + } + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; + } + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; + } + function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); + } + function createUpdate(lane) { + return { + lane: lane, + tag: UpdateState, + payload: null, + callback: null, + next: null + }; + } + function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if ( + currentlyProcessingQueue === updateQueue && + !didWarnUpdateInsideUpdate + ) { + var componentName = getComponentNameFromFiber(fiber); + error$jscomp$0( + "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", + componentName + ); + didWarnUpdateInsideUpdate = !0; + } + if ((executionContext & RenderContext) !== NoContext) + return ( + (componentName = updateQueue.pending), + null === componentName + ? (update.next = update) + : ((update.next = componentName.next), + (componentName.next = update)), + (updateQueue.pending = update), + (update = getRootForUpdatedFiber(fiber)), + markUpdateLaneFromFiberToRoot(fiber, null, lane), + update + ); + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } + } + function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { do { var clone = { lane: queue.lane, @@ -4369,198 +4778,77 @@ __DEV__ && ) callCallback(callbacks[updateQueue], context); } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; + function pushHiddenContext(fiber, context) { + var prevEntangledRenderLanes = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); + push(currentTreeHiddenStackCursor, context, fiber); + entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + } + function reuseHiddenContextOnStack(fiber) { + push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); + push( + currentTreeHiddenStackCursor, + currentTreeHiddenStackCursor.current, + fiber + ); + } + function popHiddenContext(fiber) { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor, fiber); + pop(prevEntangledRenderLanesCursor, fiber); + } + function mountHookTypesDev() { + var hookName = currentHookNameInDev; + null === hookTypesDev + ? (hookTypesDev = [hookName]) + : hookTypesDev.push(hookName); + } + function updateHookTypesDev() { + var hookName = currentHookNameInDev; if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; + null !== hookTypesDev && + (hookTypesUpdateIndexDev++, + hookTypesDev[hookTypesUpdateIndexDev] !== hookName) + ) { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; + !didWarnAboutMismatchedHooksForComponent.has(componentName) && + (didWarnAboutMismatchedHooksForComponent.add(componentName), + null !== hookTypesDev) + ) { + for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i], + newHookName = + i === hookTypesUpdateIndexDev ? hookName : oldHookName; + for ( + oldHookName = i + 1 + ". " + oldHookName; + 30 > oldHookName.length; + + ) + oldHookName += " "; + oldHookName += newHookName + "\n"; + table += oldHookName; + } + error$jscomp$0( + "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + componentName, + table + ); + } } - return !0; } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop$3() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop$3, noop$3), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) - thenable.then(noop$3, noop$3); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; - } - } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - } - function pushHiddenContext(fiber, context) { - var prevEntangledRenderLanes = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); - push(currentTreeHiddenStackCursor, context, fiber); - entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; - } - function reuseHiddenContextOnStack(fiber) { - push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); - push( - currentTreeHiddenStackCursor, - currentTreeHiddenStackCursor.current, - fiber - ); - } - function popHiddenContext(fiber) { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor, fiber); - pop(prevEntangledRenderLanesCursor, fiber); - } - function mountHookTypesDev() { - var hookName = currentHookNameInDev; - null === hookTypesDev - ? (hookTypesDev = [hookName]) - : hookTypesDev.push(hookName); - } - function updateHookTypesDev() { - var hookName = currentHookNameInDev; - if ( - null !== hookTypesDev && - (hookTypesUpdateIndexDev++, - hookTypesDev[hookTypesUpdateIndexDev] !== hookName) - ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); - if ( - !didWarnAboutMismatchedHooksForComponent.has(componentName) && - (didWarnAboutMismatchedHooksForComponent.add(componentName), - null !== hookTypesDev) - ) { - for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { - var oldHookName = hookTypesDev[i], - newHookName = - i === hookTypesUpdateIndexDev ? hookName : oldHookName; - for ( - oldHookName = i + 1 + ". " + oldHookName; - 30 > oldHookName.length; - - ) - oldHookName += " "; - oldHookName += newHookName + "\n"; - table += oldHookName; - } - error$jscomp$0( - "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - componentName, - table - ); - } - } - } - function checkDepsAreArrayDev(deps) { - void 0 === deps || - null === deps || - isArrayImpl(deps) || - error$jscomp$0( - "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", - currentHookNameInDev, - typeof deps - ); + function checkDepsAreArrayDev(deps) { + void 0 === deps || + null === deps || + isArrayImpl(deps) || + error$jscomp$0( + "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", + currentHookNameInDev, + typeof deps + ); } function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), error$jscomp$0( @@ -4603,7 +4891,7 @@ __DEV__ && nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; hookTypesDev = null !== current ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -4614,9 +4902,7 @@ __DEV__ && "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component) ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), error$jscomp$0( @@ -4676,7 +4962,7 @@ __DEV__ && currentHookNameInDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; null !== current && @@ -4711,7 +4997,7 @@ __DEV__ && ))); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -4746,7 +5032,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -4779,7 +5065,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -4796,26 +5082,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -4830,7 +5116,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -4844,7 +5130,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -4865,10 +5151,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -4886,7 +5172,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -4934,7 +5220,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -5012,7 +5298,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -5033,7 +5319,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -5080,7 +5366,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -5137,7 +5423,7 @@ __DEV__ && getSnapshot, getServerSnapshot ) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -5198,10 +5484,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -5259,11 +5545,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -5280,7 +5562,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -5436,7 +5718,7 @@ __DEV__ && var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var isMatching = currentlyRenderingFiber$1; + var isMatching = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -5492,14 +5774,14 @@ __DEV__ && ssrFormState.queue = isMatching; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, isMatching ); isMatching.dispatch = ssrFormState; isMatching = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, isMatching.queue ); @@ -5513,7 +5795,7 @@ __DEV__ && isMatching.queue = markerInstance; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, markerInstance, inRootOrSingleton, ssrFormState @@ -5549,7 +5831,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -5611,10 +5893,10 @@ __DEV__ && }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -5637,7 +5919,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -5653,7 +5935,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -5662,8 +5944,8 @@ __DEV__ && ))); } function mountEffect(create, deps) { - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } @@ -5675,12 +5957,12 @@ __DEV__ && destroy ) { if ( - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ) { var hookFlags = Passive, hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 142608384; + currentlyRenderingFiber.flags |= 142608384; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -5695,7 +5977,7 @@ __DEV__ && } else (hookFlags = Passive), (hook = mountWorkInProgressHook()), - (currentlyRenderingFiber$1.flags |= 8390656), + (currentlyRenderingFiber.flags |= 8390656), (inst = createEffectInstance()), (inst.destroy = destroy), (hook.memoizedState = pushResourceEffect( @@ -5751,7 +6033,7 @@ __DEV__ && } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= fiberFlags); + (currentlyRenderingFiber.flags |= fiberFlags); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? hookFlags : HasEffect | hookFlags, isUpdateDepsSame ? hookFlags : HasEffect | hookFlags, @@ -5763,11 +6045,11 @@ __DEV__ && ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -5801,7 +6083,7 @@ __DEV__ && } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } @@ -5835,7 +6117,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, @@ -5936,7 +6218,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -5951,7 +6233,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -6096,7 +6378,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -6150,7 +6432,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -6175,19 +6457,15 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, + args = requestUpdateLane(fiber); + var update = { + lane: args, revertLane: 0, action: action, hasEagerState: !1, @@ -6195,46 +6473,22 @@ __DEV__ && next: null }; isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -6319,8 +6573,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -9087,32 +9341,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2476; - var JSCompiler_object_inline_stack_2477 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2482; + var JSCompiler_object_inline_stack_2483 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2478 = !1; + var JSCompiler_object_inline_componentStack_2484 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2476 = didSuspend) || - (JSCompiler_object_inline_digest_2476 = + (JSCompiler_object_inline_digest_2482 = didSuspend) || + (JSCompiler_object_inline_digest_2482 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2476 && - ((JSCompiler_object_inline_componentStack_2478 = !0), + JSCompiler_object_inline_digest_2482 && + ((JSCompiler_object_inline_componentStack_2484 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2476 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2482 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2478 + JSCompiler_object_inline_componentStack_2484 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2475 = nextHydratableInstance; + var JSCompiler_object_inline_message_2481 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2475)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2481)) { c: { - var instance = JSCompiler_object_inline_message_2475; + var instance = JSCompiler_object_inline_message_2481; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9138,7 +9392,8 @@ __DEV__ && null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (instance = createFiber(18, null, null, NoMode)), (instance.stateNode = JSCompiler_temp), @@ -9153,46 +9408,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2475 + JSCompiler_object_inline_message_2481 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2475 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2481 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2475 && - ((JSCompiler_object_inline_message_2475 = - JSCompiler_object_inline_message_2475.dehydrated), - null !== JSCompiler_object_inline_message_2475) + null !== JSCompiler_object_inline_message_2481 && + ((JSCompiler_object_inline_message_2481 = + JSCompiler_object_inline_message_2481.dehydrated), + null !== JSCompiler_object_inline_message_2481) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2475) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2481) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2475 = - JSCompiler_object_inline_stack_2477.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2477.fallback; - if (JSCompiler_object_inline_componentStack_2478) + JSCompiler_object_inline_message_2481 = + JSCompiler_object_inline_stack_2483.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2483.fallback; + if (JSCompiler_object_inline_componentStack_2484) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2477 = + (JSCompiler_object_inline_stack_2483 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2475, + JSCompiler_object_inline_message_2481, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2478 = + (JSCompiler_object_inline_componentStack_2484 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2478.memoizedState = + (JSCompiler_object_inline_componentStack_2484.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2478.childLanes = + (JSCompiler_object_inline_componentStack_2484.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2476, + JSCompiler_object_inline_digest_2482, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9205,9 +9460,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2478.updateQueue), + JSCompiler_object_inline_componentStack_2484.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2478.updateQueue = + ? (JSCompiler_object_inline_componentStack_2484.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9215,46 +9470,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2477 + JSCompiler_object_inline_stack_2483 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2477.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2483.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2477 = + (JSCompiler_object_inline_stack_2483 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2475, + JSCompiler_object_inline_message_2481, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2478 = + (JSCompiler_object_inline_componentStack_2484 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2478.memoizedState = + (JSCompiler_object_inline_componentStack_2484.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2478.childLanes = + (JSCompiler_object_inline_componentStack_2484.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2476, + JSCompiler_object_inline_digest_2482, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2477 + JSCompiler_object_inline_stack_2483 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2475 + JSCompiler_object_inline_message_2481 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2475 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2475) + ((JSCompiler_object_inline_message_2481 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2481) ) { if (didSuspend) workInProgress.flags & 256 @@ -9271,94 +9526,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2478 = - JSCompiler_object_inline_stack_2477.fallback), - (JSCompiler_object_inline_message_2475 = workInProgress.mode), - (JSCompiler_object_inline_stack_2477 = + (JSCompiler_object_inline_componentStack_2484 = + JSCompiler_object_inline_stack_2483.fallback), + (JSCompiler_object_inline_message_2481 = workInProgress.mode), + (JSCompiler_object_inline_stack_2483 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2477.children + children: JSCompiler_object_inline_stack_2483.children }, - JSCompiler_object_inline_message_2475 + JSCompiler_object_inline_message_2481 )), - (JSCompiler_object_inline_componentStack_2478 = + (JSCompiler_object_inline_componentStack_2484 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2478, - JSCompiler_object_inline_message_2475, + JSCompiler_object_inline_componentStack_2484, + JSCompiler_object_inline_message_2481, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2478.flags |= 2), - (JSCompiler_object_inline_stack_2477.return = workInProgress), - (JSCompiler_object_inline_componentStack_2478.return = + (JSCompiler_object_inline_componentStack_2484.flags |= 2), + (JSCompiler_object_inline_stack_2483.return = workInProgress), + (JSCompiler_object_inline_componentStack_2484.return = workInProgress), - (JSCompiler_object_inline_stack_2477.sibling = - JSCompiler_object_inline_componentStack_2478), - (workInProgress.child = JSCompiler_object_inline_stack_2477), + (JSCompiler_object_inline_stack_2483.sibling = + JSCompiler_object_inline_componentStack_2484), + (workInProgress.child = JSCompiler_object_inline_stack_2483), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2477 = workInProgress.child), - (JSCompiler_object_inline_stack_2477.memoizedState = + (JSCompiler_object_inline_stack_2483 = workInProgress.child), + (JSCompiler_object_inline_stack_2483.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2477.childLanes = + (JSCompiler_object_inline_stack_2483.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2476, + JSCompiler_object_inline_digest_2482, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2478)); + JSCompiler_object_inline_componentStack_2484)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2475)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2481)) ) { - JSCompiler_object_inline_digest_2476 = - JSCompiler_object_inline_message_2475.nextSibling && - JSCompiler_object_inline_message_2475.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2476) { - JSCompiler_temp = JSCompiler_object_inline_digest_2476.dgst; - var message = JSCompiler_object_inline_digest_2476.msg; - instance = JSCompiler_object_inline_digest_2476.stck; - var componentStack = JSCompiler_object_inline_digest_2476.cstck; + JSCompiler_object_inline_digest_2482 = + JSCompiler_object_inline_message_2481.nextSibling && + JSCompiler_object_inline_message_2481.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2482) { + JSCompiler_temp = JSCompiler_object_inline_digest_2482.dgst; + var message = JSCompiler_object_inline_digest_2482.msg; + instance = JSCompiler_object_inline_digest_2482.stck; + var componentStack = JSCompiler_object_inline_digest_2482.cstck; } - JSCompiler_object_inline_message_2475 = message; - JSCompiler_object_inline_digest_2476 = JSCompiler_temp; - JSCompiler_object_inline_stack_2477 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2478 = + JSCompiler_object_inline_message_2481 = message; + JSCompiler_object_inline_digest_2482 = JSCompiler_temp; + JSCompiler_object_inline_stack_2483 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2484 = componentStack; - JSCompiler_object_inline_componentStack_2478 = - JSCompiler_object_inline_message_2475 - ? Error(JSCompiler_object_inline_message_2475) + JSCompiler_object_inline_componentStack_2484 = + JSCompiler_object_inline_message_2481 + ? Error(JSCompiler_object_inline_message_2481) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2478.stack = - JSCompiler_object_inline_stack_2477 || ""; - JSCompiler_object_inline_componentStack_2478.digest = - JSCompiler_object_inline_digest_2476; - JSCompiler_object_inline_digest_2476 = + JSCompiler_object_inline_componentStack_2484.stack = + JSCompiler_object_inline_stack_2483 || ""; + JSCompiler_object_inline_componentStack_2484.digest = + JSCompiler_object_inline_digest_2482; + JSCompiler_object_inline_digest_2482 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2477 = { - value: JSCompiler_object_inline_componentStack_2478, + JSCompiler_object_inline_stack_2483 = { + value: JSCompiler_object_inline_componentStack_2484, source: null, - stack: JSCompiler_object_inline_digest_2476 + stack: JSCompiler_object_inline_digest_2482 }; - "string" === typeof JSCompiler_object_inline_digest_2476 && + "string" === typeof JSCompiler_object_inline_digest_2482 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2478, - JSCompiler_object_inline_stack_2477 + JSCompiler_object_inline_componentStack_2484, + JSCompiler_object_inline_stack_2483 ); - queueHydrationError(JSCompiler_object_inline_stack_2477); + queueHydrationError(JSCompiler_object_inline_stack_2483); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9372,44 +9627,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2476 = + (JSCompiler_object_inline_digest_2482 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2476) + didReceiveUpdate || JSCompiler_object_inline_digest_2482) ) { - JSCompiler_object_inline_digest_2476 = workInProgressRoot; + JSCompiler_object_inline_digest_2482 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2476 && - ((JSCompiler_object_inline_stack_2477 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2477 = - 0 !== (JSCompiler_object_inline_stack_2477 & 42) + null !== JSCompiler_object_inline_digest_2482 && + ((JSCompiler_object_inline_stack_2483 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2483 = + 0 !== (JSCompiler_object_inline_stack_2483 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2477 + JSCompiler_object_inline_stack_2483 )), - (JSCompiler_object_inline_stack_2477 = + (JSCompiler_object_inline_stack_2483 = 0 !== - (JSCompiler_object_inline_stack_2477 & - (JSCompiler_object_inline_digest_2476.suspendedLanes | + (JSCompiler_object_inline_stack_2483 & + (JSCompiler_object_inline_digest_2482.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2477), - 0 !== JSCompiler_object_inline_stack_2477 && - JSCompiler_object_inline_stack_2477 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2483), + 0 !== JSCompiler_object_inline_stack_2483 && + JSCompiler_object_inline_stack_2483 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2477), + ((prevState.retryLane = JSCompiler_object_inline_stack_2483), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2477 + JSCompiler_object_inline_stack_2483 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2476, + JSCompiler_object_inline_digest_2482, current, - JSCompiler_object_inline_stack_2477 + JSCompiler_object_inline_stack_2483 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2475.data === + JSCompiler_object_inline_message_2481.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9417,14 +9672,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2475.data === + JSCompiler_object_inline_message_2481.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2475.nextSibling + JSCompiler_object_inline_message_2481.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9442,57 +9697,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2477.children + JSCompiler_object_inline_stack_2483.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2478) + if (JSCompiler_object_inline_componentStack_2484) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2478 = - JSCompiler_object_inline_stack_2477.fallback), - (JSCompiler_object_inline_message_2475 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2484 = + JSCompiler_object_inline_stack_2483.fallback), + (JSCompiler_object_inline_message_2481 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2477 = createWorkInProgress( + (JSCompiler_object_inline_stack_2483 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2477.children + children: JSCompiler_object_inline_stack_2483.children } )), - (JSCompiler_object_inline_stack_2477.subtreeFlags = + (JSCompiler_object_inline_stack_2483.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2478 = + ? (JSCompiler_object_inline_componentStack_2484 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2478 + JSCompiler_object_inline_componentStack_2484 )) - : ((JSCompiler_object_inline_componentStack_2478 = + : ((JSCompiler_object_inline_componentStack_2484 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2478, - JSCompiler_object_inline_message_2475, + JSCompiler_object_inline_componentStack_2484, + JSCompiler_object_inline_message_2481, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2478.flags |= 2)), - (JSCompiler_object_inline_componentStack_2478.return = + (JSCompiler_object_inline_componentStack_2484.flags |= 2)), + (JSCompiler_object_inline_componentStack_2484.return = workInProgress), - (JSCompiler_object_inline_stack_2477.return = workInProgress), - (JSCompiler_object_inline_stack_2477.sibling = - JSCompiler_object_inline_componentStack_2478), - (workInProgress.child = JSCompiler_object_inline_stack_2477), - (JSCompiler_object_inline_stack_2477 = - JSCompiler_object_inline_componentStack_2478), - (JSCompiler_object_inline_componentStack_2478 = workInProgress.child), - (JSCompiler_object_inline_message_2475 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2475 - ? (JSCompiler_object_inline_message_2475 = + (JSCompiler_object_inline_stack_2483.return = workInProgress), + (JSCompiler_object_inline_stack_2483.sibling = + JSCompiler_object_inline_componentStack_2484), + (workInProgress.child = JSCompiler_object_inline_stack_2483), + (JSCompiler_object_inline_stack_2483 = + JSCompiler_object_inline_componentStack_2484), + (JSCompiler_object_inline_componentStack_2484 = workInProgress.child), + (JSCompiler_object_inline_message_2481 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2481 + ? (JSCompiler_object_inline_message_2481 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2475.cachePool), + JSCompiler_object_inline_message_2481.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9500,34 +9755,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2475 = { + (JSCompiler_object_inline_message_2481 = { baseLanes: - JSCompiler_object_inline_message_2475.baseLanes | renderLanes, + JSCompiler_object_inline_message_2481.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2478.memoizedState = - JSCompiler_object_inline_message_2475), + (JSCompiler_object_inline_componentStack_2484.memoizedState = + JSCompiler_object_inline_message_2481), enableTransitionTracing && - ((JSCompiler_object_inline_message_2475 = enableTransitionTracing + ((JSCompiler_object_inline_message_2481 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2475 && + null !== JSCompiler_object_inline_message_2481 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2478.updateQueue), + JSCompiler_object_inline_componentStack_2484.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2478.updateQueue = { - transitions: JSCompiler_object_inline_message_2475, + ? (JSCompiler_object_inline_componentStack_2484.updateQueue = { + transitions: JSCompiler_object_inline_message_2481, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2478.updateQueue = + ? (JSCompiler_object_inline_componentStack_2484.updateQueue = { - transitions: JSCompiler_object_inline_message_2475, + transitions: JSCompiler_object_inline_message_2481, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9535,32 +9790,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2475), + JSCompiler_object_inline_message_2481), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2478.childLanes = + (JSCompiler_object_inline_componentStack_2484.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2476, + JSCompiler_object_inline_digest_2482, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2477 + JSCompiler_object_inline_stack_2483 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2477.children + children: JSCompiler_object_inline_stack_2483.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2476 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2476 + ((JSCompiler_object_inline_digest_2482 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2482 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2476.push(current)); + : JSCompiler_object_inline_digest_2482.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10691,373 +10946,97 @@ __DEV__ && ? ((prevSibling = peekCacheFromPool()), null === prevSibling && ((prevSibling = workInProgressRoot), - (nextProps = createCache()), - (prevSibling.pooledCache = nextProps), - retainCache(nextProps), - null !== nextProps && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = nextProps)), - (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), - (nextProps = 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 = nextProps.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current - ? ((returnFiber = enableTransitionTracing - ? transitionStack.current - : null), - null !== returnFiber && - ((returnFiber = { - tag: TransitionTracingMarker, - transitions: new Set(returnFiber), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = returnFiber), - (workInProgress.flags |= 2048))) - : current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ), - (returnFiber = workInProgress.stateNode), - null !== returnFiber && - pushMarkerInstance(workInProgress, returnFiber), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); - } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue, providerFiber); - context._currentValue = nextValue; - push(rendererCursorDEV, context._currentRenderer, providerFiber); - void 0 !== context._currentRenderer && - null !== context._currentRenderer && - context._currentRenderer !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ); - context._currentRenderer = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue = valueCursor.current; - var currentRenderer = rendererCursorDEV.current; - pop(rendererCursorDEV, providerFiber); - context._currentRenderer = currentRenderer; - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions, offscreenWorkInProgress) - : null === newTransitions - ? push( - transitionStack, - transitionStack.current, - offscreenWorkInProgress - ) - : push( - transitionStack, - transitionStack.current.concat(newTransitions), - offscreenWorkInProgress - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack, workInProgress), - pop(resumedCache, workInProgress)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + (nextProps = createCache()), + (prevSibling.pooledCache = nextProps), + retainCache(nextProps), + null !== nextProps && + (prevSibling.pooledCacheLanes |= renderLanes), + (prevSibling = nextProps)), + (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), + (nextProps = 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 = nextProps.cache), + pushProvider(workInProgress, CacheContext, returnFiber), + returnFiber !== prevSibling.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; + } + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } function collectScopedNodesFromChildren( startingChild, @@ -11300,13 +11279,13 @@ __DEV__ && case 1: return bubbleProperties(workInProgress), null; case 3: - newProps = workInProgress.stateNode; + renderLanes = workInProgress.stateNode; enableTransitionTracing && null !== workInProgressTransitions && (workInProgress.flags |= 2048); - renderLanes = null; - null !== current && (renderLanes = current.memoizedState.cache); - workInProgress.memoizedState.cache !== renderLanes && + newProps = null; + null !== current && (newProps = current.memoizedState.cache); + workInProgress.memoizedState.cache !== newProps && (workInProgress.flags |= 2048); popProvider(CacheContext, workInProgress); enableTransitionTracing && @@ -11314,9 +11293,9 @@ __DEV__ && pop(markerInstanceStack, workInProgress); enableTransitionTracing && pop(transitionStack, workInProgress); popHostContainer(workInProgress); - newProps.pendingContext && - ((newProps.context = newProps.pendingContext), - (newProps.pendingContext = null)); + renderLanes.pendingContext && + ((renderLanes.context = renderLanes.pendingContext), + (renderLanes.pendingContext = null)); if (null === current || null === current.child) popHydrationState(workInProgress) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress)) @@ -11324,9 +11303,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -11544,9 +11521,9 @@ __DEV__ && renderLanes = getHostContext(); if (popHydrationState(workInProgress)) { current = workInProgress.stateNode; - newProps = workInProgress.memoizedProps; + renderLanes = workInProgress.memoizedProps; _type = !didSuspendOrErrorDEV; - renderLanes = null; + newProps = null; var returnFiber = hydrationParentFiber; if (null !== returnFiber) switch (returnFiber.tag) { @@ -11554,8 +11531,8 @@ __DEV__ && _type && ((_type = diffHydratedTextForDevWarnings( current, - newProps, - renderLanes + renderLanes, + newProps )), null !== _type && (buildHydrationDiffNode(workInProgress, 0).serverProps = @@ -11563,12 +11540,12 @@ __DEV__ && break; case 27: case 5: - (renderLanes = returnFiber.memoizedProps), + (newProps = returnFiber.memoizedProps), _type && ((_type = diffHydratedTextForDevWarnings( current, - newProps, - renderLanes + renderLanes, + newProps )), null !== _type && (buildHydrationDiffNode( @@ -11578,10 +11555,10 @@ __DEV__ && } current[internalInstanceKey] = workInProgress; current = - current.nodeValue === newProps || - (null !== renderLanes && - !0 === renderLanes.suppressHydrationWarning) || - checkForUnmatchedText(current.nodeValue, newProps) + current.nodeValue === renderLanes || + (null !== newProps && + !0 === newProps.suppressHydrationWarning) || + checkForUnmatchedText(current.nodeValue, renderLanes) ? !0 : !1; !current && @@ -11643,9 +11620,10 @@ __DEV__ && _type.treeBaseDuration)); _type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (_type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = _type), (_type = !0); if (!_type) { if (workInProgress.flags & 256) @@ -11662,30 +11640,30 @@ __DEV__ && transferActualDuration(workInProgress), workInProgress ); - newProps = null !== newProps; + renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - newProps && - ((renderLanes = workInProgress.child), + renderLanes && + ((newProps = workInProgress.child), (_type = null), - null !== renderLanes.alternate && - null !== renderLanes.alternate.memoizedState && - null !== renderLanes.alternate.memoizedState.cachePool && - (_type = renderLanes.alternate.memoizedState.cachePool.pool), + null !== newProps.alternate && + null !== newProps.alternate.memoizedState && + null !== newProps.alternate.memoizedState.cachePool && + (_type = newProps.alternate.memoizedState.cachePool.pool), (returnFiber = null), - null !== renderLanes.memoizedState && - null !== renderLanes.memoizedState.cachePool && - (returnFiber = renderLanes.memoizedState.cachePool.pool), - returnFiber !== _type && (renderLanes.flags |= 2048)); - newProps !== current && + null !== newProps.memoizedState && + null !== newProps.memoizedState.cachePool && + (returnFiber = newProps.memoizedState.cachePool.pool), + returnFiber !== _type && (newProps.flags |= 2048)); + renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), - newProps && (workInProgress.child.flags |= 8192)); + renderLanes && (workInProgress.child.flags |= 8192)); scheduleRetryEffect(workInProgress, workInProgress.updateQueue); null !== workInProgress.updateQueue && null != workInProgress.memoizedProps.suspenseCallback && (workInProgress.flags |= 4); bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - newProps && + renderLanes && ((current = workInProgress.child), null !== current && (workInProgress.treeBaseDuration -= current.treeBaseDuration)); @@ -11734,9 +11712,13 @@ __DEV__ && scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; current = renderLanes; - for (newProps = workInProgress.child; null !== newProps; ) - resetWorkInProgress(newProps, current), - (newProps = newProps.sibling); + for ( + renderLanes = workInProgress.child; + null !== renderLanes; + + ) + resetWorkInProgress(renderLanes, current), + (renderLanes = renderLanes.sibling); push( suspenseStackCursor, (suspenseStackCursor.current & @@ -11841,27 +11823,27 @@ __DEV__ && workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192)) : bubbleProperties(workInProgress), - (newProps = workInProgress.updateQueue), - null !== newProps && - scheduleRetryEffect(workInProgress, newProps.retryQueue), - (newProps = null), + (renderLanes = workInProgress.updateQueue), + null !== renderLanes && + scheduleRetryEffect(workInProgress, renderLanes.retryQueue), + (renderLanes = null), null !== current && null !== current.memoizedState && null !== current.memoizedState.cachePool && - (newProps = current.memoizedState.cachePool.pool), - (renderLanes = null), + (renderLanes = current.memoizedState.cachePool.pool), + (newProps = null), null !== workInProgress.memoizedState && null !== workInProgress.memoizedState.cachePool && - (renderLanes = workInProgress.memoizedState.cachePool.pool), - renderLanes !== newProps && (workInProgress.flags |= 2048), + (newProps = workInProgress.memoizedState.cachePool.pool), + newProps !== renderLanes && (workInProgress.flags |= 2048), popTransition(workInProgress, current), null ); case 24: return ( - (newProps = null), - null !== current && (newProps = current.memoizedState.cache), - workInProgress.memoizedState.cache !== newProps && + (renderLanes = null), + null !== current && (renderLanes = current.memoizedState.cache), + workInProgress.memoizedState.cache !== renderLanes && (workInProgress.flags |= 2048), popProvider(CacheContext, workInProgress), bubbleProperties(workInProgress), @@ -14628,6 +14610,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -15401,7 +15391,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = errorRetryLanes$jscomp$0; } @@ -15517,14 +15513,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -15726,7 +15714,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -16383,9 +16371,6 @@ __DEV__ && throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -16400,58 +16385,64 @@ __DEV__ && root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - (suspendedRetryLanes = commitBeforeMutationEffects( - root, - finishedWork - )), - commitMutationEffects(root, finishedWork, lanes), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = DiscreteEventPriority; + suspendedRetryLanes = executionContext; + executionContext |= CommitContext; + var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffects(root, finishedWork, lanes); + shouldFireAfterActiveInstanceBlur && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + (transitions = spawnedLane) + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : (releaseRootPooledCache(root, remainingLanes), @@ -16463,7 +16454,6 @@ __DEV__ && onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -16471,14 +16461,15 @@ __DEV__ && finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), + (spawnedLane = makeErrorInfo(remainingLanes.stack)), runWithFiberInDEV( remainingLanes.source, renderPriorityLevel, remainingLanes.value, - transitions + spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -16840,7 +16831,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -24384,9 +24375,42 @@ __DEV__ && StrictLegacyMode = 8, StrictEffectsMode = 16, NoStrictPassiveEffectsMode = 64, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var rendererCursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, @@ -24406,14 +24430,17 @@ __DEV__ && currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, flushPendingUnsafeLifecycleWarnings: function () {}, @@ -24631,6 +24658,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -24641,7 +24679,7 @@ __DEV__ && var ResourceEffectIdentityKind = 0, ResourceEffectUpdateKind = 1, renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -26182,55 +26220,13 @@ __DEV__ && var didWarnAboutTailOptions = {}; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var rendererCursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), + hasWarnedAboutUsingNoValuePropOnContextProvider = !1, emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -26320,7 +26316,6 @@ __DEV__ && currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -27158,11 +27153,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-modern-d4287258-20241217" !== isomorphicReactPackageVersion) + if ("19.1.0-www-modern-a9bbe346-20241219" !== 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.1.0-www-modern-d4287258-20241217\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-modern-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27205,10 +27200,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-d4287258-20241217", + version: "19.1.0-www-modern-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27245,52 +27240,43 @@ __DEV__ && ); } ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = - function (children, JSCompiler_OptimizeArgumentsArray_p2) { + function (children) { var root = this._internalRoot; if (null === root) throw Error("Cannot update an unmounted root."); - "function" === typeof JSCompiler_OptimizeArgumentsArray_p2 + var args = arguments; + "function" === typeof args[1] ? error$jscomp$0( "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()." ) - : isValidContainer(JSCompiler_OptimizeArgumentsArray_p2) + : isValidContainer(args[1]) ? error$jscomp$0( "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root." ) - : "undefined" !== typeof JSCompiler_OptimizeArgumentsArray_p2 && + : "undefined" !== typeof args[1] && error$jscomp$0( "You passed a second argument to root.render(...) but it only accepts one argument." ); - JSCompiler_OptimizeArgumentsArray_p2 = root.current; - var lane = requestUpdateLane(JSCompiler_OptimizeArgumentsArray_p2); - updateContainerImpl( - JSCompiler_OptimizeArgumentsArray_p2, - lane, - children, - root, - null, - null - ); + args = children; + var current = root.current, + lane = requestUpdateLane(current); + updateContainerImpl(current, lane, args, root, null, null); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = - function (JSCompiler_OptimizeArgumentsArray_p3) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p3 && + function () { + var args = arguments; + "function" === typeof args[0] && error$jscomp$0( "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p3 = this._internalRoot; - if (null !== JSCompiler_OptimizeArgumentsArray_p3) { + args = this._internalRoot; + if (null !== args) { this._internalRoot = null; - var container = JSCompiler_OptimizeArgumentsArray_p3.containerInfo; + var container = args.containerInfo; (executionContext & (RenderContext | CommitContext)) !== NoContext && error$jscomp$0( "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition." ); - updateContainerSync( - null, - JSCompiler_OptimizeArgumentsArray_p3, - null, - null - ); + updateContainerSync(null, args, null, null); flushSyncWork$1(); container[internalContainerInstanceKey] = null; } @@ -27815,7 +27801,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-modern-d4287258-20241217"; + exports.version = "19.1.0-www-modern-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index dbcd478783adc..2982972f05c07 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -1889,123 +1889,269 @@ function resetHydrationState() { nextHydratableInstance = hydrationParentFiber = null; isHydrating = !1; } +function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; +} function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) : hydrationErrors.push(error); } -var concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0; -function finishQueueingConcurrentUpdates() { +var valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null; +function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue); + context._currentValue = nextValue; +} +function popProvider(context) { + context._currentValue = valueCursor.current; + pop(valueCursor); +} +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } +} +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } +} +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } -function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); -} -function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } -function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); +function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } -function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); +function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } -function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } -var firstScheduledRoot = null, - lastScheduledRoot = null, - didScheduleMicrotask = !1, - mightHavePendingSyncWork = !1, - isFlushingWork = !1, - currentEventTransitionLane = 0; -function ensureRootIsScheduled(root) { - root !== lastScheduledRoot && - null === root.next && - (null === lastScheduledRoot - ? (firstScheduledRoot = lastScheduledRoot = root) - : (lastScheduledRoot = lastScheduledRoot.next = root)); - mightHavePendingSyncWork = !0; - didScheduleMicrotask || - ((didScheduleMicrotask = !0), - scheduleImmediateTask(processRootScheduleInMicrotask)); - enableDeferRootSchedulingToMicrotask || - scheduleTaskForRootDuringMicrotask(root, now()); +function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; } -function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { - if (!isFlushingWork && mightHavePendingSyncWork) { - isFlushingWork = !0; - do { - var didPerformSomeWork = !1; - for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy) - if (0 !== syncTransitionLanes) { - var pendingLanes = root$26.pendingLanes; - if (0 === pendingLanes) var JSCompiler_inline_result = 0; - else { - var suspendedLanes = root$26.suspendedLanes, - pingedLanes = root$26.pingedLanes; - JSCompiler_inline_result = - (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; - JSCompiler_inline_result &= +var AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; +} +function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); +} +var firstScheduledRoot = null, + lastScheduledRoot = null, + didScheduleMicrotask = !1, + mightHavePendingSyncWork = !1, + isFlushingWork = !1, + currentEventTransitionLane = 0; +function ensureRootIsScheduled(root) { + root !== lastScheduledRoot && + null === root.next && + (null === lastScheduledRoot + ? (firstScheduledRoot = lastScheduledRoot = root) + : (lastScheduledRoot = lastScheduledRoot.next = root)); + mightHavePendingSyncWork = !0; + didScheduleMicrotask || + ((didScheduleMicrotask = !0), + scheduleImmediateTask(processRootScheduleInMicrotask)); + enableDeferRootSchedulingToMicrotask || + scheduleTaskForRootDuringMicrotask(root, now()); +} +function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { + if (!isFlushingWork && mightHavePendingSyncWork) { + isFlushingWork = !0; + do { + var didPerformSomeWork = !1; + for (var root$27 = firstScheduledRoot; null !== root$27; ) { + if (!onlyLegacy) + if (0 !== syncTransitionLanes) { + var pendingLanes = root$27.pendingLanes; + if (0 === pendingLanes) var JSCompiler_inline_result = 0; + else { + var suspendedLanes = root$27.suspendedLanes, + pingedLanes = root$27.pingedLanes; + JSCompiler_inline_result = + (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; + JSCompiler_inline_result &= pendingLanes & ~(suspendedLanes & ~pingedLanes); JSCompiler_inline_result = JSCompiler_inline_result & 201326677 @@ -2016,18 +2162,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$26, - root$26 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$27, + root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$26, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); - root$26 = root$26.next; + performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); + root$27 = root$27.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2230,279 +2376,80 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } -var hasForceUpdate = !1; -function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; -} -function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); +var prevOnStartTransitionFinish = ReactSharedInternals.S; +ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); +}; +var resumedCache = createCursor(null), + transitionStack = createCursor(null); +function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } -function createUpdate(lane) { - return { lane: lane, tag: 0, payload: null, callback: null, next: null }; +function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions +) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); } -function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if (0 !== (executionContext & 2)) { - var pending = updateQueue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - updateQueue.pending = update; - update = getRootForUpdatedFiber(fiber); - markUpdateLaneFromFiberToRoot(fiber, null, lane); - return update; - } - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); +function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); } -function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); - } +function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; } -function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; +function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast - ? (newFirst = newLast = clone) - : (newLast = newLast.next = clone); - queue = queue.next; - } while (null !== queue); - null === newLast - ? (newFirst = newLast = capturedUpdate) - : (newLast = newLast.next = capturedUpdate); - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current.shared, - callbacks: current.callbacks - }; - workInProgress.updateQueue = queue; - return; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - workInProgress = queue.lastBaseUpdate; - null === workInProgress - ? (queue.firstBaseUpdate = capturedUpdate) - : (workInProgress.next = capturedUpdate); - queue.lastBaseUpdate = capturedUpdate; + return !0; } -var didReadFromEntangledAsyncAction = !1; -function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } -} -function processUpdateQueue( - workInProgress$jscomp$0, - props, - instance$jscomp$0, - renderLanes -) { - didReadFromEntangledAsyncAction = !1; - var queue = workInProgress$jscomp$0.updateQueue; - hasForceUpdate = !1; - var firstBaseUpdate = queue.firstBaseUpdate, - lastBaseUpdate = queue.lastBaseUpdate, - pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, - firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate - ? (firstBaseUpdate = firstPendingUpdate) - : (lastBaseUpdate.next = firstPendingUpdate); - lastBaseUpdate = lastPendingUpdate; - var current = workInProgress$jscomp$0.alternate; - null !== current && - ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && - (null === pendingQueue - ? (current.firstBaseUpdate = firstPendingUpdate) - : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, - isHiddenUpdate = updateLane !== pendingQueue.lane; - if ( - isHiddenUpdate - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - 0 !== updateLane && - updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - null !== current && - (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - var workInProgress = workInProgress$jscomp$0, - update = pendingQueue; - updateLane = props; - var instance = instance$jscomp$0; - switch (update.tag) { - case 1: - workInProgress = update.payload; - if ("function" === typeof workInProgress) { - newState = workInProgress.call(instance, newState, updateLane); - break a; - } - newState = workInProgress; - break a; - case 3: - workInProgress.flags = (workInProgress.flags & -65537) | 128; - case 0: - workInProgress = update.payload; - updateLane = - "function" === typeof workInProgress - ? workInProgress.call(instance, newState, updateLane) - : workInProgress; - if (null === updateLane || void 0 === updateLane) break a; - newState = assign({}, newState, updateLane); - break a; - case 2: - hasForceUpdate = !0; - } - } - updateLane = pendingQueue.callback; - null !== updateLane && - ((workInProgress$jscomp$0.flags |= 64), - isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), - (isHiddenUpdate = queue.callbacks), - null === isHiddenUpdate - ? (queue.callbacks = [updateLane]) - : isHiddenUpdate.push(updateLane)); - } else - (isHiddenUpdate = { - lane: updateLane, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: pendingQueue.callback, - next: null - }), - null === current - ? ((firstPendingUpdate = current = isHiddenUpdate), - (lastPendingUpdate = newState)) - : (current = current.next = isHiddenUpdate), - (lastBaseUpdate |= updateLane); - pendingQueue = pendingQueue.next; - if (null === pendingQueue) - if (((pendingQueue = queue.shared.pending), null === pendingQueue)) - break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; - } -} -function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error(formatProdErrorMessage(191, callback)); - callback.call(context); -} -function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); -} -function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; -} -var SuspenseException = Error(formatProdErrorMessage(460)), - SuspenseyCommitException = Error(formatProdErrorMessage(474)), - SuspenseActionException = Error(formatProdErrorMessage(542)), - noopSuspenseyCommitThenable = { then: function () {} }; -function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; +var SuspenseException = Error(formatProdErrorMessage(460)), + SuspenseyCommitException = Error(formatProdErrorMessage(474)), + SuspenseActionException = Error(formatProdErrorMessage(542)), + noopSuspenseyCommitThenable = { then: function () {} }; +function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; } function noop$3() {} function trackUsedThenable(thenableState, thenable, index) { @@ -2572,53 +2519,374 @@ function checkIfUseWrappedInAsyncCatch(rejectedReason) { ) throw Error(formatProdErrorMessage(483)); } -var currentTreeHiddenStackCursor = createCursor(null), - prevEntangledRenderLanesCursor = createCursor(0); -function pushHiddenContext(fiber, context) { - fiber = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, fiber); - push(currentTreeHiddenStackCursor, context); - entangledRenderLanes = fiber | context.baseLanes; +var concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0; +function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } } -function reuseHiddenContextOnStack() { - push(prevEntangledRenderLanesCursor, entangledRenderLanes); - push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); +function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); } -function popHiddenContext() { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor); - pop(prevEntangledRenderLanesCursor); +function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); } -var renderLanes = 0, - currentlyRenderingFiber$1 = null, - currentHook = null, - workInProgressHook = null, - didScheduleRenderPhaseUpdate = !1, - didScheduleRenderPhaseUpdateDuringThisPass = !1, - shouldDoubleInvokeUserFnsInHooksDEV = !1, - localIdCounter = 0, - thenableIndexCounter$1 = 0, - thenableState$1 = null, - globalClientIdCounter = 0; -function throwInvalidHookError() { - throw Error(formatProdErrorMessage(321)); +function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } -function areHookInputsEqual(nextDeps, prevDeps) { - if (null === prevDeps) return !1; - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) - if (!objectIs(nextDeps[i], prevDeps[i])) return !1; - return !0; +function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } -function renderWithHooks( - current, - workInProgress, - Component, - props, - secondArg, - nextRenderLanes -) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; +function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +} +var hasForceUpdate = !1; +function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; +} +function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); +} +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; +} +function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if (0 !== (executionContext & 2)) { + var pending = updateQueue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + updateQueue.pending = update; + update = getRootForUpdatedFiber(fiber); + markUpdateLaneFromFiberToRoot(fiber, null, lane); + return update; + } + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); +} +function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } +} +function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { + do { + var clone = { + lane: queue.lane, + tag: queue.tag, + payload: queue.payload, + callback: null, + next: null + }; + null === newLast + ? (newFirst = newLast = clone) + : (newLast = newLast.next = clone); + queue = queue.next; + } while (null !== queue); + null === newLast + ? (newFirst = newLast = capturedUpdate) + : (newLast = newLast.next = capturedUpdate); + } else newFirst = newLast = capturedUpdate; + queue = { + baseState: current.baseState, + firstBaseUpdate: newFirst, + lastBaseUpdate: newLast, + shared: current.shared, + callbacks: current.callbacks + }; + workInProgress.updateQueue = queue; + return; + } + workInProgress = queue.lastBaseUpdate; + null === workInProgress + ? (queue.firstBaseUpdate = capturedUpdate) + : (workInProgress.next = capturedUpdate); + queue.lastBaseUpdate = capturedUpdate; +} +var didReadFromEntangledAsyncAction = !1; +function suspendIfUpdateReadFromEntangledAsyncAction() { + if (didReadFromEntangledAsyncAction) { + var entangledActionThenable = currentEntangledActionThenable; + if (null !== entangledActionThenable) throw entangledActionThenable; + } +} +function processUpdateQueue( + workInProgress$jscomp$0, + props, + instance$jscomp$0, + renderLanes +) { + didReadFromEntangledAsyncAction = !1; + var queue = workInProgress$jscomp$0.updateQueue; + hasForceUpdate = !1; + var firstBaseUpdate = queue.firstBaseUpdate, + lastBaseUpdate = queue.lastBaseUpdate, + pendingQueue = queue.shared.pending; + if (null !== pendingQueue) { + queue.shared.pending = null; + var lastPendingUpdate = pendingQueue, + firstPendingUpdate = lastPendingUpdate.next; + lastPendingUpdate.next = null; + null === lastBaseUpdate + ? (firstBaseUpdate = firstPendingUpdate) + : (lastBaseUpdate.next = firstPendingUpdate); + lastBaseUpdate = lastPendingUpdate; + var current = workInProgress$jscomp$0.alternate; + null !== current && + ((current = current.updateQueue), + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && + (null === pendingQueue + ? (current.firstBaseUpdate = firstPendingUpdate) + : (pendingQueue.next = firstPendingUpdate), + (current.lastBaseUpdate = lastPendingUpdate))); + } + if (null !== firstBaseUpdate) { + var newState = queue.baseState; + lastBaseUpdate = 0; + current = firstPendingUpdate = lastPendingUpdate = null; + pendingQueue = firstBaseUpdate; + do { + var updateLane = pendingQueue.lane & -536870913, + isHiddenUpdate = updateLane !== pendingQueue.lane; + if ( + isHiddenUpdate + ? (workInProgressRootRenderLanes & updateLane) === updateLane + : (renderLanes & updateLane) === updateLane + ) { + 0 !== updateLane && + updateLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + null !== current && + (current = current.next = + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); + a: { + var workInProgress = workInProgress$jscomp$0, + update = pendingQueue; + updateLane = props; + var instance = instance$jscomp$0; + switch (update.tag) { + case 1: + workInProgress = update.payload; + if ("function" === typeof workInProgress) { + newState = workInProgress.call(instance, newState, updateLane); + break a; + } + newState = workInProgress; + break a; + case 3: + workInProgress.flags = (workInProgress.flags & -65537) | 128; + case 0: + workInProgress = update.payload; + updateLane = + "function" === typeof workInProgress + ? workInProgress.call(instance, newState, updateLane) + : workInProgress; + if (null === updateLane || void 0 === updateLane) break a; + newState = assign({}, newState, updateLane); + break a; + case 2: + hasForceUpdate = !0; + } + } + updateLane = pendingQueue.callback; + null !== updateLane && + ((workInProgress$jscomp$0.flags |= 64), + isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); + } else + (isHiddenUpdate = { + lane: updateLane, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: pendingQueue.callback, + next: null + }), + null === current + ? ((firstPendingUpdate = current = isHiddenUpdate), + (lastPendingUpdate = newState)) + : (current = current.next = isHiddenUpdate), + (lastBaseUpdate |= updateLane); + pendingQueue = pendingQueue.next; + if (null === pendingQueue) + if (((pendingQueue = queue.shared.pending), null === pendingQueue)) + break; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress$jscomp$0.lanes = lastBaseUpdate; + workInProgress$jscomp$0.memoizedState = newState; + } +} +function callCallback(callback, context) { + if ("function" !== typeof callback) + throw Error(formatProdErrorMessage(191, callback)); + callback.call(context); +} +function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); +} +var currentTreeHiddenStackCursor = createCursor(null), + prevEntangledRenderLanesCursor = createCursor(0); +function pushHiddenContext(fiber, context) { + fiber = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, fiber); + push(currentTreeHiddenStackCursor, context); + entangledRenderLanes = fiber | context.baseLanes; +} +function reuseHiddenContextOnStack() { + push(prevEntangledRenderLanesCursor, entangledRenderLanes); + push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); +} +function popHiddenContext() { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor); + pop(prevEntangledRenderLanesCursor); +} +var renderLanes = 0, + currentlyRenderingFiber = null, + currentHook = null, + workInProgressHook = null, + didScheduleRenderPhaseUpdate = !1, + didScheduleRenderPhaseUpdateDuringThisPass = !1, + shouldDoubleInvokeUserFnsInHooksDEV = !1, + localIdCounter = 0, + thenableIndexCounter$1 = 0, + thenableState$1 = null, + globalClientIdCounter = 0; +function throwInvalidHookError() { + throw Error(formatProdErrorMessage(321)); +} +function areHookInputsEqual(nextDeps, prevDeps) { + if (null === prevDeps) return !1; + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) + if (!objectIs(nextDeps[i], prevDeps[i])) return !1; + return !0; +} +function renderWithHooks( + current, + workInProgress, + Component, + props, + secondArg, + nextRenderLanes +) { + renderLanes = nextRenderLanes; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -2643,7 +2911,7 @@ function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -2656,7 +2924,7 @@ function finishRenderingHooks(current) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2686,7 +2954,7 @@ function TransitionAwareHostComponent() { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -2713,7 +2981,7 @@ function resetHooksOnUnwind(workInProgress) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = localIdCounter = 0; thenableState$1 = null; @@ -2727,26 +2995,26 @@ function mountWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -2759,7 +3027,7 @@ function updateWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -2773,7 +3041,7 @@ function useThenable(thenable) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -2794,10 +3062,10 @@ function use(usable) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2815,7 +3083,7 @@ function useMemoCache(size) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -2857,7 +3125,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$37 = !1; + didReadFromEntangledAsyncAction$39 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2878,11 +3146,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$37 = !0); + (didReadFromEntangledAsyncAction$39 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$37 = !0); + (didReadFromEntangledAsyncAction$39 = !0); continue; } else (updateLane = { @@ -2897,7 +3165,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -2918,7 +3186,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -2928,7 +3196,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$37 && + didReadFromEntangledAsyncAction$39 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -2961,7 +3229,7 @@ function rerenderReducer(reducer) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -3006,10 +3274,10 @@ function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3130,8 +3398,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$43) { - onActionError(actionQueue, node, error$43); + } catch (error$45) { + onActionError(actionQueue, node, error$45); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3188,7 +3456,7 @@ function mountActionState(action, initialStateProp) { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -3244,14 +3512,14 @@ function mountActionState(action, initialStateProp) { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, JSCompiler_inline_result.queue ); @@ -3265,7 +3533,7 @@ function mountActionState(action, initialStateProp) { JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result$jscomp$0, inRootOrSingleton, ssrFormState @@ -3301,7 +3569,7 @@ function updateActionStateImpl(stateHook, currentStateHook, action) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -3363,10 +3631,10 @@ function pushResourceEffect( }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -3387,7 +3655,7 @@ function updateRef() { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -3403,7 +3671,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -3419,7 +3687,7 @@ function updateEffect(create, deps) { } function mountResourceEffect(create, createDeps, update, updateDeps, destroy) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -3455,7 +3723,7 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -3467,11 +3735,11 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -3548,7 +3816,7 @@ function mountDeferredValueImpl(hook, value, initialValue) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -3563,7 +3831,7 @@ function updateDeferredValueImpl(hook, prevValue, value, initialValue) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -3697,14 +3965,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$46 = enqueueUpdate(provider, fiber, lane); - null !== root$46 && - (scheduleUpdateOnFiber(root$46, provider, lane), - entangleTransitions(root$46, provider, lane)); + var root$48 = enqueueUpdate(provider, fiber, lane); + null !== root$48 && + (scheduleUpdateOnFiber(root$48, provider, lane), + entangleTransitions(root$48, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$46 && + null !== root$48 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -3798,8 +4066,8 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -3914,7 +4182,7 @@ var HooksDispatcherOnMount = { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3927,7 +4195,7 @@ var HooksDispatcherOnMount = { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -3940,7 +4208,7 @@ var HooksDispatcherOnMount = { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -3949,7 +4217,7 @@ var HooksDispatcherOnMount = { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -4024,7 +4292,7 @@ var HooksDispatcherOnMount = { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -4035,7 +4303,7 @@ var HooksDispatcherOnMount = { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -5039,9 +5307,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$78 in Component) - void 0 === newProps[propName$78] && - (newProps[propName$78] = Component[propName$78]); + for (var propName$80 in Component) + void 0 === newProps[propName$80] && + (newProps[propName$80] = Component[propName$80]); } return newProps; } @@ -5417,10 +5685,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$90 = workInProgress.stateNode; + root$92 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$90.incompleteTransitions.has(transition)) { + if (!root$92.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5428,11 +5696,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$90.incompleteTransitions.set(transition, markerInstance); + root$92.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$90.incompleteTransitions.forEach(function (markerInstance) { + root$92.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6097,7 +6365,12 @@ function mountHostRootWithoutHydrating( reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } -var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; +var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null +}; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; } @@ -6160,7 +6433,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), (JSCompiler_temp$jscomp$0.stateNode = nextInstance), @@ -7124,134 +7398,18 @@ function beginWork(current, workInProgress, renderLanes) { : resolveDefaultPropsOnNonClassComponent(props, init)), updateForwardRef(current, workInProgress, props, init, renderLanes) ); - case 7: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps, - renderLanes - ), - workInProgress.child - ); - case 8: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 12: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child - ); - case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); - case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 19: - return updateSuspenseListComponent(current, workInProgress, renderLanes); - case 21: + case 7: return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps, + renderLanes + ), workInProgress.child ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 24: + case 8: return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (nextProps = createCache()), - (init.pooledCache = nextProps), - nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), reconcileChildren( current, workInProgress, @@ -7260,297 +7418,157 @@ function beginWork(current, workInProgress, renderLanes) { ), workInProgress.child ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); -} -var valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null; -function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue); - context._currentValue = nextValue; -} -function popProvider(context) { - context._currentValue = valueCursor.current; - pop(valueCursor); -} -function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } -} -function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree -) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } -} -function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree -) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; -} -function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + case 12: + return ( + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 10: + return ( + (props = workInProgress.pendingProps), + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + props.value + ), + reconcileChildren(current, workInProgress, props.children, renderLanes), + workInProgress.child + ); + case 9: + return ( + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), + (props = workInProgress.pendingProps.children), + prepareToReadContext(workInProgress), + (init = readContext(init)), + (props = props(init)), + (workInProgress.flags |= 1), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 14: + return ( + (props = workInProgress.type), + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 19: + return updateSuspenseListComponent(current, workInProgress, renderLanes); + case 21: + return ( + (props = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 24: + return ( + prepareToReadContext(workInProgress), + (props = readContext(CacheContext)), + null === current + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), + (nextProps = createCache()), + (init.pooledCache = nextProps), + nextProps.refCount++, + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, init)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; -} -function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); -} -function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); -} -function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); -} -function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; -} -var AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; -} -function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); -} -var prevOnStartTransitionFinish = ReactSharedInternals.S; -ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); -}; -var resumedCache = createCursor(null), - transitionStack = createCursor(null); -function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; -} -function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions -) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); -} -function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); -} -function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } var emptyObject = {}; function collectScopedNodesFromChildren( @@ -7777,9 +7795,7 @@ function completeWork(current, workInProgress, renderLanes) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -7998,8 +8014,10 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)), + (type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = type), (type = !0); if (!type) { if (workInProgress.flags & 256) @@ -8020,11 +8038,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$138 = null; + var cache$139 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$138 = newProps.memoizedState.cachePool.pool); - cache$138 !== type && (newProps.flags |= 2048); + (cache$139 = newProps.memoizedState.cachePool.pool); + cache$139 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8058,8 +8076,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$138 = type.rendering; - if (null === cache$138) + cache$139 = type.rendering; + if (null === cache$139) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8067,11 +8085,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$138 = findFirstSuspended(current); - if (null !== cache$138) { + cache$139 = findFirstSuspended(current); + if (null !== cache$139) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$138.updateQueue; + current = cache$139.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8096,7 +8114,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$138)), null !== current)) { + if (((current = findFirstSuspended(cache$139)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8106,7 +8124,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$138.alternate && + !cache$139.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8119,13 +8137,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$138.sibling = workInProgress.child), - (workInProgress.child = cache$138)) + ? ((cache$139.sibling = workInProgress.child), + (workInProgress.child = cache$139)) : ((current = type.last), null !== current - ? (current.sibling = cache$138) - : (workInProgress.child = cache$138), - (type.last = cache$138)); + ? (current.sibling = cache$139) + : (workInProgress.child = cache$139), + (type.last = cache$139)); } if (null !== type.tail) return ( @@ -8378,10 +8396,10 @@ function commitHookEffectListMount(flags, finishedWork) { inst.destroy = lastEffect; } } else { - var create$155 = updateQueue.create, - inst$156 = updateQueue.inst; - lastEffect = create$155(); - inst$156.destroy = lastEffect; + var create$156 = updateQueue.create, + inst$157 = updateQueue.inst; + lastEffect = create$156(); + inst$157.destroy = lastEffect; } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8536,8 +8554,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$158) { - captureCommitPhaseError(current, nearestMountedAncestor, error$158); + } catch (error$159) { + captureCommitPhaseError(current, nearestMountedAncestor, error$159); } else ref.current = null; } @@ -8693,7 +8711,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$201) { + } catch (e$202) { JSCompiler_temp = null; break a; } @@ -8911,11 +8929,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$157) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$158 ); } } @@ -9263,7 +9281,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$166 = hostParentIsContainer; + var prevHostParentIsContainer$167 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9271,7 +9289,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$166; + hostParentIsContainer = prevHostParentIsContainer$167; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9970,21 +9988,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$159 = JSCompiler_inline_result.stateNode; + var parent$160 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$159, ""), + (setTextContent(parent$160, ""), (JSCompiler_inline_result.flags &= -33)); - var before$160 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$160, parent$159); + var before$161 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$161, parent$160); break; case 3: case 4: - var parent$161 = JSCompiler_inline_result.stateNode.containerInfo, - before$162 = getHostSibling(finishedWork); + var parent$162 = JSCompiler_inline_result.stateNode.containerInfo, + before$163 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$162, - parent$161 + before$163, + parent$162 ); break; default: @@ -10348,6 +10366,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10470,9 +10496,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$177 = finishedWork.stateNode; + var instance$178 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$177._visibility & 4 + ? instance$178._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10484,7 +10510,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$177._visibility |= 4), + : ((instance$178._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10497,7 +10523,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$177 + instance$178 ); break; case 24: @@ -10917,7 +10943,6 @@ function addTransitionProgressCallbackToPendingTransition( )); } var legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -11055,7 +11080,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -11153,14 +11183,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { } while (1); ensureRootIsScheduled(root$jscomp$0); } -function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); -} function commitRootWhenReady( root, finishedWork, @@ -11296,7 +11318,7 @@ function resetWorkInProgressStack() { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -11353,7 +11375,7 @@ function prepareFreshStack(root, lanes) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException || thrownValue === SuspenseActionException ? ((thrownValue = getSuspendedThenable()), @@ -11475,12 +11497,12 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$189) { - handleThrow(root, thrownValue$189); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -11591,11 +11613,11 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$191) { - handleThrow(root, thrownValue$191); + } catch (thrownValue$192) { + handleThrow(root, thrownValue$192); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -11672,7 +11694,7 @@ function throwAndUnwindWorkLoop( thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -11838,9 +11860,6 @@ function commitRootImpl( root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -11855,49 +11874,57 @@ function commitRootImpl( root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - (suspendedRetryLanes = commitBeforeMutationEffects(root, finishedWork)), - commitMutationEffectsOnFiber(finishedWork, root), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = 2; + suspendedRetryLanes = executionContext; + executionContext |= 4; + var shouldFireAfterActiveInstanceBlur$196 = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffectsOnFiber(finishedWork, root); + shouldFireAfterActiveInstanceBlur$196 && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -11909,6 +11936,7 @@ function commitRootImpl( componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -11945,7 +11973,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$196 = rootWithPendingPassiveEffects, + var root$197 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11960,7 +11988,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$196, remainingLanes); + releaseRootPooledCache(root$197, remainingLanes); } } return !1; @@ -13195,19 +13223,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$351; + var JSCompiler_inline_result$jscomp$352; if (canUseDOM) { - var isSupported$jscomp$inline_1551 = "oninput" in document; - if (!isSupported$jscomp$inline_1551) { - var element$jscomp$inline_1552 = document.createElement("div"); - element$jscomp$inline_1552.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1551 = - "function" === typeof element$jscomp$inline_1552.oninput; + var isSupported$jscomp$inline_1556 = "oninput" in document; + if (!isSupported$jscomp$inline_1556) { + var element$jscomp$inline_1557 = document.createElement("div"); + element$jscomp$inline_1557.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1556 = + "function" === typeof element$jscomp$inline_1557.oninput; } - JSCompiler_inline_result$jscomp$351 = isSupported$jscomp$inline_1551; - } else JSCompiler_inline_result$jscomp$351 = !1; + JSCompiler_inline_result$jscomp$352 = isSupported$jscomp$inline_1556; + } else JSCompiler_inline_result$jscomp$352 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$351 && + JSCompiler_inline_result$jscomp$352 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13618,20 +13646,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1592 = 0; - i$jscomp$inline_1592 < simpleEventPluginEvents.length; - i$jscomp$inline_1592++ + var i$jscomp$inline_1597 = 0; + i$jscomp$inline_1597 < simpleEventPluginEvents.length; + i$jscomp$inline_1597++ ) { - var eventName$jscomp$inline_1593 = - simpleEventPluginEvents[i$jscomp$inline_1592], - domEventName$jscomp$inline_1594 = - eventName$jscomp$inline_1593.toLowerCase(), - capitalizedEvent$jscomp$inline_1595 = - eventName$jscomp$inline_1593[0].toUpperCase() + - eventName$jscomp$inline_1593.slice(1); + var eventName$jscomp$inline_1598 = + simpleEventPluginEvents[i$jscomp$inline_1597], + domEventName$jscomp$inline_1599 = + eventName$jscomp$inline_1598.toLowerCase(), + capitalizedEvent$jscomp$inline_1600 = + eventName$jscomp$inline_1598[0].toUpperCase() + + eventName$jscomp$inline_1598.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1594, - "on" + capitalizedEvent$jscomp$inline_1595 + domEventName$jscomp$inline_1599, + "on" + capitalizedEvent$jscomp$inline_1600 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14924,34 +14952,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$216 = props[hasSrc]; + if (null != propValue$216) switch (hasSrc) { case "name": - hasSrcSet = propValue$215; + hasSrcSet = propValue$216; break; case "type": - propValue = propValue$215; + propValue = propValue$216; break; case "checked": - checked = propValue$215; + checked = propValue$216; break; case "defaultChecked": - defaultChecked = propValue$215; + defaultChecked = propValue$216; break; case "value": - propKey = propValue$215; + propKey = propValue$216; break; case "defaultValue": - defaultValue = propValue$215; + defaultValue = propValue$216; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$215) + if (null != propValue$216) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$215, props, null); + setProp(domElement, tag, hasSrc, propValue$216, props, null); } } initInput( @@ -15088,14 +15116,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$216 in props) + props.hasOwnProperty(propValue$216) && + ((hasSrc = props[propValue$216]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$215, + propValue$216, hasSrc, props, void 0 @@ -15143,14 +15171,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$233 in nextProps) { + var propKey = nextProps[propKey$233]; + lastProp = lastProps[propKey$233]; if ( - nextProps.hasOwnProperty(propKey$232) && + nextProps.hasOwnProperty(propKey$233) && (null != propKey || null != lastProp) ) - switch (propKey$232) { + switch (propKey$233) { case "type": type = propKey; break; @@ -15179,7 +15207,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$232, + propKey$233, propKey, nextProps, lastProp @@ -15198,7 +15226,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$232 = null; + propKey = value = defaultValue = propKey$233 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15229,7 +15257,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$232 = type; + propKey$233 = type; break; case "defaultValue": defaultValue = type; @@ -15250,15 +15278,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$232 - ? updateOptions(domElement, !!lastProps, propKey$232, !1) + null != propKey$233 + ? updateOptions(domElement, !!lastProps, propKey$233, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$232 = null; + propKey = propKey$233 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15282,7 +15310,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$232 = name; + propKey$233 = name; break; case "defaultValue": propKey = name; @@ -15296,17 +15324,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$232, propKey); + updateTextarea(domElement, propKey$233, propKey); return; case "option": - for (var propKey$248 in lastProps) + for (var propKey$249 in lastProps) if ( - ((propKey$232 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$248)) + ((propKey$233 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$249)) ) - switch (propKey$248) { + switch (propKey$249) { case "selected": domElement.selected = !1; break; @@ -15314,33 +15342,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$248, + propKey$249, null, nextProps, - propKey$232 + propKey$233 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$232 = nextProps[lastDefaultValue]), + ((propKey$233 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$233 !== propKey && + (null != propKey$233 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$232 && - "function" !== typeof propKey$232 && - "symbol" !== typeof propKey$232; + propKey$233 && + "function" !== typeof propKey$233 && + "symbol" !== typeof propKey$233; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$232, + propKey$233, nextProps, propKey ); @@ -15361,24 +15389,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$254 in lastProps) + (propKey$233 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$254) && + setProp(domElement, tag, propKey$254, null, nextProps, propKey$233); for (checked in nextProps) if ( - ((propKey$232 = nextProps[checked]), + ((propKey$233 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$233 !== propKey && + (null != propKey$233 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$232) + if (null != propKey$233) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15386,7 +15414,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$232, + propKey$233, nextProps, propKey ); @@ -15394,49 +15422,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$259 in lastProps) + (propKey$233 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + void 0 !== propKey$233 && + !nextProps.hasOwnProperty(propKey$259) && setPropOnCustomElement( domElement, tag, - propKey$258, + propKey$259, void 0, nextProps, - propKey$232 + propKey$233 ); for (defaultChecked in nextProps) - (propKey$232 = nextProps[defaultChecked]), + (propKey$233 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$232 === propKey || - (void 0 === propKey$232 && void 0 === propKey) || + propKey$233 === propKey || + (void 0 === propKey$233 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$232, + propKey$233, 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$264 in lastProps) + (propKey$233 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$264) && + setProp(domElement, tag, propKey$264, null, nextProps, propKey$233); for (lastProp in nextProps) - (propKey$232 = nextProps[lastProp]), + (propKey$233 = 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$233 === propKey || + (null == propKey$233 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$233, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16033,26 +16061,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$271 = getResourcesFromRoot( + var styles$272 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$272 = styles$271.get(type); - resource$272 || + resource$273 = styles$272.get(type); + resource$273 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$272 = { + (resource$273 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$271.set(type, resource$272), - (styles$271 = JSCompiler_inline_result.querySelector( + styles$272.set(type, resource$273), + (styles$272 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$271._p && - ((resource$272.instance = styles$271), - (resource$272.state.loading = 5)), + !styles$272._p && + ((resource$273.instance = styles$272), + (resource$273.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16065,16 +16093,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$271 || + styles$272 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$272.state + resource$273.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$272; + return resource$273; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16171,37 +16199,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$277 = hoistableRoot.querySelector( + var instance$278 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$277) + if (instance$278) return ( (resource.state.loading |= 4), - (resource.instance = instance$277), - markNodeAsHoistable(instance$277), - instance$277 + (resource.instance = instance$278), + markNodeAsHoistable(instance$278), + instance$278 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$277 = ( + instance$278 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$277); - var linkInstance = instance$277; + markNodeAsHoistable(instance$278); + var linkInstance = instance$278; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$277, "link", instance); + setInitialProperties(instance$278, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$277, props.precedence, hoistableRoot); - return (resource.instance = instance$277); + insertStylesheet(instance$278, props.precedence, hoistableRoot); + return (resource.instance = instance$278); case "script": - instance$277 = getScriptKey(props.src); + instance$278 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$277) + getScriptSelectorFromKey(instance$278) )) ) return ( @@ -16210,7 +16238,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$277))) + if ((styleProps = preloadPropsMap.get(instance$278))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17214,16 +17242,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1765 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1770 = React.version; if ( - "19.1.0-www-classic-d4287258-20241217" !== - isomorphicReactPackageVersion$jscomp$inline_1765 + "19.1.0-www-classic-a9bbe346-20241219" !== + isomorphicReactPackageVersion$jscomp$inline_1770 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1765, - "19.1.0-www-classic-d4287258-20241217" + isomorphicReactPackageVersion$jscomp$inline_1770, + "19.1.0-www-classic-a9bbe346-20241219" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17239,24 +17267,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2299 = { +var internals$jscomp$inline_2307 = { bundleType: 0, - version: "19.1.0-www-classic-d4287258-20241217", + version: "19.1.0-www-classic-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2300 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2308 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2300.isDisabled && - hook$jscomp$inline_2300.supportsFiber + !hook$jscomp$inline_2308.isDisabled && + hook$jscomp$inline_2308.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2300.inject( - internals$jscomp$inline_2299 + (rendererID = hook$jscomp$inline_2308.inject( + internals$jscomp$inline_2307 )), - (injectedHook = hook$jscomp$inline_2300); + (injectedHook = hook$jscomp$inline_2308); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17609,4 +17637,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-d4287258-20241217"; +exports.version = "19.1.0-www-classic-a9bbe346-20241219"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 9ca8f9b630f29..4e8342cf5dfeb 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -1740,123 +1740,269 @@ function resetHydrationState() { nextHydratableInstance = hydrationParentFiber = null; isHydrating = !1; } +function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; +} function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) : hydrationErrors.push(error); } -var concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0; -function finishQueueingConcurrentUpdates() { +var valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null; +function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue); + context._currentValue = nextValue; +} +function popProvider(context) { + context._currentValue = valueCursor.current; + pop(valueCursor); +} +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } +} +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } +} +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } -function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); -} -function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } -function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); +function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } -function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); +function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } -function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } -var firstScheduledRoot = null, - lastScheduledRoot = null, - didScheduleMicrotask = !1, - mightHavePendingSyncWork = !1, - isFlushingWork = !1, - currentEventTransitionLane = 0; -function ensureRootIsScheduled(root) { - root !== lastScheduledRoot && - null === root.next && - (null === lastScheduledRoot - ? (firstScheduledRoot = lastScheduledRoot = root) - : (lastScheduledRoot = lastScheduledRoot.next = root)); - mightHavePendingSyncWork = !0; - didScheduleMicrotask || - ((didScheduleMicrotask = !0), - scheduleImmediateTask(processRootScheduleInMicrotask)); - enableDeferRootSchedulingToMicrotask || - scheduleTaskForRootDuringMicrotask(root, now()); +function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; } -function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { - if (!isFlushingWork && mightHavePendingSyncWork) { - isFlushingWork = !0; - do { - var didPerformSomeWork = !1; - for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy) - if (0 !== syncTransitionLanes) { - var pendingLanes = root$26.pendingLanes; - if (0 === pendingLanes) var JSCompiler_inline_result = 0; - else { - var suspendedLanes = root$26.suspendedLanes, - pingedLanes = root$26.pingedLanes; - JSCompiler_inline_result = - (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; - JSCompiler_inline_result &= +var AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; +} +function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); +} +var firstScheduledRoot = null, + lastScheduledRoot = null, + didScheduleMicrotask = !1, + mightHavePendingSyncWork = !1, + isFlushingWork = !1, + currentEventTransitionLane = 0; +function ensureRootIsScheduled(root) { + root !== lastScheduledRoot && + null === root.next && + (null === lastScheduledRoot + ? (firstScheduledRoot = lastScheduledRoot = root) + : (lastScheduledRoot = lastScheduledRoot.next = root)); + mightHavePendingSyncWork = !0; + didScheduleMicrotask || + ((didScheduleMicrotask = !0), + scheduleImmediateTask(processRootScheduleInMicrotask)); + enableDeferRootSchedulingToMicrotask || + scheduleTaskForRootDuringMicrotask(root, now()); +} +function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { + if (!isFlushingWork && mightHavePendingSyncWork) { + isFlushingWork = !0; + do { + var didPerformSomeWork = !1; + for (var root$27 = firstScheduledRoot; null !== root$27; ) { + if (!onlyLegacy) + if (0 !== syncTransitionLanes) { + var pendingLanes = root$27.pendingLanes; + if (0 === pendingLanes) var JSCompiler_inline_result = 0; + else { + var suspendedLanes = root$27.suspendedLanes, + pingedLanes = root$27.pingedLanes; + JSCompiler_inline_result = + (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; + JSCompiler_inline_result &= pendingLanes & ~(suspendedLanes & ~pingedLanes); JSCompiler_inline_result = JSCompiler_inline_result & 201326677 @@ -1867,18 +2013,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$26, - root$26 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$27, + root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$26, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); - root$26 = root$26.next; + performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); + root$27 = root$27.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2081,279 +2227,80 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } -var hasForceUpdate = !1; -function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; -} -function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); +var prevOnStartTransitionFinish = ReactSharedInternals.S; +ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); +}; +var resumedCache = createCursor(null), + transitionStack = createCursor(null); +function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } -function createUpdate(lane) { - return { lane: lane, tag: 0, payload: null, callback: null, next: null }; +function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions +) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); } -function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if (0 !== (executionContext & 2)) { - var pending = updateQueue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - updateQueue.pending = update; - update = getRootForUpdatedFiber(fiber); - markUpdateLaneFromFiberToRoot(fiber, null, lane); - return update; - } - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); +function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); } -function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); - } +function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; } -function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; +function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast - ? (newFirst = newLast = clone) - : (newLast = newLast.next = clone); - queue = queue.next; - } while (null !== queue); - null === newLast - ? (newFirst = newLast = capturedUpdate) - : (newLast = newLast.next = capturedUpdate); - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current.shared, - callbacks: current.callbacks - }; - workInProgress.updateQueue = queue; - return; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - workInProgress = queue.lastBaseUpdate; - null === workInProgress - ? (queue.firstBaseUpdate = capturedUpdate) - : (workInProgress.next = capturedUpdate); - queue.lastBaseUpdate = capturedUpdate; + return !0; } -var didReadFromEntangledAsyncAction = !1; -function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } -} -function processUpdateQueue( - workInProgress$jscomp$0, - props, - instance$jscomp$0, - renderLanes -) { - didReadFromEntangledAsyncAction = !1; - var queue = workInProgress$jscomp$0.updateQueue; - hasForceUpdate = !1; - var firstBaseUpdate = queue.firstBaseUpdate, - lastBaseUpdate = queue.lastBaseUpdate, - pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, - firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate - ? (firstBaseUpdate = firstPendingUpdate) - : (lastBaseUpdate.next = firstPendingUpdate); - lastBaseUpdate = lastPendingUpdate; - var current = workInProgress$jscomp$0.alternate; - null !== current && - ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && - (null === pendingQueue - ? (current.firstBaseUpdate = firstPendingUpdate) - : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, - isHiddenUpdate = updateLane !== pendingQueue.lane; - if ( - isHiddenUpdate - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - 0 !== updateLane && - updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - null !== current && - (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - var workInProgress = workInProgress$jscomp$0, - update = pendingQueue; - updateLane = props; - var instance = instance$jscomp$0; - switch (update.tag) { - case 1: - workInProgress = update.payload; - if ("function" === typeof workInProgress) { - newState = workInProgress.call(instance, newState, updateLane); - break a; - } - newState = workInProgress; - break a; - case 3: - workInProgress.flags = (workInProgress.flags & -65537) | 128; - case 0: - workInProgress = update.payload; - updateLane = - "function" === typeof workInProgress - ? workInProgress.call(instance, newState, updateLane) - : workInProgress; - if (null === updateLane || void 0 === updateLane) break a; - newState = assign({}, newState, updateLane); - break a; - case 2: - hasForceUpdate = !0; - } - } - updateLane = pendingQueue.callback; - null !== updateLane && - ((workInProgress$jscomp$0.flags |= 64), - isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), - (isHiddenUpdate = queue.callbacks), - null === isHiddenUpdate - ? (queue.callbacks = [updateLane]) - : isHiddenUpdate.push(updateLane)); - } else - (isHiddenUpdate = { - lane: updateLane, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: pendingQueue.callback, - next: null - }), - null === current - ? ((firstPendingUpdate = current = isHiddenUpdate), - (lastPendingUpdate = newState)) - : (current = current.next = isHiddenUpdate), - (lastBaseUpdate |= updateLane); - pendingQueue = pendingQueue.next; - if (null === pendingQueue) - if (((pendingQueue = queue.shared.pending), null === pendingQueue)) - break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; - } -} -function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error(formatProdErrorMessage(191, callback)); - callback.call(context); -} -function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); -} -function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; -} -var SuspenseException = Error(formatProdErrorMessage(460)), - SuspenseyCommitException = Error(formatProdErrorMessage(474)), - SuspenseActionException = Error(formatProdErrorMessage(542)), - noopSuspenseyCommitThenable = { then: function () {} }; -function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; +var SuspenseException = Error(formatProdErrorMessage(460)), + SuspenseyCommitException = Error(formatProdErrorMessage(474)), + SuspenseActionException = Error(formatProdErrorMessage(542)), + noopSuspenseyCommitThenable = { then: function () {} }; +function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; } function noop$3() {} function trackUsedThenable(thenableState, thenable, index) { @@ -2423,53 +2370,374 @@ function checkIfUseWrappedInAsyncCatch(rejectedReason) { ) throw Error(formatProdErrorMessage(483)); } -var currentTreeHiddenStackCursor = createCursor(null), - prevEntangledRenderLanesCursor = createCursor(0); -function pushHiddenContext(fiber, context) { - fiber = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, fiber); - push(currentTreeHiddenStackCursor, context); - entangledRenderLanes = fiber | context.baseLanes; +var concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0; +function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } } -function reuseHiddenContextOnStack() { - push(prevEntangledRenderLanesCursor, entangledRenderLanes); - push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); +function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); } -function popHiddenContext() { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor); - pop(prevEntangledRenderLanesCursor); +function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); } -var renderLanes = 0, - currentlyRenderingFiber$1 = null, - currentHook = null, - workInProgressHook = null, - didScheduleRenderPhaseUpdate = !1, - didScheduleRenderPhaseUpdateDuringThisPass = !1, - shouldDoubleInvokeUserFnsInHooksDEV = !1, - localIdCounter = 0, - thenableIndexCounter$1 = 0, - thenableState$1 = null, - globalClientIdCounter = 0; -function throwInvalidHookError() { - throw Error(formatProdErrorMessage(321)); +function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } -function areHookInputsEqual(nextDeps, prevDeps) { - if (null === prevDeps) return !1; - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) - if (!objectIs(nextDeps[i], prevDeps[i])) return !1; - return !0; +function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } -function renderWithHooks( - current, - workInProgress, - Component, - props, - secondArg, - nextRenderLanes -) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; +function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +} +var hasForceUpdate = !1; +function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; +} +function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); +} +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; +} +function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if (0 !== (executionContext & 2)) { + var pending = updateQueue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + updateQueue.pending = update; + update = getRootForUpdatedFiber(fiber); + markUpdateLaneFromFiberToRoot(fiber, null, lane); + return update; + } + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); +} +function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } +} +function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { + do { + var clone = { + lane: queue.lane, + tag: queue.tag, + payload: queue.payload, + callback: null, + next: null + }; + null === newLast + ? (newFirst = newLast = clone) + : (newLast = newLast.next = clone); + queue = queue.next; + } while (null !== queue); + null === newLast + ? (newFirst = newLast = capturedUpdate) + : (newLast = newLast.next = capturedUpdate); + } else newFirst = newLast = capturedUpdate; + queue = { + baseState: current.baseState, + firstBaseUpdate: newFirst, + lastBaseUpdate: newLast, + shared: current.shared, + callbacks: current.callbacks + }; + workInProgress.updateQueue = queue; + return; + } + workInProgress = queue.lastBaseUpdate; + null === workInProgress + ? (queue.firstBaseUpdate = capturedUpdate) + : (workInProgress.next = capturedUpdate); + queue.lastBaseUpdate = capturedUpdate; +} +var didReadFromEntangledAsyncAction = !1; +function suspendIfUpdateReadFromEntangledAsyncAction() { + if (didReadFromEntangledAsyncAction) { + var entangledActionThenable = currentEntangledActionThenable; + if (null !== entangledActionThenable) throw entangledActionThenable; + } +} +function processUpdateQueue( + workInProgress$jscomp$0, + props, + instance$jscomp$0, + renderLanes +) { + didReadFromEntangledAsyncAction = !1; + var queue = workInProgress$jscomp$0.updateQueue; + hasForceUpdate = !1; + var firstBaseUpdate = queue.firstBaseUpdate, + lastBaseUpdate = queue.lastBaseUpdate, + pendingQueue = queue.shared.pending; + if (null !== pendingQueue) { + queue.shared.pending = null; + var lastPendingUpdate = pendingQueue, + firstPendingUpdate = lastPendingUpdate.next; + lastPendingUpdate.next = null; + null === lastBaseUpdate + ? (firstBaseUpdate = firstPendingUpdate) + : (lastBaseUpdate.next = firstPendingUpdate); + lastBaseUpdate = lastPendingUpdate; + var current = workInProgress$jscomp$0.alternate; + null !== current && + ((current = current.updateQueue), + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && + (null === pendingQueue + ? (current.firstBaseUpdate = firstPendingUpdate) + : (pendingQueue.next = firstPendingUpdate), + (current.lastBaseUpdate = lastPendingUpdate))); + } + if (null !== firstBaseUpdate) { + var newState = queue.baseState; + lastBaseUpdate = 0; + current = firstPendingUpdate = lastPendingUpdate = null; + pendingQueue = firstBaseUpdate; + do { + var updateLane = pendingQueue.lane & -536870913, + isHiddenUpdate = updateLane !== pendingQueue.lane; + if ( + isHiddenUpdate + ? (workInProgressRootRenderLanes & updateLane) === updateLane + : (renderLanes & updateLane) === updateLane + ) { + 0 !== updateLane && + updateLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + null !== current && + (current = current.next = + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); + a: { + var workInProgress = workInProgress$jscomp$0, + update = pendingQueue; + updateLane = props; + var instance = instance$jscomp$0; + switch (update.tag) { + case 1: + workInProgress = update.payload; + if ("function" === typeof workInProgress) { + newState = workInProgress.call(instance, newState, updateLane); + break a; + } + newState = workInProgress; + break a; + case 3: + workInProgress.flags = (workInProgress.flags & -65537) | 128; + case 0: + workInProgress = update.payload; + updateLane = + "function" === typeof workInProgress + ? workInProgress.call(instance, newState, updateLane) + : workInProgress; + if (null === updateLane || void 0 === updateLane) break a; + newState = assign({}, newState, updateLane); + break a; + case 2: + hasForceUpdate = !0; + } + } + updateLane = pendingQueue.callback; + null !== updateLane && + ((workInProgress$jscomp$0.flags |= 64), + isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); + } else + (isHiddenUpdate = { + lane: updateLane, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: pendingQueue.callback, + next: null + }), + null === current + ? ((firstPendingUpdate = current = isHiddenUpdate), + (lastPendingUpdate = newState)) + : (current = current.next = isHiddenUpdate), + (lastBaseUpdate |= updateLane); + pendingQueue = pendingQueue.next; + if (null === pendingQueue) + if (((pendingQueue = queue.shared.pending), null === pendingQueue)) + break; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress$jscomp$0.lanes = lastBaseUpdate; + workInProgress$jscomp$0.memoizedState = newState; + } +} +function callCallback(callback, context) { + if ("function" !== typeof callback) + throw Error(formatProdErrorMessage(191, callback)); + callback.call(context); +} +function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); +} +var currentTreeHiddenStackCursor = createCursor(null), + prevEntangledRenderLanesCursor = createCursor(0); +function pushHiddenContext(fiber, context) { + fiber = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, fiber); + push(currentTreeHiddenStackCursor, context); + entangledRenderLanes = fiber | context.baseLanes; +} +function reuseHiddenContextOnStack() { + push(prevEntangledRenderLanesCursor, entangledRenderLanes); + push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); +} +function popHiddenContext() { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor); + pop(prevEntangledRenderLanesCursor); +} +var renderLanes = 0, + currentlyRenderingFiber = null, + currentHook = null, + workInProgressHook = null, + didScheduleRenderPhaseUpdate = !1, + didScheduleRenderPhaseUpdateDuringThisPass = !1, + shouldDoubleInvokeUserFnsInHooksDEV = !1, + localIdCounter = 0, + thenableIndexCounter$1 = 0, + thenableState$1 = null, + globalClientIdCounter = 0; +function throwInvalidHookError() { + throw Error(formatProdErrorMessage(321)); +} +function areHookInputsEqual(nextDeps, prevDeps) { + if (null === prevDeps) return !1; + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) + if (!objectIs(nextDeps[i], prevDeps[i])) return !1; + return !0; +} +function renderWithHooks( + current, + workInProgress, + Component, + props, + secondArg, + nextRenderLanes +) { + renderLanes = nextRenderLanes; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -2494,7 +2762,7 @@ function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -2507,7 +2775,7 @@ function finishRenderingHooks(current) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2537,7 +2805,7 @@ function TransitionAwareHostComponent() { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -2564,7 +2832,7 @@ function resetHooksOnUnwind(workInProgress) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = localIdCounter = 0; thenableState$1 = null; @@ -2578,26 +2846,26 @@ function mountWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -2610,7 +2878,7 @@ function updateWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -2624,7 +2892,7 @@ function useThenable(thenable) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -2645,10 +2913,10 @@ function use(usable) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2666,7 +2934,7 @@ function useMemoCache(size) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -2708,7 +2976,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$37 = !1; + didReadFromEntangledAsyncAction$39 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2729,11 +2997,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$37 = !0); + (didReadFromEntangledAsyncAction$39 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$37 = !0); + (didReadFromEntangledAsyncAction$39 = !0); continue; } else (updateLane = { @@ -2748,7 +3016,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -2769,7 +3037,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -2779,7 +3047,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$37 && + didReadFromEntangledAsyncAction$39 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -2812,7 +3080,7 @@ function rerenderReducer(reducer) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -2857,10 +3125,10 @@ function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -2981,8 +3249,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$43) { - onActionError(actionQueue, node, error$43); + } catch (error$45) { + onActionError(actionQueue, node, error$45); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3039,7 +3307,7 @@ function mountActionState(action, initialStateProp) { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -3095,14 +3363,14 @@ function mountActionState(action, initialStateProp) { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, JSCompiler_inline_result.queue ); @@ -3116,7 +3384,7 @@ function mountActionState(action, initialStateProp) { JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result$jscomp$0, inRootOrSingleton, ssrFormState @@ -3152,7 +3420,7 @@ function updateActionStateImpl(stateHook, currentStateHook, action) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -3214,10 +3482,10 @@ function pushResourceEffect( }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -3238,7 +3506,7 @@ function updateRef() { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -3254,7 +3522,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -3270,7 +3538,7 @@ function updateEffect(create, deps) { } function mountResourceEffect(create, createDeps, update, updateDeps, destroy) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -3306,7 +3574,7 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -3318,11 +3586,11 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -3399,7 +3667,7 @@ function mountDeferredValueImpl(hook, value, initialValue) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -3414,7 +3682,7 @@ function updateDeferredValueImpl(hook, prevValue, value, initialValue) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -3548,14 +3816,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$46 = enqueueUpdate(provider, fiber, lane); - null !== root$46 && - (scheduleUpdateOnFiber(root$46, provider, lane), - entangleTransitions(root$46, provider, lane)); + var root$48 = enqueueUpdate(provider, fiber, lane); + null !== root$48 && + (scheduleUpdateOnFiber(root$48, provider, lane), + entangleTransitions(root$48, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$46 && + null !== root$48 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -3649,8 +3917,8 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -3765,7 +4033,7 @@ var HooksDispatcherOnMount = { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3778,7 +4046,7 @@ var HooksDispatcherOnMount = { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -3791,7 +4059,7 @@ var HooksDispatcherOnMount = { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -3800,7 +4068,7 @@ var HooksDispatcherOnMount = { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -3875,7 +4143,7 @@ var HooksDispatcherOnMount = { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3886,7 +4154,7 @@ var HooksDispatcherOnMount = { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -4890,9 +5158,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$78 in Component) - void 0 === newProps[propName$78] && - (newProps[propName$78] = Component[propName$78]); + for (var propName$80 in Component) + void 0 === newProps[propName$80] && + (newProps[propName$80] = Component[propName$80]); } return newProps; } @@ -5268,10 +5536,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$90 = workInProgress.stateNode; + root$92 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$90.incompleteTransitions.has(transition)) { + if (!root$92.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5279,11 +5547,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$90.incompleteTransitions.set(transition, markerInstance); + root$92.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$90.incompleteTransitions.forEach(function (markerInstance) { + root$92.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5871,7 +6139,12 @@ function mountHostRootWithoutHydrating( reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } -var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; +var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null +}; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; } @@ -5934,7 +6207,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), (JSCompiler_temp$jscomp$0.stateNode = nextInstance), @@ -6894,134 +7168,18 @@ function beginWork(current, workInProgress, renderLanes) { : resolveDefaultPropsOnNonClassComponent(props, init)), updateForwardRef(current, workInProgress, props, init, renderLanes) ); - case 7: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps, - renderLanes - ), - workInProgress.child - ); - case 8: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 12: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child - ); - case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); - case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 19: - return updateSuspenseListComponent(current, workInProgress, renderLanes); - case 21: + case 7: return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps, + renderLanes + ), workInProgress.child ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 24: + case 8: return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (nextProps = createCache()), - (init.pooledCache = nextProps), - nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), reconcileChildren( current, workInProgress, @@ -7030,297 +7188,157 @@ function beginWork(current, workInProgress, renderLanes) { ), workInProgress.child ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); -} -var valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null; -function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue); - context._currentValue = nextValue; -} -function popProvider(context) { - context._currentValue = valueCursor.current; - pop(valueCursor); -} -function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } -} -function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree -) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } -} -function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree -) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; -} -function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + case 12: + return ( + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 10: + return ( + (props = workInProgress.pendingProps), + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + props.value + ), + reconcileChildren(current, workInProgress, props.children, renderLanes), + workInProgress.child + ); + case 9: + return ( + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), + (props = workInProgress.pendingProps.children), + prepareToReadContext(workInProgress), + (init = readContext(init)), + (props = props(init)), + (workInProgress.flags |= 1), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 14: + return ( + (props = workInProgress.type), + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 19: + return updateSuspenseListComponent(current, workInProgress, renderLanes); + case 21: + return ( + (props = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 24: + return ( + prepareToReadContext(workInProgress), + (props = readContext(CacheContext)), + null === current + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), + (nextProps = createCache()), + (init.pooledCache = nextProps), + nextProps.refCount++, + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, init)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; -} -function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); -} -function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); -} -function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); -} -function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; -} -var AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; -} -function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); -} -var prevOnStartTransitionFinish = ReactSharedInternals.S; -ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); -}; -var resumedCache = createCursor(null), - transitionStack = createCursor(null); -function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; -} -function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions -) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); -} -function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); -} -function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } var emptyObject = {}; function collectScopedNodesFromChildren( @@ -7540,9 +7558,7 @@ function completeWork(current, workInProgress, renderLanes) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -7761,8 +7777,10 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)), + (type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = type), (type = !0); if (!type) { if (workInProgress.flags & 256) @@ -7783,11 +7801,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$138 = null; + var cache$139 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$138 = newProps.memoizedState.cachePool.pool); - cache$138 !== type && (newProps.flags |= 2048); + (cache$139 = newProps.memoizedState.cachePool.pool); + cache$139 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7821,8 +7839,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$138 = type.rendering; - if (null === cache$138) + cache$139 = type.rendering; + if (null === cache$139) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -7830,11 +7848,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$138 = findFirstSuspended(current); - if (null !== cache$138) { + cache$139 = findFirstSuspended(current); + if (null !== cache$139) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$138.updateQueue; + current = cache$139.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7859,7 +7877,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$138)), null !== current)) { + if (((current = findFirstSuspended(cache$139)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7869,7 +7887,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$138.alternate && + !cache$139.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7882,13 +7900,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$138.sibling = workInProgress.child), - (workInProgress.child = cache$138)) + ? ((cache$139.sibling = workInProgress.child), + (workInProgress.child = cache$139)) : ((current = type.last), null !== current - ? (current.sibling = cache$138) - : (workInProgress.child = cache$138), - (type.last = cache$138)); + ? (current.sibling = cache$139) + : (workInProgress.child = cache$139), + (type.last = cache$139)); } if (null !== type.tail) return ( @@ -8129,10 +8147,10 @@ function commitHookEffectListMount(flags, finishedWork) { inst.destroy = lastEffect; } } else { - var create$155 = updateQueue.create, - inst$156 = updateQueue.inst; - lastEffect = create$155(); - inst$156.destroy = lastEffect; + var create$156 = updateQueue.create, + inst$157 = updateQueue.inst; + lastEffect = create$156(); + inst$157.destroy = lastEffect; } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8287,8 +8305,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$158) { - captureCommitPhaseError(current, nearestMountedAncestor, error$158); + } catch (error$159) { + captureCommitPhaseError(current, nearestMountedAncestor, error$159); } else ref.current = null; } @@ -8444,7 +8462,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$201) { + } catch (e$202) { JSCompiler_temp = null; break a; } @@ -8662,11 +8680,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$157) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$158 ); } } @@ -9014,7 +9032,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$166 = hostParentIsContainer; + var prevHostParentIsContainer$167 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9022,7 +9040,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$166; + hostParentIsContainer = prevHostParentIsContainer$167; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9721,21 +9739,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$159 = JSCompiler_inline_result.stateNode; + var parent$160 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$159, ""), + (setTextContent(parent$160, ""), (JSCompiler_inline_result.flags &= -33)); - var before$160 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$160, parent$159); + var before$161 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$161, parent$160); break; case 3: case 4: - var parent$161 = JSCompiler_inline_result.stateNode.containerInfo, - before$162 = getHostSibling(finishedWork); + var parent$162 = JSCompiler_inline_result.stateNode.containerInfo, + before$163 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$162, - parent$161 + before$163, + parent$162 ); break; default: @@ -10099,6 +10117,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10221,9 +10247,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$177 = finishedWork.stateNode; + var instance$178 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$177._visibility & 4 + ? instance$178._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10235,7 +10261,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$177._visibility |= 4), + : ((instance$178._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10248,7 +10274,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$177 + instance$178 ); break; case 24: @@ -10668,7 +10694,6 @@ function addTransitionProgressCallbackToPendingTransition( )); } var legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -10806,7 +10831,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -10904,14 +10934,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { } while (1); ensureRootIsScheduled(root$jscomp$0); } -function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); -} function commitRootWhenReady( root, finishedWork, @@ -11047,7 +11069,7 @@ function resetWorkInProgressStack() { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -11104,7 +11126,7 @@ function prepareFreshStack(root, lanes) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException || thrownValue === SuspenseActionException ? ((thrownValue = getSuspendedThenable()), @@ -11226,12 +11248,12 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$189) { - handleThrow(root, thrownValue$189); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -11342,11 +11364,11 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$191) { - handleThrow(root, thrownValue$191); + } catch (thrownValue$192) { + handleThrow(root, thrownValue$192); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -11419,7 +11441,7 @@ function throwAndUnwindWorkLoop( thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -11585,9 +11607,6 @@ function commitRootImpl( root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -11602,49 +11621,57 @@ function commitRootImpl( root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - (suspendedRetryLanes = commitBeforeMutationEffects(root, finishedWork)), - commitMutationEffectsOnFiber(finishedWork, root), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = 2; + suspendedRetryLanes = executionContext; + executionContext |= 4; + var shouldFireAfterActiveInstanceBlur$196 = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffectsOnFiber(finishedWork, root); + shouldFireAfterActiveInstanceBlur$196 && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -11656,6 +11683,7 @@ function commitRootImpl( componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -11692,7 +11720,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$196 = rootWithPendingPassiveEffects, + var root$197 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11707,7 +11735,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$196, remainingLanes); + releaseRootPooledCache(root$197, remainingLanes); } } return !1; @@ -12931,19 +12959,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$354; + var JSCompiler_inline_result$jscomp$355; if (canUseDOM) { - var isSupported$jscomp$inline_1541 = "oninput" in document; - if (!isSupported$jscomp$inline_1541) { - var element$jscomp$inline_1542 = document.createElement("div"); - element$jscomp$inline_1542.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1541 = - "function" === typeof element$jscomp$inline_1542.oninput; + var isSupported$jscomp$inline_1546 = "oninput" in document; + if (!isSupported$jscomp$inline_1546) { + var element$jscomp$inline_1547 = document.createElement("div"); + element$jscomp$inline_1547.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1546 = + "function" === typeof element$jscomp$inline_1547.oninput; } - JSCompiler_inline_result$jscomp$354 = isSupported$jscomp$inline_1541; - } else JSCompiler_inline_result$jscomp$354 = !1; + JSCompiler_inline_result$jscomp$355 = isSupported$jscomp$inline_1546; + } else JSCompiler_inline_result$jscomp$355 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$354 && + JSCompiler_inline_result$jscomp$355 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13354,20 +13382,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1582 = 0; - i$jscomp$inline_1582 < simpleEventPluginEvents.length; - i$jscomp$inline_1582++ + var i$jscomp$inline_1587 = 0; + i$jscomp$inline_1587 < simpleEventPluginEvents.length; + i$jscomp$inline_1587++ ) { - var eventName$jscomp$inline_1583 = - simpleEventPluginEvents[i$jscomp$inline_1582], - domEventName$jscomp$inline_1584 = - eventName$jscomp$inline_1583.toLowerCase(), - capitalizedEvent$jscomp$inline_1585 = - eventName$jscomp$inline_1583[0].toUpperCase() + - eventName$jscomp$inline_1583.slice(1); + var eventName$jscomp$inline_1588 = + simpleEventPluginEvents[i$jscomp$inline_1587], + domEventName$jscomp$inline_1589 = + eventName$jscomp$inline_1588.toLowerCase(), + capitalizedEvent$jscomp$inline_1590 = + eventName$jscomp$inline_1588[0].toUpperCase() + + eventName$jscomp$inline_1588.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1584, - "on" + capitalizedEvent$jscomp$inline_1585 + domEventName$jscomp$inline_1589, + "on" + capitalizedEvent$jscomp$inline_1590 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14656,34 +14684,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$216 = props[hasSrc]; + if (null != propValue$216) switch (hasSrc) { case "name": - hasSrcSet = propValue$215; + hasSrcSet = propValue$216; break; case "type": - propKey = propValue$215; + propKey = propValue$216; break; case "checked": - checked = propValue$215; + checked = propValue$216; break; case "defaultChecked": - defaultChecked = propValue$215; + defaultChecked = propValue$216; break; case "value": - propValue = propValue$215; + propValue = propValue$216; break; case "defaultValue": - defaultValue = propValue$215; + defaultValue = propValue$216; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$215) + if (null != propValue$216) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$215, props, null); + setProp(domElement, tag, hasSrc, propValue$216, props, null); } } initInput( @@ -14819,14 +14847,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$216 in props) + props.hasOwnProperty(propValue$216) && + ((hasSrc = props[propValue$216]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$215, + propValue$216, hasSrc, props, void 0 @@ -14874,14 +14902,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$233 in nextProps) { + var propKey = nextProps[propKey$233]; + lastProp = lastProps[propKey$233]; if ( - nextProps.hasOwnProperty(propKey$232) && + nextProps.hasOwnProperty(propKey$233) && (null != propKey || null != lastProp) ) - switch (propKey$232) { + switch (propKey$233) { case "type": type = propKey; break; @@ -14910,7 +14938,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$232, + propKey$233, propKey, nextProps, lastProp @@ -14929,7 +14957,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$232 = null; + propKey = value = defaultValue = propKey$233 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -14960,7 +14988,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$232 = type; + propKey$233 = type; break; case "defaultValue": defaultValue = type; @@ -14981,15 +15009,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$232 - ? updateOptions(domElement, !!lastProps, propKey$232, !1) + null != propKey$233 + ? updateOptions(domElement, !!lastProps, propKey$233, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$232 = null; + propKey = propKey$233 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15013,7 +15041,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$232 = name; + propKey$233 = name; break; case "defaultValue": propKey = name; @@ -15027,17 +15055,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$232, propKey); + updateTextarea(domElement, propKey$233, propKey); return; case "option": - for (var propKey$248 in lastProps) + for (var propKey$249 in lastProps) if ( - ((propKey$232 = lastProps[propKey$248]), - lastProps.hasOwnProperty(propKey$248) && - null != propKey$232 && - !nextProps.hasOwnProperty(propKey$248)) + ((propKey$233 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$249)) ) - switch (propKey$248) { + switch (propKey$249) { case "selected": domElement.selected = !1; break; @@ -15045,33 +15073,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$248, + propKey$249, null, nextProps, - propKey$232 + propKey$233 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$232 = nextProps[lastDefaultValue]), + ((propKey$233 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$233 !== propKey && + (null != propKey$233 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$232 && - "function" !== typeof propKey$232 && - "symbol" !== typeof propKey$232; + propKey$233 && + "function" !== typeof propKey$233 && + "symbol" !== typeof propKey$233; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$232, + propKey$233, nextProps, propKey ); @@ -15092,24 +15120,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$254 in lastProps) + (propKey$233 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$254) && + setProp(domElement, tag, propKey$254, null, nextProps, propKey$233); for (checked in nextProps) if ( - ((propKey$232 = nextProps[checked]), + ((propKey$233 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$232 !== propKey && - (null != propKey$232 || null != propKey)) + propKey$233 !== propKey && + (null != propKey$233 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$232) + if (null != propKey$233) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15117,7 +15145,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$232, + propKey$233, nextProps, propKey ); @@ -15125,49 +15153,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$259 in lastProps) + (propKey$233 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + void 0 !== propKey$233 && + !nextProps.hasOwnProperty(propKey$259) && setPropOnCustomElement( domElement, tag, - propKey$258, + propKey$259, void 0, nextProps, - propKey$232 + propKey$233 ); for (defaultChecked in nextProps) - (propKey$232 = nextProps[defaultChecked]), + (propKey$233 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$232 === propKey || - (void 0 === propKey$232 && void 0 === propKey) || + propKey$233 === propKey || + (void 0 === propKey$233 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$232, + propKey$233, 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$264 in lastProps) + (propKey$233 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$233 && + !nextProps.hasOwnProperty(propKey$264) && + setProp(domElement, tag, propKey$264, null, nextProps, propKey$233); for (lastProp in nextProps) - (propKey$232 = nextProps[lastProp]), + (propKey$233 = 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$233 === propKey || + (null == propKey$233 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$233, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15764,26 +15792,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$271 = getResourcesFromRoot( + var styles$272 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$272 = styles$271.get(type); - resource$272 || + resource$273 = styles$272.get(type); + resource$273 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$272 = { + (resource$273 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$271.set(type, resource$272), - (styles$271 = JSCompiler_inline_result.querySelector( + styles$272.set(type, resource$273), + (styles$272 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$271._p && - ((resource$272.instance = styles$271), - (resource$272.state.loading = 5)), + !styles$272._p && + ((resource$273.instance = styles$272), + (resource$273.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -15796,16 +15824,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$271 || + styles$272 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$272.state + resource$273.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$272; + return resource$273; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -15902,37 +15930,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$277 = hoistableRoot.querySelector( + var instance$278 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$277) + if (instance$278) return ( (resource.state.loading |= 4), - (resource.instance = instance$277), - markNodeAsHoistable(instance$277), - instance$277 + (resource.instance = instance$278), + markNodeAsHoistable(instance$278), + instance$278 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$277 = ( + instance$278 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$277); - var linkInstance = instance$277; + markNodeAsHoistable(instance$278); + var linkInstance = instance$278; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$277, "link", instance); + setInitialProperties(instance$278, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$277, props.precedence, hoistableRoot); - return (resource.instance = instance$277); + insertStylesheet(instance$278, props.precedence, hoistableRoot); + return (resource.instance = instance$278); case "script": - instance$277 = getScriptKey(props.src); + instance$278 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$277) + getScriptSelectorFromKey(instance$278) )) ) return ( @@ -15941,7 +15969,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$277))) + if ((styleProps = preloadPropsMap.get(instance$278))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16945,16 +16973,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1755 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1760 = React.version; if ( - "19.1.0-www-modern-d4287258-20241217" !== - isomorphicReactPackageVersion$jscomp$inline_1755 + "19.1.0-www-modern-a9bbe346-20241219" !== + isomorphicReactPackageVersion$jscomp$inline_1760 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1755, - "19.1.0-www-modern-d4287258-20241217" + isomorphicReactPackageVersion$jscomp$inline_1760, + "19.1.0-www-modern-a9bbe346-20241219" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -16970,24 +16998,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2281 = { +var internals$jscomp$inline_2289 = { bundleType: 0, - version: "19.1.0-www-modern-d4287258-20241217", + version: "19.1.0-www-modern-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2282 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2290 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2282.isDisabled && - hook$jscomp$inline_2282.supportsFiber + !hook$jscomp$inline_2290.isDisabled && + hook$jscomp$inline_2290.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2282.inject( - internals$jscomp$inline_2281 + (rendererID = hook$jscomp$inline_2290.inject( + internals$jscomp$inline_2289 )), - (injectedHook = hook$jscomp$inline_2282); + (injectedHook = hook$jscomp$inline_2290); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17340,4 +17368,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-d4287258-20241217"; +exports.version = "19.1.0-www-modern-a9bbe346-20241219"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index c0e8d9e275a74..9cf910af3d9e4 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -2000,87 +2000,233 @@ function resetHydrationState() { nextHydratableInstance = hydrationParentFiber = null; isHydrating = !1; } +function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; +} function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) : hydrationErrors.push(error); } -var concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0; -function finishQueueingConcurrentUpdates() { +var valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null; +function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue); + context._currentValue = nextValue; +} +function popProvider(context) { + context._currentValue = valueCursor.current; + pop(valueCursor); +} +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } +} +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } +} +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } -function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } -function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); +function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } -function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); +function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } -function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } -function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; +} +var AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; +} +function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } var now = Scheduler.unstable_now, commitStartTime = -0, @@ -2160,14 +2306,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$28 = firstScheduledRoot; null !== root$28; ) { + for (var root$29 = firstScheduledRoot; null !== root$29; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$28.pendingLanes; + var pendingLanes = root$29.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$28.suspendedLanes, - pingedLanes = root$28.pingedLanes; + var suspendedLanes = root$29.suspendedLanes, + pingedLanes = root$29.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -2181,18 +2327,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$28, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$29, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$28, - root$28 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$29, + root$29 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$28, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$29, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$28, JSCompiler_inline_result)); - root$28 = root$28.next; + performSyncWorkOnRoot(root$29, JSCompiler_inline_result)); + root$29 = root$29.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2353,50 +2499,270 @@ function entangleAsyncAction(transition, thenable) { then: function (resolve) { entangledListeners.push(resolve); } - }; + }; + } + currentEntangledPendingCount++; + thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); + return thenable; +} +function pingEngtangledActionScope() { + if ( + 0 === --currentEntangledPendingCount && + null !== currentEntangledListeners + ) { + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } +} +function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); + } + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; +} +var prevOnStartTransitionFinish = ReactSharedInternals.S; +ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); +}; +var resumedCache = createCursor(null), + transitionStack = createCursor(null); +function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; +} +function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions +) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); +} +function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); +} +function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; +} +function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; +} +var SuspenseException = Error(formatProdErrorMessage(460)), + SuspenseyCommitException = Error(formatProdErrorMessage(474)), + SuspenseActionException = Error(formatProdErrorMessage(542)), + noopSuspenseyCommitThenable = { then: function () {} }; +function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; +} +function noop$3() {} +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop$3, noop$3), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop$3, noop$3); + else { + thenableState = workInProgressRoot; + if (null !== thenableState && 100 < thenableState.shellSuspendCounter) + throw Error(formatProdErrorMessage(482)); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + throw SuspenseException; } - currentEntangledPendingCount++; - thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); + var thenable = suspendedThenable; + suspendedThenable = null; return thenable; } -function pingEngtangledActionScope() { +function checkIfUseWrappedInAsyncCatch(rejectedReason) { if ( - 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error(formatProdErrorMessage(483)); +} +var concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0; +function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); } } -function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; +function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); +} +function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); +} +function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); +} +function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); +} +function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; } var hasForceUpdate = !1; function initializeUpdateQueue(fiber) { @@ -2642,104 +3008,6 @@ function commitCallbacks(updateQueue, context) { ) callCallback(callbacks[updateQueue], context); } -function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; -} -var SuspenseException = Error(formatProdErrorMessage(460)), - SuspenseyCommitException = Error(formatProdErrorMessage(474)), - SuspenseActionException = Error(formatProdErrorMessage(542)), - noopSuspenseyCommitThenable = { then: function () {} }; -function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; -} -function noop$3() {} -function trackUsedThenable(thenableState, thenable, index) { - index = thenableState[index]; - void 0 === index - ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop$3, noop$3), (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop$3, noop$3); - else { - thenableState = workInProgressRoot; - if (null !== thenableState && 100 < thenableState.shellSuspendCounter) - throw Error(formatProdErrorMessage(482)); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - throw SuspenseException; - } -} -var suspendedThenable = null; -function getSuspendedThenable() { - if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); - var thenable = suspendedThenable; - suspendedThenable = null; - return thenable; -} -function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error(formatProdErrorMessage(483)); -} var currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0); function pushHiddenContext(fiber, context) { @@ -2758,7 +3026,7 @@ function popHiddenContext() { pop(prevEntangledRenderLanesCursor); } var renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -2786,7 +3054,7 @@ function renderWithHooks( nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -2811,7 +3079,7 @@ function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -2824,7 +3092,7 @@ function finishRenderingHooks(current) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2854,7 +3122,7 @@ function TransitionAwareHostComponent() { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -2881,7 +3149,7 @@ function resetHooksOnUnwind(workInProgress) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = localIdCounter = 0; thenableState$1 = null; @@ -2895,26 +3163,26 @@ function mountWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -2927,7 +3195,7 @@ function updateWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -2941,7 +3209,7 @@ function useThenable(thenable) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -2962,10 +3230,10 @@ function use(usable) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2983,7 +3251,7 @@ function useMemoCache(size) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -3025,7 +3293,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$39 = !1; + didReadFromEntangledAsyncAction$41 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3046,11 +3314,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$39 = !0); + (didReadFromEntangledAsyncAction$41 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$39 = !0); + (didReadFromEntangledAsyncAction$41 = !0); continue; } else (updateLane = { @@ -3065,7 +3333,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -3086,7 +3354,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -3096,7 +3364,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$39 && + didReadFromEntangledAsyncAction$41 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -3129,7 +3397,7 @@ function rerenderReducer(reducer) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -3174,10 +3442,10 @@ function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3298,8 +3566,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$45) { - onActionError(actionQueue, node, error$45); + } catch (error$47) { + onActionError(actionQueue, node, error$47); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3356,7 +3624,7 @@ function mountActionState(action, initialStateProp) { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -3412,14 +3680,14 @@ function mountActionState(action, initialStateProp) { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, JSCompiler_inline_result.queue ); @@ -3433,7 +3701,7 @@ function mountActionState(action, initialStateProp) { JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result$jscomp$0, inRootOrSingleton, ssrFormState @@ -3469,7 +3737,7 @@ function updateActionStateImpl(stateHook, currentStateHook, action) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -3531,10 +3799,10 @@ function pushResourceEffect( }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -3555,7 +3823,7 @@ function updateRef() { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -3571,7 +3839,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -3587,7 +3855,7 @@ function updateEffect(create, deps) { } function mountResourceEffect(create, createDeps, update, updateDeps, destroy) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -3623,7 +3891,7 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -3635,11 +3903,11 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -3716,7 +3984,7 @@ function mountDeferredValueImpl(hook, value, initialValue) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -3731,7 +3999,7 @@ function updateDeferredValueImpl(hook, prevValue, value, initialValue) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -3865,14 +4133,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$48 = enqueueUpdate(provider, fiber, lane); - null !== root$48 && - (scheduleUpdateOnFiber(root$48, provider, lane), - entangleTransitions(root$48, provider, lane)); + var root$50 = enqueueUpdate(provider, fiber, lane); + null !== root$50 && + (scheduleUpdateOnFiber(root$50, provider, lane), + entangleTransitions(root$50, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$48 && + null !== root$50 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -3969,8 +4237,8 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -4085,7 +4353,7 @@ var HooksDispatcherOnMount = { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -4098,7 +4366,7 @@ var HooksDispatcherOnMount = { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -4111,7 +4379,7 @@ var HooksDispatcherOnMount = { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -4120,7 +4388,7 @@ var HooksDispatcherOnMount = { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -4195,7 +4463,7 @@ var HooksDispatcherOnMount = { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -4206,7 +4474,7 @@ var HooksDispatcherOnMount = { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -5217,9 +5485,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$80 in Component) - void 0 === newProps[propName$80] && - (newProps[propName$80] = Component[propName$80]); + for (var propName$82 in Component) + void 0 === newProps[propName$82] && + (newProps[propName$82] = Component[propName$82]); } return newProps; } @@ -5596,10 +5864,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$92 = workInProgress.stateNode; + root$94 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$92.incompleteTransitions.has(transition)) { + if (!root$94.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5607,11 +5875,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$92.incompleteTransitions.set(transition, markerInstance); + root$94.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$92.incompleteTransitions.forEach(function (markerInstance) { + root$94.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6285,7 +6553,12 @@ function mountHostRootWithoutHydrating( reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } -var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; +var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null +}; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; } @@ -6348,7 +6621,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), (JSCompiler_temp$jscomp$0.stateNode = nextInstance), @@ -7386,375 +7660,119 @@ function beginWork(current, workInProgress, renderLanes) { ); case 14: return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 19: - return updateSuspenseListComponent(current, workInProgress, renderLanes); - case 21: - return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 24: - return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (nextProps = createCache()), - (init.pooledCache = nextProps), - nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); -} -var valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null; -function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue); - context._currentValue = nextValue; -} -function popProvider(context) { - context._currentValue = valueCursor.current; - pop(valueCursor); -} -function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } -} -function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree -) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } -} -function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree -) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; -} -function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + (props = workInProgress.type), + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 19: + return updateSuspenseListComponent(current, workInProgress, renderLanes); + case 21: + return ( + (props = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 24: + return ( + prepareToReadContext(workInProgress), + (props = readContext(CacheContext)), + null === current + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), + (nextProps = createCache()), + (init.pooledCache = nextProps), + nextProps.refCount++, + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, init)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; -} -function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); -} -function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); -} -function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); -} -function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; -} -var AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; -} -function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); -} -var prevOnStartTransitionFinish = ReactSharedInternals.S; -ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); -}; -var resumedCache = createCursor(null), - transitionStack = createCursor(null); -function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; -} -function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions -) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); -} -function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); -} -function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } var emptyObject = {}; function collectScopedNodesFromChildren( @@ -8017,9 +8035,7 @@ function completeWork(current, workInProgress, renderLanes) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -8249,8 +8265,10 @@ function completeWork(current, workInProgress, renderLanes) { (workInProgress.treeBaseDuration -= type.treeBaseDuration)); type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)), + (type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = type), (type = !0); if (!type) { if (workInProgress.flags & 256) @@ -8276,11 +8294,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$146 = null; + var cache$147 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$146 = newProps.memoizedState.cachePool.pool); - cache$146 !== type && (newProps.flags |= 2048); + (cache$147 = newProps.memoizedState.cachePool.pool); + cache$147 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8319,8 +8337,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$146 = type.rendering; - if (null === cache$146) + cache$147 = type.rendering; + if (null === cache$147) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8328,11 +8346,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$146 = findFirstSuspended(current); - if (null !== cache$146) { + cache$147 = findFirstSuspended(current); + if (null !== cache$147) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$146.updateQueue; + current = cache$147.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8357,7 +8375,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$146)), null !== current)) { + if (((current = findFirstSuspended(cache$147)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8367,7 +8385,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$146.alternate && + !cache$147.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8380,13 +8398,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$146.sibling = workInProgress.child), - (workInProgress.child = cache$146)) + ? ((cache$147.sibling = workInProgress.child), + (workInProgress.child = cache$147)) : ((current = type.last), null !== current - ? (current.sibling = cache$146) - : (workInProgress.child = cache$146), - (type.last = cache$146)); + ? (current.sibling = cache$147) + : (workInProgress.child = cache$147), + (type.last = cache$147)); } if (null !== type.tail) return ( @@ -8692,10 +8710,10 @@ function commitHookEffectListMount(flags, finishedWork) { inst.destroy = lastEffect; } } else { - var create$163 = updateQueue.create, - inst$164 = updateQueue.inst; - lastEffect = create$163(); - inst$164.destroy = lastEffect; + var create$164 = updateQueue.create, + inst$165 = updateQueue.inst; + lastEffect = create$164(); + inst$165.destroy = lastEffect; } enableSchedulingProfiler && (0 !== (flags & 8) @@ -8884,8 +8902,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$168) { - captureCommitPhaseError(current, nearestMountedAncestor, error$168); + } catch (error$169) { + captureCommitPhaseError(current, nearestMountedAncestor, error$169); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8946,8 +8964,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$169) { - captureCommitPhaseError(current, nearestMountedAncestor, error$169); + } catch (error$170) { + captureCommitPhaseError(current, nearestMountedAncestor, error$170); } else ref.current = null; } @@ -9135,7 +9153,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$218) { + } catch (e$219) { JSCompiler_temp = null; break a; } @@ -9346,11 +9364,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$165) { + } catch (error$166) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$165 + error$166 ); } else { @@ -9368,11 +9386,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$166) { + } catch (error$167) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$166 + error$167 ); } recordEffectDuration(); @@ -9383,11 +9401,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$167) { + } catch (error$168) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$167 + error$168 ); } } @@ -9748,7 +9766,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$178 = hostParentIsContainer; + var prevHostParentIsContainer$179 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9756,7 +9774,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$178; + hostParentIsContainer = prevHostParentIsContainer$179; if (null !== hostParent) if (hostParentIsContainer) try { @@ -10468,21 +10486,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$170 = JSCompiler_inline_result.stateNode; + var parent$171 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$170, ""), + (setTextContent(parent$171, ""), (JSCompiler_inline_result.flags &= -33)); - var before$171 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$171, parent$170); + var before$172 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$172, parent$171); break; case 3: case 4: - var parent$172 = JSCompiler_inline_result.stateNode.containerInfo, - before$173 = getHostSibling(finishedWork); + var parent$173 = JSCompiler_inline_result.stateNode.containerInfo, + before$174 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$173, - parent$172 + before$174, + parent$173 ); break; default: @@ -10874,6 +10892,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10996,9 +11022,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$191 = finishedWork.stateNode; + var instance$192 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$191._visibility & 4 + ? instance$192._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11010,7 +11036,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$191._visibility |= 4), + : ((instance$192._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11023,7 +11049,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$191 + instance$192 ); break; case 24: @@ -11449,7 +11475,6 @@ function addTransitionProgressCallbackToPendingTransition( )); } var legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -11588,7 +11613,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -11686,14 +11716,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { } while (1); ensureRootIsScheduled(root$jscomp$0); } -function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); -} function commitRootWhenReady( root, finishedWork, @@ -11829,7 +11851,7 @@ function resetWorkInProgressStack() { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -11886,7 +11908,7 @@ function prepareFreshStack(root, lanes) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException || thrownValue === SuspenseActionException ? ((thrownValue = getSuspendedThenable()), @@ -12048,12 +12070,12 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$204) { - handleThrow(root, thrownValue$204); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -12172,11 +12194,11 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$206) { - handleThrow(root, thrownValue$206); + } catch (thrownValue$207) { + handleThrow(root, thrownValue$207); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -12273,7 +12295,7 @@ function throwAndUnwindWorkLoop( thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -12452,9 +12474,6 @@ function commitRootImpl( root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -12469,53 +12488,62 @@ function commitRootImpl( root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - (suspendedRetryLanes = commitBeforeMutationEffects(root, finishedWork)), - commitMutationEffects(root, finishedWork, lanes), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = 2; + suspendedRetryLanes = executionContext; + executionContext |= 4; + var shouldFireAfterActiveInstanceBlur$211 = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffects(root, finishedWork, lanes); + shouldFireAfterActiveInstanceBlur$211 && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); @@ -12523,7 +12551,6 @@ function commitRootImpl( 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -12535,6 +12562,7 @@ function commitRootImpl( componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -12573,7 +12601,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$211 = rootWithPendingPassiveEffects, + var root$212 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12588,7 +12616,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$211, remainingLanes); + releaseRootPooledCache(root$212, remainingLanes); } } return !1; @@ -13331,9 +13359,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$216 = 0; - 31 > index$216; - index$216++ + var map = new Map(), lane = 1, index$217 = 0; + 31 > index$217; + index$217++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13884,19 +13912,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$368; + var JSCompiler_inline_result$jscomp$369; if (canUseDOM) { - var isSupported$jscomp$inline_1644 = "oninput" in document; - if (!isSupported$jscomp$inline_1644) { - var element$jscomp$inline_1645 = document.createElement("div"); - element$jscomp$inline_1645.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1644 = - "function" === typeof element$jscomp$inline_1645.oninput; + var isSupported$jscomp$inline_1649 = "oninput" in document; + if (!isSupported$jscomp$inline_1649) { + var element$jscomp$inline_1650 = document.createElement("div"); + element$jscomp$inline_1650.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1649 = + "function" === typeof element$jscomp$inline_1650.oninput; } - JSCompiler_inline_result$jscomp$368 = isSupported$jscomp$inline_1644; - } else JSCompiler_inline_result$jscomp$368 = !1; + JSCompiler_inline_result$jscomp$369 = isSupported$jscomp$inline_1649; + } else JSCompiler_inline_result$jscomp$369 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$368 && + JSCompiler_inline_result$jscomp$369 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14307,20 +14335,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1685 = 0; - i$jscomp$inline_1685 < simpleEventPluginEvents.length; - i$jscomp$inline_1685++ + var i$jscomp$inline_1690 = 0; + i$jscomp$inline_1690 < simpleEventPluginEvents.length; + i$jscomp$inline_1690++ ) { - var eventName$jscomp$inline_1686 = - simpleEventPluginEvents[i$jscomp$inline_1685], - domEventName$jscomp$inline_1687 = - eventName$jscomp$inline_1686.toLowerCase(), - capitalizedEvent$jscomp$inline_1688 = - eventName$jscomp$inline_1686[0].toUpperCase() + - eventName$jscomp$inline_1686.slice(1); + var eventName$jscomp$inline_1691 = + simpleEventPluginEvents[i$jscomp$inline_1690], + domEventName$jscomp$inline_1692 = + eventName$jscomp$inline_1691.toLowerCase(), + capitalizedEvent$jscomp$inline_1693 = + eventName$jscomp$inline_1691[0].toUpperCase() + + eventName$jscomp$inline_1691.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1687, - "on" + capitalizedEvent$jscomp$inline_1688 + domEventName$jscomp$inline_1692, + "on" + capitalizedEvent$jscomp$inline_1693 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15613,34 +15641,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$232 = props[hasSrc]; - if (null != propValue$232) + var propValue$233 = props[hasSrc]; + if (null != propValue$233) switch (hasSrc) { case "name": - hasSrcSet = propValue$232; + hasSrcSet = propValue$233; break; case "type": - propValue = propValue$232; + propValue = propValue$233; break; case "checked": - checked = propValue$232; + checked = propValue$233; break; case "defaultChecked": - defaultChecked = propValue$232; + defaultChecked = propValue$233; break; case "value": - propKey = propValue$232; + propKey = propValue$233; break; case "defaultValue": - defaultValue = propValue$232; + defaultValue = propValue$233; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$232) + if (null != propValue$233) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$232, props, null); + setProp(domElement, tag, hasSrc, propValue$233, props, null); } } initInput( @@ -15777,14 +15805,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$232 in props) - props.hasOwnProperty(propValue$232) && - ((hasSrc = props[propValue$232]), + for (propValue$233 in props) + props.hasOwnProperty(propValue$233) && + ((hasSrc = props[propValue$233]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$232, + propValue$233, hasSrc, props, void 0 @@ -15832,14 +15860,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$249 in nextProps) { - var propKey = nextProps[propKey$249]; - lastProp = lastProps[propKey$249]; + for (var propKey$250 in nextProps) { + var propKey = nextProps[propKey$250]; + lastProp = lastProps[propKey$250]; if ( - nextProps.hasOwnProperty(propKey$249) && + nextProps.hasOwnProperty(propKey$250) && (null != propKey || null != lastProp) ) - switch (propKey$249) { + switch (propKey$250) { case "type": type = propKey; break; @@ -15868,7 +15896,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$250, propKey, nextProps, lastProp @@ -15887,7 +15915,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$249 = null; + propKey = value = defaultValue = propKey$250 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15918,7 +15946,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$249 = type; + propKey$250 = type; break; case "defaultValue": defaultValue = type; @@ -15939,15 +15967,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$249 - ? updateOptions(domElement, !!lastProps, propKey$249, !1) + null != propKey$250 + ? updateOptions(domElement, !!lastProps, propKey$250, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$249 = null; + propKey = propKey$250 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15971,7 +15999,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$249 = name; + propKey$250 = name; break; case "defaultValue": propKey = name; @@ -15985,17 +16013,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$249, propKey); + updateTextarea(domElement, propKey$250, propKey); return; case "option": - for (var propKey$265 in lastProps) + for (var propKey$266 in lastProps) if ( - ((propKey$249 = lastProps[propKey$265]), - lastProps.hasOwnProperty(propKey$265) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$265)) + ((propKey$250 = lastProps[propKey$266]), + lastProps.hasOwnProperty(propKey$266) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$266)) ) - switch (propKey$265) { + switch (propKey$266) { case "selected": domElement.selected = !1; break; @@ -16003,33 +16031,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$265, + propKey$266, null, nextProps, - propKey$249 + propKey$250 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$249 = nextProps[lastDefaultValue]), + ((propKey$250 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$250 !== propKey && + (null != propKey$250 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$249 && - "function" !== typeof propKey$249 && - "symbol" !== typeof propKey$249; + propKey$250 && + "function" !== typeof propKey$250 && + "symbol" !== typeof propKey$250; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$249, + propKey$250, nextProps, propKey ); @@ -16050,24 +16078,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$270 in lastProps) - (propKey$249 = lastProps[propKey$270]), - lastProps.hasOwnProperty(propKey$270) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$270) && - setProp(domElement, tag, propKey$270, null, nextProps, propKey$249); + for (var propKey$271 in lastProps) + (propKey$250 = lastProps[propKey$271]), + lastProps.hasOwnProperty(propKey$271) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$271) && + setProp(domElement, tag, propKey$271, null, nextProps, propKey$250); for (checked in nextProps) if ( - ((propKey$249 = nextProps[checked]), + ((propKey$250 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$250 !== propKey && + (null != propKey$250 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$249) + if (null != propKey$250) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16075,7 +16103,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$249, + propKey$250, nextProps, propKey ); @@ -16083,49 +16111,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$275 in lastProps) - (propKey$249 = lastProps[propKey$275]), - lastProps.hasOwnProperty(propKey$275) && - void 0 !== propKey$249 && - !nextProps.hasOwnProperty(propKey$275) && + for (var propKey$276 in lastProps) + (propKey$250 = lastProps[propKey$276]), + lastProps.hasOwnProperty(propKey$276) && + void 0 !== propKey$250 && + !nextProps.hasOwnProperty(propKey$276) && setPropOnCustomElement( domElement, tag, - propKey$275, + propKey$276, void 0, nextProps, - propKey$249 + propKey$250 ); for (defaultChecked in nextProps) - (propKey$249 = nextProps[defaultChecked]), + (propKey$250 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$249 === propKey || - (void 0 === propKey$249 && void 0 === propKey) || + propKey$250 === propKey || + (void 0 === propKey$250 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$249, + propKey$250, nextProps, propKey ); return; } } - for (var propKey$280 in lastProps) - (propKey$249 = lastProps[propKey$280]), - lastProps.hasOwnProperty(propKey$280) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$280) && - setProp(domElement, tag, propKey$280, null, nextProps, propKey$249); + for (var propKey$281 in lastProps) + (propKey$250 = lastProps[propKey$281]), + lastProps.hasOwnProperty(propKey$281) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$281) && + setProp(domElement, tag, propKey$281, null, nextProps, propKey$250); for (lastProp in nextProps) - (propKey$249 = nextProps[lastProp]), + (propKey$250 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$249 === propKey || - (null == propKey$249 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$249, nextProps, propKey); + propKey$250 === propKey || + (null == propKey$250 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$250, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16722,26 +16750,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$288 = getResourcesFromRoot( + var styles$289 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$289 = styles$288.get(type); - resource$289 || + resource$290 = styles$289.get(type); + resource$290 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$289 = { + (resource$290 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$288.set(type, resource$289), - (styles$288 = JSCompiler_inline_result.querySelector( + styles$289.set(type, resource$290), + (styles$289 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$288._p && - ((resource$289.instance = styles$288), - (resource$289.state.loading = 5)), + !styles$289._p && + ((resource$290.instance = styles$289), + (resource$290.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16754,16 +16782,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$288 || + styles$289 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$289.state + resource$290.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$289; + return resource$290; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16860,37 +16888,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$294 = hoistableRoot.querySelector( + var instance$295 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$294) + if (instance$295) return ( (resource.state.loading |= 4), - (resource.instance = instance$294), - markNodeAsHoistable(instance$294), - instance$294 + (resource.instance = instance$295), + markNodeAsHoistable(instance$295), + instance$295 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$294 = ( + instance$295 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$294); - var linkInstance = instance$294; + markNodeAsHoistable(instance$295); + var linkInstance = instance$295; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$294, "link", instance); + setInitialProperties(instance$295, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$294, props.precedence, hoistableRoot); - return (resource.instance = instance$294); + insertStylesheet(instance$295, props.precedence, hoistableRoot); + return (resource.instance = instance$295); case "script": - instance$294 = getScriptKey(props.src); + instance$295 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$294) + getScriptSelectorFromKey(instance$295) )) ) return ( @@ -16899,7 +16927,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$294))) + if ((styleProps = preloadPropsMap.get(instance$295))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17903,16 +17931,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1858 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1863 = React.version; if ( - "19.1.0-www-classic-d4287258-20241217" !== - isomorphicReactPackageVersion$jscomp$inline_1858 + "19.1.0-www-classic-a9bbe346-20241219" !== + isomorphicReactPackageVersion$jscomp$inline_1863 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1858, - "19.1.0-www-classic-d4287258-20241217" + isomorphicReactPackageVersion$jscomp$inline_1863, + "19.1.0-www-classic-a9bbe346-20241219" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17928,27 +17956,27 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1860 = { +var internals$jscomp$inline_1865 = { bundleType: 0, - version: "19.1.0-www-classic-d4287258-20241217", + version: "19.1.0-www-classic-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1860.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1860.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1865.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1865.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2351 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2359 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2351.isDisabled && - hook$jscomp$inline_2351.supportsFiber + !hook$jscomp$inline_2359.isDisabled && + hook$jscomp$inline_2359.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2351.inject( - internals$jscomp$inline_1860 + (rendererID = hook$jscomp$inline_2359.inject( + internals$jscomp$inline_1865 )), - (injectedHook = hook$jscomp$inline_2351); + (injectedHook = hook$jscomp$inline_2359); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18301,7 +18329,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-d4287258-20241217"; +exports.version = "19.1.0-www-classic-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 0373846558cee..175afc43523a0 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -1851,87 +1851,233 @@ function resetHydrationState() { nextHydratableInstance = hydrationParentFiber = null; isHydrating = !1; } +function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; +} function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) : hydrationErrors.push(error); } -var concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0; -function finishQueueingConcurrentUpdates() { +var valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null; +function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue); + context._currentValue = nextValue; +} +function popProvider(context) { + context._currentValue = valueCursor.current; + pop(valueCursor); +} +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } +} +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } +} +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } -function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } -function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); +function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } -function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); +function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } -function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } -function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; +} +var AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; +} +function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } var now = Scheduler.unstable_now, commitStartTime = -0, @@ -2011,14 +2157,14 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$28 = firstScheduledRoot; null !== root$28; ) { + for (var root$29 = firstScheduledRoot; null !== root$29; ) { if (!onlyLegacy) if (0 !== syncTransitionLanes) { - var pendingLanes = root$28.pendingLanes; + var pendingLanes = root$29.pendingLanes; if (0 === pendingLanes) var JSCompiler_inline_result = 0; else { - var suspendedLanes = root$28.suspendedLanes, - pingedLanes = root$28.pingedLanes; + var suspendedLanes = root$29.suspendedLanes, + pingedLanes = root$29.pingedLanes; JSCompiler_inline_result = (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; JSCompiler_inline_result &= @@ -2032,18 +2178,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$28, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$29, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$28, - root$28 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$29, + root$29 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$28, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$29, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$28, JSCompiler_inline_result)); - root$28 = root$28.next; + performSyncWorkOnRoot(root$29, JSCompiler_inline_result)); + root$29 = root$29.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2204,50 +2350,270 @@ function entangleAsyncAction(transition, thenable) { then: function (resolve) { entangledListeners.push(resolve); } - }; + }; + } + currentEntangledPendingCount++; + thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); + return thenable; +} +function pingEngtangledActionScope() { + if ( + 0 === --currentEntangledPendingCount && + null !== currentEntangledListeners + ) { + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } +} +function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); + } + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; +} +var prevOnStartTransitionFinish = ReactSharedInternals.S; +ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); +}; +var resumedCache = createCursor(null), + transitionStack = createCursor(null); +function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; +} +function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions +) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); +} +function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); +} +function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; +} +function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; +} +var SuspenseException = Error(formatProdErrorMessage(460)), + SuspenseyCommitException = Error(formatProdErrorMessage(474)), + SuspenseActionException = Error(formatProdErrorMessage(542)), + noopSuspenseyCommitThenable = { then: function () {} }; +function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; +} +function noop$3() {} +function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && (thenable.then(noop$3, noop$3), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop$3, noop$3); + else { + thenableState = workInProgressRoot; + if (null !== thenableState && 100 < thenableState.shellSuspendCounter) + throw Error(formatProdErrorMessage(482)); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + throw SuspenseException; } - currentEntangledPendingCount++; - thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); +} +var suspendedThenable = null; +function getSuspendedThenable() { + if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); + var thenable = suspendedThenable; + suspendedThenable = null; return thenable; } -function pingEngtangledActionScope() { +function checkIfUseWrappedInAsyncCatch(rejectedReason) { if ( - 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error(formatProdErrorMessage(483)); +} +var concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0; +function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); } } -function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; +function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); +} +function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); +} +function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); +} +function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); +} +function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; } var hasForceUpdate = !1; function initializeUpdateQueue(fiber) { @@ -2493,104 +2859,6 @@ function commitCallbacks(updateQueue, context) { ) callCallback(callbacks[updateQueue], context); } -function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; -} -var SuspenseException = Error(formatProdErrorMessage(460)), - SuspenseyCommitException = Error(formatProdErrorMessage(474)), - SuspenseActionException = Error(formatProdErrorMessage(542)), - noopSuspenseyCommitThenable = { then: function () {} }; -function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; -} -function noop$3() {} -function trackUsedThenable(thenableState, thenable, index) { - index = thenableState[index]; - void 0 === index - ? thenableState.push(thenable) - : index !== thenable && (thenable.then(noop$3, noop$3), (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop$3, noop$3); - else { - thenableState = workInProgressRoot; - if (null !== thenableState && 100 < thenableState.shellSuspendCounter) - throw Error(formatProdErrorMessage(482)); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - throw SuspenseException; - } -} -var suspendedThenable = null; -function getSuspendedThenable() { - if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); - var thenable = suspendedThenable; - suspendedThenable = null; - return thenable; -} -function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error(formatProdErrorMessage(483)); -} var currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0); function pushHiddenContext(fiber, context) { @@ -2609,7 +2877,7 @@ function popHiddenContext() { pop(prevEntangledRenderLanesCursor); } var renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -2637,7 +2905,7 @@ function renderWithHooks( nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -2662,7 +2930,7 @@ function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -2675,7 +2943,7 @@ function finishRenderingHooks(current) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2705,7 +2973,7 @@ function TransitionAwareHostComponent() { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -2732,7 +3000,7 @@ function resetHooksOnUnwind(workInProgress) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = localIdCounter = 0; thenableState$1 = null; @@ -2746,26 +3014,26 @@ function mountWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -2778,7 +3046,7 @@ function updateWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -2792,7 +3060,7 @@ function useThenable(thenable) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -2813,10 +3081,10 @@ function use(usable) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2834,7 +3102,7 @@ function useMemoCache(size) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -2876,7 +3144,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$39 = !1; + didReadFromEntangledAsyncAction$41 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2897,11 +3165,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$39 = !0); + (didReadFromEntangledAsyncAction$41 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$39 = !0); + (didReadFromEntangledAsyncAction$41 = !0); continue; } else (updateLane = { @@ -2916,7 +3184,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -2937,7 +3205,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -2947,7 +3215,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$39 && + didReadFromEntangledAsyncAction$41 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -2980,7 +3248,7 @@ function rerenderReducer(reducer) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -3025,10 +3293,10 @@ function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3149,8 +3417,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$45) { - onActionError(actionQueue, node, error$45); + } catch (error$47) { + onActionError(actionQueue, node, error$47); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3207,7 +3475,7 @@ function mountActionState(action, initialStateProp) { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -3263,14 +3531,14 @@ function mountActionState(action, initialStateProp) { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, JSCompiler_inline_result.queue ); @@ -3284,7 +3552,7 @@ function mountActionState(action, initialStateProp) { JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result$jscomp$0, inRootOrSingleton, ssrFormState @@ -3320,7 +3588,7 @@ function updateActionStateImpl(stateHook, currentStateHook, action) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -3382,10 +3650,10 @@ function pushResourceEffect( }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -3406,7 +3674,7 @@ function updateRef() { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -3422,7 +3690,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -3438,7 +3706,7 @@ function updateEffect(create, deps) { } function mountResourceEffect(create, createDeps, update, updateDeps, destroy) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -3474,7 +3742,7 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -3486,11 +3754,11 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -3567,7 +3835,7 @@ function mountDeferredValueImpl(hook, value, initialValue) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -3582,7 +3850,7 @@ function updateDeferredValueImpl(hook, prevValue, value, initialValue) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -3716,14 +3984,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$48 = enqueueUpdate(provider, fiber, lane); - null !== root$48 && - (scheduleUpdateOnFiber(root$48, provider, lane), - entangleTransitions(root$48, provider, lane)); + var root$50 = enqueueUpdate(provider, fiber, lane); + null !== root$50 && + (scheduleUpdateOnFiber(root$50, provider, lane), + entangleTransitions(root$50, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$48 && + null !== root$50 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -3820,8 +4088,8 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -3936,7 +4204,7 @@ var HooksDispatcherOnMount = { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3949,7 +4217,7 @@ var HooksDispatcherOnMount = { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -3962,7 +4230,7 @@ var HooksDispatcherOnMount = { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -3971,7 +4239,7 @@ var HooksDispatcherOnMount = { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -4046,7 +4314,7 @@ var HooksDispatcherOnMount = { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -4057,7 +4325,7 @@ var HooksDispatcherOnMount = { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -5068,9 +5336,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$80 in Component) - void 0 === newProps[propName$80] && - (newProps[propName$80] = Component[propName$80]); + for (var propName$82 in Component) + void 0 === newProps[propName$82] && + (newProps[propName$82] = Component[propName$82]); } return newProps; } @@ -5447,10 +5715,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$92 = workInProgress.stateNode; + root$94 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$92.incompleteTransitions.has(transition)) { + if (!root$94.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5458,11 +5726,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$92.incompleteTransitions.set(transition, markerInstance); + root$94.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$92.incompleteTransitions.forEach(function (markerInstance) { + root$94.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6058,7 +6326,12 @@ function mountHostRootWithoutHydrating( reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } -var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; +var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null +}; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; } @@ -6121,7 +6394,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), (JSCompiler_temp$jscomp$0.stateNode = nextInstance), @@ -7155,375 +7429,119 @@ function beginWork(current, workInProgress, renderLanes) { ); case 14: return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 19: - return updateSuspenseListComponent(current, workInProgress, renderLanes); - case 21: - return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 24: - return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (nextProps = createCache()), - (init.pooledCache = nextProps), - nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); -} -var valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null; -function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue); - context._currentValue = nextValue; -} -function popProvider(context) { - context._currentValue = valueCursor.current; - pop(valueCursor); -} -function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } -} -function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree -) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } -} -function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree -) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; -} -function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + (props = workInProgress.type), + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 19: + return updateSuspenseListComponent(current, workInProgress, renderLanes); + case 21: + return ( + (props = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 24: + return ( + prepareToReadContext(workInProgress), + (props = readContext(CacheContext)), + null === current + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), + (nextProps = createCache()), + (init.pooledCache = nextProps), + nextProps.refCount++, + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, init)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; -} -function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); -} -function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); -} -function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); -} -function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; -} -var AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; -} -function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); -} -var prevOnStartTransitionFinish = ReactSharedInternals.S; -ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); -}; -var resumedCache = createCursor(null), - transitionStack = createCursor(null); -function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; -} -function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions -) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); -} -function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); -} -function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } var emptyObject = {}; function collectScopedNodesFromChildren( @@ -7779,9 +7797,7 @@ function completeWork(current, workInProgress, renderLanes) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -8011,8 +8027,10 @@ function completeWork(current, workInProgress, renderLanes) { (workInProgress.treeBaseDuration -= type.treeBaseDuration)); type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)), + (type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = type), (type = !0); if (!type) { if (workInProgress.flags & 256) @@ -8038,11 +8056,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$146 = null; + var cache$147 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$146 = newProps.memoizedState.cachePool.pool); - cache$146 !== type && (newProps.flags |= 2048); + (cache$147 = newProps.memoizedState.cachePool.pool); + cache$147 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8081,8 +8099,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$146 = type.rendering; - if (null === cache$146) + cache$147 = type.rendering; + if (null === cache$147) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8090,11 +8108,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$146 = findFirstSuspended(current); - if (null !== cache$146) { + cache$147 = findFirstSuspended(current); + if (null !== cache$147) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$146.updateQueue; + current = cache$147.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8119,7 +8137,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$146)), null !== current)) { + if (((current = findFirstSuspended(cache$147)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8129,7 +8147,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$146.alternate && + !cache$147.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8142,13 +8160,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$146.sibling = workInProgress.child), - (workInProgress.child = cache$146)) + ? ((cache$147.sibling = workInProgress.child), + (workInProgress.child = cache$147)) : ((current = type.last), null !== current - ? (current.sibling = cache$146) - : (workInProgress.child = cache$146), - (type.last = cache$146)); + ? (current.sibling = cache$147) + : (workInProgress.child = cache$147), + (type.last = cache$147)); } if (null !== type.tail) return ( @@ -8442,10 +8460,10 @@ function commitHookEffectListMount(flags, finishedWork) { inst.destroy = lastEffect; } } else { - var create$163 = updateQueue.create, - inst$164 = updateQueue.inst; - lastEffect = create$163(); - inst$164.destroy = lastEffect; + var create$164 = updateQueue.create, + inst$165 = updateQueue.inst; + lastEffect = create$164(); + inst$165.destroy = lastEffect; } enableSchedulingProfiler && (0 !== (flags & 8) @@ -8634,8 +8652,8 @@ function safelyCallComponentWillUnmount( } else try { instance.componentWillUnmount(); - } catch (error$168) { - captureCommitPhaseError(current, nearestMountedAncestor, error$168); + } catch (error$169) { + captureCommitPhaseError(current, nearestMountedAncestor, error$169); } } function safelyAttachRef(current, nearestMountedAncestor) { @@ -8696,8 +8714,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordEffectDuration(current); } else ref(null); - } catch (error$169) { - captureCommitPhaseError(current, nearestMountedAncestor, error$169); + } catch (error$170) { + captureCommitPhaseError(current, nearestMountedAncestor, error$170); } else ref.current = null; } @@ -8885,7 +8903,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$218) { + } catch (e$219) { JSCompiler_temp = null; break a; } @@ -9096,11 +9114,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$165) { + } catch (error$166) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$165 + error$166 ); } else { @@ -9118,11 +9136,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$166) { + } catch (error$167) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$166 + error$167 ); } recordEffectDuration(); @@ -9133,11 +9151,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$167) { + } catch (error$168) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$167 + error$168 ); } } @@ -9498,7 +9516,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$178 = hostParentIsContainer; + var prevHostParentIsContainer$179 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9506,7 +9524,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$178; + hostParentIsContainer = prevHostParentIsContainer$179; if (null !== hostParent) if (hostParentIsContainer) try { @@ -10218,21 +10236,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$170 = JSCompiler_inline_result.stateNode; + var parent$171 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$170, ""), + (setTextContent(parent$171, ""), (JSCompiler_inline_result.flags &= -33)); - var before$171 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$171, parent$170); + var before$172 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$172, parent$171); break; case 3: case 4: - var parent$172 = JSCompiler_inline_result.stateNode.containerInfo, - before$173 = getHostSibling(finishedWork); + var parent$173 = JSCompiler_inline_result.stateNode.containerInfo, + before$174 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$173, - parent$172 + before$174, + parent$173 ); break; default: @@ -10624,6 +10642,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10746,9 +10772,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$191 = finishedWork.stateNode; + var instance$192 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$191._visibility & 4 + ? instance$192._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10760,7 +10786,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$191._visibility |= 4), + : ((instance$192._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10773,7 +10799,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$191 + instance$192 ); break; case 24: @@ -11199,7 +11225,6 @@ function addTransitionProgressCallbackToPendingTransition( )); } var legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -11338,7 +11363,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -11436,14 +11466,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { } while (1); ensureRootIsScheduled(root$jscomp$0); } -function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); -} function commitRootWhenReady( root, finishedWork, @@ -11579,7 +11601,7 @@ function resetWorkInProgressStack() { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -11636,7 +11658,7 @@ function prepareFreshStack(root, lanes) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException || thrownValue === SuspenseActionException ? ((thrownValue = getSuspendedThenable()), @@ -11798,12 +11820,12 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); memoizedUpdaters = workInProgressRootExitStatus; break; - } catch (thrownValue$204) { - handleThrow(root, thrownValue$204); + } catch (thrownValue$205) { + handleThrow(root, thrownValue$205); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -11922,11 +11944,11 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$206) { - handleThrow(root, thrownValue$206); + } catch (thrownValue$207) { + handleThrow(root, thrownValue$207); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -12019,7 +12041,7 @@ function throwAndUnwindWorkLoop( thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -12198,9 +12220,6 @@ function commitRootImpl( root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -12215,53 +12234,62 @@ function commitRootImpl( root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - (suspendedRetryLanes = commitBeforeMutationEffects(root, finishedWork)), - commitMutationEffects(root, finishedWork, lanes), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = 2; + suspendedRetryLanes = executionContext; + executionContext |= 4; + var shouldFireAfterActiveInstanceBlur$211 = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffects(root, finishedWork, lanes); + shouldFireAfterActiveInstanceBlur$211 && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + null !== injectedProfilingHooks && + "function" === typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); @@ -12269,7 +12297,6 @@ function commitRootImpl( 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -12281,6 +12308,7 @@ function commitRootImpl( componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -12319,7 +12347,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$211 = rootWithPendingPassiveEffects, + var root$212 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12334,7 +12362,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$211, remainingLanes); + releaseRootPooledCache(root$212, remainingLanes); } } return !1; @@ -13038,9 +13066,9 @@ function attemptContinuousHydration(fiber) { function getLaneLabelMap() { if (enableSchedulingProfiler) { for ( - var map = new Map(), lane = 1, index$216 = 0; - 31 > index$216; - index$216++ + var map = new Map(), lane = 1, index$217 = 0; + 31 > index$217; + index$217++ ) { var label = getLabelForLane(lane); map.set(lane, label); @@ -13619,19 +13647,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$371; + var JSCompiler_inline_result$jscomp$372; if (canUseDOM) { - var isSupported$jscomp$inline_1634 = "oninput" in document; - if (!isSupported$jscomp$inline_1634) { - var element$jscomp$inline_1635 = document.createElement("div"); - element$jscomp$inline_1635.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1634 = - "function" === typeof element$jscomp$inline_1635.oninput; + var isSupported$jscomp$inline_1639 = "oninput" in document; + if (!isSupported$jscomp$inline_1639) { + var element$jscomp$inline_1640 = document.createElement("div"); + element$jscomp$inline_1640.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1639 = + "function" === typeof element$jscomp$inline_1640.oninput; } - JSCompiler_inline_result$jscomp$371 = isSupported$jscomp$inline_1634; - } else JSCompiler_inline_result$jscomp$371 = !1; + JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1639; + } else JSCompiler_inline_result$jscomp$372 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$371 && + JSCompiler_inline_result$jscomp$372 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14042,20 +14070,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1675 = 0; - i$jscomp$inline_1675 < simpleEventPluginEvents.length; - i$jscomp$inline_1675++ + var i$jscomp$inline_1680 = 0; + i$jscomp$inline_1680 < simpleEventPluginEvents.length; + i$jscomp$inline_1680++ ) { - var eventName$jscomp$inline_1676 = - simpleEventPluginEvents[i$jscomp$inline_1675], - domEventName$jscomp$inline_1677 = - eventName$jscomp$inline_1676.toLowerCase(), - capitalizedEvent$jscomp$inline_1678 = - eventName$jscomp$inline_1676[0].toUpperCase() + - eventName$jscomp$inline_1676.slice(1); + var eventName$jscomp$inline_1681 = + simpleEventPluginEvents[i$jscomp$inline_1680], + domEventName$jscomp$inline_1682 = + eventName$jscomp$inline_1681.toLowerCase(), + capitalizedEvent$jscomp$inline_1683 = + eventName$jscomp$inline_1681[0].toUpperCase() + + eventName$jscomp$inline_1681.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1677, - "on" + capitalizedEvent$jscomp$inline_1678 + domEventName$jscomp$inline_1682, + "on" + capitalizedEvent$jscomp$inline_1683 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15344,34 +15372,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$232 = props[hasSrc]; - if (null != propValue$232) + var propValue$233 = props[hasSrc]; + if (null != propValue$233) switch (hasSrc) { case "name": - hasSrcSet = propValue$232; + hasSrcSet = propValue$233; break; case "type": - propKey = propValue$232; + propKey = propValue$233; break; case "checked": - checked = propValue$232; + checked = propValue$233; break; case "defaultChecked": - defaultChecked = propValue$232; + defaultChecked = propValue$233; break; case "value": - propValue = propValue$232; + propValue = propValue$233; break; case "defaultValue": - defaultValue = propValue$232; + defaultValue = propValue$233; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$232) + if (null != propValue$233) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$232, props, null); + setProp(domElement, tag, hasSrc, propValue$233, props, null); } } initInput( @@ -15507,14 +15535,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$232 in props) - props.hasOwnProperty(propValue$232) && - ((hasSrc = props[propValue$232]), + for (propValue$233 in props) + props.hasOwnProperty(propValue$233) && + ((hasSrc = props[propValue$233]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$232, + propValue$233, hasSrc, props, void 0 @@ -15562,14 +15590,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$249 in nextProps) { - var propKey = nextProps[propKey$249]; - lastProp = lastProps[propKey$249]; + for (var propKey$250 in nextProps) { + var propKey = nextProps[propKey$250]; + lastProp = lastProps[propKey$250]; if ( - nextProps.hasOwnProperty(propKey$249) && + nextProps.hasOwnProperty(propKey$250) && (null != propKey || null != lastProp) ) - switch (propKey$249) { + switch (propKey$250) { case "type": type = propKey; break; @@ -15598,7 +15626,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$250, propKey, nextProps, lastProp @@ -15617,7 +15645,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$249 = null; + propKey = value = defaultValue = propKey$250 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15648,7 +15676,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$249 = type; + propKey$250 = type; break; case "defaultValue": defaultValue = type; @@ -15669,15 +15697,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$249 - ? updateOptions(domElement, !!lastProps, propKey$249, !1) + null != propKey$250 + ? updateOptions(domElement, !!lastProps, propKey$250, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$249 = null; + propKey = propKey$250 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15701,7 +15729,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$249 = name; + propKey$250 = name; break; case "defaultValue": propKey = name; @@ -15715,17 +15743,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$249, propKey); + updateTextarea(domElement, propKey$250, propKey); return; case "option": - for (var propKey$265 in lastProps) + for (var propKey$266 in lastProps) if ( - ((propKey$249 = lastProps[propKey$265]), - lastProps.hasOwnProperty(propKey$265) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$265)) + ((propKey$250 = lastProps[propKey$266]), + lastProps.hasOwnProperty(propKey$266) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$266)) ) - switch (propKey$265) { + switch (propKey$266) { case "selected": domElement.selected = !1; break; @@ -15733,33 +15761,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$265, + propKey$266, null, nextProps, - propKey$249 + propKey$250 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$249 = nextProps[lastDefaultValue]), + ((propKey$250 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$250 !== propKey && + (null != propKey$250 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$249 && - "function" !== typeof propKey$249 && - "symbol" !== typeof propKey$249; + propKey$250 && + "function" !== typeof propKey$250 && + "symbol" !== typeof propKey$250; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$249, + propKey$250, nextProps, propKey ); @@ -15780,24 +15808,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$270 in lastProps) - (propKey$249 = lastProps[propKey$270]), - lastProps.hasOwnProperty(propKey$270) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$270) && - setProp(domElement, tag, propKey$270, null, nextProps, propKey$249); + for (var propKey$271 in lastProps) + (propKey$250 = lastProps[propKey$271]), + lastProps.hasOwnProperty(propKey$271) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$271) && + setProp(domElement, tag, propKey$271, null, nextProps, propKey$250); for (checked in nextProps) if ( - ((propKey$249 = nextProps[checked]), + ((propKey$250 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$250 !== propKey && + (null != propKey$250 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$249) + if (null != propKey$250) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15805,7 +15833,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$249, + propKey$250, nextProps, propKey ); @@ -15813,49 +15841,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$275 in lastProps) - (propKey$249 = lastProps[propKey$275]), - lastProps.hasOwnProperty(propKey$275) && - void 0 !== propKey$249 && - !nextProps.hasOwnProperty(propKey$275) && + for (var propKey$276 in lastProps) + (propKey$250 = lastProps[propKey$276]), + lastProps.hasOwnProperty(propKey$276) && + void 0 !== propKey$250 && + !nextProps.hasOwnProperty(propKey$276) && setPropOnCustomElement( domElement, tag, - propKey$275, + propKey$276, void 0, nextProps, - propKey$249 + propKey$250 ); for (defaultChecked in nextProps) - (propKey$249 = nextProps[defaultChecked]), + (propKey$250 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$249 === propKey || - (void 0 === propKey$249 && void 0 === propKey) || + propKey$250 === propKey || + (void 0 === propKey$250 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$249, + propKey$250, nextProps, propKey ); return; } } - for (var propKey$280 in lastProps) - (propKey$249 = lastProps[propKey$280]), - lastProps.hasOwnProperty(propKey$280) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$280) && - setProp(domElement, tag, propKey$280, null, nextProps, propKey$249); + for (var propKey$281 in lastProps) + (propKey$250 = lastProps[propKey$281]), + lastProps.hasOwnProperty(propKey$281) && + null != propKey$250 && + !nextProps.hasOwnProperty(propKey$281) && + setProp(domElement, tag, propKey$281, null, nextProps, propKey$250); for (lastProp in nextProps) - (propKey$249 = nextProps[lastProp]), + (propKey$250 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$249 === propKey || - (null == propKey$249 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$249, nextProps, propKey); + propKey$250 === propKey || + (null == propKey$250 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$250, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16452,26 +16480,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$288 = getResourcesFromRoot( + var styles$289 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$289 = styles$288.get(type); - resource$289 || + resource$290 = styles$289.get(type); + resource$290 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$289 = { + (resource$290 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$288.set(type, resource$289), - (styles$288 = JSCompiler_inline_result.querySelector( + styles$289.set(type, resource$290), + (styles$289 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$288._p && - ((resource$289.instance = styles$288), - (resource$289.state.loading = 5)), + !styles$289._p && + ((resource$290.instance = styles$289), + (resource$290.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16484,16 +16512,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$288 || + styles$289 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$289.state + resource$290.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$289; + return resource$290; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16590,37 +16618,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$294 = hoistableRoot.querySelector( + var instance$295 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$294) + if (instance$295) return ( (resource.state.loading |= 4), - (resource.instance = instance$294), - markNodeAsHoistable(instance$294), - instance$294 + (resource.instance = instance$295), + markNodeAsHoistable(instance$295), + instance$295 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$294 = ( + instance$295 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$294); - var linkInstance = instance$294; + markNodeAsHoistable(instance$295); + var linkInstance = instance$295; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$294, "link", instance); + setInitialProperties(instance$295, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$294, props.precedence, hoistableRoot); - return (resource.instance = instance$294); + insertStylesheet(instance$295, props.precedence, hoistableRoot); + return (resource.instance = instance$295); case "script": - instance$294 = getScriptKey(props.src); + instance$295 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$294) + getScriptSelectorFromKey(instance$295) )) ) return ( @@ -16629,7 +16657,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$294))) + if ((styleProps = preloadPropsMap.get(instance$295))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17633,16 +17661,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1848 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1853 = React.version; if ( - "19.1.0-www-modern-d4287258-20241217" !== - isomorphicReactPackageVersion$jscomp$inline_1848 + "19.1.0-www-modern-a9bbe346-20241219" !== + isomorphicReactPackageVersion$jscomp$inline_1853 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1848, - "19.1.0-www-modern-d4287258-20241217" + isomorphicReactPackageVersion$jscomp$inline_1853, + "19.1.0-www-modern-a9bbe346-20241219" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17658,27 +17686,27 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_1850 = { +var internals$jscomp$inline_1855 = { bundleType: 0, - version: "19.1.0-www-modern-d4287258-20241217", + version: "19.1.0-www-modern-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; enableSchedulingProfiler && - ((internals$jscomp$inline_1850.getLaneLabelMap = getLaneLabelMap), - (internals$jscomp$inline_1850.injectProfilingHooks = injectProfilingHooks)); + ((internals$jscomp$inline_1855.getLaneLabelMap = getLaneLabelMap), + (internals$jscomp$inline_1855.injectProfilingHooks = injectProfilingHooks)); if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2333 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2341 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2333.isDisabled && - hook$jscomp$inline_2333.supportsFiber + !hook$jscomp$inline_2341.isDisabled && + hook$jscomp$inline_2341.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2333.inject( - internals$jscomp$inline_1850 + (rendererID = hook$jscomp$inline_2341.inject( + internals$jscomp$inline_1855 )), - (injectedHook = hook$jscomp$inline_2333); + (injectedHook = hook$jscomp$inline_2341); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18031,7 +18059,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-d4287258-20241217"; +exports.version = "19.1.0-www-modern-a9bbe346-20241219"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index a792d9536e0ee..d6d687fbf9541 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -9150,5 +9150,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.1.0-www-classic-d4287258-20241217"; + exports.version = "19.1.0-www-classic-a9bbe346-20241219"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 5c26d0999436e..0ef3f531cf9a7 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -8976,5 +8976,5 @@ __DEV__ && 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.1.0-www-modern-d4287258-20241217"; + exports.version = "19.1.0-www-modern-a9bbe346-20241219"; })(); diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 8413be7e7ef2f..13354685cdd44 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5898,4 +5898,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.1.0-www-classic-d4287258-20241217"; +exports.version = "19.1.0-www-classic-a9bbe346-20241219"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index fb523933f7332..5f6480a1ff595 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -5810,4 +5810,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.1.0-www-modern-d4287258-20241217"; +exports.version = "19.1.0-www-modern-a9bbe346-20241219"; diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index d6d844bfcf393..e534067b780db 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -2543,6 +2543,8 @@ __DEV__ && "hr" === tag || "option" === tag || "optgroup" === tag || + "script" === tag || + "template" === tag || "#text" === tag ); case "optgroup": @@ -3796,6 +3798,18 @@ __DEV__ && nextHydratableInstance = hydrationParentFiber = null; didSuspendOrErrorDEV = isHydrating = !1; } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) @@ -3812,88 +3826,241 @@ __DEV__ && diffRoot )); } - function finishQueueingConcurrentUpdates() { + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; + } + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + push(rendererCursorDEV, context._currentRenderer, providerFiber); + void 0 !== context._currentRenderer && + null !== context._currentRenderer && + context._currentRenderer !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ); + context._currentRenderer = rendererSigil; + } + function popProvider(context, providerFiber) { + context._currentValue = valueCursor.current; + var currentRenderer = rendererCursorDEV.current; + pop(rendererCursorDEV, providerFiber); + context._currentRenderer = currentRenderer; + pop(valueCursor, providerFiber); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); - } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); + } + function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function pushNestedEffectDurations() { var prevEffectDuration = profilerEffectDuration; @@ -4219,86 +4386,328 @@ __DEV__ && ); return thenableWithOverride; } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } - function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions, offscreenWorkInProgress) + : null === newTransitions + ? push( + transitionStack, + transitionStack.current, + offscreenWorkInProgress + ) + : push( + transitionStack, + transitionStack.current.concat(newTransitions), + offscreenWorkInProgress + )); } - function createUpdate(lane) { - return { - lane: lane, - tag: UpdateState, - payload: null, - callback: null, - next: null - }; + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack, workInProgress), + pop(resumedCache, workInProgress)); } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - currentlyProcessingQueue === updateQueue && - !didWarnUpdateInsideUpdate - ) { - var componentName = getComponentNameFromFiber(fiber); - error$jscomp$0( - "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", - componentName - ); - didWarnUpdateInsideUpdate = !0; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - if ((executionContext & RenderContext) !== NoContext) - return ( - (componentName = updateQueue.pending), - null === componentName - ? (update.next = update) - : ((update.next = componentName.next), - (componentName.next = update)), - (updateQueue.pending = update), - (update = getRootForUpdatedFiber(fiber)), - markUpdateLaneFromFiberToRoot(fiber, null, lane), - update - ); - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); + return !0; } - function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop$3() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), + error$jscomp$0( + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop$3, noop$3), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) + thenable.then(noop$3, noop$3); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; } } - function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error( + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); + } + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); + } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); + } + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; + } + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; + } + function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); + } + function createUpdate(lane) { + return { + lane: lane, + tag: UpdateState, + payload: null, + callback: null, + next: null + }; + } + function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if ( + currentlyProcessingQueue === updateQueue && + !didWarnUpdateInsideUpdate + ) { + var componentName = getComponentNameFromFiber(fiber); + error$jscomp$0( + "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", + componentName + ); + didWarnUpdateInsideUpdate = !0; + } + if ((executionContext & RenderContext) !== NoContext) + return ( + (componentName = updateQueue.pending), + null === componentName + ? (update.next = update) + : ((update.next = componentName.next), + (componentName.next = update)), + (updateQueue.pending = update), + (update = getRootForUpdatedFiber(fiber)), + markUpdateLaneFromFiberToRoot(fiber, null, lane), + update + ); + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } + } + function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { do { var clone = { lane: queue.lane, @@ -4523,198 +4932,77 @@ __DEV__ && ) callCallback(callbacks[updateQueue], context); } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; + function pushHiddenContext(fiber, context) { + var prevEntangledRenderLanes = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); + push(currentTreeHiddenStackCursor, context, fiber); + entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + } + function reuseHiddenContextOnStack(fiber) { + push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); + push( + currentTreeHiddenStackCursor, + currentTreeHiddenStackCursor.current, + fiber + ); + } + function popHiddenContext(fiber) { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor, fiber); + pop(prevEntangledRenderLanesCursor, fiber); + } + function mountHookTypesDev() { + var hookName = currentHookNameInDev; + null === hookTypesDev + ? (hookTypesDev = [hookName]) + : hookTypesDev.push(hookName); + } + function updateHookTypesDev() { + var hookName = currentHookNameInDev; if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; + null !== hookTypesDev && + (hookTypesUpdateIndexDev++, + hookTypesDev[hookTypesUpdateIndexDev] !== hookName) + ) { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; + !didWarnAboutMismatchedHooksForComponent.has(componentName) && + (didWarnAboutMismatchedHooksForComponent.add(componentName), + null !== hookTypesDev) + ) { + for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i], + newHookName = + i === hookTypesUpdateIndexDev ? hookName : oldHookName; + for ( + oldHookName = i + 1 + ". " + oldHookName; + 30 > oldHookName.length; + + ) + oldHookName += " "; + oldHookName += newHookName + "\n"; + table += oldHookName; + } + error$jscomp$0( + "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + componentName, + table + ); + } } - return !0; } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop$3() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop$3, noop$3), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) - thenable.then(noop$3, noop$3); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; - } - } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - } - function pushHiddenContext(fiber, context) { - var prevEntangledRenderLanes = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); - push(currentTreeHiddenStackCursor, context, fiber); - entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; - } - function reuseHiddenContextOnStack(fiber) { - push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); - push( - currentTreeHiddenStackCursor, - currentTreeHiddenStackCursor.current, - fiber - ); - } - function popHiddenContext(fiber) { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor, fiber); - pop(prevEntangledRenderLanesCursor, fiber); - } - function mountHookTypesDev() { - var hookName = currentHookNameInDev; - null === hookTypesDev - ? (hookTypesDev = [hookName]) - : hookTypesDev.push(hookName); - } - function updateHookTypesDev() { - var hookName = currentHookNameInDev; - if ( - null !== hookTypesDev && - (hookTypesUpdateIndexDev++, - hookTypesDev[hookTypesUpdateIndexDev] !== hookName) - ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); - if ( - !didWarnAboutMismatchedHooksForComponent.has(componentName) && - (didWarnAboutMismatchedHooksForComponent.add(componentName), - null !== hookTypesDev) - ) { - for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { - var oldHookName = hookTypesDev[i], - newHookName = - i === hookTypesUpdateIndexDev ? hookName : oldHookName; - for ( - oldHookName = i + 1 + ". " + oldHookName; - 30 > oldHookName.length; - - ) - oldHookName += " "; - oldHookName += newHookName + "\n"; - table += oldHookName; - } - error$jscomp$0( - "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - componentName, - table - ); - } - } - } - function checkDepsAreArrayDev(deps) { - void 0 === deps || - null === deps || - isArrayImpl(deps) || - error$jscomp$0( - "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", - currentHookNameInDev, - typeof deps - ); + function checkDepsAreArrayDev(deps) { + void 0 === deps || + null === deps || + isArrayImpl(deps) || + error$jscomp$0( + "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", + currentHookNameInDev, + typeof deps + ); } function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), error$jscomp$0( @@ -4757,7 +5045,7 @@ __DEV__ && nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; hookTypesDev = null !== current ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -4768,9 +5056,7 @@ __DEV__ && "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component) ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), error$jscomp$0( @@ -4830,7 +5116,7 @@ __DEV__ && currentHookNameInDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; null !== current && @@ -4865,7 +5151,7 @@ __DEV__ && ))); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -4900,7 +5186,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -4933,7 +5219,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -4950,26 +5236,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -4984,7 +5270,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -4998,7 +5284,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -5019,10 +5305,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -5040,7 +5326,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -5088,7 +5374,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -5166,7 +5452,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -5187,7 +5473,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -5234,7 +5520,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -5291,7 +5577,7 @@ __DEV__ && getSnapshot, getServerSnapshot ) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -5352,10 +5638,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -5413,11 +5699,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -5434,7 +5716,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -5590,7 +5872,7 @@ __DEV__ && var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var isMatching = currentlyRenderingFiber$1; + var isMatching = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -5646,14 +5928,14 @@ __DEV__ && ssrFormState.queue = isMatching; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, isMatching ); isMatching.dispatch = ssrFormState; isMatching = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, isMatching.queue ); @@ -5667,7 +5949,7 @@ __DEV__ && isMatching.queue = markerInstance; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, markerInstance, inRootOrSingleton, ssrFormState @@ -5703,7 +5985,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -5765,10 +6047,10 @@ __DEV__ && }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -5791,7 +6073,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -5807,7 +6089,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -5816,8 +6098,8 @@ __DEV__ && ))); } function mountEffect(create, deps) { - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } @@ -5829,12 +6111,12 @@ __DEV__ && destroy ) { if ( - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ) { var hookFlags = Passive, hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 142608384; + currentlyRenderingFiber.flags |= 142608384; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -5849,7 +6131,7 @@ __DEV__ && } else (hookFlags = Passive), (hook = mountWorkInProgressHook()), - (currentlyRenderingFiber$1.flags |= 8390656), + (currentlyRenderingFiber.flags |= 8390656), (inst = createEffectInstance()), (inst.destroy = destroy), (hook.memoizedState = pushResourceEffect( @@ -5905,7 +6187,7 @@ __DEV__ && } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= fiberFlags); + (currentlyRenderingFiber.flags |= fiberFlags); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? hookFlags : HasEffect | hookFlags, isUpdateDepsSame ? hookFlags : HasEffect | hookFlags, @@ -5917,11 +6199,11 @@ __DEV__ && ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -5955,7 +6237,7 @@ __DEV__ && } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } @@ -5989,7 +6271,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, @@ -6090,7 +6372,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -6105,7 +6387,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -6250,7 +6532,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -6304,7 +6586,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -6329,19 +6611,15 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, + args = requestUpdateLane(fiber); + var update = { + lane: args, revertLane: 0, action: action, hasEagerState: !1, @@ -6349,46 +6627,22 @@ __DEV__ && next: null }; isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -6473,8 +6727,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -9316,32 +9570,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2518; - var JSCompiler_object_inline_stack_2519 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2524; + var JSCompiler_object_inline_stack_2525 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2520 = !1; + var JSCompiler_object_inline_componentStack_2526 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2518 = didSuspend) || - (JSCompiler_object_inline_digest_2518 = + (JSCompiler_object_inline_digest_2524 = didSuspend) || + (JSCompiler_object_inline_digest_2524 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2518 && - ((JSCompiler_object_inline_componentStack_2520 = !0), + JSCompiler_object_inline_digest_2524 && + ((JSCompiler_object_inline_componentStack_2526 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2518 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2524 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2520 + JSCompiler_object_inline_componentStack_2526 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2517 = nextHydratableInstance; + var JSCompiler_object_inline_message_2523 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2517)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2523)) { c: { - var instance = JSCompiler_object_inline_message_2517; + var instance = JSCompiler_object_inline_message_2523; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9367,7 +9621,8 @@ __DEV__ && null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (instance = createFiber(18, null, null, NoMode)), (instance.stateNode = JSCompiler_temp), @@ -9382,46 +9637,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2517 + JSCompiler_object_inline_message_2523 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2517 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2523 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2517 && - ((JSCompiler_object_inline_message_2517 = - JSCompiler_object_inline_message_2517.dehydrated), - null !== JSCompiler_object_inline_message_2517) + null !== JSCompiler_object_inline_message_2523 && + ((JSCompiler_object_inline_message_2523 = + JSCompiler_object_inline_message_2523.dehydrated), + null !== JSCompiler_object_inline_message_2523) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2517) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2523) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2517 = - JSCompiler_object_inline_stack_2519.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2519.fallback; - if (JSCompiler_object_inline_componentStack_2520) + JSCompiler_object_inline_message_2523 = + JSCompiler_object_inline_stack_2525.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2525.fallback; + if (JSCompiler_object_inline_componentStack_2526) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2519 = + (JSCompiler_object_inline_stack_2525 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2517, + JSCompiler_object_inline_message_2523, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2520 = + (JSCompiler_object_inline_componentStack_2526 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2520.memoizedState = + (JSCompiler_object_inline_componentStack_2526.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2520.childLanes = + (JSCompiler_object_inline_componentStack_2526.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2518, + JSCompiler_object_inline_digest_2524, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9434,9 +9689,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2520.updateQueue), + JSCompiler_object_inline_componentStack_2526.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2520.updateQueue = + ? (JSCompiler_object_inline_componentStack_2526.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9444,46 +9699,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2519 + JSCompiler_object_inline_stack_2525 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2519.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2525.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2519 = + (JSCompiler_object_inline_stack_2525 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2517, + JSCompiler_object_inline_message_2523, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2520 = + (JSCompiler_object_inline_componentStack_2526 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2520.memoizedState = + (JSCompiler_object_inline_componentStack_2526.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2520.childLanes = + (JSCompiler_object_inline_componentStack_2526.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2518, + JSCompiler_object_inline_digest_2524, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2519 + JSCompiler_object_inline_stack_2525 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2517 + JSCompiler_object_inline_message_2523 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2517 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2517) + ((JSCompiler_object_inline_message_2523 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2523) ) { if (didSuspend) workInProgress.flags & 256 @@ -9500,94 +9755,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2520 = - JSCompiler_object_inline_stack_2519.fallback), - (JSCompiler_object_inline_message_2517 = workInProgress.mode), - (JSCompiler_object_inline_stack_2519 = + (JSCompiler_object_inline_componentStack_2526 = + JSCompiler_object_inline_stack_2525.fallback), + (JSCompiler_object_inline_message_2523 = workInProgress.mode), + (JSCompiler_object_inline_stack_2525 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2519.children + children: JSCompiler_object_inline_stack_2525.children }, - JSCompiler_object_inline_message_2517 + JSCompiler_object_inline_message_2523 )), - (JSCompiler_object_inline_componentStack_2520 = + (JSCompiler_object_inline_componentStack_2526 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2520, - JSCompiler_object_inline_message_2517, + JSCompiler_object_inline_componentStack_2526, + JSCompiler_object_inline_message_2523, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2520.flags |= 2), - (JSCompiler_object_inline_stack_2519.return = workInProgress), - (JSCompiler_object_inline_componentStack_2520.return = + (JSCompiler_object_inline_componentStack_2526.flags |= 2), + (JSCompiler_object_inline_stack_2525.return = workInProgress), + (JSCompiler_object_inline_componentStack_2526.return = workInProgress), - (JSCompiler_object_inline_stack_2519.sibling = - JSCompiler_object_inline_componentStack_2520), - (workInProgress.child = JSCompiler_object_inline_stack_2519), + (JSCompiler_object_inline_stack_2525.sibling = + JSCompiler_object_inline_componentStack_2526), + (workInProgress.child = JSCompiler_object_inline_stack_2525), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2519 = workInProgress.child), - (JSCompiler_object_inline_stack_2519.memoizedState = + (JSCompiler_object_inline_stack_2525 = workInProgress.child), + (JSCompiler_object_inline_stack_2525.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2519.childLanes = + (JSCompiler_object_inline_stack_2525.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2518, + JSCompiler_object_inline_digest_2524, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2520)); + JSCompiler_object_inline_componentStack_2526)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2517)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2523)) ) { - JSCompiler_object_inline_digest_2518 = - JSCompiler_object_inline_message_2517.nextSibling && - JSCompiler_object_inline_message_2517.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2518) { - JSCompiler_temp = JSCompiler_object_inline_digest_2518.dgst; - var message = JSCompiler_object_inline_digest_2518.msg; - instance = JSCompiler_object_inline_digest_2518.stck; - var componentStack = JSCompiler_object_inline_digest_2518.cstck; + JSCompiler_object_inline_digest_2524 = + JSCompiler_object_inline_message_2523.nextSibling && + JSCompiler_object_inline_message_2523.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2524) { + JSCompiler_temp = JSCompiler_object_inline_digest_2524.dgst; + var message = JSCompiler_object_inline_digest_2524.msg; + instance = JSCompiler_object_inline_digest_2524.stck; + var componentStack = JSCompiler_object_inline_digest_2524.cstck; } - JSCompiler_object_inline_message_2517 = message; - JSCompiler_object_inline_digest_2518 = JSCompiler_temp; - JSCompiler_object_inline_stack_2519 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2520 = + JSCompiler_object_inline_message_2523 = message; + JSCompiler_object_inline_digest_2524 = JSCompiler_temp; + JSCompiler_object_inline_stack_2525 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2526 = componentStack; - JSCompiler_object_inline_componentStack_2520 = - JSCompiler_object_inline_message_2517 - ? Error(JSCompiler_object_inline_message_2517) + JSCompiler_object_inline_componentStack_2526 = + JSCompiler_object_inline_message_2523 + ? Error(JSCompiler_object_inline_message_2523) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2520.stack = - JSCompiler_object_inline_stack_2519 || ""; - JSCompiler_object_inline_componentStack_2520.digest = - JSCompiler_object_inline_digest_2518; - JSCompiler_object_inline_digest_2518 = + JSCompiler_object_inline_componentStack_2526.stack = + JSCompiler_object_inline_stack_2525 || ""; + JSCompiler_object_inline_componentStack_2526.digest = + JSCompiler_object_inline_digest_2524; + JSCompiler_object_inline_digest_2524 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2519 = { - value: JSCompiler_object_inline_componentStack_2520, + JSCompiler_object_inline_stack_2525 = { + value: JSCompiler_object_inline_componentStack_2526, source: null, - stack: JSCompiler_object_inline_digest_2518 + stack: JSCompiler_object_inline_digest_2524 }; - "string" === typeof JSCompiler_object_inline_digest_2518 && + "string" === typeof JSCompiler_object_inline_digest_2524 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2520, - JSCompiler_object_inline_stack_2519 + JSCompiler_object_inline_componentStack_2526, + JSCompiler_object_inline_stack_2525 ); - queueHydrationError(JSCompiler_object_inline_stack_2519); + queueHydrationError(JSCompiler_object_inline_stack_2525); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9601,44 +9856,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2518 = + (JSCompiler_object_inline_digest_2524 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2518) + didReceiveUpdate || JSCompiler_object_inline_digest_2524) ) { - JSCompiler_object_inline_digest_2518 = workInProgressRoot; + JSCompiler_object_inline_digest_2524 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2518 && - ((JSCompiler_object_inline_stack_2519 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2519 = - 0 !== (JSCompiler_object_inline_stack_2519 & 42) + null !== JSCompiler_object_inline_digest_2524 && + ((JSCompiler_object_inline_stack_2525 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2525 = + 0 !== (JSCompiler_object_inline_stack_2525 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2519 + JSCompiler_object_inline_stack_2525 )), - (JSCompiler_object_inline_stack_2519 = + (JSCompiler_object_inline_stack_2525 = 0 !== - (JSCompiler_object_inline_stack_2519 & - (JSCompiler_object_inline_digest_2518.suspendedLanes | + (JSCompiler_object_inline_stack_2525 & + (JSCompiler_object_inline_digest_2524.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2519), - 0 !== JSCompiler_object_inline_stack_2519 && - JSCompiler_object_inline_stack_2519 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2525), + 0 !== JSCompiler_object_inline_stack_2525 && + JSCompiler_object_inline_stack_2525 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2519), + ((prevState.retryLane = JSCompiler_object_inline_stack_2525), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2519 + JSCompiler_object_inline_stack_2525 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2518, + JSCompiler_object_inline_digest_2524, current, - JSCompiler_object_inline_stack_2519 + JSCompiler_object_inline_stack_2525 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2517.data === + JSCompiler_object_inline_message_2523.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9646,14 +9901,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2517.data === + JSCompiler_object_inline_message_2523.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2517.nextSibling + JSCompiler_object_inline_message_2523.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9671,57 +9926,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2519.children + JSCompiler_object_inline_stack_2525.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2520) + if (JSCompiler_object_inline_componentStack_2526) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2520 = - JSCompiler_object_inline_stack_2519.fallback), - (JSCompiler_object_inline_message_2517 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2526 = + JSCompiler_object_inline_stack_2525.fallback), + (JSCompiler_object_inline_message_2523 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2519 = createWorkInProgress( + (JSCompiler_object_inline_stack_2525 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2519.children + children: JSCompiler_object_inline_stack_2525.children } )), - (JSCompiler_object_inline_stack_2519.subtreeFlags = + (JSCompiler_object_inline_stack_2525.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2520 = + ? (JSCompiler_object_inline_componentStack_2526 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2520 + JSCompiler_object_inline_componentStack_2526 )) - : ((JSCompiler_object_inline_componentStack_2520 = + : ((JSCompiler_object_inline_componentStack_2526 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2520, - JSCompiler_object_inline_message_2517, + JSCompiler_object_inline_componentStack_2526, + JSCompiler_object_inline_message_2523, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2520.flags |= 2)), - (JSCompiler_object_inline_componentStack_2520.return = + (JSCompiler_object_inline_componentStack_2526.flags |= 2)), + (JSCompiler_object_inline_componentStack_2526.return = workInProgress), - (JSCompiler_object_inline_stack_2519.return = workInProgress), - (JSCompiler_object_inline_stack_2519.sibling = - JSCompiler_object_inline_componentStack_2520), - (workInProgress.child = JSCompiler_object_inline_stack_2519), - (JSCompiler_object_inline_stack_2519 = - JSCompiler_object_inline_componentStack_2520), - (JSCompiler_object_inline_componentStack_2520 = workInProgress.child), - (JSCompiler_object_inline_message_2517 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2517 - ? (JSCompiler_object_inline_message_2517 = + (JSCompiler_object_inline_stack_2525.return = workInProgress), + (JSCompiler_object_inline_stack_2525.sibling = + JSCompiler_object_inline_componentStack_2526), + (workInProgress.child = JSCompiler_object_inline_stack_2525), + (JSCompiler_object_inline_stack_2525 = + JSCompiler_object_inline_componentStack_2526), + (JSCompiler_object_inline_componentStack_2526 = workInProgress.child), + (JSCompiler_object_inline_message_2523 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2523 + ? (JSCompiler_object_inline_message_2523 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2517.cachePool), + JSCompiler_object_inline_message_2523.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9729,34 +9984,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2517 = { + (JSCompiler_object_inline_message_2523 = { baseLanes: - JSCompiler_object_inline_message_2517.baseLanes | renderLanes, + JSCompiler_object_inline_message_2523.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2520.memoizedState = - JSCompiler_object_inline_message_2517), + (JSCompiler_object_inline_componentStack_2526.memoizedState = + JSCompiler_object_inline_message_2523), enableTransitionTracing && - ((JSCompiler_object_inline_message_2517 = enableTransitionTracing + ((JSCompiler_object_inline_message_2523 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2517 && + null !== JSCompiler_object_inline_message_2523 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2520.updateQueue), + JSCompiler_object_inline_componentStack_2526.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2520.updateQueue = { - transitions: JSCompiler_object_inline_message_2517, + ? (JSCompiler_object_inline_componentStack_2526.updateQueue = { + transitions: JSCompiler_object_inline_message_2523, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2520.updateQueue = + ? (JSCompiler_object_inline_componentStack_2526.updateQueue = { - transitions: JSCompiler_object_inline_message_2517, + transitions: JSCompiler_object_inline_message_2523, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9764,32 +10019,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2517), + JSCompiler_object_inline_message_2523), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2520.childLanes = + (JSCompiler_object_inline_componentStack_2526.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2518, + JSCompiler_object_inline_digest_2524, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2519 + JSCompiler_object_inline_stack_2525 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2519.children + children: JSCompiler_object_inline_stack_2525.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2518 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2518 + ((JSCompiler_object_inline_digest_2524 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2524 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2518.push(current)); + : JSCompiler_object_inline_digest_2524.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10920,372 +11175,96 @@ __DEV__ && null === prevSibling && ((prevSibling = workInProgressRoot), (nextProps = createCache()), - (prevSibling.pooledCache = nextProps), - retainCache(nextProps), - null !== nextProps && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = nextProps)), - (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), - (nextProps = 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 = nextProps.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current - ? ((returnFiber = enableTransitionTracing - ? transitionStack.current - : null), - null !== returnFiber && - ((returnFiber = { - tag: TransitionTracingMarker, - transitions: new Set(returnFiber), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = returnFiber), - (workInProgress.flags |= 2048))) - : current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ), - (returnFiber = workInProgress.stateNode), - null !== returnFiber && - pushMarkerInstance(workInProgress, returnFiber), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); - } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue, providerFiber); - context._currentValue = nextValue; - push(rendererCursorDEV, context._currentRenderer, providerFiber); - void 0 !== context._currentRenderer && - null !== context._currentRenderer && - context._currentRenderer !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ); - context._currentRenderer = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue = valueCursor.current; - var currentRenderer = rendererCursorDEV.current; - pop(rendererCursorDEV, providerFiber); - context._currentRenderer = currentRenderer; - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions, offscreenWorkInProgress) - : null === newTransitions - ? push( - transitionStack, - transitionStack.current, - offscreenWorkInProgress - ) - : push( - transitionStack, - transitionStack.current.concat(newTransitions), - offscreenWorkInProgress - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack, workInProgress), - pop(resumedCache, workInProgress)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + (prevSibling.pooledCache = nextProps), + retainCache(nextProps), + null !== nextProps && + (prevSibling.pooledCacheLanes |= renderLanes), + (prevSibling = nextProps)), + (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), + (nextProps = 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 = nextProps.cache), + pushProvider(workInProgress, CacheContext, returnFiber), + returnFiber !== prevSibling.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; + } + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } function collectScopedNodesFromChildren( startingChild, @@ -11533,13 +11512,13 @@ __DEV__ && null ); case 3: - newProps = workInProgress.stateNode; + renderLanes = workInProgress.stateNode; enableTransitionTracing && null !== workInProgressTransitions && (workInProgress.flags |= 2048); - renderLanes = null; - null !== current && (renderLanes = current.memoizedState.cache); - workInProgress.memoizedState.cache !== renderLanes && + newProps = null; + null !== current && (newProps = current.memoizedState.cache); + workInProgress.memoizedState.cache !== newProps && (workInProgress.flags |= 2048); popProvider(CacheContext, workInProgress); enableTransitionTracing && @@ -11548,9 +11527,9 @@ __DEV__ && enableTransitionTracing && pop(transitionStack, workInProgress); popHostContainer(workInProgress); popTopLevelContextObject(workInProgress); - newProps.pendingContext && - ((newProps.context = newProps.pendingContext), - (newProps.pendingContext = null)); + renderLanes.pendingContext && + ((renderLanes.context = renderLanes.pendingContext), + (renderLanes.pendingContext = null)); if (null === current || null === current.child) popHydrationState(workInProgress) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress)) @@ -11558,9 +11537,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -11778,9 +11755,9 @@ __DEV__ && renderLanes = getHostContext(); if (popHydrationState(workInProgress)) { current = workInProgress.stateNode; - newProps = workInProgress.memoizedProps; + renderLanes = workInProgress.memoizedProps; _type = !didSuspendOrErrorDEV; - renderLanes = null; + newProps = null; var returnFiber = hydrationParentFiber; if (null !== returnFiber) switch (returnFiber.tag) { @@ -11788,8 +11765,8 @@ __DEV__ && _type && ((_type = diffHydratedTextForDevWarnings( current, - newProps, - renderLanes + renderLanes, + newProps )), null !== _type && (buildHydrationDiffNode(workInProgress, 0).serverProps = @@ -11797,12 +11774,12 @@ __DEV__ && break; case 27: case 5: - (renderLanes = returnFiber.memoizedProps), + (newProps = returnFiber.memoizedProps), _type && ((_type = diffHydratedTextForDevWarnings( current, - newProps, - renderLanes + renderLanes, + newProps )), null !== _type && (buildHydrationDiffNode( @@ -11812,10 +11789,10 @@ __DEV__ && } current[internalInstanceKey] = workInProgress; current = - current.nodeValue === newProps || - (null !== renderLanes && - !0 === renderLanes.suppressHydrationWarning) || - checkForUnmatchedText(current.nodeValue, newProps) + current.nodeValue === renderLanes || + (null !== newProps && + !0 === newProps.suppressHydrationWarning) || + checkForUnmatchedText(current.nodeValue, renderLanes) ? !0 : !1; !current && @@ -11877,9 +11854,10 @@ __DEV__ && _type.treeBaseDuration)); _type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (_type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = _type), (_type = !0); if (!_type) { if (workInProgress.flags & 256) @@ -11896,30 +11874,30 @@ __DEV__ && transferActualDuration(workInProgress), workInProgress ); - newProps = null !== newProps; + renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - newProps && - ((renderLanes = workInProgress.child), + renderLanes && + ((newProps = workInProgress.child), (_type = null), - null !== renderLanes.alternate && - null !== renderLanes.alternate.memoizedState && - null !== renderLanes.alternate.memoizedState.cachePool && - (_type = renderLanes.alternate.memoizedState.cachePool.pool), + null !== newProps.alternate && + null !== newProps.alternate.memoizedState && + null !== newProps.alternate.memoizedState.cachePool && + (_type = newProps.alternate.memoizedState.cachePool.pool), (returnFiber = null), - null !== renderLanes.memoizedState && - null !== renderLanes.memoizedState.cachePool && - (returnFiber = renderLanes.memoizedState.cachePool.pool), - returnFiber !== _type && (renderLanes.flags |= 2048)); - newProps !== current && + null !== newProps.memoizedState && + null !== newProps.memoizedState.cachePool && + (returnFiber = newProps.memoizedState.cachePool.pool), + returnFiber !== _type && (newProps.flags |= 2048)); + renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), - newProps && (workInProgress.child.flags |= 8192)); + renderLanes && (workInProgress.child.flags |= 8192)); scheduleRetryEffect(workInProgress, workInProgress.updateQueue); null !== workInProgress.updateQueue && null != workInProgress.memoizedProps.suspenseCallback && (workInProgress.flags |= 4); bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - newProps && + renderLanes && ((current = workInProgress.child), null !== current && (workInProgress.treeBaseDuration -= current.treeBaseDuration)); @@ -11968,9 +11946,13 @@ __DEV__ && scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; current = renderLanes; - for (newProps = workInProgress.child; null !== newProps; ) - resetWorkInProgress(newProps, current), - (newProps = newProps.sibling); + for ( + renderLanes = workInProgress.child; + null !== renderLanes; + + ) + resetWorkInProgress(renderLanes, current), + (renderLanes = renderLanes.sibling); push( suspenseStackCursor, (suspenseStackCursor.current & @@ -12075,27 +12057,27 @@ __DEV__ && workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192)) : bubbleProperties(workInProgress), - (newProps = workInProgress.updateQueue), - null !== newProps && - scheduleRetryEffect(workInProgress, newProps.retryQueue), - (newProps = null), + (renderLanes = workInProgress.updateQueue), + null !== renderLanes && + scheduleRetryEffect(workInProgress, renderLanes.retryQueue), + (renderLanes = null), null !== current && null !== current.memoizedState && null !== current.memoizedState.cachePool && - (newProps = current.memoizedState.cachePool.pool), - (renderLanes = null), + (renderLanes = current.memoizedState.cachePool.pool), + (newProps = null), null !== workInProgress.memoizedState && null !== workInProgress.memoizedState.cachePool && - (renderLanes = workInProgress.memoizedState.cachePool.pool), - renderLanes !== newProps && (workInProgress.flags |= 2048), + (newProps = workInProgress.memoizedState.cachePool.pool), + newProps !== renderLanes && (workInProgress.flags |= 2048), popTransition(workInProgress, current), null ); case 24: return ( - (newProps = null), - null !== current && (newProps = current.memoizedState.cache), - workInProgress.memoizedState.cache !== newProps && + (renderLanes = null), + null !== current && (renderLanes = current.memoizedState.cache), + workInProgress.memoizedState.cache !== renderLanes && (workInProgress.flags |= 2048), popProvider(CacheContext, workInProgress), bubbleProperties(workInProgress), @@ -14870,6 +14852,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -15825,7 +15815,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = errorRetryLanes$jscomp$0; } @@ -15941,14 +15937,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -16150,7 +16138,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -16811,9 +16799,6 @@ __DEV__ && throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -16828,58 +16813,64 @@ __DEV__ && root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - (suspendedRetryLanes = commitBeforeMutationEffects( - root, - finishedWork - )), - commitMutationEffects(root, finishedWork, lanes), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = DiscreteEventPriority; + suspendedRetryLanes = executionContext; + executionContext |= CommitContext; + var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffects(root, finishedWork, lanes); + shouldFireAfterActiveInstanceBlur && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + (transitions = spawnedLane) + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : (releaseRootPooledCache(root, remainingLanes), @@ -16891,7 +16882,6 @@ __DEV__ && onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -16899,14 +16889,15 @@ __DEV__ && finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), + (spawnedLane = makeErrorInfo(remainingLanes.stack)), runWithFiberInDEV( remainingLanes.source, renderPriorityLevel, remainingLanes.value, - transitions + spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -17268,7 +17259,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -24932,9 +24923,42 @@ __DEV__ && StrictLegacyMode = 8, StrictEffectsMode = 16, NoStrictPassiveEffectsMode = 64, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var rendererCursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, @@ -24954,14 +24978,17 @@ __DEV__ && currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, flushPendingUnsafeLifecycleWarnings: function () {}, @@ -25179,6 +25206,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -25189,7 +25227,7 @@ __DEV__ && var ResourceEffectIdentityKind = 0, ResourceEffectUpdateKind = 1, renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -26731,55 +26769,13 @@ __DEV__ && var didWarnAboutTailOptions = {}; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var rendererCursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), + hasWarnedAboutUsingNoValuePropOnContextProvider = !1, emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -26874,7 +26870,6 @@ __DEV__ && currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -27713,11 +27708,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-classic-d4287258-20241217" !== isomorphicReactPackageVersion) + if ("19.1.0-www-classic-a9bbe346-20241219" !== 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.1.0-www-classic-d4287258-20241217\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-classic-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27760,10 +27755,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-d4287258-20241217", + version: "19.1.0-www-classic-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27800,52 +27795,43 @@ __DEV__ && ); } ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = - function (children, JSCompiler_OptimizeArgumentsArray_p2) { + function (children) { var root = this._internalRoot; if (null === root) throw Error("Cannot update an unmounted root."); - "function" === typeof JSCompiler_OptimizeArgumentsArray_p2 + var args = arguments; + "function" === typeof args[1] ? error$jscomp$0( "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()." ) - : isValidContainer(JSCompiler_OptimizeArgumentsArray_p2) + : isValidContainer(args[1]) ? error$jscomp$0( "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root." ) - : "undefined" !== typeof JSCompiler_OptimizeArgumentsArray_p2 && + : "undefined" !== typeof args[1] && error$jscomp$0( "You passed a second argument to root.render(...) but it only accepts one argument." ); - JSCompiler_OptimizeArgumentsArray_p2 = root.current; - var lane = requestUpdateLane(JSCompiler_OptimizeArgumentsArray_p2); - updateContainerImpl( - JSCompiler_OptimizeArgumentsArray_p2, - lane, - children, - root, - null, - null - ); + args = children; + var current = root.current, + lane = requestUpdateLane(current); + updateContainerImpl(current, lane, args, root, null, null); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = - function (JSCompiler_OptimizeArgumentsArray_p3) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p3 && + function () { + var args = arguments; + "function" === typeof args[0] && error$jscomp$0( "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p3 = this._internalRoot; - if (null !== JSCompiler_OptimizeArgumentsArray_p3) { + args = this._internalRoot; + if (null !== args) { this._internalRoot = null; - var container = JSCompiler_OptimizeArgumentsArray_p3.containerInfo; + var container = args.containerInfo; (executionContext & (RenderContext | CommitContext)) !== NoContext && error$jscomp$0( "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition." ); - updateContainerSync( - null, - JSCompiler_OptimizeArgumentsArray_p3, - null, - null - ); + updateContainerSync(null, args, null, null); flushSyncWork$1(); container[internalContainerInstanceKey] = null; } @@ -28536,5 +28522,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-classic-d4287258-20241217"; + exports.version = "19.1.0-www-classic-a9bbe346-20241219"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 321a3efe7f59b..23dffc7849af9 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -2529,6 +2529,8 @@ __DEV__ && "hr" === tag || "option" === tag || "optgroup" === tag || + "script" === tag || + "template" === tag || "#text" === tag ); case "optgroup": @@ -3683,6 +3685,18 @@ __DEV__ && nextHydratableInstance = hydrationParentFiber = null; didSuspendOrErrorDEV = isHydrating = !1; } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) @@ -3699,88 +3713,241 @@ __DEV__ && diffRoot )); } - function finishQueueingConcurrentUpdates() { + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; + } + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue, providerFiber); + context._currentValue = nextValue; + push(rendererCursorDEV, context._currentRenderer, providerFiber); + void 0 !== context._currentRenderer && + null !== context._currentRenderer && + context._currentRenderer !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ); + context._currentRenderer = rendererSigil; + } + function popProvider(context, providerFiber) { + context._currentValue = valueCursor.current; + var currentRenderer = rendererCursorDEV.current; + pop(rendererCursorDEV, providerFiber); + context._currentRenderer = currentRenderer; + pop(valueCursor, providerFiber); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); - } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); + } + function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function pushNestedEffectDurations() { var prevEffectDuration = profilerEffectDuration; @@ -4106,86 +4273,328 @@ __DEV__ && ); return thenableWithOverride; } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } - function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions, offscreenWorkInProgress) + : null === newTransitions + ? push( + transitionStack, + transitionStack.current, + offscreenWorkInProgress + ) + : push( + transitionStack, + transitionStack.current.concat(newTransitions), + offscreenWorkInProgress + )); } - function createUpdate(lane) { - return { - lane: lane, - tag: UpdateState, - payload: null, - callback: null, - next: null - }; + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack, workInProgress), + pop(resumedCache, workInProgress)); } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - currentlyProcessingQueue === updateQueue && - !didWarnUpdateInsideUpdate - ) { - var componentName = getComponentNameFromFiber(fiber); - error$jscomp$0( - "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", - componentName - ); - didWarnUpdateInsideUpdate = !0; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - if ((executionContext & RenderContext) !== NoContext) - return ( - (componentName = updateQueue.pending), - null === componentName - ? (update.next = update) - : ((update.next = componentName.next), - (componentName.next = update)), - (updateQueue.pending = update), - (update = getRootForUpdatedFiber(fiber)), - markUpdateLaneFromFiberToRoot(fiber, null, lane), - update - ); - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); + return !0; } - function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop$3() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), + error$jscomp$0( + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop$3, noop$3), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) + thenable.then(noop$3, noop$3); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; } } - function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error( + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); + } + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); + } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); + } + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; + } + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; + } + function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); + } + function createUpdate(lane) { + return { + lane: lane, + tag: UpdateState, + payload: null, + callback: null, + next: null + }; + } + function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if ( + currentlyProcessingQueue === updateQueue && + !didWarnUpdateInsideUpdate + ) { + var componentName = getComponentNameFromFiber(fiber); + error$jscomp$0( + "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", + componentName + ); + didWarnUpdateInsideUpdate = !0; + } + if ((executionContext & RenderContext) !== NoContext) + return ( + (componentName = updateQueue.pending), + null === componentName + ? (update.next = update) + : ((update.next = componentName.next), + (componentName.next = update)), + (updateQueue.pending = update), + (update = getRootForUpdatedFiber(fiber)), + markUpdateLaneFromFiberToRoot(fiber, null, lane), + update + ); + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } + } + function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { do { var clone = { lane: queue.lane, @@ -4410,198 +4819,77 @@ __DEV__ && ) callCallback(callbacks[updateQueue], context); } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; + function pushHiddenContext(fiber, context) { + var prevEntangledRenderLanes = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); + push(currentTreeHiddenStackCursor, context, fiber); + entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + } + function reuseHiddenContextOnStack(fiber) { + push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); + push( + currentTreeHiddenStackCursor, + currentTreeHiddenStackCursor.current, + fiber + ); + } + function popHiddenContext(fiber) { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor, fiber); + pop(prevEntangledRenderLanesCursor, fiber); + } + function mountHookTypesDev() { + var hookName = currentHookNameInDev; + null === hookTypesDev + ? (hookTypesDev = [hookName]) + : hookTypesDev.push(hookName); + } + function updateHookTypesDev() { + var hookName = currentHookNameInDev; if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; + null !== hookTypesDev && + (hookTypesUpdateIndexDev++, + hookTypesDev[hookTypesUpdateIndexDev] !== hookName) + ) { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; + !didWarnAboutMismatchedHooksForComponent.has(componentName) && + (didWarnAboutMismatchedHooksForComponent.add(componentName), + null !== hookTypesDev) + ) { + for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i], + newHookName = + i === hookTypesUpdateIndexDev ? hookName : oldHookName; + for ( + oldHookName = i + 1 + ". " + oldHookName; + 30 > oldHookName.length; + + ) + oldHookName += " "; + oldHookName += newHookName + "\n"; + table += oldHookName; + } + error$jscomp$0( + "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + componentName, + table + ); + } } - return !0; } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop$3() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop$3, noop$3), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) - thenable.then(noop$3, noop$3); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; - } - } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - } - function pushHiddenContext(fiber, context) { - var prevEntangledRenderLanes = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); - push(currentTreeHiddenStackCursor, context, fiber); - entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; - } - function reuseHiddenContextOnStack(fiber) { - push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); - push( - currentTreeHiddenStackCursor, - currentTreeHiddenStackCursor.current, - fiber - ); - } - function popHiddenContext(fiber) { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor, fiber); - pop(prevEntangledRenderLanesCursor, fiber); - } - function mountHookTypesDev() { - var hookName = currentHookNameInDev; - null === hookTypesDev - ? (hookTypesDev = [hookName]) - : hookTypesDev.push(hookName); - } - function updateHookTypesDev() { - var hookName = currentHookNameInDev; - if ( - null !== hookTypesDev && - (hookTypesUpdateIndexDev++, - hookTypesDev[hookTypesUpdateIndexDev] !== hookName) - ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); - if ( - !didWarnAboutMismatchedHooksForComponent.has(componentName) && - (didWarnAboutMismatchedHooksForComponent.add(componentName), - null !== hookTypesDev) - ) { - for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { - var oldHookName = hookTypesDev[i], - newHookName = - i === hookTypesUpdateIndexDev ? hookName : oldHookName; - for ( - oldHookName = i + 1 + ". " + oldHookName; - 30 > oldHookName.length; - - ) - oldHookName += " "; - oldHookName += newHookName + "\n"; - table += oldHookName; - } - error$jscomp$0( - "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - componentName, - table - ); - } - } - } - function checkDepsAreArrayDev(deps) { - void 0 === deps || - null === deps || - isArrayImpl(deps) || - error$jscomp$0( - "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", - currentHookNameInDev, - typeof deps - ); + function checkDepsAreArrayDev(deps) { + void 0 === deps || + null === deps || + isArrayImpl(deps) || + error$jscomp$0( + "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", + currentHookNameInDev, + typeof deps + ); } function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), error$jscomp$0( @@ -4644,7 +4932,7 @@ __DEV__ && nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; hookTypesDev = null !== current ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -4655,9 +4943,7 @@ __DEV__ && "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component) ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), error$jscomp$0( @@ -4717,7 +5003,7 @@ __DEV__ && currentHookNameInDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; null !== current && @@ -4752,7 +5038,7 @@ __DEV__ && ))); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -4787,7 +5073,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -4820,7 +5106,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -4837,26 +5123,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -4871,7 +5157,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -4885,7 +5171,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -4906,10 +5192,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -4927,7 +5213,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -4975,7 +5261,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -5053,7 +5339,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -5074,7 +5360,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -5121,7 +5407,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -5178,7 +5464,7 @@ __DEV__ && getSnapshot, getServerSnapshot ) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -5239,10 +5525,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -5300,11 +5586,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -5321,7 +5603,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -5477,7 +5759,7 @@ __DEV__ && var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var isMatching = currentlyRenderingFiber$1; + var isMatching = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -5533,14 +5815,14 @@ __DEV__ && ssrFormState.queue = isMatching; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, isMatching ); isMatching.dispatch = ssrFormState; isMatching = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, isMatching.queue ); @@ -5554,7 +5836,7 @@ __DEV__ && isMatching.queue = markerInstance; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, markerInstance, inRootOrSingleton, ssrFormState @@ -5590,7 +5872,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -5652,10 +5934,10 @@ __DEV__ && }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -5678,7 +5960,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -5694,7 +5976,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -5703,8 +5985,8 @@ __DEV__ && ))); } function mountEffect(create, deps) { - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } @@ -5716,12 +5998,12 @@ __DEV__ && destroy ) { if ( - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && - (currentlyRenderingFiber$1.mode & NoStrictPassiveEffectsMode) === NoMode + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & NoStrictPassiveEffectsMode) === NoMode ) { var hookFlags = Passive, hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 142608384; + currentlyRenderingFiber.flags |= 142608384; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -5736,7 +6018,7 @@ __DEV__ && } else (hookFlags = Passive), (hook = mountWorkInProgressHook()), - (currentlyRenderingFiber$1.flags |= 8390656), + (currentlyRenderingFiber.flags |= 8390656), (inst = createEffectInstance()), (inst.destroy = destroy), (hook.memoizedState = pushResourceEffect( @@ -5792,7 +6074,7 @@ __DEV__ && } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= fiberFlags); + (currentlyRenderingFiber.flags |= fiberFlags); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? hookFlags : HasEffect | hookFlags, isUpdateDepsSame ? hookFlags : HasEffect | hookFlags, @@ -5804,11 +6086,11 @@ __DEV__ && ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -5842,7 +6124,7 @@ __DEV__ && } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } @@ -5876,7 +6158,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode && + (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, @@ -5977,7 +6259,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -5992,7 +6274,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -6137,7 +6419,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -6191,7 +6473,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -6216,19 +6498,15 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, + args = requestUpdateLane(fiber); + var update = { + lane: args, revertLane: 0, action: action, hasEagerState: !1, @@ -6236,46 +6514,22 @@ __DEV__ && next: null }; isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -6360,8 +6614,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -9128,32 +9382,32 @@ __DEV__ && return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_digest_2510; - var JSCompiler_object_inline_stack_2511 = workInProgress.pendingProps; + var JSCompiler_object_inline_digest_2516; + var JSCompiler_object_inline_stack_2517 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_componentStack_2512 = !1; + var JSCompiler_object_inline_componentStack_2518 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_digest_2510 = didSuspend) || - (JSCompiler_object_inline_digest_2510 = + (JSCompiler_object_inline_digest_2516 = didSuspend) || + (JSCompiler_object_inline_digest_2516 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_digest_2510 && - ((JSCompiler_object_inline_componentStack_2512 = !0), + JSCompiler_object_inline_digest_2516 && + ((JSCompiler_object_inline_componentStack_2518 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_digest_2510 = 0 !== (workInProgress.flags & 32); + JSCompiler_object_inline_digest_2516 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_componentStack_2512 + JSCompiler_object_inline_componentStack_2518 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_message_2509 = nextHydratableInstance; + var JSCompiler_object_inline_message_2515 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2509)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_message_2515)) { c: { - var instance = JSCompiler_object_inline_message_2509; + var instance = JSCompiler_object_inline_message_2515; for ( JSCompiler_temp = rootOrSingletonContext; instance.nodeType !== COMMENT_NODE; @@ -9179,7 +9433,8 @@ __DEV__ && null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (instance = createFiber(18, null, null, NoMode)), (instance.stateNode = JSCompiler_temp), @@ -9194,46 +9449,46 @@ __DEV__ && JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_message_2509 + JSCompiler_object_inline_message_2515 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_message_2509 = workInProgress.memoizedState; + JSCompiler_object_inline_message_2515 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_message_2509 && - ((JSCompiler_object_inline_message_2509 = - JSCompiler_object_inline_message_2509.dehydrated), - null !== JSCompiler_object_inline_message_2509) + null !== JSCompiler_object_inline_message_2515 && + ((JSCompiler_object_inline_message_2515 = + JSCompiler_object_inline_message_2515.dehydrated), + null !== JSCompiler_object_inline_message_2515) ) return ( - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2509) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2515) ? (workInProgress.lanes = 32) : (workInProgress.lanes = 536870912), null ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_message_2509 = - JSCompiler_object_inline_stack_2511.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2511.fallback; - if (JSCompiler_object_inline_componentStack_2512) + JSCompiler_object_inline_message_2515 = + JSCompiler_object_inline_stack_2517.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2517.fallback; + if (JSCompiler_object_inline_componentStack_2518) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2511 = + (JSCompiler_object_inline_stack_2517 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2509, + JSCompiler_object_inline_message_2515, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2512 = + (JSCompiler_object_inline_componentStack_2518 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2512.memoizedState = + (JSCompiler_object_inline_componentStack_2518.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2512.childLanes = + (JSCompiler_object_inline_componentStack_2518.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2510, + JSCompiler_object_inline_digest_2516, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), @@ -9246,9 +9501,9 @@ __DEV__ && ? markerInstanceStack.current : null), (renderLanes = - JSCompiler_object_inline_componentStack_2512.updateQueue), + JSCompiler_object_inline_componentStack_2518.updateQueue), null === renderLanes - ? (JSCompiler_object_inline_componentStack_2512.updateQueue = + ? (JSCompiler_object_inline_componentStack_2518.updateQueue = { transitions: workInProgress, markerInstances: current, @@ -9256,46 +9511,46 @@ __DEV__ && }) : ((renderLanes.transitions = workInProgress), (renderLanes.markerInstances = current)))), - JSCompiler_object_inline_stack_2511 + JSCompiler_object_inline_stack_2517 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2511.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2517.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2511 = + (JSCompiler_object_inline_stack_2517 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_message_2509, + JSCompiler_object_inline_message_2515, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_componentStack_2512 = + (JSCompiler_object_inline_componentStack_2518 = workInProgress.child), - (JSCompiler_object_inline_componentStack_2512.memoizedState = + (JSCompiler_object_inline_componentStack_2518.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_componentStack_2512.childLanes = + (JSCompiler_object_inline_componentStack_2518.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2510, + JSCompiler_object_inline_digest_2516, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2511 + JSCompiler_object_inline_stack_2517 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_message_2509 + JSCompiler_object_inline_message_2515 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_message_2509 = prevState.dehydrated), - null !== JSCompiler_object_inline_message_2509) + ((JSCompiler_object_inline_message_2515 = prevState.dehydrated), + null !== JSCompiler_object_inline_message_2515) ) { if (didSuspend) workInProgress.flags & 256 @@ -9312,94 +9567,94 @@ __DEV__ && (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2512 = - JSCompiler_object_inline_stack_2511.fallback), - (JSCompiler_object_inline_message_2509 = workInProgress.mode), - (JSCompiler_object_inline_stack_2511 = + (JSCompiler_object_inline_componentStack_2518 = + JSCompiler_object_inline_stack_2517.fallback), + (JSCompiler_object_inline_message_2515 = workInProgress.mode), + (JSCompiler_object_inline_stack_2517 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2511.children + children: JSCompiler_object_inline_stack_2517.children }, - JSCompiler_object_inline_message_2509 + JSCompiler_object_inline_message_2515 )), - (JSCompiler_object_inline_componentStack_2512 = + (JSCompiler_object_inline_componentStack_2518 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2512, - JSCompiler_object_inline_message_2509, + JSCompiler_object_inline_componentStack_2518, + JSCompiler_object_inline_message_2515, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2512.flags |= 2), - (JSCompiler_object_inline_stack_2511.return = workInProgress), - (JSCompiler_object_inline_componentStack_2512.return = + (JSCompiler_object_inline_componentStack_2518.flags |= 2), + (JSCompiler_object_inline_stack_2517.return = workInProgress), + (JSCompiler_object_inline_componentStack_2518.return = workInProgress), - (JSCompiler_object_inline_stack_2511.sibling = - JSCompiler_object_inline_componentStack_2512), - (workInProgress.child = JSCompiler_object_inline_stack_2511), + (JSCompiler_object_inline_stack_2517.sibling = + JSCompiler_object_inline_componentStack_2518), + (workInProgress.child = JSCompiler_object_inline_stack_2517), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2511 = workInProgress.child), - (JSCompiler_object_inline_stack_2511.memoizedState = + (JSCompiler_object_inline_stack_2517 = workInProgress.child), + (JSCompiler_object_inline_stack_2517.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2511.childLanes = + (JSCompiler_object_inline_stack_2517.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2510, + JSCompiler_object_inline_digest_2516, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress = - JSCompiler_object_inline_componentStack_2512)); + JSCompiler_object_inline_componentStack_2518)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && error$jscomp$0( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - isSuspenseInstanceFallback(JSCompiler_object_inline_message_2509)) + isSuspenseInstanceFallback(JSCompiler_object_inline_message_2515)) ) { - JSCompiler_object_inline_digest_2510 = - JSCompiler_object_inline_message_2509.nextSibling && - JSCompiler_object_inline_message_2509.nextSibling.dataset; - if (JSCompiler_object_inline_digest_2510) { - JSCompiler_temp = JSCompiler_object_inline_digest_2510.dgst; - var message = JSCompiler_object_inline_digest_2510.msg; - instance = JSCompiler_object_inline_digest_2510.stck; - var componentStack = JSCompiler_object_inline_digest_2510.cstck; + JSCompiler_object_inline_digest_2516 = + JSCompiler_object_inline_message_2515.nextSibling && + JSCompiler_object_inline_message_2515.nextSibling.dataset; + if (JSCompiler_object_inline_digest_2516) { + JSCompiler_temp = JSCompiler_object_inline_digest_2516.dgst; + var message = JSCompiler_object_inline_digest_2516.msg; + instance = JSCompiler_object_inline_digest_2516.stck; + var componentStack = JSCompiler_object_inline_digest_2516.cstck; } - JSCompiler_object_inline_message_2509 = message; - JSCompiler_object_inline_digest_2510 = JSCompiler_temp; - JSCompiler_object_inline_stack_2511 = instance; - JSCompiler_temp = JSCompiler_object_inline_componentStack_2512 = + JSCompiler_object_inline_message_2515 = message; + JSCompiler_object_inline_digest_2516 = JSCompiler_temp; + JSCompiler_object_inline_stack_2517 = instance; + JSCompiler_temp = JSCompiler_object_inline_componentStack_2518 = componentStack; - JSCompiler_object_inline_componentStack_2512 = - JSCompiler_object_inline_message_2509 - ? Error(JSCompiler_object_inline_message_2509) + JSCompiler_object_inline_componentStack_2518 = + JSCompiler_object_inline_message_2515 + ? Error(JSCompiler_object_inline_message_2515) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." ); - JSCompiler_object_inline_componentStack_2512.stack = - JSCompiler_object_inline_stack_2511 || ""; - JSCompiler_object_inline_componentStack_2512.digest = - JSCompiler_object_inline_digest_2510; - JSCompiler_object_inline_digest_2510 = + JSCompiler_object_inline_componentStack_2518.stack = + JSCompiler_object_inline_stack_2517 || ""; + JSCompiler_object_inline_componentStack_2518.digest = + JSCompiler_object_inline_digest_2516; + JSCompiler_object_inline_digest_2516 = void 0 === JSCompiler_temp ? null : JSCompiler_temp; - JSCompiler_object_inline_stack_2511 = { - value: JSCompiler_object_inline_componentStack_2512, + JSCompiler_object_inline_stack_2517 = { + value: JSCompiler_object_inline_componentStack_2518, source: null, - stack: JSCompiler_object_inline_digest_2510 + stack: JSCompiler_object_inline_digest_2516 }; - "string" === typeof JSCompiler_object_inline_digest_2510 && + "string" === typeof JSCompiler_object_inline_digest_2516 && CapturedStacks.set( - JSCompiler_object_inline_componentStack_2512, - JSCompiler_object_inline_stack_2511 + JSCompiler_object_inline_componentStack_2518, + JSCompiler_object_inline_stack_2517 ); - queueHydrationError(JSCompiler_object_inline_stack_2511); + queueHydrationError(JSCompiler_object_inline_stack_2517); workInProgress = retrySuspenseComponentWithoutHydrating( current, workInProgress, @@ -9413,44 +9668,44 @@ __DEV__ && renderLanes, !1 ), - (JSCompiler_object_inline_digest_2510 = + (JSCompiler_object_inline_digest_2516 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_digest_2510) + didReceiveUpdate || JSCompiler_object_inline_digest_2516) ) { - JSCompiler_object_inline_digest_2510 = workInProgressRoot; + JSCompiler_object_inline_digest_2516 = workInProgressRoot; if ( - null !== JSCompiler_object_inline_digest_2510 && - ((JSCompiler_object_inline_stack_2511 = renderLanes & -renderLanes), - (JSCompiler_object_inline_stack_2511 = - 0 !== (JSCompiler_object_inline_stack_2511 & 42) + null !== JSCompiler_object_inline_digest_2516 && + ((JSCompiler_object_inline_stack_2517 = renderLanes & -renderLanes), + (JSCompiler_object_inline_stack_2517 = + 0 !== (JSCompiler_object_inline_stack_2517 & 42) ? 1 : getBumpedLaneForHydrationByLane( - JSCompiler_object_inline_stack_2511 + JSCompiler_object_inline_stack_2517 )), - (JSCompiler_object_inline_stack_2511 = + (JSCompiler_object_inline_stack_2517 = 0 !== - (JSCompiler_object_inline_stack_2511 & - (JSCompiler_object_inline_digest_2510.suspendedLanes | + (JSCompiler_object_inline_stack_2517 & + (JSCompiler_object_inline_digest_2516.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2511), - 0 !== JSCompiler_object_inline_stack_2511 && - JSCompiler_object_inline_stack_2511 !== prevState.retryLane) + : JSCompiler_object_inline_stack_2517), + 0 !== JSCompiler_object_inline_stack_2517 && + JSCompiler_object_inline_stack_2517 !== prevState.retryLane) ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2511), + ((prevState.retryLane = JSCompiler_object_inline_stack_2517), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2511 + JSCompiler_object_inline_stack_2517 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_digest_2510, + JSCompiler_object_inline_digest_2516, current, - JSCompiler_object_inline_stack_2511 + JSCompiler_object_inline_stack_2517 ), SelectiveHydrationException) ); - JSCompiler_object_inline_message_2509.data === + JSCompiler_object_inline_message_2515.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9458,14 +9713,14 @@ __DEV__ && renderLanes ); } else - JSCompiler_object_inline_message_2509.data === + JSCompiler_object_inline_message_2515.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 192), (workInProgress.child = current.child), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_message_2509.nextSibling + JSCompiler_object_inline_message_2515.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9483,57 +9738,57 @@ __DEV__ && (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2511.children + JSCompiler_object_inline_stack_2517.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_componentStack_2512) + if (JSCompiler_object_inline_componentStack_2518) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_componentStack_2512 = - JSCompiler_object_inline_stack_2511.fallback), - (JSCompiler_object_inline_message_2509 = workInProgress.mode), + (JSCompiler_object_inline_componentStack_2518 = + JSCompiler_object_inline_stack_2517.fallback), + (JSCompiler_object_inline_message_2515 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2511 = createWorkInProgress( + (JSCompiler_object_inline_stack_2517 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2511.children + children: JSCompiler_object_inline_stack_2517.children } )), - (JSCompiler_object_inline_stack_2511.subtreeFlags = + (JSCompiler_object_inline_stack_2517.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_componentStack_2512 = + ? (JSCompiler_object_inline_componentStack_2518 = createWorkInProgress( instance, - JSCompiler_object_inline_componentStack_2512 + JSCompiler_object_inline_componentStack_2518 )) - : ((JSCompiler_object_inline_componentStack_2512 = + : ((JSCompiler_object_inline_componentStack_2518 = createFiberFromFragment( - JSCompiler_object_inline_componentStack_2512, - JSCompiler_object_inline_message_2509, + JSCompiler_object_inline_componentStack_2518, + JSCompiler_object_inline_message_2515, renderLanes, null )), - (JSCompiler_object_inline_componentStack_2512.flags |= 2)), - (JSCompiler_object_inline_componentStack_2512.return = + (JSCompiler_object_inline_componentStack_2518.flags |= 2)), + (JSCompiler_object_inline_componentStack_2518.return = workInProgress), - (JSCompiler_object_inline_stack_2511.return = workInProgress), - (JSCompiler_object_inline_stack_2511.sibling = - JSCompiler_object_inline_componentStack_2512), - (workInProgress.child = JSCompiler_object_inline_stack_2511), - (JSCompiler_object_inline_stack_2511 = - JSCompiler_object_inline_componentStack_2512), - (JSCompiler_object_inline_componentStack_2512 = workInProgress.child), - (JSCompiler_object_inline_message_2509 = current.child.memoizedState), - null === JSCompiler_object_inline_message_2509 - ? (JSCompiler_object_inline_message_2509 = + (JSCompiler_object_inline_stack_2517.return = workInProgress), + (JSCompiler_object_inline_stack_2517.sibling = + JSCompiler_object_inline_componentStack_2518), + (workInProgress.child = JSCompiler_object_inline_stack_2517), + (JSCompiler_object_inline_stack_2517 = + JSCompiler_object_inline_componentStack_2518), + (JSCompiler_object_inline_componentStack_2518 = workInProgress.child), + (JSCompiler_object_inline_message_2515 = current.child.memoizedState), + null === JSCompiler_object_inline_message_2515 + ? (JSCompiler_object_inline_message_2515 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_message_2509.cachePool), + JSCompiler_object_inline_message_2515.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9541,34 +9796,34 @@ __DEV__ && ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_message_2509 = { + (JSCompiler_object_inline_message_2515 = { baseLanes: - JSCompiler_object_inline_message_2509.baseLanes | renderLanes, + JSCompiler_object_inline_message_2515.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_componentStack_2512.memoizedState = - JSCompiler_object_inline_message_2509), + (JSCompiler_object_inline_componentStack_2518.memoizedState = + JSCompiler_object_inline_message_2515), enableTransitionTracing && - ((JSCompiler_object_inline_message_2509 = enableTransitionTracing + ((JSCompiler_object_inline_message_2515 = enableTransitionTracing ? transitionStack.current : null), - null !== JSCompiler_object_inline_message_2509 && + null !== JSCompiler_object_inline_message_2515 && ((JSCompiler_temp = enableTransitionTracing ? markerInstanceStack.current : null), (instance = - JSCompiler_object_inline_componentStack_2512.updateQueue), + JSCompiler_object_inline_componentStack_2518.updateQueue), (componentStack = current.updateQueue), null === instance - ? (JSCompiler_object_inline_componentStack_2512.updateQueue = { - transitions: JSCompiler_object_inline_message_2509, + ? (JSCompiler_object_inline_componentStack_2518.updateQueue = { + transitions: JSCompiler_object_inline_message_2515, markerInstances: JSCompiler_temp, retryQueue: null }) : instance === componentStack - ? (JSCompiler_object_inline_componentStack_2512.updateQueue = + ? (JSCompiler_object_inline_componentStack_2518.updateQueue = { - transitions: JSCompiler_object_inline_message_2509, + transitions: JSCompiler_object_inline_message_2515, markerInstances: JSCompiler_temp, retryQueue: null !== componentStack @@ -9576,32 +9831,32 @@ __DEV__ && : null }) : ((instance.transitions = - JSCompiler_object_inline_message_2509), + JSCompiler_object_inline_message_2515), (instance.markerInstances = JSCompiler_temp)))), - (JSCompiler_object_inline_componentStack_2512.childLanes = + (JSCompiler_object_inline_componentStack_2518.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_digest_2510, + JSCompiler_object_inline_digest_2516, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2511 + JSCompiler_object_inline_stack_2517 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2511.children + children: JSCompiler_object_inline_stack_2517.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_digest_2510 = workInProgress.deletions), - null === JSCompiler_object_inline_digest_2510 + ((JSCompiler_object_inline_digest_2516 = workInProgress.deletions), + null === JSCompiler_object_inline_digest_2516 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_digest_2510.push(current)); + : JSCompiler_object_inline_digest_2516.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -10732,373 +10987,97 @@ __DEV__ && ? ((prevSibling = peekCacheFromPool()), null === prevSibling && ((prevSibling = workInProgressRoot), - (nextProps = createCache()), - (prevSibling.pooledCache = nextProps), - retainCache(nextProps), - null !== nextProps && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = nextProps)), - (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), - (nextProps = 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 = nextProps.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current - ? ((returnFiber = enableTransitionTracing - ? transitionStack.current - : null), - null !== returnFiber && - ((returnFiber = { - tag: TransitionTracingMarker, - transitions: new Set(returnFiber), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = returnFiber), - (workInProgress.flags |= 2048))) - : current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ), - (returnFiber = workInProgress.stateNode), - null !== returnFiber && - pushMarkerInstance(workInProgress, returnFiber), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); - } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue, providerFiber); - context._currentValue = nextValue; - push(rendererCursorDEV, context._currentRenderer, providerFiber); - void 0 !== context._currentRenderer && - null !== context._currentRenderer && - context._currentRenderer !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ); - context._currentRenderer = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue = valueCursor.current; - var currentRenderer = rendererCursorDEV.current; - pop(rendererCursorDEV, providerFiber); - context._currentRenderer = currentRenderer; - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions, offscreenWorkInProgress) - : null === newTransitions - ? push( - transitionStack, - transitionStack.current, - offscreenWorkInProgress - ) - : push( - transitionStack, - transitionStack.current.concat(newTransitions), - offscreenWorkInProgress - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack, workInProgress), - pop(resumedCache, workInProgress)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + (nextProps = createCache()), + (prevSibling.pooledCache = nextProps), + retainCache(nextProps), + null !== nextProps && + (prevSibling.pooledCacheLanes |= renderLanes), + (prevSibling = nextProps)), + (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), + (nextProps = 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 = nextProps.cache), + pushProvider(workInProgress, CacheContext, returnFiber), + returnFiber !== prevSibling.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; + } + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } function collectScopedNodesFromChildren( startingChild, @@ -11341,13 +11320,13 @@ __DEV__ && case 1: return bubbleProperties(workInProgress), null; case 3: - newProps = workInProgress.stateNode; + renderLanes = workInProgress.stateNode; enableTransitionTracing && null !== workInProgressTransitions && (workInProgress.flags |= 2048); - renderLanes = null; - null !== current && (renderLanes = current.memoizedState.cache); - workInProgress.memoizedState.cache !== renderLanes && + newProps = null; + null !== current && (newProps = current.memoizedState.cache); + workInProgress.memoizedState.cache !== newProps && (workInProgress.flags |= 2048); popProvider(CacheContext, workInProgress); enableTransitionTracing && @@ -11355,9 +11334,9 @@ __DEV__ && pop(markerInstanceStack, workInProgress); enableTransitionTracing && pop(transitionStack, workInProgress); popHostContainer(workInProgress); - newProps.pendingContext && - ((newProps.context = newProps.pendingContext), - (newProps.pendingContext = null)); + renderLanes.pendingContext && + ((renderLanes.context = renderLanes.pendingContext), + (renderLanes.pendingContext = null)); if (null === current || null === current.child) popHydrationState(workInProgress) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress)) @@ -11365,9 +11344,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -11585,9 +11562,9 @@ __DEV__ && renderLanes = getHostContext(); if (popHydrationState(workInProgress)) { current = workInProgress.stateNode; - newProps = workInProgress.memoizedProps; + renderLanes = workInProgress.memoizedProps; _type = !didSuspendOrErrorDEV; - renderLanes = null; + newProps = null; var returnFiber = hydrationParentFiber; if (null !== returnFiber) switch (returnFiber.tag) { @@ -11595,8 +11572,8 @@ __DEV__ && _type && ((_type = diffHydratedTextForDevWarnings( current, - newProps, - renderLanes + renderLanes, + newProps )), null !== _type && (buildHydrationDiffNode(workInProgress, 0).serverProps = @@ -11604,12 +11581,12 @@ __DEV__ && break; case 27: case 5: - (renderLanes = returnFiber.memoizedProps), + (newProps = returnFiber.memoizedProps), _type && ((_type = diffHydratedTextForDevWarnings( current, - newProps, - renderLanes + renderLanes, + newProps )), null !== _type && (buildHydrationDiffNode( @@ -11619,10 +11596,10 @@ __DEV__ && } current[internalInstanceKey] = workInProgress; current = - current.nodeValue === newProps || - (null !== renderLanes && - !0 === renderLanes.suppressHydrationWarning) || - checkForUnmatchedText(current.nodeValue, newProps) + current.nodeValue === renderLanes || + (null !== newProps && + !0 === newProps.suppressHydrationWarning) || + checkForUnmatchedText(current.nodeValue, renderLanes) ? !0 : !1; !current && @@ -11684,9 +11661,10 @@ __DEV__ && _type.treeBaseDuration)); _type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (_type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = _type), (_type = !0); if (!_type) { if (workInProgress.flags & 256) @@ -11703,30 +11681,30 @@ __DEV__ && transferActualDuration(workInProgress), workInProgress ); - newProps = null !== newProps; + renderLanes = null !== newProps; current = null !== current && null !== current.memoizedState; - newProps && - ((renderLanes = workInProgress.child), + renderLanes && + ((newProps = workInProgress.child), (_type = null), - null !== renderLanes.alternate && - null !== renderLanes.alternate.memoizedState && - null !== renderLanes.alternate.memoizedState.cachePool && - (_type = renderLanes.alternate.memoizedState.cachePool.pool), + null !== newProps.alternate && + null !== newProps.alternate.memoizedState && + null !== newProps.alternate.memoizedState.cachePool && + (_type = newProps.alternate.memoizedState.cachePool.pool), (returnFiber = null), - null !== renderLanes.memoizedState && - null !== renderLanes.memoizedState.cachePool && - (returnFiber = renderLanes.memoizedState.cachePool.pool), - returnFiber !== _type && (renderLanes.flags |= 2048)); - newProps !== current && + null !== newProps.memoizedState && + null !== newProps.memoizedState.cachePool && + (returnFiber = newProps.memoizedState.cachePool.pool), + returnFiber !== _type && (newProps.flags |= 2048)); + renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), - newProps && (workInProgress.child.flags |= 8192)); + renderLanes && (workInProgress.child.flags |= 8192)); scheduleRetryEffect(workInProgress, workInProgress.updateQueue); null !== workInProgress.updateQueue && null != workInProgress.memoizedProps.suspenseCallback && (workInProgress.flags |= 4); bubbleProperties(workInProgress); (workInProgress.mode & ProfileMode) !== NoMode && - newProps && + renderLanes && ((current = workInProgress.child), null !== current && (workInProgress.treeBaseDuration -= current.treeBaseDuration)); @@ -11775,9 +11753,13 @@ __DEV__ && scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; current = renderLanes; - for (newProps = workInProgress.child; null !== newProps; ) - resetWorkInProgress(newProps, current), - (newProps = newProps.sibling); + for ( + renderLanes = workInProgress.child; + null !== renderLanes; + + ) + resetWorkInProgress(renderLanes, current), + (renderLanes = renderLanes.sibling); push( suspenseStackCursor, (suspenseStackCursor.current & @@ -11882,27 +11864,27 @@ __DEV__ && workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192)) : bubbleProperties(workInProgress), - (newProps = workInProgress.updateQueue), - null !== newProps && - scheduleRetryEffect(workInProgress, newProps.retryQueue), - (newProps = null), + (renderLanes = workInProgress.updateQueue), + null !== renderLanes && + scheduleRetryEffect(workInProgress, renderLanes.retryQueue), + (renderLanes = null), null !== current && null !== current.memoizedState && null !== current.memoizedState.cachePool && - (newProps = current.memoizedState.cachePool.pool), - (renderLanes = null), + (renderLanes = current.memoizedState.cachePool.pool), + (newProps = null), null !== workInProgress.memoizedState && null !== workInProgress.memoizedState.cachePool && - (renderLanes = workInProgress.memoizedState.cachePool.pool), - renderLanes !== newProps && (workInProgress.flags |= 2048), + (newProps = workInProgress.memoizedState.cachePool.pool), + newProps !== renderLanes && (workInProgress.flags |= 2048), popTransition(workInProgress, current), null ); case 24: return ( - (newProps = null), - null !== current && (newProps = current.memoizedState.cache), - workInProgress.memoizedState.cache !== newProps && + (renderLanes = null), + null !== current && (renderLanes = current.memoizedState.cache), + workInProgress.memoizedState.cache !== renderLanes && (workInProgress.flags |= 2048), popProvider(CacheContext, workInProgress), bubbleProperties(workInProgress), @@ -14669,6 +14651,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -15624,7 +15614,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = errorRetryLanes$jscomp$0; } @@ -15740,14 +15736,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -15949,7 +15937,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -16606,9 +16594,6 @@ __DEV__ && throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -16623,58 +16608,64 @@ __DEV__ && root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - (suspendedRetryLanes = commitBeforeMutationEffects( - root, - finishedWork - )), - commitMutationEffects(root, finishedWork, lanes), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = DiscreteEventPriority; + suspendedRetryLanes = executionContext; + executionContext |= CommitContext; + var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffects(root, finishedWork, lanes); + shouldFireAfterActiveInstanceBlur && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + (transitions = spawnedLane) + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : (releaseRootPooledCache(root, remainingLanes), @@ -16686,7 +16677,6 @@ __DEV__ && onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -16694,14 +16684,15 @@ __DEV__ && finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), + (spawnedLane = makeErrorInfo(remainingLanes.stack)), runWithFiberInDEV( remainingLanes.source, renderPriorityLevel, remainingLanes.value, - transitions + spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -17063,7 +17054,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -24713,9 +24704,42 @@ __DEV__ && StrictLegacyMode = 8, StrictEffectsMode = 16, NoStrictPassiveEffectsMode = 64, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var rendererCursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler.unstable_now, renderStartTime = -0, commitStartTime = -0, @@ -24735,14 +24759,17 @@ __DEV__ && currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, flushPendingUnsafeLifecycleWarnings: function () {}, @@ -24960,6 +24987,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -24970,7 +25008,7 @@ __DEV__ && var ResourceEffectIdentityKind = 0, ResourceEffectUpdateKind = 1, renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -26511,55 +26549,13 @@ __DEV__ && var didWarnAboutTailOptions = {}; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var rendererCursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), + hasWarnedAboutUsingNoValuePropOnContextProvider = !1, emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -26654,7 +26650,6 @@ __DEV__ && currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -27492,11 +27487,11 @@ __DEV__ && return_targetInst = null; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.1.0-www-modern-d4287258-20241217" !== isomorphicReactPackageVersion) + if ("19.1.0-www-modern-a9bbe346-20241219" !== 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.1.0-www-modern-d4287258-20241217\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.1.0-www-modern-a9bbe346-20241219\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27539,10 +27534,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-d4287258-20241217", + version: "19.1.0-www-modern-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27579,52 +27574,43 @@ __DEV__ && ); } ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = - function (children, JSCompiler_OptimizeArgumentsArray_p2) { + function (children) { var root = this._internalRoot; if (null === root) throw Error("Cannot update an unmounted root."); - "function" === typeof JSCompiler_OptimizeArgumentsArray_p2 + var args = arguments; + "function" === typeof args[1] ? error$jscomp$0( "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()." ) - : isValidContainer(JSCompiler_OptimizeArgumentsArray_p2) + : isValidContainer(args[1]) ? error$jscomp$0( "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root." ) - : "undefined" !== typeof JSCompiler_OptimizeArgumentsArray_p2 && + : "undefined" !== typeof args[1] && error$jscomp$0( "You passed a second argument to root.render(...) but it only accepts one argument." ); - JSCompiler_OptimizeArgumentsArray_p2 = root.current; - var lane = requestUpdateLane(JSCompiler_OptimizeArgumentsArray_p2); - updateContainerImpl( - JSCompiler_OptimizeArgumentsArray_p2, - lane, - children, - root, - null, - null - ); + args = children; + var current = root.current, + lane = requestUpdateLane(current); + updateContainerImpl(current, lane, args, root, null, null); }; ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = - function (JSCompiler_OptimizeArgumentsArray_p3) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p3 && + function () { + var args = arguments; + "function" === typeof args[0] && error$jscomp$0( "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p3 = this._internalRoot; - if (null !== JSCompiler_OptimizeArgumentsArray_p3) { + args = this._internalRoot; + if (null !== args) { this._internalRoot = null; - var container = JSCompiler_OptimizeArgumentsArray_p3.containerInfo; + var container = args.containerInfo; (executionContext & (RenderContext | CommitContext)) !== NoContext && error$jscomp$0( "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition." ); - updateContainerSync( - null, - JSCompiler_OptimizeArgumentsArray_p3, - null, - null - ); + updateContainerSync(null, args, null, null); flushSyncWork$1(); container[internalContainerInstanceKey] = null; } @@ -28315,5 +28301,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.1.0-www-modern-d4287258-20241217"; + exports.version = "19.1.0-www-modern-a9bbe346-20241219"; })(); diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 32ef6b2f0d588..3e9edbcc59f8d 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -1975,123 +1975,269 @@ function resetHydrationState() { nextHydratableInstance = hydrationParentFiber = null; isHydrating = !1; } +function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; +} function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) : hydrationErrors.push(error); } -var concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0; -function finishQueueingConcurrentUpdates() { +var valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null; +function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue); + context._currentValue = nextValue; +} +function popProvider(context) { + context._currentValue = valueCursor.current; + pop(valueCursor); +} +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } +} +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } +} +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } -function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); -} -function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } -function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); +function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } -function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); +function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } -function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } -var firstScheduledRoot = null, - lastScheduledRoot = null, - didScheduleMicrotask = !1, - mightHavePendingSyncWork = !1, - isFlushingWork = !1, - currentEventTransitionLane = 0; -function ensureRootIsScheduled(root) { - root !== lastScheduledRoot && - null === root.next && - (null === lastScheduledRoot - ? (firstScheduledRoot = lastScheduledRoot = root) - : (lastScheduledRoot = lastScheduledRoot.next = root)); - mightHavePendingSyncWork = !0; - didScheduleMicrotask || - ((didScheduleMicrotask = !0), - scheduleImmediateTask(processRootScheduleInMicrotask)); - enableDeferRootSchedulingToMicrotask || - scheduleTaskForRootDuringMicrotask(root, now()); +function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; } -function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { - if (!isFlushingWork && mightHavePendingSyncWork) { - isFlushingWork = !0; - do { - var didPerformSomeWork = !1; - for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy) - if (0 !== syncTransitionLanes) { - var pendingLanes = root$26.pendingLanes; - if (0 === pendingLanes) var JSCompiler_inline_result = 0; - else { - var suspendedLanes = root$26.suspendedLanes, - pingedLanes = root$26.pingedLanes; - JSCompiler_inline_result = - (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; - JSCompiler_inline_result &= +var AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; +} +function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); +} +var firstScheduledRoot = null, + lastScheduledRoot = null, + didScheduleMicrotask = !1, + mightHavePendingSyncWork = !1, + isFlushingWork = !1, + currentEventTransitionLane = 0; +function ensureRootIsScheduled(root) { + root !== lastScheduledRoot && + null === root.next && + (null === lastScheduledRoot + ? (firstScheduledRoot = lastScheduledRoot = root) + : (lastScheduledRoot = lastScheduledRoot.next = root)); + mightHavePendingSyncWork = !0; + didScheduleMicrotask || + ((didScheduleMicrotask = !0), + scheduleImmediateTask(processRootScheduleInMicrotask)); + enableDeferRootSchedulingToMicrotask || + scheduleTaskForRootDuringMicrotask(root, now()); +} +function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { + if (!isFlushingWork && mightHavePendingSyncWork) { + isFlushingWork = !0; + do { + var didPerformSomeWork = !1; + for (var root$27 = firstScheduledRoot; null !== root$27; ) { + if (!onlyLegacy) + if (0 !== syncTransitionLanes) { + var pendingLanes = root$27.pendingLanes; + if (0 === pendingLanes) var JSCompiler_inline_result = 0; + else { + var suspendedLanes = root$27.suspendedLanes, + pingedLanes = root$27.pingedLanes; + JSCompiler_inline_result = + (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; + JSCompiler_inline_result &= pendingLanes & ~(suspendedLanes & ~pingedLanes); JSCompiler_inline_result = JSCompiler_inline_result & 201326677 @@ -2102,18 +2248,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$26, - root$26 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$27, + root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$26, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); - root$26 = root$26.next; + performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); + root$27 = root$27.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2316,279 +2462,80 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } -var hasForceUpdate = !1; -function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; -} -function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); +var prevOnStartTransitionFinish = ReactSharedInternals.S; +ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); +}; +var resumedCache = createCursor(null), + transitionStack = createCursor(null); +function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } -function createUpdate(lane) { - return { lane: lane, tag: 0, payload: null, callback: null, next: null }; +function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions +) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); } -function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if (0 !== (executionContext & 2)) { - var pending = updateQueue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - updateQueue.pending = update; - update = getRootForUpdatedFiber(fiber); - markUpdateLaneFromFiberToRoot(fiber, null, lane); - return update; - } - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); +function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); } -function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); - } +function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; } -function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; +function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast - ? (newFirst = newLast = clone) - : (newLast = newLast.next = clone); - queue = queue.next; - } while (null !== queue); - null === newLast - ? (newFirst = newLast = capturedUpdate) - : (newLast = newLast.next = capturedUpdate); - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current.shared, - callbacks: current.callbacks - }; - workInProgress.updateQueue = queue; - return; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - workInProgress = queue.lastBaseUpdate; - null === workInProgress - ? (queue.firstBaseUpdate = capturedUpdate) - : (workInProgress.next = capturedUpdate); - queue.lastBaseUpdate = capturedUpdate; + return !0; } -var didReadFromEntangledAsyncAction = !1; -function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } -} -function processUpdateQueue( - workInProgress$jscomp$0, - props, - instance$jscomp$0, - renderLanes -) { - didReadFromEntangledAsyncAction = !1; - var queue = workInProgress$jscomp$0.updateQueue; - hasForceUpdate = !1; - var firstBaseUpdate = queue.firstBaseUpdate, - lastBaseUpdate = queue.lastBaseUpdate, - pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, - firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate - ? (firstBaseUpdate = firstPendingUpdate) - : (lastBaseUpdate.next = firstPendingUpdate); - lastBaseUpdate = lastPendingUpdate; - var current = workInProgress$jscomp$0.alternate; - null !== current && - ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && - (null === pendingQueue - ? (current.firstBaseUpdate = firstPendingUpdate) - : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, - isHiddenUpdate = updateLane !== pendingQueue.lane; - if ( - isHiddenUpdate - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - 0 !== updateLane && - updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - null !== current && - (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - var workInProgress = workInProgress$jscomp$0, - update = pendingQueue; - updateLane = props; - var instance = instance$jscomp$0; - switch (update.tag) { - case 1: - workInProgress = update.payload; - if ("function" === typeof workInProgress) { - newState = workInProgress.call(instance, newState, updateLane); - break a; - } - newState = workInProgress; - break a; - case 3: - workInProgress.flags = (workInProgress.flags & -65537) | 128; - case 0: - workInProgress = update.payload; - updateLane = - "function" === typeof workInProgress - ? workInProgress.call(instance, newState, updateLane) - : workInProgress; - if (null === updateLane || void 0 === updateLane) break a; - newState = assign({}, newState, updateLane); - break a; - case 2: - hasForceUpdate = !0; - } - } - updateLane = pendingQueue.callback; - null !== updateLane && - ((workInProgress$jscomp$0.flags |= 64), - isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), - (isHiddenUpdate = queue.callbacks), - null === isHiddenUpdate - ? (queue.callbacks = [updateLane]) - : isHiddenUpdate.push(updateLane)); - } else - (isHiddenUpdate = { - lane: updateLane, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: pendingQueue.callback, - next: null - }), - null === current - ? ((firstPendingUpdate = current = isHiddenUpdate), - (lastPendingUpdate = newState)) - : (current = current.next = isHiddenUpdate), - (lastBaseUpdate |= updateLane); - pendingQueue = pendingQueue.next; - if (null === pendingQueue) - if (((pendingQueue = queue.shared.pending), null === pendingQueue)) - break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; - } -} -function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error(formatProdErrorMessage(191, callback)); - callback.call(context); -} -function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); -} -function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; -} -var SuspenseException = Error(formatProdErrorMessage(460)), - SuspenseyCommitException = Error(formatProdErrorMessage(474)), - SuspenseActionException = Error(formatProdErrorMessage(542)), - noopSuspenseyCommitThenable = { then: function () {} }; -function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; +var SuspenseException = Error(formatProdErrorMessage(460)), + SuspenseyCommitException = Error(formatProdErrorMessage(474)), + SuspenseActionException = Error(formatProdErrorMessage(542)), + noopSuspenseyCommitThenable = { then: function () {} }; +function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; } function noop$3() {} function trackUsedThenable(thenableState, thenable, index) { @@ -2658,53 +2605,374 @@ function checkIfUseWrappedInAsyncCatch(rejectedReason) { ) throw Error(formatProdErrorMessage(483)); } -var currentTreeHiddenStackCursor = createCursor(null), - prevEntangledRenderLanesCursor = createCursor(0); -function pushHiddenContext(fiber, context) { - fiber = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, fiber); - push(currentTreeHiddenStackCursor, context); - entangledRenderLanes = fiber | context.baseLanes; +var concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0; +function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } } -function reuseHiddenContextOnStack() { - push(prevEntangledRenderLanesCursor, entangledRenderLanes); - push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); +function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); } -function popHiddenContext() { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor); - pop(prevEntangledRenderLanesCursor); +function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); } -var renderLanes = 0, - currentlyRenderingFiber$1 = null, - currentHook = null, - workInProgressHook = null, - didScheduleRenderPhaseUpdate = !1, - didScheduleRenderPhaseUpdateDuringThisPass = !1, - shouldDoubleInvokeUserFnsInHooksDEV = !1, - localIdCounter = 0, - thenableIndexCounter$1 = 0, - thenableState$1 = null, - globalClientIdCounter = 0; -function throwInvalidHookError() { - throw Error(formatProdErrorMessage(321)); +function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } -function areHookInputsEqual(nextDeps, prevDeps) { - if (null === prevDeps) return !1; - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) - if (!objectIs(nextDeps[i], prevDeps[i])) return !1; - return !0; +function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } -function renderWithHooks( - current, - workInProgress, - Component, - props, - secondArg, - nextRenderLanes -) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; +function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +} +var hasForceUpdate = !1; +function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; +} +function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); +} +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; +} +function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if (0 !== (executionContext & 2)) { + var pending = updateQueue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + updateQueue.pending = update; + update = getRootForUpdatedFiber(fiber); + markUpdateLaneFromFiberToRoot(fiber, null, lane); + return update; + } + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); +} +function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } +} +function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { + do { + var clone = { + lane: queue.lane, + tag: queue.tag, + payload: queue.payload, + callback: null, + next: null + }; + null === newLast + ? (newFirst = newLast = clone) + : (newLast = newLast.next = clone); + queue = queue.next; + } while (null !== queue); + null === newLast + ? (newFirst = newLast = capturedUpdate) + : (newLast = newLast.next = capturedUpdate); + } else newFirst = newLast = capturedUpdate; + queue = { + baseState: current.baseState, + firstBaseUpdate: newFirst, + lastBaseUpdate: newLast, + shared: current.shared, + callbacks: current.callbacks + }; + workInProgress.updateQueue = queue; + return; + } + workInProgress = queue.lastBaseUpdate; + null === workInProgress + ? (queue.firstBaseUpdate = capturedUpdate) + : (workInProgress.next = capturedUpdate); + queue.lastBaseUpdate = capturedUpdate; +} +var didReadFromEntangledAsyncAction = !1; +function suspendIfUpdateReadFromEntangledAsyncAction() { + if (didReadFromEntangledAsyncAction) { + var entangledActionThenable = currentEntangledActionThenable; + if (null !== entangledActionThenable) throw entangledActionThenable; + } +} +function processUpdateQueue( + workInProgress$jscomp$0, + props, + instance$jscomp$0, + renderLanes +) { + didReadFromEntangledAsyncAction = !1; + var queue = workInProgress$jscomp$0.updateQueue; + hasForceUpdate = !1; + var firstBaseUpdate = queue.firstBaseUpdate, + lastBaseUpdate = queue.lastBaseUpdate, + pendingQueue = queue.shared.pending; + if (null !== pendingQueue) { + queue.shared.pending = null; + var lastPendingUpdate = pendingQueue, + firstPendingUpdate = lastPendingUpdate.next; + lastPendingUpdate.next = null; + null === lastBaseUpdate + ? (firstBaseUpdate = firstPendingUpdate) + : (lastBaseUpdate.next = firstPendingUpdate); + lastBaseUpdate = lastPendingUpdate; + var current = workInProgress$jscomp$0.alternate; + null !== current && + ((current = current.updateQueue), + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && + (null === pendingQueue + ? (current.firstBaseUpdate = firstPendingUpdate) + : (pendingQueue.next = firstPendingUpdate), + (current.lastBaseUpdate = lastPendingUpdate))); + } + if (null !== firstBaseUpdate) { + var newState = queue.baseState; + lastBaseUpdate = 0; + current = firstPendingUpdate = lastPendingUpdate = null; + pendingQueue = firstBaseUpdate; + do { + var updateLane = pendingQueue.lane & -536870913, + isHiddenUpdate = updateLane !== pendingQueue.lane; + if ( + isHiddenUpdate + ? (workInProgressRootRenderLanes & updateLane) === updateLane + : (renderLanes & updateLane) === updateLane + ) { + 0 !== updateLane && + updateLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + null !== current && + (current = current.next = + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); + a: { + var workInProgress = workInProgress$jscomp$0, + update = pendingQueue; + updateLane = props; + var instance = instance$jscomp$0; + switch (update.tag) { + case 1: + workInProgress = update.payload; + if ("function" === typeof workInProgress) { + newState = workInProgress.call(instance, newState, updateLane); + break a; + } + newState = workInProgress; + break a; + case 3: + workInProgress.flags = (workInProgress.flags & -65537) | 128; + case 0: + workInProgress = update.payload; + updateLane = + "function" === typeof workInProgress + ? workInProgress.call(instance, newState, updateLane) + : workInProgress; + if (null === updateLane || void 0 === updateLane) break a; + newState = assign({}, newState, updateLane); + break a; + case 2: + hasForceUpdate = !0; + } + } + updateLane = pendingQueue.callback; + null !== updateLane && + ((workInProgress$jscomp$0.flags |= 64), + isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); + } else + (isHiddenUpdate = { + lane: updateLane, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: pendingQueue.callback, + next: null + }), + null === current + ? ((firstPendingUpdate = current = isHiddenUpdate), + (lastPendingUpdate = newState)) + : (current = current.next = isHiddenUpdate), + (lastBaseUpdate |= updateLane); + pendingQueue = pendingQueue.next; + if (null === pendingQueue) + if (((pendingQueue = queue.shared.pending), null === pendingQueue)) + break; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress$jscomp$0.lanes = lastBaseUpdate; + workInProgress$jscomp$0.memoizedState = newState; + } +} +function callCallback(callback, context) { + if ("function" !== typeof callback) + throw Error(formatProdErrorMessage(191, callback)); + callback.call(context); +} +function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); +} +var currentTreeHiddenStackCursor = createCursor(null), + prevEntangledRenderLanesCursor = createCursor(0); +function pushHiddenContext(fiber, context) { + fiber = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, fiber); + push(currentTreeHiddenStackCursor, context); + entangledRenderLanes = fiber | context.baseLanes; +} +function reuseHiddenContextOnStack() { + push(prevEntangledRenderLanesCursor, entangledRenderLanes); + push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); +} +function popHiddenContext() { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor); + pop(prevEntangledRenderLanesCursor); +} +var renderLanes = 0, + currentlyRenderingFiber = null, + currentHook = null, + workInProgressHook = null, + didScheduleRenderPhaseUpdate = !1, + didScheduleRenderPhaseUpdateDuringThisPass = !1, + shouldDoubleInvokeUserFnsInHooksDEV = !1, + localIdCounter = 0, + thenableIndexCounter$1 = 0, + thenableState$1 = null, + globalClientIdCounter = 0; +function throwInvalidHookError() { + throw Error(formatProdErrorMessage(321)); +} +function areHookInputsEqual(nextDeps, prevDeps) { + if (null === prevDeps) return !1; + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) + if (!objectIs(nextDeps[i], prevDeps[i])) return !1; + return !0; +} +function renderWithHooks( + current, + workInProgress, + Component, + props, + secondArg, + nextRenderLanes +) { + renderLanes = nextRenderLanes; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -2729,7 +2997,7 @@ function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -2742,7 +3010,7 @@ function finishRenderingHooks(current) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2772,7 +3040,7 @@ function TransitionAwareHostComponent() { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -2799,7 +3067,7 @@ function resetHooksOnUnwind(workInProgress) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = localIdCounter = 0; thenableState$1 = null; @@ -2813,26 +3081,26 @@ function mountWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -2845,7 +3113,7 @@ function updateWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -2859,7 +3127,7 @@ function useThenable(thenable) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -2880,10 +3148,10 @@ function use(usable) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2901,7 +3169,7 @@ function useMemoCache(size) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -2943,7 +3211,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$37 = !1; + didReadFromEntangledAsyncAction$39 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2964,11 +3232,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$37 = !0); + (didReadFromEntangledAsyncAction$39 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$37 = !0); + (didReadFromEntangledAsyncAction$39 = !0); continue; } else (updateLane = { @@ -2983,7 +3251,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -3004,7 +3272,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -3014,7 +3282,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$37 && + didReadFromEntangledAsyncAction$39 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -3047,7 +3315,7 @@ function rerenderReducer(reducer) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -3092,10 +3360,10 @@ function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3216,8 +3484,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$43) { - onActionError(actionQueue, node, error$43); + } catch (error$45) { + onActionError(actionQueue, node, error$45); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3274,7 +3542,7 @@ function mountActionState(action, initialStateProp) { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -3330,14 +3598,14 @@ function mountActionState(action, initialStateProp) { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, JSCompiler_inline_result.queue ); @@ -3351,7 +3619,7 @@ function mountActionState(action, initialStateProp) { JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result$jscomp$0, inRootOrSingleton, ssrFormState @@ -3387,7 +3655,7 @@ function updateActionStateImpl(stateHook, currentStateHook, action) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -3449,10 +3717,10 @@ function pushResourceEffect( }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -3473,7 +3741,7 @@ function updateRef() { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -3489,7 +3757,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -3505,7 +3773,7 @@ function updateEffect(create, deps) { } function mountResourceEffect(create, createDeps, update, updateDeps, destroy) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -3541,7 +3809,7 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -3553,11 +3821,11 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -3634,7 +3902,7 @@ function mountDeferredValueImpl(hook, value, initialValue) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -3649,7 +3917,7 @@ function updateDeferredValueImpl(hook, prevValue, value, initialValue) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -3783,14 +4051,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$46 = enqueueUpdate(provider, fiber, lane); - null !== root$46 && - (scheduleUpdateOnFiber(root$46, provider, lane), - entangleTransitions(root$46, provider, lane)); + var root$48 = enqueueUpdate(provider, fiber, lane); + null !== root$48 && + (scheduleUpdateOnFiber(root$48, provider, lane), + entangleTransitions(root$48, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$46 && + null !== root$48 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -3884,8 +4152,8 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -4000,7 +4268,7 @@ var HooksDispatcherOnMount = { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -4013,7 +4281,7 @@ var HooksDispatcherOnMount = { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -4026,7 +4294,7 @@ var HooksDispatcherOnMount = { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -4035,7 +4303,7 @@ var HooksDispatcherOnMount = { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -4110,7 +4378,7 @@ var HooksDispatcherOnMount = { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -4121,7 +4389,7 @@ var HooksDispatcherOnMount = { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -5125,9 +5393,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$78 in Component) - void 0 === newProps[propName$78] && - (newProps[propName$78] = Component[propName$78]); + for (var propName$80 in Component) + void 0 === newProps[propName$80] && + (newProps[propName$80] = Component[propName$80]); } return newProps; } @@ -5503,10 +5771,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$90 = workInProgress.stateNode; + root$92 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$90.incompleteTransitions.has(transition)) { + if (!root$92.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5514,11 +5782,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$90.incompleteTransitions.set(transition, markerInstance); + root$92.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$90.incompleteTransitions.forEach(function (markerInstance) { + root$92.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6183,7 +6451,12 @@ function mountHostRootWithoutHydrating( reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } -var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; +var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null +}; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; } @@ -6246,7 +6519,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), (JSCompiler_temp$jscomp$0.stateNode = nextInstance), @@ -7210,134 +7484,18 @@ function beginWork(current, workInProgress, renderLanes) { : resolveDefaultPropsOnNonClassComponent(props, init)), updateForwardRef(current, workInProgress, props, init, renderLanes) ); - case 7: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps, - renderLanes - ), - workInProgress.child - ); - case 8: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 12: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child - ); - case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); - case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 19: - return updateSuspenseListComponent(current, workInProgress, renderLanes); - case 21: + case 7: return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps, + renderLanes + ), workInProgress.child ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 24: + case 8: return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (nextProps = createCache()), - (init.pooledCache = nextProps), - nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), reconcileChildren( current, workInProgress, @@ -7346,297 +7504,157 @@ function beginWork(current, workInProgress, renderLanes) { ), workInProgress.child ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); -} -var valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null; -function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue); - context._currentValue = nextValue; -} -function popProvider(context) { - context._currentValue = valueCursor.current; - pop(valueCursor); -} -function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } -} -function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree -) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } -} -function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree -) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; -} -function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + case 12: + return ( + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 10: + return ( + (props = workInProgress.pendingProps), + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + props.value + ), + reconcileChildren(current, workInProgress, props.children, renderLanes), + workInProgress.child + ); + case 9: + return ( + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), + (props = workInProgress.pendingProps.children), + prepareToReadContext(workInProgress), + (init = readContext(init)), + (props = props(init)), + (workInProgress.flags |= 1), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 14: + return ( + (props = workInProgress.type), + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 19: + return updateSuspenseListComponent(current, workInProgress, renderLanes); + case 21: + return ( + (props = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 24: + return ( + prepareToReadContext(workInProgress), + (props = readContext(CacheContext)), + null === current + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), + (nextProps = createCache()), + (init.pooledCache = nextProps), + nextProps.refCount++, + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, init)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; -} -function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); -} -function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); -} -function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); -} -function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; -} -var AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; -} -function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); -} -var prevOnStartTransitionFinish = ReactSharedInternals.S; -ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); -}; -var resumedCache = createCursor(null), - transitionStack = createCursor(null); -function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; -} -function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions -) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); -} -function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); -} -function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } var emptyObject = {}; function collectScopedNodesFromChildren( @@ -7863,9 +7881,7 @@ function completeWork(current, workInProgress, renderLanes) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -8084,8 +8100,10 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)), + (type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = type), (type = !0); if (!type) { if (workInProgress.flags & 256) @@ -8106,11 +8124,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$138 = null; + var cache$139 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$138 = newProps.memoizedState.cachePool.pool); - cache$138 !== type && (newProps.flags |= 2048); + (cache$139 = newProps.memoizedState.cachePool.pool); + cache$139 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8144,8 +8162,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$138 = type.rendering; - if (null === cache$138) + cache$139 = type.rendering; + if (null === cache$139) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -8153,11 +8171,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$138 = findFirstSuspended(current); - if (null !== cache$138) { + cache$139 = findFirstSuspended(current); + if (null !== cache$139) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$138.updateQueue; + current = cache$139.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8182,7 +8200,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$138)), null !== current)) { + if (((current = findFirstSuspended(cache$139)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8192,7 +8210,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$138.alternate && + !cache$139.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8205,13 +8223,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$138.sibling = workInProgress.child), - (workInProgress.child = cache$138)) + ? ((cache$139.sibling = workInProgress.child), + (workInProgress.child = cache$139)) : ((current = type.last), null !== current - ? (current.sibling = cache$138) - : (workInProgress.child = cache$138), - (type.last = cache$138)); + ? (current.sibling = cache$139) + : (workInProgress.child = cache$139), + (type.last = cache$139)); } if (null !== type.tail) return ( @@ -8464,10 +8482,10 @@ function commitHookEffectListMount(flags, finishedWork) { inst.destroy = lastEffect; } } else { - var create$155 = updateQueue.create, - inst$156 = updateQueue.inst; - lastEffect = create$155(); - inst$156.destroy = lastEffect; + var create$156 = updateQueue.create, + inst$157 = updateQueue.inst; + lastEffect = create$156(); + inst$157.destroy = lastEffect; } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8622,8 +8640,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$158) { - captureCommitPhaseError(current, nearestMountedAncestor, error$158); + } catch (error$159) { + captureCommitPhaseError(current, nearestMountedAncestor, error$159); } else ref.current = null; } @@ -8779,7 +8797,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$202) { + } catch (e$203) { JSCompiler_temp = null; break a; } @@ -8997,11 +9015,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$157) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$158 ); } } @@ -9349,7 +9367,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$166 = hostParentIsContainer; + var prevHostParentIsContainer$167 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9357,7 +9375,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$166; + hostParentIsContainer = prevHostParentIsContainer$167; if (null !== hostParent) if (hostParentIsContainer) try { @@ -10056,21 +10074,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$159 = JSCompiler_inline_result.stateNode; + var parent$160 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$159, ""), + (setTextContent(parent$160, ""), (JSCompiler_inline_result.flags &= -33)); - var before$160 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$160, parent$159); + var before$161 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$161, parent$160); break; case 3: case 4: - var parent$161 = JSCompiler_inline_result.stateNode.containerInfo, - before$162 = getHostSibling(finishedWork); + var parent$162 = JSCompiler_inline_result.stateNode.containerInfo, + before$163 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$162, - parent$161 + before$163, + parent$162 ); break; default: @@ -10434,6 +10452,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10556,9 +10582,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$177 = finishedWork.stateNode; + var instance$178 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$177._visibility & 4 + ? instance$178._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10570,7 +10596,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$177._visibility |= 4), + : ((instance$178._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10583,7 +10609,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$177 + instance$178 ); break; case 24: @@ -11189,7 +11215,6 @@ function addTransitionProgressCallbackToPendingTransition( )); } var legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -11327,7 +11352,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -11425,14 +11455,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { } while (1); ensureRootIsScheduled(root$jscomp$0); } -function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); -} function commitRootWhenReady( root, finishedWork, @@ -11568,7 +11590,7 @@ function resetWorkInProgressStack() { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -11625,7 +11647,7 @@ function prepareFreshStack(root, lanes) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException || thrownValue === SuspenseActionException ? ((thrownValue = getSuspendedThenable()), @@ -11747,12 +11769,12 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$190) { - handleThrow(root, thrownValue$190); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -11863,11 +11885,11 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$192) { - handleThrow(root, thrownValue$192); + } catch (thrownValue$193) { + handleThrow(root, thrownValue$193); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -11944,7 +11966,7 @@ function throwAndUnwindWorkLoop( thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -12110,9 +12132,6 @@ function commitRootImpl( root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -12127,49 +12146,57 @@ function commitRootImpl( root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - (suspendedRetryLanes = commitBeforeMutationEffects(root, finishedWork)), - commitMutationEffectsOnFiber(finishedWork, root), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = 2; + suspendedRetryLanes = executionContext; + executionContext |= 4; + var shouldFireAfterActiveInstanceBlur$197 = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffectsOnFiber(finishedWork, root); + shouldFireAfterActiveInstanceBlur$197 && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -12181,6 +12208,7 @@ function commitRootImpl( componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -12217,7 +12245,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$197 = rootWithPendingPassiveEffects, + var root$198 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12232,7 +12260,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$197, remainingLanes); + releaseRootPooledCache(root$198, remainingLanes); } } return !1; @@ -13467,19 +13495,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$353; + var JSCompiler_inline_result$jscomp$354; if (canUseDOM) { - var isSupported$jscomp$inline_1580 = "oninput" in document; - if (!isSupported$jscomp$inline_1580) { - var element$jscomp$inline_1581 = document.createElement("div"); - element$jscomp$inline_1581.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1580 = - "function" === typeof element$jscomp$inline_1581.oninput; + var isSupported$jscomp$inline_1585 = "oninput" in document; + if (!isSupported$jscomp$inline_1585) { + var element$jscomp$inline_1586 = document.createElement("div"); + element$jscomp$inline_1586.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1585 = + "function" === typeof element$jscomp$inline_1586.oninput; } - JSCompiler_inline_result$jscomp$353 = isSupported$jscomp$inline_1580; - } else JSCompiler_inline_result$jscomp$353 = !1; + JSCompiler_inline_result$jscomp$354 = isSupported$jscomp$inline_1585; + } else JSCompiler_inline_result$jscomp$354 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$353 && + JSCompiler_inline_result$jscomp$354 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13890,20 +13918,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1621 = 0; - i$jscomp$inline_1621 < simpleEventPluginEvents.length; - i$jscomp$inline_1621++ + var i$jscomp$inline_1626 = 0; + i$jscomp$inline_1626 < simpleEventPluginEvents.length; + i$jscomp$inline_1626++ ) { - var eventName$jscomp$inline_1622 = - simpleEventPluginEvents[i$jscomp$inline_1621], - domEventName$jscomp$inline_1623 = - eventName$jscomp$inline_1622.toLowerCase(), - capitalizedEvent$jscomp$inline_1624 = - eventName$jscomp$inline_1622[0].toUpperCase() + - eventName$jscomp$inline_1622.slice(1); + var eventName$jscomp$inline_1627 = + simpleEventPluginEvents[i$jscomp$inline_1626], + domEventName$jscomp$inline_1628 = + eventName$jscomp$inline_1627.toLowerCase(), + capitalizedEvent$jscomp$inline_1629 = + eventName$jscomp$inline_1627[0].toUpperCase() + + eventName$jscomp$inline_1627.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1623, - "on" + capitalizedEvent$jscomp$inline_1624 + domEventName$jscomp$inline_1628, + "on" + capitalizedEvent$jscomp$inline_1629 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15196,34 +15224,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$216 = props[hasSrc]; - if (null != propValue$216) + var propValue$217 = props[hasSrc]; + if (null != propValue$217) switch (hasSrc) { case "name": - hasSrcSet = propValue$216; + hasSrcSet = propValue$217; break; case "type": - propValue = propValue$216; + propValue = propValue$217; break; case "checked": - checked = propValue$216; + checked = propValue$217; break; case "defaultChecked": - defaultChecked = propValue$216; + defaultChecked = propValue$217; break; case "value": - propKey = propValue$216; + propKey = propValue$217; break; case "defaultValue": - defaultValue = propValue$216; + defaultValue = propValue$217; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$216) + if (null != propValue$217) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$216, props, null); + setProp(domElement, tag, hasSrc, propValue$217, props, null); } } initInput( @@ -15360,14 +15388,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$216 in props) - props.hasOwnProperty(propValue$216) && - ((hasSrc = props[propValue$216]), + for (propValue$217 in props) + props.hasOwnProperty(propValue$217) && + ((hasSrc = props[propValue$217]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$216, + propValue$217, hasSrc, props, void 0 @@ -15415,14 +15443,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$233 in nextProps) { - var propKey = nextProps[propKey$233]; - lastProp = lastProps[propKey$233]; + for (var propKey$234 in nextProps) { + var propKey = nextProps[propKey$234]; + lastProp = lastProps[propKey$234]; if ( - nextProps.hasOwnProperty(propKey$233) && + nextProps.hasOwnProperty(propKey$234) && (null != propKey || null != lastProp) ) - switch (propKey$233) { + switch (propKey$234) { case "type": type = propKey; break; @@ -15451,7 +15479,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$233, + propKey$234, propKey, nextProps, lastProp @@ -15470,7 +15498,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$233 = null; + propKey = value = defaultValue = propKey$234 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15501,7 +15529,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$233 = type; + propKey$234 = type; break; case "defaultValue": defaultValue = type; @@ -15522,15 +15550,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$233 - ? updateOptions(domElement, !!lastProps, propKey$233, !1) + null != propKey$234 + ? updateOptions(domElement, !!lastProps, propKey$234, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$233 = null; + propKey = propKey$234 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15554,7 +15582,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$233 = name; + propKey$234 = name; break; case "defaultValue": propKey = name; @@ -15568,17 +15596,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$233, propKey); + updateTextarea(domElement, propKey$234, propKey); return; case "option": - for (var propKey$249 in lastProps) + for (var propKey$250 in lastProps) if ( - ((propKey$233 = lastProps[propKey$249]), - lastProps.hasOwnProperty(propKey$249) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$249)) + ((propKey$234 = lastProps[propKey$250]), + lastProps.hasOwnProperty(propKey$250) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$250)) ) - switch (propKey$249) { + switch (propKey$250) { case "selected": domElement.selected = !1; break; @@ -15586,33 +15614,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$250, null, nextProps, - propKey$233 + propKey$234 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$233 = nextProps[lastDefaultValue]), + ((propKey$234 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$233 !== propKey && - (null != propKey$233 || null != propKey)) + propKey$234 !== propKey && + (null != propKey$234 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$233 && - "function" !== typeof propKey$233 && - "symbol" !== typeof propKey$233; + propKey$234 && + "function" !== typeof propKey$234 && + "symbol" !== typeof propKey$234; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$233, + propKey$234, nextProps, propKey ); @@ -15633,24 +15661,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$254 in lastProps) - (propKey$233 = lastProps[propKey$254]), - lastProps.hasOwnProperty(propKey$254) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$254) && - setProp(domElement, tag, propKey$254, null, nextProps, propKey$233); + for (var propKey$255 in lastProps) + (propKey$234 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$255) && + setProp(domElement, tag, propKey$255, null, nextProps, propKey$234); for (checked in nextProps) if ( - ((propKey$233 = nextProps[checked]), + ((propKey$234 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$233 !== propKey && - (null != propKey$233 || null != propKey)) + propKey$234 !== propKey && + (null != propKey$234 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$233) + if (null != propKey$234) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15658,7 +15686,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$233, + propKey$234, nextProps, propKey ); @@ -15666,49 +15694,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$259 in lastProps) - (propKey$233 = lastProps[propKey$259]), - lastProps.hasOwnProperty(propKey$259) && - void 0 !== propKey$233 && - !nextProps.hasOwnProperty(propKey$259) && + for (var propKey$260 in lastProps) + (propKey$234 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + void 0 !== propKey$234 && + !nextProps.hasOwnProperty(propKey$260) && setPropOnCustomElement( domElement, tag, - propKey$259, + propKey$260, void 0, nextProps, - propKey$233 + propKey$234 ); for (defaultChecked in nextProps) - (propKey$233 = nextProps[defaultChecked]), + (propKey$234 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$233 === propKey || - (void 0 === propKey$233 && void 0 === propKey) || + propKey$234 === propKey || + (void 0 === propKey$234 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$233, + propKey$234, nextProps, propKey ); return; } } - for (var propKey$264 in lastProps) - (propKey$233 = lastProps[propKey$264]), - lastProps.hasOwnProperty(propKey$264) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$264) && - setProp(domElement, tag, propKey$264, null, nextProps, propKey$233); + for (var propKey$265 in lastProps) + (propKey$234 = lastProps[propKey$265]), + lastProps.hasOwnProperty(propKey$265) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$265) && + setProp(domElement, tag, propKey$265, null, nextProps, propKey$234); for (lastProp in nextProps) - (propKey$233 = nextProps[lastProp]), + (propKey$234 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$233 === propKey || - (null == propKey$233 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$233, nextProps, propKey); + propKey$234 === propKey || + (null == propKey$234 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$234, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16362,26 +16390,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$272 = getResourcesFromRoot( + var styles$273 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$273 = styles$272.get(type); - resource$273 || + resource$274 = styles$273.get(type); + resource$274 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$273 = { + (resource$274 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$272.set(type, resource$273), - (styles$272 = JSCompiler_inline_result.querySelector( + styles$273.set(type, resource$274), + (styles$273 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$272._p && - ((resource$273.instance = styles$272), - (resource$273.state.loading = 5)), + !styles$273._p && + ((resource$274.instance = styles$273), + (resource$274.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16394,16 +16422,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$272 || + styles$273 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$273.state + resource$274.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$273; + return resource$274; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16500,37 +16528,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$278 = hoistableRoot.querySelector( + var instance$279 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$278) + if (instance$279) return ( (resource.state.loading |= 4), - (resource.instance = instance$278), - markNodeAsHoistable(instance$278), - instance$278 + (resource.instance = instance$279), + markNodeAsHoistable(instance$279), + instance$279 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$278 = ( + instance$279 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$278); - var linkInstance = instance$278; + markNodeAsHoistable(instance$279); + var linkInstance = instance$279; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$278, "link", instance); + setInitialProperties(instance$279, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$278, props.precedence, hoistableRoot); - return (resource.instance = instance$278); + insertStylesheet(instance$279, props.precedence, hoistableRoot); + return (resource.instance = instance$279); case "script": - instance$278 = getScriptKey(props.src); + instance$279 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$278) + getScriptSelectorFromKey(instance$279) )) ) return ( @@ -16539,7 +16567,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$278))) + if ((styleProps = preloadPropsMap.get(instance$279))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17543,16 +17571,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1794 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1799 = React.version; if ( - "19.1.0-www-classic-d4287258-20241217" !== - isomorphicReactPackageVersion$jscomp$inline_1794 + "19.1.0-www-classic-a9bbe346-20241219" !== + isomorphicReactPackageVersion$jscomp$inline_1799 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1794, - "19.1.0-www-classic-d4287258-20241217" + isomorphicReactPackageVersion$jscomp$inline_1799, + "19.1.0-www-classic-a9bbe346-20241219" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17568,24 +17596,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2333 = { +var internals$jscomp$inline_2341 = { bundleType: 0, - version: "19.1.0-www-classic-d4287258-20241217", + version: "19.1.0-www-classic-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2334 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2342 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2334.isDisabled && - hook$jscomp$inline_2334.supportsFiber + !hook$jscomp$inline_2342.isDisabled && + hook$jscomp$inline_2342.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2334.inject( - internals$jscomp$inline_2333 + (rendererID = hook$jscomp$inline_2342.inject( + internals$jscomp$inline_2341 )), - (injectedHook = hook$jscomp$inline_2334); + (injectedHook = hook$jscomp$inline_2342); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -18089,4 +18117,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-classic-d4287258-20241217"; +exports.version = "19.1.0-www-classic-a9bbe346-20241219"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 080f4a5f15f1a..1f56f2e61194b 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -1826,123 +1826,269 @@ function resetHydrationState() { nextHydratableInstance = hydrationParentFiber = null; isHydrating = !1; } +function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; +} function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) : hydrationErrors.push(error); } -var concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0; -function finishQueueingConcurrentUpdates() { +var valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null; +function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue); + context._currentValue = nextValue; +} +function popProvider(context) { + context._currentValue = valueCursor.current; + pop(valueCursor); +} +function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } +} +function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree +) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } +} +function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree +) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } -function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); -} -function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); +function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } -function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); +function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } -function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); +function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } -function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } -var firstScheduledRoot = null, - lastScheduledRoot = null, - didScheduleMicrotask = !1, - mightHavePendingSyncWork = !1, - isFlushingWork = !1, - currentEventTransitionLane = 0; -function ensureRootIsScheduled(root) { - root !== lastScheduledRoot && - null === root.next && - (null === lastScheduledRoot - ? (firstScheduledRoot = lastScheduledRoot = root) - : (lastScheduledRoot = lastScheduledRoot.next = root)); - mightHavePendingSyncWork = !0; - didScheduleMicrotask || - ((didScheduleMicrotask = !0), - scheduleImmediateTask(processRootScheduleInMicrotask)); - enableDeferRootSchedulingToMicrotask || - scheduleTaskForRootDuringMicrotask(root, now()); +function readContextForConsumer(consumer, context) { + var value = context._currentValue; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; } -function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { - if (!isFlushingWork && mightHavePendingSyncWork) { - isFlushingWork = !0; - do { - var didPerformSomeWork = !1; - for (var root$26 = firstScheduledRoot; null !== root$26; ) { - if (!onlyLegacy) - if (0 !== syncTransitionLanes) { - var pendingLanes = root$26.pendingLanes; - if (0 === pendingLanes) var JSCompiler_inline_result = 0; - else { - var suspendedLanes = root$26.suspendedLanes, - pingedLanes = root$26.pingedLanes; - JSCompiler_inline_result = - (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; - JSCompiler_inline_result &= +var AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; +} +function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); +} +var firstScheduledRoot = null, + lastScheduledRoot = null, + didScheduleMicrotask = !1, + mightHavePendingSyncWork = !1, + isFlushingWork = !1, + currentEventTransitionLane = 0; +function ensureRootIsScheduled(root) { + root !== lastScheduledRoot && + null === root.next && + (null === lastScheduledRoot + ? (firstScheduledRoot = lastScheduledRoot = root) + : (lastScheduledRoot = lastScheduledRoot.next = root)); + mightHavePendingSyncWork = !0; + didScheduleMicrotask || + ((didScheduleMicrotask = !0), + scheduleImmediateTask(processRootScheduleInMicrotask)); + enableDeferRootSchedulingToMicrotask || + scheduleTaskForRootDuringMicrotask(root, now()); +} +function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { + if (!isFlushingWork && mightHavePendingSyncWork) { + isFlushingWork = !0; + do { + var didPerformSomeWork = !1; + for (var root$27 = firstScheduledRoot; null !== root$27; ) { + if (!onlyLegacy) + if (0 !== syncTransitionLanes) { + var pendingLanes = root$27.pendingLanes; + if (0 === pendingLanes) var JSCompiler_inline_result = 0; + else { + var suspendedLanes = root$27.suspendedLanes, + pingedLanes = root$27.pingedLanes; + JSCompiler_inline_result = + (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1; + JSCompiler_inline_result &= pendingLanes & ~(suspendedLanes & ~pingedLanes); JSCompiler_inline_result = JSCompiler_inline_result & 201326677 @@ -1953,18 +2099,18 @@ function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) { } 0 !== JSCompiler_inline_result && ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); + performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); } else (JSCompiler_inline_result = workInProgressRootRenderLanes), (JSCompiler_inline_result = getNextLanes( - root$26, - root$26 === workInProgressRoot ? JSCompiler_inline_result : 0 + root$27, + root$27 === workInProgressRoot ? JSCompiler_inline_result : 0 )), 0 === (JSCompiler_inline_result & 3) || - checkIfRootIsPrerendering(root$26, JSCompiler_inline_result) || + checkIfRootIsPrerendering(root$27, JSCompiler_inline_result) || ((didPerformSomeWork = !0), - performSyncWorkOnRoot(root$26, JSCompiler_inline_result)); - root$26 = root$26.next; + performSyncWorkOnRoot(root$27, JSCompiler_inline_result)); + root$27 = root$27.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2167,279 +2313,80 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } -var hasForceUpdate = !1; -function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; -} -function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); +var prevOnStartTransitionFinish = ReactSharedInternals.S; +ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); +}; +var resumedCache = createCursor(null), + transitionStack = createCursor(null); +function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } -function createUpdate(lane) { - return { lane: lane, tag: 0, payload: null, callback: null, next: null }; +function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions +) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); } -function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if (0 !== (executionContext & 2)) { - var pending = updateQueue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - updateQueue.pending = update; - update = getRootForUpdatedFiber(fiber); - markUpdateLaneFromFiberToRoot(fiber, null, lane); - return update; - } - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); +function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); } -function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); - } +function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue, pool: cacheFromPool }; } -function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; +function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast - ? (newFirst = newLast = clone) - : (newLast = newLast.next = clone); - queue = queue.next; - } while (null !== queue); - null === newLast - ? (newFirst = newLast = capturedUpdate) - : (newLast = newLast.next = capturedUpdate); - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current.shared, - callbacks: current.callbacks - }; - workInProgress.updateQueue = queue; - return; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - workInProgress = queue.lastBaseUpdate; - null === workInProgress - ? (queue.firstBaseUpdate = capturedUpdate) - : (workInProgress.next = capturedUpdate); - queue.lastBaseUpdate = capturedUpdate; + return !0; } -var didReadFromEntangledAsyncAction = !1; -function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } -} -function processUpdateQueue( - workInProgress$jscomp$0, - props, - instance$jscomp$0, - renderLanes -) { - didReadFromEntangledAsyncAction = !1; - var queue = workInProgress$jscomp$0.updateQueue; - hasForceUpdate = !1; - var firstBaseUpdate = queue.firstBaseUpdate, - lastBaseUpdate = queue.lastBaseUpdate, - pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, - firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate - ? (firstBaseUpdate = firstPendingUpdate) - : (lastBaseUpdate.next = firstPendingUpdate); - lastBaseUpdate = lastPendingUpdate; - var current = workInProgress$jscomp$0.alternate; - null !== current && - ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && - (null === pendingQueue - ? (current.firstBaseUpdate = firstPendingUpdate) - : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, - isHiddenUpdate = updateLane !== pendingQueue.lane; - if ( - isHiddenUpdate - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - 0 !== updateLane && - updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - null !== current && - (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - var workInProgress = workInProgress$jscomp$0, - update = pendingQueue; - updateLane = props; - var instance = instance$jscomp$0; - switch (update.tag) { - case 1: - workInProgress = update.payload; - if ("function" === typeof workInProgress) { - newState = workInProgress.call(instance, newState, updateLane); - break a; - } - newState = workInProgress; - break a; - case 3: - workInProgress.flags = (workInProgress.flags & -65537) | 128; - case 0: - workInProgress = update.payload; - updateLane = - "function" === typeof workInProgress - ? workInProgress.call(instance, newState, updateLane) - : workInProgress; - if (null === updateLane || void 0 === updateLane) break a; - newState = assign({}, newState, updateLane); - break a; - case 2: - hasForceUpdate = !0; - } - } - updateLane = pendingQueue.callback; - null !== updateLane && - ((workInProgress$jscomp$0.flags |= 64), - isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), - (isHiddenUpdate = queue.callbacks), - null === isHiddenUpdate - ? (queue.callbacks = [updateLane]) - : isHiddenUpdate.push(updateLane)); - } else - (isHiddenUpdate = { - lane: updateLane, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: pendingQueue.callback, - next: null - }), - null === current - ? ((firstPendingUpdate = current = isHiddenUpdate), - (lastPendingUpdate = newState)) - : (current = current.next = isHiddenUpdate), - (lastBaseUpdate |= updateLane); - pendingQueue = pendingQueue.next; - if (null === pendingQueue) - if (((pendingQueue = queue.shared.pending), null === pendingQueue)) - break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; - } -} -function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error(formatProdErrorMessage(191, callback)); - callback.call(context); -} -function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); -} -function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; -} -var SuspenseException = Error(formatProdErrorMessage(460)), - SuspenseyCommitException = Error(formatProdErrorMessage(474)), - SuspenseActionException = Error(formatProdErrorMessage(542)), - noopSuspenseyCommitThenable = { then: function () {} }; -function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; +var SuspenseException = Error(formatProdErrorMessage(460)), + SuspenseyCommitException = Error(formatProdErrorMessage(474)), + SuspenseActionException = Error(formatProdErrorMessage(542)), + noopSuspenseyCommitThenable = { then: function () {} }; +function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; } function noop$3() {} function trackUsedThenable(thenableState, thenable, index) { @@ -2509,53 +2456,374 @@ function checkIfUseWrappedInAsyncCatch(rejectedReason) { ) throw Error(formatProdErrorMessage(483)); } -var currentTreeHiddenStackCursor = createCursor(null), - prevEntangledRenderLanesCursor = createCursor(0); -function pushHiddenContext(fiber, context) { - fiber = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, fiber); - push(currentTreeHiddenStackCursor, context); - entangledRenderLanes = fiber | context.baseLanes; +var concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0; +function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } } -function reuseHiddenContextOnStack() { - push(prevEntangledRenderLanesCursor, entangledRenderLanes); - push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); +function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); } -function popHiddenContext() { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor); - pop(prevEntangledRenderLanesCursor); +function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); } -var renderLanes = 0, - currentlyRenderingFiber$1 = null, - currentHook = null, - workInProgressHook = null, - didScheduleRenderPhaseUpdate = !1, - didScheduleRenderPhaseUpdateDuringThisPass = !1, - shouldDoubleInvokeUserFnsInHooksDEV = !1, - localIdCounter = 0, - thenableIndexCounter$1 = 0, - thenableState$1 = null, - globalClientIdCounter = 0; -function throwInvalidHookError() { - throw Error(formatProdErrorMessage(321)); +function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } -function areHookInputsEqual(nextDeps, prevDeps) { - if (null === prevDeps) return !1; - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) - if (!objectIs(nextDeps[i], prevDeps[i])) return !1; - return !0; +function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } -function renderWithHooks( - current, - workInProgress, - Component, - props, - secondArg, - nextRenderLanes -) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; +function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; +} +var hasForceUpdate = !1; +function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; +} +function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); +} +function createUpdate(lane) { + return { lane: lane, tag: 0, payload: null, callback: null, next: null }; +} +function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if (0 !== (executionContext & 2)) { + var pending = updateQueue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + updateQueue.pending = update; + update = getRootForUpdatedFiber(fiber); + markUpdateLaneFromFiberToRoot(fiber, null, lane); + return update; + } + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); +} +function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } +} +function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { + do { + var clone = { + lane: queue.lane, + tag: queue.tag, + payload: queue.payload, + callback: null, + next: null + }; + null === newLast + ? (newFirst = newLast = clone) + : (newLast = newLast.next = clone); + queue = queue.next; + } while (null !== queue); + null === newLast + ? (newFirst = newLast = capturedUpdate) + : (newLast = newLast.next = capturedUpdate); + } else newFirst = newLast = capturedUpdate; + queue = { + baseState: current.baseState, + firstBaseUpdate: newFirst, + lastBaseUpdate: newLast, + shared: current.shared, + callbacks: current.callbacks + }; + workInProgress.updateQueue = queue; + return; + } + workInProgress = queue.lastBaseUpdate; + null === workInProgress + ? (queue.firstBaseUpdate = capturedUpdate) + : (workInProgress.next = capturedUpdate); + queue.lastBaseUpdate = capturedUpdate; +} +var didReadFromEntangledAsyncAction = !1; +function suspendIfUpdateReadFromEntangledAsyncAction() { + if (didReadFromEntangledAsyncAction) { + var entangledActionThenable = currentEntangledActionThenable; + if (null !== entangledActionThenable) throw entangledActionThenable; + } +} +function processUpdateQueue( + workInProgress$jscomp$0, + props, + instance$jscomp$0, + renderLanes +) { + didReadFromEntangledAsyncAction = !1; + var queue = workInProgress$jscomp$0.updateQueue; + hasForceUpdate = !1; + var firstBaseUpdate = queue.firstBaseUpdate, + lastBaseUpdate = queue.lastBaseUpdate, + pendingQueue = queue.shared.pending; + if (null !== pendingQueue) { + queue.shared.pending = null; + var lastPendingUpdate = pendingQueue, + firstPendingUpdate = lastPendingUpdate.next; + lastPendingUpdate.next = null; + null === lastBaseUpdate + ? (firstBaseUpdate = firstPendingUpdate) + : (lastBaseUpdate.next = firstPendingUpdate); + lastBaseUpdate = lastPendingUpdate; + var current = workInProgress$jscomp$0.alternate; + null !== current && + ((current = current.updateQueue), + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && + (null === pendingQueue + ? (current.firstBaseUpdate = firstPendingUpdate) + : (pendingQueue.next = firstPendingUpdate), + (current.lastBaseUpdate = lastPendingUpdate))); + } + if (null !== firstBaseUpdate) { + var newState = queue.baseState; + lastBaseUpdate = 0; + current = firstPendingUpdate = lastPendingUpdate = null; + pendingQueue = firstBaseUpdate; + do { + var updateLane = pendingQueue.lane & -536870913, + isHiddenUpdate = updateLane !== pendingQueue.lane; + if ( + isHiddenUpdate + ? (workInProgressRootRenderLanes & updateLane) === updateLane + : (renderLanes & updateLane) === updateLane + ) { + 0 !== updateLane && + updateLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + null !== current && + (current = current.next = + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); + a: { + var workInProgress = workInProgress$jscomp$0, + update = pendingQueue; + updateLane = props; + var instance = instance$jscomp$0; + switch (update.tag) { + case 1: + workInProgress = update.payload; + if ("function" === typeof workInProgress) { + newState = workInProgress.call(instance, newState, updateLane); + break a; + } + newState = workInProgress; + break a; + case 3: + workInProgress.flags = (workInProgress.flags & -65537) | 128; + case 0: + workInProgress = update.payload; + updateLane = + "function" === typeof workInProgress + ? workInProgress.call(instance, newState, updateLane) + : workInProgress; + if (null === updateLane || void 0 === updateLane) break a; + newState = assign({}, newState, updateLane); + break a; + case 2: + hasForceUpdate = !0; + } + } + updateLane = pendingQueue.callback; + null !== updateLane && + ((workInProgress$jscomp$0.flags |= 64), + isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); + } else + (isHiddenUpdate = { + lane: updateLane, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: pendingQueue.callback, + next: null + }), + null === current + ? ((firstPendingUpdate = current = isHiddenUpdate), + (lastPendingUpdate = newState)) + : (current = current.next = isHiddenUpdate), + (lastBaseUpdate |= updateLane); + pendingQueue = pendingQueue.next; + if (null === pendingQueue) + if (((pendingQueue = queue.shared.pending), null === pendingQueue)) + break; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress$jscomp$0.lanes = lastBaseUpdate; + workInProgress$jscomp$0.memoizedState = newState; + } +} +function callCallback(callback, context) { + if ("function" !== typeof callback) + throw Error(formatProdErrorMessage(191, callback)); + callback.call(context); +} +function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); +} +var currentTreeHiddenStackCursor = createCursor(null), + prevEntangledRenderLanesCursor = createCursor(0); +function pushHiddenContext(fiber, context) { + fiber = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, fiber); + push(currentTreeHiddenStackCursor, context); + entangledRenderLanes = fiber | context.baseLanes; +} +function reuseHiddenContextOnStack() { + push(prevEntangledRenderLanesCursor, entangledRenderLanes); + push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current); +} +function popHiddenContext() { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor); + pop(prevEntangledRenderLanesCursor); +} +var renderLanes = 0, + currentlyRenderingFiber = null, + currentHook = null, + workInProgressHook = null, + didScheduleRenderPhaseUpdate = !1, + didScheduleRenderPhaseUpdateDuringThisPass = !1, + shouldDoubleInvokeUserFnsInHooksDEV = !1, + localIdCounter = 0, + thenableIndexCounter$1 = 0, + thenableState$1 = null, + globalClientIdCounter = 0; +function throwInvalidHookError() { + throw Error(formatProdErrorMessage(321)); +} +function areHookInputsEqual(nextDeps, prevDeps) { + if (null === prevDeps) return !1; + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) + if (!objectIs(nextDeps[i], prevDeps[i])) return !1; + return !0; +} +function renderWithHooks( + current, + workInProgress, + Component, + props, + secondArg, + nextRenderLanes +) { + renderLanes = nextRenderLanes; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -2580,7 +2848,7 @@ function finishRenderingHooks(current) { ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -2593,7 +2861,7 @@ function finishRenderingHooks(current) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2623,7 +2891,7 @@ function TransitionAwareHostComponent() { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -2650,7 +2918,7 @@ function resetHooksOnUnwind(workInProgress) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = localIdCounter = 0; thenableState$1 = null; @@ -2664,26 +2932,26 @@ function mountWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -2696,7 +2964,7 @@ function updateWorkInProgressHook() { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -2710,7 +2978,7 @@ function useThenable(thenable) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -2731,10 +2999,10 @@ function use(usable) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2752,7 +3020,7 @@ function useMemoCache(size) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -2794,7 +3062,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$37 = !1; + didReadFromEntangledAsyncAction$39 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2815,11 +3083,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$37 = !0); + (didReadFromEntangledAsyncAction$39 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$37 = !0); + (didReadFromEntangledAsyncAction$39 = !0); continue; } else (updateLane = { @@ -2834,7 +3102,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -2855,7 +3123,7 @@ function updateReducerImpl(hook, current, reducer) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -2865,7 +3133,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$37 && + didReadFromEntangledAsyncAction$39 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -2898,7 +3166,7 @@ function rerenderReducer(reducer) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -2943,10 +3211,10 @@ function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3067,8 +3335,8 @@ function runActionStateAction(actionQueue, node) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$43) { - onActionError(actionQueue, node, error$43); + } catch (error$45) { + onActionError(actionQueue, node, error$45); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -3125,7 +3393,7 @@ function mountActionState(action, initialStateProp) { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { b: { @@ -3181,14 +3449,14 @@ function mountActionState(action, initialStateProp) { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(!1); inRootOrSingleton = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, JSCompiler_inline_result.queue ); @@ -3202,7 +3470,7 @@ function mountActionState(action, initialStateProp) { JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result$jscomp$0, inRootOrSingleton, ssrFormState @@ -3238,7 +3506,7 @@ function updateActionStateImpl(stateHook, currentStateHook, action) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -3300,10 +3568,10 @@ function pushResourceEffect( }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -3324,7 +3592,7 @@ function updateRef() { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -3340,7 +3608,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -3356,7 +3624,7 @@ function updateEffect(create, deps) { } function mountResourceEffect(create, createDeps, update, updateDeps, destroy) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -3392,7 +3660,7 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -3404,11 +3672,11 @@ function updateResourceEffect(create, createDeps, update, updateDeps, destroy) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -3485,7 +3753,7 @@ function mountDeferredValueImpl(hook, value, initialValue) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -3500,7 +3768,7 @@ function updateDeferredValueImpl(hook, prevValue, value, initialValue) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -3634,14 +3902,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$46 = enqueueUpdate(provider, fiber, lane); - null !== root$46 && - (scheduleUpdateOnFiber(root$46, provider, lane), - entangleTransitions(root$46, provider, lane)); + var root$48 = enqueueUpdate(provider, fiber, lane); + null !== root$48 && + (scheduleUpdateOnFiber(root$48, provider, lane), + entangleTransitions(root$48, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$46 && + null !== root$48 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -3735,8 +4003,8 @@ function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -3851,7 +4119,7 @@ var HooksDispatcherOnMount = { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3864,7 +4132,7 @@ var HooksDispatcherOnMount = { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -3877,7 +4145,7 @@ var HooksDispatcherOnMount = { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -3886,7 +4154,7 @@ var HooksDispatcherOnMount = { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -3961,7 +4229,7 @@ var HooksDispatcherOnMount = { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3972,7 +4240,7 @@ var HooksDispatcherOnMount = { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -4976,9 +5244,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$78 in Component) - void 0 === newProps[propName$78] && - (newProps[propName$78] = Component[propName$78]); + for (var propName$80 in Component) + void 0 === newProps[propName$80] && + (newProps[propName$80] = Component[propName$80]); } return newProps; } @@ -5354,10 +5622,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$90 = workInProgress.stateNode; + root$92 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$90.incompleteTransitions.has(transition)) { + if (!root$92.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5365,11 +5633,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$90.incompleteTransitions.set(transition, markerInstance); + root$92.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$90.incompleteTransitions.forEach(function (markerInstance) { + root$92.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -5957,7 +6225,12 @@ function mountHostRootWithoutHydrating( reconcileChildren(current, workInProgress, nextChildren, renderLanes); return workInProgress.child; } -var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }; +var SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null +}; function mountSuspenseOffscreenState(renderLanes) { return { baseLanes: renderLanes, cachePool: getSuspendedCache() }; } @@ -6020,7 +6293,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) { null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), (JSCompiler_temp$jscomp$0.stateNode = nextInstance), @@ -6980,134 +7254,18 @@ function beginWork(current, workInProgress, renderLanes) { : resolveDefaultPropsOnNonClassComponent(props, init)), updateForwardRef(current, workInProgress, props, init, renderLanes) ); - case 7: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps, - renderLanes - ), - workInProgress.child - ); - case 8: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 12: - return ( - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 10: - return ( - (props = workInProgress.pendingProps), - pushProvider( - workInProgress, - enableRenderableContext - ? workInProgress.type - : workInProgress.type._context, - props.value - ), - reconcileChildren(current, workInProgress, props.children, renderLanes), - workInProgress.child - ); - case 9: - return ( - (init = enableRenderableContext - ? workInProgress.type._context - : workInProgress.type), - (props = workInProgress.pendingProps.children), - prepareToReadContext(workInProgress), - (init = readContext(init)), - (props = props(init)), - (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, props, renderLanes), - workInProgress.child - ); - case 14: - return ( - (props = workInProgress.type), - (init = workInProgress.pendingProps), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props, init)), - (init = disableDefaultPropsExceptForClasses - ? init - : resolveDefaultPropsOnNonClassComponent(props.type, init)), - updateMemoComponent(current, workInProgress, props, init, renderLanes) - ); - case 15: - return updateSimpleMemoComponent( - current, - workInProgress, - workInProgress.type, - workInProgress.pendingProps, - renderLanes - ); - case 19: - return updateSuspenseListComponent(current, workInProgress, renderLanes); - case 21: + case 7: return ( - (props = workInProgress.pendingProps.children), - markRef(current, workInProgress), - reconcileChildren(current, workInProgress, props, renderLanes), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps, + renderLanes + ), workInProgress.child ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 24: + case 8: return ( - prepareToReadContext(workInProgress), - (props = readContext(CacheContext)), - null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), - (nextProps = createCache()), - (init.pooledCache = nextProps), - nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), - (workInProgress.memoizedState = { parent: props, cache: init }), - initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) - : (0 !== (current.lanes & renderLanes) && - (cloneUpdateQueue(current, workInProgress), - processUpdateQueue(workInProgress, null, null, renderLanes), - suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), reconcileChildren( current, workInProgress, @@ -7116,297 +7274,157 @@ function beginWork(current, workInProgress, renderLanes) { ), workInProgress.child ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); -} -var valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null; -function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue); - context._currentValue = nextValue; -} -function popProvider(context) { - context._currentValue = valueCursor.current; - pop(valueCursor); -} -function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } -} -function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree -) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } -} -function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree -) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; -} -function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + case 12: + return ( + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 10: + return ( + (props = workInProgress.pendingProps), + pushProvider( + workInProgress, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, + props.value + ), + reconcileChildren(current, workInProgress, props.children, renderLanes), + workInProgress.child + ); + case 9: + return ( + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), + (props = workInProgress.pendingProps.children), + prepareToReadContext(workInProgress), + (init = readContext(init)), + (props = props(init)), + (workInProgress.flags |= 1), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 14: + return ( + (props = workInProgress.type), + (init = workInProgress.pendingProps), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props, init)), + (init = disableDefaultPropsExceptForClasses + ? init + : resolveDefaultPropsOnNonClassComponent(props.type, init)), + updateMemoComponent(current, workInProgress, props, init, renderLanes) + ); + case 15: + return updateSimpleMemoComponent( + current, + workInProgress, + workInProgress.type, + workInProgress.pendingProps, + renderLanes + ); + case 19: + return updateSuspenseListComponent(current, workInProgress, renderLanes); + case 21: + return ( + (props = workInProgress.pendingProps.children), + markRef(current, workInProgress), + reconcileChildren(current, workInProgress, props, renderLanes), + workInProgress.child + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 24: + return ( + prepareToReadContext(workInProgress), + (props = readContext(CacheContext)), + null === current + ? ((init = peekCacheFromPool()), + null === init && + ((init = workInProgressRoot), + (nextProps = createCache()), + (init.pooledCache = nextProps), + nextProps.refCount++, + null !== nextProps && (init.pooledCacheLanes |= renderLanes), + (init = nextProps)), + (workInProgress.memoizedState = { parent: props, cache: init }), + initializeUpdateQueue(workInProgress), + pushProvider(workInProgress, CacheContext, init)) + : (0 !== (current.lanes & renderLanes) && + (cloneUpdateQueue(current, workInProgress), + processUpdateQueue(workInProgress, null, null, renderLanes), + suspendIfUpdateReadFromEntangledAsyncAction()), + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; -} -function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); -} -function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); -} -function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); -} -function readContextForConsumer(consumer, context) { - var value = context._currentValue; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; -} -var AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; -} -function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); -} -var prevOnStartTransitionFinish = ReactSharedInternals.S; -ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); -}; -var resumedCache = createCursor(null), - transitionStack = createCursor(null); -function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; -} -function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions -) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); -} -function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); -} -function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue, pool: cacheFromPool }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } var emptyObject = {}; function collectScopedNodesFromChildren( @@ -7626,9 +7644,7 @@ function completeWork(current, workInProgress, renderLanes) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); bubbleProperties(workInProgress); enableTransitionTracing && 0 !== (workInProgress.subtreeFlags & 8192) && @@ -7847,8 +7863,10 @@ function completeWork(current, workInProgress, renderLanes) { bubbleProperties(workInProgress); type = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), (hydrationErrors = null)), + (type = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = type), (type = !0); if (!type) { if (workInProgress.flags & 256) @@ -7869,11 +7887,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool); - var cache$138 = null; + var cache$139 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$138 = newProps.memoizedState.cachePool.pool); - cache$138 !== type && (newProps.flags |= 2048); + (cache$139 = newProps.memoizedState.cachePool.pool); + cache$139 !== type && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7907,8 +7925,8 @@ function completeWork(current, workInProgress, renderLanes) { type = workInProgress.memoizedState; if (null === type) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$138 = type.rendering; - if (null === cache$138) + cache$139 = type.rendering; + if (null === cache$139) if (newProps) cutOffTailIfNeeded(type, !1); else { if ( @@ -7916,11 +7934,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$138 = findFirstSuspended(current); - if (null !== cache$138) { + cache$139 = findFirstSuspended(current); + if (null !== cache$139) { workInProgress.flags |= 128; cutOffTailIfNeeded(type, !1); - current = cache$138.updateQueue; + current = cache$139.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7945,7 +7963,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$138)), null !== current)) { + if (((current = findFirstSuspended(cache$139)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7955,7 +7973,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !0), null === type.tail && "hidden" === type.tailMode && - !cache$138.alternate && + !cache$139.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7968,13 +7986,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(type, !1), (workInProgress.lanes = 4194304)); type.isBackwards - ? ((cache$138.sibling = workInProgress.child), - (workInProgress.child = cache$138)) + ? ((cache$139.sibling = workInProgress.child), + (workInProgress.child = cache$139)) : ((current = type.last), null !== current - ? (current.sibling = cache$138) - : (workInProgress.child = cache$138), - (type.last = cache$138)); + ? (current.sibling = cache$139) + : (workInProgress.child = cache$139), + (type.last = cache$139)); } if (null !== type.tail) return ( @@ -8215,10 +8233,10 @@ function commitHookEffectListMount(flags, finishedWork) { inst.destroy = lastEffect; } } else { - var create$155 = updateQueue.create, - inst$156 = updateQueue.inst; - lastEffect = create$155(); - inst$156.destroy = lastEffect; + var create$156 = updateQueue.create, + inst$157 = updateQueue.inst; + lastEffect = create$156(); + inst$157.destroy = lastEffect; } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -8373,8 +8391,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$158) { - captureCommitPhaseError(current, nearestMountedAncestor, error$158); + } catch (error$159) { + captureCommitPhaseError(current, nearestMountedAncestor, error$159); } else ref.current = null; } @@ -8530,7 +8548,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$202) { + } catch (e$203) { JSCompiler_temp = null; break a; } @@ -8748,11 +8766,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$157) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$158 ); } } @@ -9100,7 +9118,7 @@ function commitDeletionEffectsOnFiber( safelyDetachRef(deletedFiber, nearestMountedAncestor); case 6: prevHostParentIsContainer = hostParent; - var prevHostParentIsContainer$166 = hostParentIsContainer; + var prevHostParentIsContainer$167 = hostParentIsContainer; hostParent = null; recursivelyTraverseDeletionEffects( finishedRoot, @@ -9108,7 +9126,7 @@ function commitDeletionEffectsOnFiber( deletedFiber ); hostParent = prevHostParentIsContainer; - hostParentIsContainer = prevHostParentIsContainer$166; + hostParentIsContainer = prevHostParentIsContainer$167; if (null !== hostParent) if (hostParentIsContainer) try { @@ -9807,21 +9825,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$159 = JSCompiler_inline_result.stateNode; + var parent$160 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$159, ""), + (setTextContent(parent$160, ""), (JSCompiler_inline_result.flags &= -33)); - var before$160 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$160, parent$159); + var before$161 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$161, parent$160); break; case 3: case 4: - var parent$161 = JSCompiler_inline_result.stateNode.containerInfo, - before$162 = getHostSibling(finishedWork); + var parent$162 = JSCompiler_inline_result.stateNode.containerInfo, + before$163 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$162, - parent$161 + before$163, + parent$162 ); break; default: @@ -10185,6 +10203,14 @@ function commitPassiveMountOnFiber( committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -10307,9 +10333,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$177 = finishedWork.stateNode; + var instance$178 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$177._visibility & 4 + ? instance$178._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10321,7 +10347,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$177._visibility |= 4), + : ((instance$178._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10334,7 +10360,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$177 + instance$178 ); break; case 24: @@ -10940,7 +10966,6 @@ function addTransitionProgressCallbackToPendingTransition( )); } var legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -11078,7 +11103,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -11176,14 +11206,6 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) { } while (1); ensureRootIsScheduled(root$jscomp$0); } -function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); -} function commitRootWhenReady( root, finishedWork, @@ -11319,7 +11341,7 @@ function resetWorkInProgressStack() { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -11376,7 +11398,7 @@ function prepareFreshStack(root, lanes) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException || thrownValue === SuspenseActionException ? ((thrownValue = getSuspendedThenable()), @@ -11498,12 +11520,12 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$190) { - handleThrow(root, thrownValue$190); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -11614,11 +11636,11 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$192) { - handleThrow(root, thrownValue$192); + } catch (thrownValue$193) { + handleThrow(root, thrownValue$193); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -11691,7 +11713,7 @@ function throwAndUnwindWorkLoop( thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -11857,9 +11879,6 @@ function commitRootImpl( root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -11874,49 +11893,57 @@ function commitRootImpl( root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = Internals.p), - (Internals.p = 2), - (updatedLanes = executionContext), - (executionContext |= 4), - (suspendedRetryLanes = commitBeforeMutationEffects(root, finishedWork)), - commitMutationEffectsOnFiber(finishedWork, root), - suspendedRetryLanes && - ((_enabled = !0), - dispatchAfterDetachedBlur(selectionInformation.focusedElem), - (_enabled = !1)), - restoreSelection(selectionInformation, root.containerInfo), - (_enabled = !!eventsEnabled), - (selectionInformation = eventsEnabled = null), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (Internals.p = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = Internals.p; + Internals.p = 2; + suspendedRetryLanes = executionContext; + executionContext |= 4; + var shouldFireAfterActiveInstanceBlur$197 = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffectsOnFiber(finishedWork, root); + shouldFireAfterActiveInstanceBlur$197 && + ((_enabled = !0), + dispatchAfterDetachedBlur(selectionInformation.focusedElem), + (_enabled = !1)); + restoreSelection(selectionInformation, root.containerInfo); + _enabled = !!eventsEnabled; + selectionInformation = eventsEnabled = null; + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = suspendedRetryLanes; + Internals.p = updatedLanes; + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -11928,6 +11955,7 @@ function commitRootImpl( componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -11964,7 +11992,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects(wasDelayedCommit) { if (null !== rootWithPendingPassiveEffects) { - var root$197 = rootWithPendingPassiveEffects, + var root$198 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11979,7 +12007,7 @@ function flushPassiveEffects(wasDelayedCommit) { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$197, remainingLanes); + releaseRootPooledCache(root$198, remainingLanes); } } return !1; @@ -13203,19 +13231,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$356; + var JSCompiler_inline_result$jscomp$357; if (canUseDOM) { - var isSupported$jscomp$inline_1570 = "oninput" in document; - if (!isSupported$jscomp$inline_1570) { - var element$jscomp$inline_1571 = document.createElement("div"); - element$jscomp$inline_1571.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1570 = - "function" === typeof element$jscomp$inline_1571.oninput; + var isSupported$jscomp$inline_1575 = "oninput" in document; + if (!isSupported$jscomp$inline_1575) { + var element$jscomp$inline_1576 = document.createElement("div"); + element$jscomp$inline_1576.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1575 = + "function" === typeof element$jscomp$inline_1576.oninput; } - JSCompiler_inline_result$jscomp$356 = isSupported$jscomp$inline_1570; - } else JSCompiler_inline_result$jscomp$356 = !1; + JSCompiler_inline_result$jscomp$357 = isSupported$jscomp$inline_1575; + } else JSCompiler_inline_result$jscomp$357 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$356 && + JSCompiler_inline_result$jscomp$357 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13626,20 +13654,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1611 = 0; - i$jscomp$inline_1611 < simpleEventPluginEvents.length; - i$jscomp$inline_1611++ + var i$jscomp$inline_1616 = 0; + i$jscomp$inline_1616 < simpleEventPluginEvents.length; + i$jscomp$inline_1616++ ) { - var eventName$jscomp$inline_1612 = - simpleEventPluginEvents[i$jscomp$inline_1611], - domEventName$jscomp$inline_1613 = - eventName$jscomp$inline_1612.toLowerCase(), - capitalizedEvent$jscomp$inline_1614 = - eventName$jscomp$inline_1612[0].toUpperCase() + - eventName$jscomp$inline_1612.slice(1); + var eventName$jscomp$inline_1617 = + simpleEventPluginEvents[i$jscomp$inline_1616], + domEventName$jscomp$inline_1618 = + eventName$jscomp$inline_1617.toLowerCase(), + capitalizedEvent$jscomp$inline_1619 = + eventName$jscomp$inline_1617[0].toUpperCase() + + eventName$jscomp$inline_1617.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1613, - "on" + capitalizedEvent$jscomp$inline_1614 + domEventName$jscomp$inline_1618, + "on" + capitalizedEvent$jscomp$inline_1619 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14928,34 +14956,34 @@ function setInitialProperties(domElement, tag, props) { defaultChecked = null; for (hasSrc in props) if (props.hasOwnProperty(hasSrc)) { - var propValue$216 = props[hasSrc]; - if (null != propValue$216) + var propValue$217 = props[hasSrc]; + if (null != propValue$217) switch (hasSrc) { case "name": - hasSrcSet = propValue$216; + hasSrcSet = propValue$217; break; case "type": - propKey = propValue$216; + propKey = propValue$217; break; case "checked": - checked = propValue$216; + checked = propValue$217; break; case "defaultChecked": - defaultChecked = propValue$216; + defaultChecked = propValue$217; break; case "value": - propValue = propValue$216; + propValue = propValue$217; break; case "defaultValue": - defaultValue = propValue$216; + defaultValue = propValue$217; break; case "children": case "dangerouslySetInnerHTML": - if (null != propValue$216) + if (null != propValue$217) throw Error(formatProdErrorMessage(137, tag)); break; default: - setProp(domElement, tag, hasSrc, propValue$216, props, null); + setProp(domElement, tag, hasSrc, propValue$217, props, null); } } initInput( @@ -15091,14 +15119,14 @@ function setInitialProperties(domElement, tag, props) { return; default: if (isCustomElement(tag)) { - for (propValue$216 in props) - props.hasOwnProperty(propValue$216) && - ((hasSrc = props[propValue$216]), + for (propValue$217 in props) + props.hasOwnProperty(propValue$217) && + ((hasSrc = props[propValue$217]), void 0 !== hasSrc && setPropOnCustomElement( domElement, tag, - propValue$216, + propValue$217, hasSrc, props, void 0 @@ -15146,14 +15174,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$233 in nextProps) { - var propKey = nextProps[propKey$233]; - lastProp = lastProps[propKey$233]; + for (var propKey$234 in nextProps) { + var propKey = nextProps[propKey$234]; + lastProp = lastProps[propKey$234]; if ( - nextProps.hasOwnProperty(propKey$233) && + nextProps.hasOwnProperty(propKey$234) && (null != propKey || null != lastProp) ) - switch (propKey$233) { + switch (propKey$234) { case "type": type = propKey; break; @@ -15182,7 +15210,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$233, + propKey$234, propKey, nextProps, lastProp @@ -15201,7 +15229,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$233 = null; + propKey = value = defaultValue = propKey$234 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15232,7 +15260,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$233 = type; + propKey$234 = type; break; case "defaultValue": defaultValue = type; @@ -15253,15 +15281,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$233 - ? updateOptions(domElement, !!lastProps, propKey$233, !1) + null != propKey$234 + ? updateOptions(domElement, !!lastProps, propKey$234, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$233 = null; + propKey = propKey$234 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15285,7 +15313,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$233 = name; + propKey$234 = name; break; case "defaultValue": propKey = name; @@ -15299,17 +15327,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$233, propKey); + updateTextarea(domElement, propKey$234, propKey); return; case "option": - for (var propKey$249 in lastProps) + for (var propKey$250 in lastProps) if ( - ((propKey$233 = lastProps[propKey$249]), - lastProps.hasOwnProperty(propKey$249) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$249)) + ((propKey$234 = lastProps[propKey$250]), + lastProps.hasOwnProperty(propKey$250) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$250)) ) - switch (propKey$249) { + switch (propKey$250) { case "selected": domElement.selected = !1; break; @@ -15317,33 +15345,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$250, null, nextProps, - propKey$233 + propKey$234 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$233 = nextProps[lastDefaultValue]), + ((propKey$234 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$233 !== propKey && - (null != propKey$233 || null != propKey)) + propKey$234 !== propKey && + (null != propKey$234 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$233 && - "function" !== typeof propKey$233 && - "symbol" !== typeof propKey$233; + propKey$234 && + "function" !== typeof propKey$234 && + "symbol" !== typeof propKey$234; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$233, + propKey$234, nextProps, propKey ); @@ -15364,24 +15392,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$254 in lastProps) - (propKey$233 = lastProps[propKey$254]), - lastProps.hasOwnProperty(propKey$254) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$254) && - setProp(domElement, tag, propKey$254, null, nextProps, propKey$233); + for (var propKey$255 in lastProps) + (propKey$234 = lastProps[propKey$255]), + lastProps.hasOwnProperty(propKey$255) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$255) && + setProp(domElement, tag, propKey$255, null, nextProps, propKey$234); for (checked in nextProps) if ( - ((propKey$233 = nextProps[checked]), + ((propKey$234 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$233 !== propKey && - (null != propKey$233 || null != propKey)) + propKey$234 !== propKey && + (null != propKey$234 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$233) + if (null != propKey$234) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15389,7 +15417,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$233, + propKey$234, nextProps, propKey ); @@ -15397,49 +15425,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$259 in lastProps) - (propKey$233 = lastProps[propKey$259]), - lastProps.hasOwnProperty(propKey$259) && - void 0 !== propKey$233 && - !nextProps.hasOwnProperty(propKey$259) && + for (var propKey$260 in lastProps) + (propKey$234 = lastProps[propKey$260]), + lastProps.hasOwnProperty(propKey$260) && + void 0 !== propKey$234 && + !nextProps.hasOwnProperty(propKey$260) && setPropOnCustomElement( domElement, tag, - propKey$259, + propKey$260, void 0, nextProps, - propKey$233 + propKey$234 ); for (defaultChecked in nextProps) - (propKey$233 = nextProps[defaultChecked]), + (propKey$234 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$233 === propKey || - (void 0 === propKey$233 && void 0 === propKey) || + propKey$234 === propKey || + (void 0 === propKey$234 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$233, + propKey$234, nextProps, propKey ); return; } } - for (var propKey$264 in lastProps) - (propKey$233 = lastProps[propKey$264]), - lastProps.hasOwnProperty(propKey$264) && - null != propKey$233 && - !nextProps.hasOwnProperty(propKey$264) && - setProp(domElement, tag, propKey$264, null, nextProps, propKey$233); + for (var propKey$265 in lastProps) + (propKey$234 = lastProps[propKey$265]), + lastProps.hasOwnProperty(propKey$265) && + null != propKey$234 && + !nextProps.hasOwnProperty(propKey$265) && + setProp(domElement, tag, propKey$265, null, nextProps, propKey$234); for (lastProp in nextProps) - (propKey$233 = nextProps[lastProp]), + (propKey$234 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$233 === propKey || - (null == propKey$233 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$233, nextProps, propKey); + propKey$234 === propKey || + (null == propKey$234 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$234, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16093,26 +16121,26 @@ function getResource(type, currentProps, pendingProps, currentResource) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$272 = getResourcesFromRoot( + var styles$273 = getResourcesFromRoot( JSCompiler_inline_result ).hoistableStyles, - resource$273 = styles$272.get(type); - resource$273 || + resource$274 = styles$273.get(type); + resource$274 || ((JSCompiler_inline_result = JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result), - (resource$273 = { + (resource$274 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$272.set(type, resource$273), - (styles$272 = JSCompiler_inline_result.querySelector( + styles$273.set(type, resource$274), + (styles$273 = JSCompiler_inline_result.querySelector( getStylesheetSelectorFromKey(type) )) && - !styles$272._p && - ((resource$273.instance = styles$272), - (resource$273.state.loading = 5)), + !styles$273._p && + ((resource$274.instance = styles$273), + (resource$274.state.loading = 5)), preloadPropsMap.has(type) || ((pendingProps = { rel: "preload", @@ -16125,16 +16153,16 @@ function getResource(type, currentProps, pendingProps, currentResource) { referrerPolicy: pendingProps.referrerPolicy }), preloadPropsMap.set(type, pendingProps), - styles$272 || + styles$273 || preloadStylesheet( JSCompiler_inline_result, type, pendingProps, - resource$273.state + resource$274.state ))); if (currentProps && null === currentResource) throw Error(formatProdErrorMessage(528, "")); - return resource$273; + return resource$274; } if (currentProps && null !== currentResource) throw Error(formatProdErrorMessage(529, "")); @@ -16231,37 +16259,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$278 = hoistableRoot.querySelector( + var instance$279 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$278) + if (instance$279) return ( (resource.state.loading |= 4), - (resource.instance = instance$278), - markNodeAsHoistable(instance$278), - instance$278 + (resource.instance = instance$279), + markNodeAsHoistable(instance$279), + instance$279 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$278 = ( + instance$279 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$278); - var linkInstance = instance$278; + markNodeAsHoistable(instance$279); + var linkInstance = instance$279; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$278, "link", instance); + setInitialProperties(instance$279, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$278, props.precedence, hoistableRoot); - return (resource.instance = instance$278); + insertStylesheet(instance$279, props.precedence, hoistableRoot); + return (resource.instance = instance$279); case "script": - instance$278 = getScriptKey(props.src); + instance$279 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$278) + getScriptSelectorFromKey(instance$279) )) ) return ( @@ -16270,7 +16298,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$278))) + if ((styleProps = preloadPropsMap.get(instance$279))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17274,16 +17302,16 @@ function getCrossOriginStringAs(as, input) { if ("string" === typeof input) return "use-credentials" === input ? input : ""; } -var isomorphicReactPackageVersion$jscomp$inline_1784 = React.version; +var isomorphicReactPackageVersion$jscomp$inline_1789 = React.version; if ( - "19.1.0-www-modern-d4287258-20241217" !== - isomorphicReactPackageVersion$jscomp$inline_1784 + "19.1.0-www-modern-a9bbe346-20241219" !== + isomorphicReactPackageVersion$jscomp$inline_1789 ) throw Error( formatProdErrorMessage( 527, - isomorphicReactPackageVersion$jscomp$inline_1784, - "19.1.0-www-modern-d4287258-20241217" + isomorphicReactPackageVersion$jscomp$inline_1789, + "19.1.0-www-modern-a9bbe346-20241219" ) ); Internals.findDOMNode = function (componentOrElement) { @@ -17299,24 +17327,24 @@ Internals.Events = [ return fn(a); } ]; -var internals$jscomp$inline_2315 = { +var internals$jscomp$inline_2323 = { bundleType: 0, - version: "19.1.0-www-modern-d4287258-20241217", + version: "19.1.0-www-modern-a9bbe346-20241219", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2316 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2324 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2316.isDisabled && - hook$jscomp$inline_2316.supportsFiber + !hook$jscomp$inline_2324.isDisabled && + hook$jscomp$inline_2324.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2316.inject( - internals$jscomp$inline_2315 + (rendererID = hook$jscomp$inline_2324.inject( + internals$jscomp$inline_2323 )), - (injectedHook = hook$jscomp$inline_2316); + (injectedHook = hook$jscomp$inline_2324); } catch (err) {} } function ReactDOMRoot(internalRoot) { @@ -17820,4 +17848,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.1.0-www-modern-d4287258-20241217"; +exports.version = "19.1.0-www-modern-a9bbe346-20241219"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 34d8b3d8cf506..9ee7a630abc38 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -2124,6 +2124,18 @@ __DEV__ && ((nextHydratableInstance = hydrationParentFiber = null), (didSuspendOrErrorDEV = isHydrating = !1)); } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) @@ -2140,88 +2152,261 @@ __DEV__ && diffRoot )); } - function finishQueueingConcurrentUpdates() { + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; + } + function pushProvider(providerFiber, context, nextValue) { + isPrimaryRenderer + ? (push(valueCursor, context._currentValue, providerFiber), + (context._currentValue = nextValue), + push(rendererCursorDEV, context._currentRenderer, providerFiber), + void 0 !== context._currentRenderer && + null !== context._currentRenderer && + context._currentRenderer !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ), + (context._currentRenderer = rendererSigil)) + : (push(valueCursor, context._currentValue2, providerFiber), + (context._currentValue2 = nextValue), + push(renderer2CursorDEV, context._currentRenderer2, providerFiber), + void 0 !== context._currentRenderer2 && + null !== context._currentRenderer2 && + context._currentRenderer2 !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ), + (context._currentRenderer2 = rendererSigil)); + } + function popProvider(context, providerFiber) { + var currentValue = valueCursor.current; + isPrimaryRenderer + ? ((context._currentValue = currentValue), + (currentValue = rendererCursorDEV.current), + pop(rendererCursorDEV, providerFiber), + (context._currentRenderer = currentValue)) + : ((context._currentValue2 = currentValue), + (currentValue = renderer2CursorDEV.current), + pop(renderer2CursorDEV, providerFiber), + (context._currentRenderer2 = currentValue)); + pop(valueCursor, providerFiber); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + var context = currentDependencies.context; + if ( + !objectIs( + isPrimaryRenderer ? context._currentValue : context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; + function readContextForConsumer(consumer, context) { + var value = isPrimaryRenderer + ? context._currentValue + : context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function pushNestedEffectDurations() { var prevEffectDuration = profilerEffectDuration; @@ -2549,334 +2734,75 @@ __DEV__ && ); return thenableWithOverride; } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; - } - function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } - function createUpdate(lane) { - return { - lane: lane, - tag: UpdateState, - payload: null, - callback: null, - next: null - }; + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions, offscreenWorkInProgress) + : null === newTransitions + ? push( + transitionStack, + transitionStack.current, + offscreenWorkInProgress + ) + : push( + transitionStack, + transitionStack.current.concat(newTransitions), + offscreenWorkInProgress + )); } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if ( - currentlyProcessingQueue === updateQueue && - !didWarnUpdateInsideUpdate - ) { - var componentName = getComponentNameFromFiber(fiber); - error$jscomp$0( - "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", - componentName - ); - didWarnUpdateInsideUpdate = !0; - } - if ((executionContext & RenderContext) !== NoContext) - return ( - (componentName = updateQueue.pending), - null === componentName - ? (update.next = update) - : ((update.next = componentName.next), - (componentName.next = update)), - (updateQueue.pending = update), - (update = getRootForUpdatedFiber(fiber)), - markUpdateLaneFromFiberToRoot(fiber, null, lane), - update - ); - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack, workInProgress), + pop(resumedCache, workInProgress)); } - function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); - } + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { + parent: isPrimaryRenderer + ? CacheContext._currentValue + : CacheContext._currentValue2, + pool: cacheFromPool + }; } - function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast - ? (newFirst = newLast = clone) - : (newLast = newLast.next = clone); - queue = queue.next; - } while (null !== queue); - null === newLast - ? (newFirst = newLast = capturedUpdate) - : (newLast = newLast.next = capturedUpdate); - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current.shared, - callbacks: current.callbacks - }; - workInProgress.updateQueue = queue; - return; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - workInProgress = queue.lastBaseUpdate; - null === workInProgress - ? (queue.firstBaseUpdate = capturedUpdate) - : (workInProgress.next = capturedUpdate); - queue.lastBaseUpdate = capturedUpdate; + return !0; } - function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } - } - function processUpdateQueue( - workInProgress, - props, - instance$jscomp$0, - renderLanes - ) { - didReadFromEntangledAsyncAction = !1; - var queue = workInProgress.updateQueue; - hasForceUpdate = !1; - currentlyProcessingQueue = queue.shared; - var firstBaseUpdate = queue.firstBaseUpdate, - lastBaseUpdate = queue.lastBaseUpdate, - pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, - firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate - ? (firstBaseUpdate = firstPendingUpdate) - : (lastBaseUpdate.next = firstPendingUpdate); - lastBaseUpdate = lastPendingUpdate; - var current = workInProgress.alternate; - null !== current && - ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && - (null === pendingQueue - ? (current.firstBaseUpdate = firstPendingUpdate) - : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, - isHiddenUpdate = updateLane !== pendingQueue.lane; - if ( - isHiddenUpdate - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - 0 !== updateLane && - updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - null !== current && - (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - updateLane = workInProgress; - var partialState = pendingQueue; - var nextProps = props, - instance = instance$jscomp$0; - switch (partialState.tag) { - case ReplaceState: - partialState = partialState.payload; - if ("function" === typeof partialState) { - isDisallowedContextReadInDEV = !0; - var nextState = partialState.call( - instance, - newState, - nextProps - ); - if (updateLane.mode & 8) { - setIsStrictModeForDevtools(!0); - try { - partialState.call(instance, newState, nextProps); - } finally { - setIsStrictModeForDevtools(!1); - } - } - isDisallowedContextReadInDEV = !1; - newState = nextState; - break a; - } - newState = partialState; - break a; - case CaptureUpdate: - updateLane.flags = (updateLane.flags & -65537) | 128; - case UpdateState: - nextState = partialState.payload; - if ("function" === typeof nextState) { - isDisallowedContextReadInDEV = !0; - partialState = nextState.call( - instance, - newState, - nextProps - ); - if (updateLane.mode & 8) { - setIsStrictModeForDevtools(!0); - try { - nextState.call(instance, newState, nextProps); - } finally { - setIsStrictModeForDevtools(!1); - } - } - isDisallowedContextReadInDEV = !1; - } else partialState = nextState; - if (null === partialState || void 0 === partialState) break a; - newState = assign({}, newState, partialState); - break a; - case ForceUpdate: - hasForceUpdate = !0; - } - } - updateLane = pendingQueue.callback; - null !== updateLane && - ((workInProgress.flags |= 64), - isHiddenUpdate && (workInProgress.flags |= 8192), - (isHiddenUpdate = queue.callbacks), - null === isHiddenUpdate - ? (queue.callbacks = [updateLane]) - : isHiddenUpdate.push(updateLane)); - } else - (isHiddenUpdate = { - lane: updateLane, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: pendingQueue.callback, - next: null - }), - null === current - ? ((firstPendingUpdate = current = isHiddenUpdate), - (lastPendingUpdate = newState)) - : (current = current.next = isHiddenUpdate), - (lastBaseUpdate |= updateLane); - pendingQueue = pendingQueue.next; - if (null === pendingQueue) - if (((pendingQueue = queue.shared.pending), null === pendingQueue)) - break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress.lanes = lastBaseUpdate; - workInProgress.memoizedState = newState; - } - currentlyProcessingQueue = null; - } - function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error( - "Invalid argument passed as callback. Expected a function. Instead received: " + - callback - ); - callback.call(context); - } - function commitHiddenCallbacks(updateQueue, context) { - var hiddenCallbacks = updateQueue.shared.hiddenCallbacks; - if (null !== hiddenCallbacks) - for ( - updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; - updateQueue < hiddenCallbacks.length; - updateQueue++ - ) - callCallback(hiddenCallbacks[updateQueue], context); - } - function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); - } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; - } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; } function isThenableResolved(thenable) { thenable = thenable.status; @@ -2972,257 +2898,640 @@ __DEV__ && "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." ); } - function pushHiddenContext(fiber, context) { - var prevEntangledRenderLanes = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); - push(currentTreeHiddenStackCursor, context, fiber); - entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } } - function reuseHiddenContextOnStack(fiber) { - push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); - push( - currentTreeHiddenStackCursor, - currentTreeHiddenStackCursor.current, - fiber - ); + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); } - function popHiddenContext(fiber) { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor, fiber); - pop(prevEntangledRenderLanesCursor, fiber); + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); } - function mountHookTypesDev() { - var hookName = currentHookNameInDev; - null === hookTypesDev - ? (hookTypesDev = [hookName]) - : hookTypesDev.push(hookName); + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } - function updateHookTypesDev() { - var hookName = currentHookNameInDev; - if ( - null !== hookTypesDev && - (hookTypesUpdateIndexDev++, - hookTypesDev[hookTypesUpdateIndexDev] !== hookName) - ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); - if ( - !didWarnAboutMismatchedHooksForComponent.has(componentName) && - (didWarnAboutMismatchedHooksForComponent.add(componentName), - null !== hookTypesDev) - ) { - for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { - var oldHookName = hookTypesDev[i], - newHookName = - i === hookTypesUpdateIndexDev ? hookName : oldHookName; - for ( - oldHookName = i + 1 + ". " + oldHookName; - 30 > oldHookName.length; - - ) - oldHookName += " "; - oldHookName += newHookName + "\n"; - table += oldHookName; - } - error$jscomp$0( - "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - componentName, - table - ); - } - } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } - function checkDepsAreArrayDev(deps) { - void 0 === deps || - null === deps || - isArrayImpl(deps) || - error$jscomp$0( - "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", - currentHookNameInDev, - typeof deps - ); + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; } - function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); - didWarnAboutUseFormState.has(componentName) || - (didWarnAboutUseFormState.add(componentName), - error$jscomp$0( - "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.", - componentName - )); + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; } - function throwInvalidHookError() { - throw Error( - "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." - ); + function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); } - function areHookInputsEqual(nextDeps, prevDeps) { - if (ignorePreviousDependencies) return !1; - if (null === prevDeps) - return ( - error$jscomp$0( - "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", - currentHookNameInDev - ), - !1 - ); - nextDeps.length !== prevDeps.length && + function createUpdate(lane) { + return { + lane: lane, + tag: UpdateState, + payload: null, + callback: null, + next: null + }; + } + function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if ( + currentlyProcessingQueue === updateQueue && + !didWarnUpdateInsideUpdate + ) { + var componentName = getComponentNameFromFiber(fiber); error$jscomp$0( - "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", - currentHookNameInDev, - "[" + prevDeps.join(", ") + "]", - "[" + nextDeps.join(", ") + "]" + "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", + componentName ); - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) - if (!objectIs(nextDeps[i], prevDeps[i])) return !1; - return !0; + didWarnUpdateInsideUpdate = !0; + } + if ((executionContext & RenderContext) !== NoContext) + return ( + (componentName = updateQueue.pending), + null === componentName + ? (update.next = update) + : ((update.next = componentName.next), + (componentName.next = update)), + (updateQueue.pending = update), + (update = getRootForUpdatedFiber(fiber)), + markUpdateLaneFromFiberToRoot(fiber, null, lane), + update + ); + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); } - function renderWithHooks( - current, + function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } + } + function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { + do { + var clone = { + lane: queue.lane, + tag: queue.tag, + payload: queue.payload, + callback: null, + next: null + }; + null === newLast + ? (newFirst = newLast = clone) + : (newLast = newLast.next = clone); + queue = queue.next; + } while (null !== queue); + null === newLast + ? (newFirst = newLast = capturedUpdate) + : (newLast = newLast.next = capturedUpdate); + } else newFirst = newLast = capturedUpdate; + queue = { + baseState: current.baseState, + firstBaseUpdate: newFirst, + lastBaseUpdate: newLast, + shared: current.shared, + callbacks: current.callbacks + }; + workInProgress.updateQueue = queue; + return; + } + workInProgress = queue.lastBaseUpdate; + null === workInProgress + ? (queue.firstBaseUpdate = capturedUpdate) + : (workInProgress.next = capturedUpdate); + queue.lastBaseUpdate = capturedUpdate; + } + function suspendIfUpdateReadFromEntangledAsyncAction() { + if (didReadFromEntangledAsyncAction) { + var entangledActionThenable = currentEntangledActionThenable; + if (null !== entangledActionThenable) throw entangledActionThenable; + } + } + function processUpdateQueue( workInProgress, - Component, props, - secondArg, - nextRenderLanes + instance$jscomp$0, + renderLanes ) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; - hookTypesDev = null !== current ? current._debugHookTypes : null; - hookTypesUpdateIndexDev = -1; - ignorePreviousDependencies = - null !== current && current.type !== workInProgress.type; - if ( - "[object AsyncFunction]" === - Object.prototype.toString.call(Component) || - "[object AsyncGeneratorFunction]" === - Object.prototype.toString.call(Component) - ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), - didWarnAboutAsyncClientComponent.has(nextRenderLanes) || - (didWarnAboutAsyncClientComponent.add(nextRenderLanes), - error$jscomp$0( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - )); - workInProgress.memoizedState = null; - workInProgress.updateQueue = null; - workInProgress.lanes = 0; - ReactSharedInternals.H = - null !== current && null !== current.memoizedState - ? HooksDispatcherOnUpdateInDEV - : null !== hookTypesDev - ? HooksDispatcherOnMountWithHookTypesInDEV - : HooksDispatcherOnMountInDEV; - shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = - (workInProgress.mode & 8) !== NoMode; - var children = callComponentInDEV(Component, props, secondArg); - shouldDoubleInvokeUserFnsInHooksDEV = !1; - didScheduleRenderPhaseUpdateDuringThisPass && - (children = renderWithHooksAgain( - workInProgress, - Component, - props, - secondArg - )); - if (nextRenderLanes) { - setIsStrictModeForDevtools(!0); - try { - children = renderWithHooksAgain( - workInProgress, - Component, - props, - secondArg - ); - } finally { - setIsStrictModeForDevtools(!1); - } + didReadFromEntangledAsyncAction = !1; + var queue = workInProgress.updateQueue; + hasForceUpdate = !1; + currentlyProcessingQueue = queue.shared; + var firstBaseUpdate = queue.firstBaseUpdate, + lastBaseUpdate = queue.lastBaseUpdate, + pendingQueue = queue.shared.pending; + if (null !== pendingQueue) { + queue.shared.pending = null; + var lastPendingUpdate = pendingQueue, + firstPendingUpdate = lastPendingUpdate.next; + lastPendingUpdate.next = null; + null === lastBaseUpdate + ? (firstBaseUpdate = firstPendingUpdate) + : (lastBaseUpdate.next = firstPendingUpdate); + lastBaseUpdate = lastPendingUpdate; + var current = workInProgress.alternate; + null !== current && + ((current = current.updateQueue), + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && + (null === pendingQueue + ? (current.firstBaseUpdate = firstPendingUpdate) + : (pendingQueue.next = firstPendingUpdate), + (current.lastBaseUpdate = lastPendingUpdate))); } - finishRenderingHooks(current, workInProgress); - return children; + if (null !== firstBaseUpdate) { + var newState = queue.baseState; + lastBaseUpdate = 0; + current = firstPendingUpdate = lastPendingUpdate = null; + pendingQueue = firstBaseUpdate; + do { + var updateLane = pendingQueue.lane & -536870913, + isHiddenUpdate = updateLane !== pendingQueue.lane; + if ( + isHiddenUpdate + ? (workInProgressRootRenderLanes & updateLane) === updateLane + : (renderLanes & updateLane) === updateLane + ) { + 0 !== updateLane && + updateLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + null !== current && + (current = current.next = + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); + a: { + updateLane = workInProgress; + var partialState = pendingQueue; + var nextProps = props, + instance = instance$jscomp$0; + switch (partialState.tag) { + case ReplaceState: + partialState = partialState.payload; + if ("function" === typeof partialState) { + isDisallowedContextReadInDEV = !0; + var nextState = partialState.call( + instance, + newState, + nextProps + ); + if (updateLane.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + partialState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } + isDisallowedContextReadInDEV = !1; + newState = nextState; + break a; + } + newState = partialState; + break a; + case CaptureUpdate: + updateLane.flags = (updateLane.flags & -65537) | 128; + case UpdateState: + nextState = partialState.payload; + if ("function" === typeof nextState) { + isDisallowedContextReadInDEV = !0; + partialState = nextState.call( + instance, + newState, + nextProps + ); + if (updateLane.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + nextState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } + isDisallowedContextReadInDEV = !1; + } else partialState = nextState; + if (null === partialState || void 0 === partialState) break a; + newState = assign({}, newState, partialState); + break a; + case ForceUpdate: + hasForceUpdate = !0; + } + } + updateLane = pendingQueue.callback; + null !== updateLane && + ((workInProgress.flags |= 64), + isHiddenUpdate && (workInProgress.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); + } else + (isHiddenUpdate = { + lane: updateLane, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: pendingQueue.callback, + next: null + }), + null === current + ? ((firstPendingUpdate = current = isHiddenUpdate), + (lastPendingUpdate = newState)) + : (current = current.next = isHiddenUpdate), + (lastBaseUpdate |= updateLane); + pendingQueue = pendingQueue.next; + if (null === pendingQueue) + if (((pendingQueue = queue.shared.pending), null === pendingQueue)) + break; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress.lanes = lastBaseUpdate; + workInProgress.memoizedState = newState; + } + currentlyProcessingQueue = null; } - function finishRenderingHooks(current, workInProgress) { - workInProgress._debugHookTypes = hookTypesDev; - null === workInProgress.dependencies - ? null !== thenableState$1 && - (workInProgress.dependencies = { - lanes: 0, - firstContext: null, - _debugThenableState: thenableState$1 - }) - : (workInProgress.dependencies._debugThenableState = thenableState$1); - ReactSharedInternals.H = ContextOnlyDispatcher; - var didRenderTooFewHooks = - null !== currentHook && null !== currentHook.next; - renderLanes = 0; - hookTypesDev = - currentHookNameInDev = - workInProgressHook = - currentHook = - currentlyRenderingFiber$1 = - null; - hookTypesUpdateIndexDev = -1; - null !== current && - (current.flags & 31457280) !== (workInProgress.flags & 31457280) && - error$jscomp$0( - "Internal React error: Expected static flag was missing. Please notify the React team." - ); - didScheduleRenderPhaseUpdate = !1; - thenableIndexCounter$1 = 0; - thenableState$1 = null; - if (didRenderTooFewHooks) + function callCallback(callback, context) { + if ("function" !== typeof callback) throw Error( - "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." + "Invalid argument passed as callback. Expected a function. Instead received: " + + callback ); - null === current || - didReceiveUpdate || - ((current = current.dependencies), - null !== current && - checkIfContextChanged(current) && - (didReceiveUpdate = !0)); - needsToResetSuspendedThenableDEV - ? ((needsToResetSuspendedThenableDEV = !1), (current = !0)) - : (current = !1); - current && - ((workInProgress = - getComponentNameFromFiber(workInProgress) || "Unknown"), - didWarnAboutUseWrappedInTryCatch.has(workInProgress) || - didWarnAboutAsyncClientComponent.has(workInProgress) || - (didWarnAboutUseWrappedInTryCatch.add(workInProgress), - error$jscomp$0( - "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary." - ))); + callback.call(context); } - function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; - var numberOfReRenders = 0; - do { - didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); - thenableIndexCounter$1 = 0; - didScheduleRenderPhaseUpdateDuringThisPass = !1; - if (numberOfReRenders >= RE_RENDER_LIMIT) - throw Error( - "Too many re-renders. React limits the number of renders to prevent an infinite loop." - ); - numberOfReRenders += 1; - ignorePreviousDependencies = !1; - workInProgressHook = currentHook = null; - if (null != workInProgress.updateQueue) { - var children = workInProgress.updateQueue; - children.lastEffect = null; - children.events = null; - children.stores = null; - null != children.memoCache && (children.memoCache.index = 0); - } - hookTypesUpdateIndexDev = -1; - ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; - children = callComponentInDEV(Component, props, secondArg); - } while (didScheduleRenderPhaseUpdateDuringThisPass); - return children; + function commitHiddenCallbacks(updateQueue, context) { + var hiddenCallbacks = updateQueue.shared.hiddenCallbacks; + if (null !== hiddenCallbacks) + for ( + updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; + updateQueue < hiddenCallbacks.length; + updateQueue++ + ) + callCallback(hiddenCallbacks[updateQueue], context); } - function TransitionAwareHostComponent() { - var dispatcher = ReactSharedInternals.H, + function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); + } + function pushHiddenContext(fiber, context) { + var prevEntangledRenderLanes = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); + push(currentTreeHiddenStackCursor, context, fiber); + entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + } + function reuseHiddenContextOnStack(fiber) { + push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); + push( + currentTreeHiddenStackCursor, + currentTreeHiddenStackCursor.current, + fiber + ); + } + function popHiddenContext(fiber) { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor, fiber); + pop(prevEntangledRenderLanesCursor, fiber); + } + function mountHookTypesDev() { + var hookName = currentHookNameInDev; + null === hookTypesDev + ? (hookTypesDev = [hookName]) + : hookTypesDev.push(hookName); + } + function updateHookTypesDev() { + var hookName = currentHookNameInDev; + if ( + null !== hookTypesDev && + (hookTypesUpdateIndexDev++, + hookTypesDev[hookTypesUpdateIndexDev] !== hookName) + ) { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); + if ( + !didWarnAboutMismatchedHooksForComponent.has(componentName) && + (didWarnAboutMismatchedHooksForComponent.add(componentName), + null !== hookTypesDev) + ) { + for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i], + newHookName = + i === hookTypesUpdateIndexDev ? hookName : oldHookName; + for ( + oldHookName = i + 1 + ". " + oldHookName; + 30 > oldHookName.length; + + ) + oldHookName += " "; + oldHookName += newHookName + "\n"; + table += oldHookName; + } + error$jscomp$0( + "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + componentName, + table + ); + } + } + } + function checkDepsAreArrayDev(deps) { + void 0 === deps || + null === deps || + isArrayImpl(deps) || + error$jscomp$0( + "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", + currentHookNameInDev, + typeof deps + ); + } + function warnOnUseFormStateInDev() { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); + didWarnAboutUseFormState.has(componentName) || + (didWarnAboutUseFormState.add(componentName), + error$jscomp$0( + "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.", + componentName + )); + } + function throwInvalidHookError() { + throw Error( + "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." + ); + } + function areHookInputsEqual(nextDeps, prevDeps) { + if (ignorePreviousDependencies) return !1; + if (null === prevDeps) + return ( + error$jscomp$0( + "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", + currentHookNameInDev + ), + !1 + ); + nextDeps.length !== prevDeps.length && + error$jscomp$0( + "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", + currentHookNameInDev, + "[" + prevDeps.join(", ") + "]", + "[" + nextDeps.join(", ") + "]" + ); + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) + if (!objectIs(nextDeps[i], prevDeps[i])) return !1; + return !0; + } + function renderWithHooks( + current, + workInProgress, + Component, + props, + secondArg, + nextRenderLanes + ) { + renderLanes = nextRenderLanes; + currentlyRenderingFiber = workInProgress; + hookTypesDev = null !== current ? current._debugHookTypes : null; + hookTypesUpdateIndexDev = -1; + ignorePreviousDependencies = + null !== current && current.type !== workInProgress.type; + if ( + "[object AsyncFunction]" === + Object.prototype.toString.call(Component) || + "[object AsyncGeneratorFunction]" === + Object.prototype.toString.call(Component) + ) + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), + didWarnAboutAsyncClientComponent.has(nextRenderLanes) || + (didWarnAboutAsyncClientComponent.add(nextRenderLanes), + error$jscomp$0( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + )); + workInProgress.memoizedState = null; + workInProgress.updateQueue = null; + workInProgress.lanes = 0; + ReactSharedInternals.H = + null !== current && null !== current.memoizedState + ? HooksDispatcherOnUpdateInDEV + : null !== hookTypesDev + ? HooksDispatcherOnMountWithHookTypesInDEV + : HooksDispatcherOnMountInDEV; + shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = + (workInProgress.mode & 8) !== NoMode; + var children = callComponentInDEV(Component, props, secondArg); + shouldDoubleInvokeUserFnsInHooksDEV = !1; + didScheduleRenderPhaseUpdateDuringThisPass && + (children = renderWithHooksAgain( + workInProgress, + Component, + props, + secondArg + )); + if (nextRenderLanes) { + setIsStrictModeForDevtools(!0); + try { + children = renderWithHooksAgain( + workInProgress, + Component, + props, + secondArg + ); + } finally { + setIsStrictModeForDevtools(!1); + } + } + finishRenderingHooks(current, workInProgress); + return children; + } + function finishRenderingHooks(current, workInProgress) { + workInProgress._debugHookTypes = hookTypesDev; + null === workInProgress.dependencies + ? null !== thenableState$1 && + (workInProgress.dependencies = { + lanes: 0, + firstContext: null, + _debugThenableState: thenableState$1 + }) + : (workInProgress.dependencies._debugThenableState = thenableState$1); + ReactSharedInternals.H = ContextOnlyDispatcher; + var didRenderTooFewHooks = + null !== currentHook && null !== currentHook.next; + renderLanes = 0; + hookTypesDev = + currentHookNameInDev = + workInProgressHook = + currentHook = + currentlyRenderingFiber = + null; + hookTypesUpdateIndexDev = -1; + null !== current && + (current.flags & 31457280) !== (workInProgress.flags & 31457280) && + error$jscomp$0( + "Internal React error: Expected static flag was missing. Please notify the React team." + ); + didScheduleRenderPhaseUpdate = !1; + thenableIndexCounter$1 = 0; + thenableState$1 = null; + if (didRenderTooFewHooks) + throw Error( + "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." + ); + null === current || + didReceiveUpdate || + ((current = current.dependencies), + null !== current && + checkIfContextChanged(current) && + (didReceiveUpdate = !0)); + needsToResetSuspendedThenableDEV + ? ((needsToResetSuspendedThenableDEV = !1), (current = !0)) + : (current = !1); + current && + ((workInProgress = + getComponentNameFromFiber(workInProgress) || "Unknown"), + didWarnAboutUseWrappedInTryCatch.has(workInProgress) || + didWarnAboutAsyncClientComponent.has(workInProgress) || + (didWarnAboutUseWrappedInTryCatch.add(workInProgress), + error$jscomp$0( + "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary." + ))); + } + function renderWithHooksAgain(workInProgress, Component, props, secondArg) { + currentlyRenderingFiber = workInProgress; + var numberOfReRenders = 0; + do { + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); + thenableIndexCounter$1 = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; + if (numberOfReRenders >= RE_RENDER_LIMIT) + throw Error( + "Too many re-renders. React limits the number of renders to prevent an infinite loop." + ); + numberOfReRenders += 1; + ignorePreviousDependencies = !1; + workInProgressHook = currentHook = null; + if (null != workInProgress.updateQueue) { + var children = workInProgress.updateQueue; + children.lastEffect = null; + children.events = null; + children.stores = null; + null != children.memoCache && (children.memoCache.index = 0); + } + hookTypesUpdateIndexDev = -1; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; + children = callComponentInDEV(Component, props, secondArg); + } while (didScheduleRenderPhaseUpdateDuringThisPass); + return children; + } + function TransitionAwareHostComponent() { + var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0]; maybeThenable = "function" === typeof maybeThenable.then @@ -3230,7 +3539,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -3263,7 +3572,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -3280,26 +3589,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -3314,7 +3623,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -3328,7 +3637,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -3349,10 +3658,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -3370,7 +3679,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -3418,7 +3727,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3496,7 +3805,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -3517,7 +3826,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -3564,7 +3873,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -3621,7 +3930,7 @@ __DEV__ && getSnapshot, getServerSnapshot ) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -3682,10 +3991,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3743,11 +4052,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -3764,7 +4069,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3920,7 +4225,7 @@ __DEV__ && var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var isMatching = currentlyRenderingFiber$1; + var isMatching = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { var markerInstance = canHydrateFormStateMarker( @@ -3953,14 +4258,14 @@ __DEV__ && ssrFormState.queue = isMatching; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, isMatching ); isMatching.dispatch = ssrFormState; isMatching = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, isMatching.queue ); @@ -3974,7 +4279,7 @@ __DEV__ && isMatching.queue = markerInstance; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, markerInstance, setPendingState, ssrFormState @@ -4010,7 +4315,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -4072,10 +4377,10 @@ __DEV__ && }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -4098,7 +4403,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -4114,7 +4419,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -4123,8 +4428,8 @@ __DEV__ && ))); } function mountEffect(create, deps) { - (currentlyRenderingFiber$1.mode & 16) !== NoMode && - (currentlyRenderingFiber$1.mode & 64) === NoMode + (currentlyRenderingFiber.mode & 16) !== NoMode && + (currentlyRenderingFiber.mode & 64) === NoMode ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } @@ -4136,12 +4441,12 @@ __DEV__ && destroy ) { if ( - (currentlyRenderingFiber$1.mode & 16) !== NoMode && - (currentlyRenderingFiber$1.mode & 64) === NoMode + (currentlyRenderingFiber.mode & 16) !== NoMode && + (currentlyRenderingFiber.mode & 64) === NoMode ) { var hookFlags = Passive, hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 142608384; + currentlyRenderingFiber.flags |= 142608384; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -4156,7 +4461,7 @@ __DEV__ && } else (hookFlags = Passive), (hook = mountWorkInProgressHook()), - (currentlyRenderingFiber$1.flags |= 8390656), + (currentlyRenderingFiber.flags |= 8390656), (inst = createEffectInstance()), (inst.destroy = destroy), (hook.memoizedState = pushResourceEffect( @@ -4212,7 +4517,7 @@ __DEV__ && } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= fiberFlags); + (currentlyRenderingFiber.flags |= fiberFlags); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? hookFlags : HasEffect | hookFlags, isUpdateDepsSame ? hookFlags : HasEffect | hookFlags, @@ -4224,11 +4529,11 @@ __DEV__ && ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -4262,7 +4567,7 @@ __DEV__ && } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & 16) !== NoMode && + (currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } @@ -4296,7 +4601,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & 16) !== NoMode && + (currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, @@ -4397,7 +4702,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -4412,7 +4717,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -4524,7 +4829,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -4578,7 +4883,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -4603,19 +4908,15 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, + args = requestUpdateLane(fiber); + var update = { + lane: args, revertLane: 0, action: action, hasEagerState: !1, @@ -4623,46 +4924,22 @@ __DEV__ && next: null }; isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -4747,8 +5024,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -7559,7 +7836,8 @@ __DEV__ && null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (didSuspend = createFiber(18, null, null, NoMode)), (didSuspend.stateNode = JSCompiler_temp$jscomp$0), @@ -9017,415 +9295,114 @@ __DEV__ && renderLanes ), workInProgress.child - ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateLegacyHiddenComponent( - current, - workInProgress, - renderLanes - ); - case 24: - return ( - prepareToReadContext(workInProgress), - (returnFiber = readContext(CacheContext)), - null === current - ? ((prevSibling = peekCacheFromPool()), - null === prevSibling && - ((prevSibling = workInProgressRoot), - (nextProps = createCache()), - (prevSibling.pooledCache = nextProps), - retainCache(nextProps), - null !== nextProps && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = nextProps)), - (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), - (nextProps = 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 = nextProps.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current - ? ((returnFiber = enableTransitionTracing - ? transitionStack.current - : null), - null !== returnFiber && - ((returnFiber = { - tag: TransitionTracingMarker, - transitions: new Set(returnFiber), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = returnFiber), - (workInProgress.flags |= 2048))) - : current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ), - (returnFiber = workInProgress.stateNode), - null !== returnFiber && - pushMarkerInstance(workInProgress, returnFiber), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); - } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - isPrimaryRenderer - ? (push(valueCursor, context._currentValue, providerFiber), - (context._currentValue = nextValue), - push(rendererCursorDEV, context._currentRenderer, providerFiber), - void 0 !== context._currentRenderer && - null !== context._currentRenderer && - context._currentRenderer !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ), - (context._currentRenderer = rendererSigil)) - : (push(valueCursor, context._currentValue2, providerFiber), - (context._currentValue2 = nextValue), - push(renderer2CursorDEV, context._currentRenderer2, providerFiber), - void 0 !== context._currentRenderer2 && - null !== context._currentRenderer2 && - context._currentRenderer2 !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ), - (context._currentRenderer2 = rendererSigil)); - } - function popProvider(context, providerFiber) { - var currentValue = valueCursor.current; - isPrimaryRenderer - ? ((context._currentValue = currentValue), - (currentValue = rendererCursorDEV.current), - pop(rendererCursorDEV, providerFiber), - (context._currentRenderer = currentValue)) - : ((context._currentValue2 = currentValue), - (currentValue = renderer2CursorDEV.current), - pop(renderer2CursorDEV, providerFiber), - (context._currentRenderer2 = currentValue)); - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - var context = currentDependencies.context; - if ( - !objectIs( - isPrimaryRenderer ? context._currentValue : context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions, offscreenWorkInProgress) - : null === newTransitions - ? push( - transitionStack, - transitionStack.current, - offscreenWorkInProgress - ) - : push( - transitionStack, - transitionStack.current.concat(newTransitions), - offscreenWorkInProgress - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack, workInProgress), - pop(resumedCache, workInProgress)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { - parent: isPrimaryRenderer - ? CacheContext._currentValue - : CacheContext._currentValue2, - pool: cacheFromPool - }; + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateLegacyHiddenComponent( + current, + workInProgress, + renderLanes + ); + case 24: + return ( + prepareToReadContext(workInProgress), + (returnFiber = readContext(CacheContext)), + null === current + ? ((prevSibling = peekCacheFromPool()), + null === prevSibling && + ((prevSibling = workInProgressRoot), + (nextProps = createCache()), + (prevSibling.pooledCache = nextProps), + retainCache(nextProps), + null !== nextProps && + (prevSibling.pooledCacheLanes |= renderLanes), + (prevSibling = nextProps)), + (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), + (nextProps = 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 = nextProps.cache), + pushProvider(workInProgress, CacheContext, returnFiber), + returnFiber !== prevSibling.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; + } + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } function collectScopedNodesFromChildren( startingChild, @@ -9899,9 +9876,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); updateHostContainer(current, workInProgress); bubbleProperties(workInProgress); enableTransitionTracing && @@ -10169,9 +10144,10 @@ __DEV__ && nextResource.treeBaseDuration)); nextResource = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (nextResource = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = nextResource), (nextResource = !0); if (!nextResource) { if (workInProgress.flags & 256) @@ -13038,6 +13014,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -13963,7 +13947,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = errorRetryLanes$jscomp$0; } @@ -14079,14 +14069,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -14288,7 +14270,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -14955,9 +14937,6 @@ __DEV__ && throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -14972,53 +14951,59 @@ __DEV__ && root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = getCurrentUpdatePriority()), - setCurrentUpdatePriority(2), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - (suspendedRetryLanes = commitBeforeMutationEffects( - root, - finishedWork - )), - commitMutationEffects(root, finishedWork, lanes), - suspendedRetryLanes && afterActiveInstanceBlur(), - resetAfterCommit(root.containerInfo), - (root.current = finishedWork), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + suspendedRetryLanes = executionContext; + executionContext |= CommitContext; + var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffects(root, finishedWork, lanes); + shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(); + resetAfterCommit(root.containerInfo); + root.current = finishedWork; + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - setCurrentUpdatePriority(spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = suspendedRetryLanes; + setCurrentUpdatePriority(updatedLanes); + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + (transitions = spawnedLane) + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : (releaseRootPooledCache(root, remainingLanes), @@ -15030,7 +15015,6 @@ __DEV__ && onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -15038,14 +15022,15 @@ __DEV__ && finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), + (spawnedLane = makeErrorInfo(remainingLanes.stack)), runWithFiberInDEV( remainingLanes.source, renderPriorityLevel, remainingLanes.value, - transitions + spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -15404,7 +15389,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -16540,9 +16525,43 @@ __DEV__ && "Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React." ), NoMode = 0, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var rendererCursorDEV = createCursor(null); + var renderer2CursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler.unstable_now, commitStartTime = -0, profilerStartTime = -1.1, @@ -16561,14 +16580,17 @@ __DEV__ && currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -16786,6 +16808,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -16796,7 +16829,7 @@ __DEV__ && var ResourceEffectIdentityKind = 0, ResourceEffectUpdateKind = 1, renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -18338,56 +18371,13 @@ __DEV__ && var didWarnAboutTailOptions = {}; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var rendererCursorDEV = createCursor(null); - var renderer2CursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), + hasWarnedAboutUsingNoValuePropOnContextProvider = !1, emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -18482,7 +18472,6 @@ __DEV__ && currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -19060,7 +19049,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index e8d5a0864793d..3ef06f503910f 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -2030,6 +2030,18 @@ __DEV__ && ((nextHydratableInstance = hydrationParentFiber = null), (didSuspendOrErrorDEV = isHydrating = !1)); } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) @@ -2046,88 +2058,261 @@ __DEV__ && diffRoot )); } - function finishQueueingConcurrentUpdates() { + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; + } + function pushProvider(providerFiber, context, nextValue) { + isPrimaryRenderer + ? (push(valueCursor, context._currentValue, providerFiber), + (context._currentValue = nextValue), + push(rendererCursorDEV, context._currentRenderer, providerFiber), + void 0 !== context._currentRenderer && + null !== context._currentRenderer && + context._currentRenderer !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ), + (context._currentRenderer = rendererSigil)) + : (push(valueCursor, context._currentValue2, providerFiber), + (context._currentValue2 = nextValue), + push(renderer2CursorDEV, context._currentRenderer2, providerFiber), + void 0 !== context._currentRenderer2 && + null !== context._currentRenderer2 && + context._currentRenderer2 !== rendererSigil && + error$jscomp$0( + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ), + (context._currentRenderer2 = rendererSigil)); + } + function popProvider(context, providerFiber) { + var currentValue = valueCursor.current; + isPrimaryRenderer + ? ((context._currentValue = currentValue), + (currentValue = rendererCursorDEV.current), + pop(rendererCursorDEV, providerFiber), + (context._currentRenderer = currentValue)) + : ((context._currentValue2 = currentValue), + (currentValue = renderer2CursorDEV.current), + pop(renderer2CursorDEV, providerFiber), + (context._currentRenderer2 = currentValue)); + pop(valueCursor, providerFiber); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + var context = currentDependencies.context; + if ( + !objectIs( + isPrimaryRenderer ? context._currentValue : context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; + function readContextForConsumer(consumer, context) { + var value = isPrimaryRenderer + ? context._currentValue + : context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function pushNestedEffectDurations() { var prevEffectDuration = profilerEffectDuration; @@ -2455,334 +2640,75 @@ __DEV__ && ); return thenableWithOverride; } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; - } - function cloneUpdateQueue(current, workInProgress) { - current = current.updateQueue; - workInProgress.updateQueue === current && - (workInProgress.updateQueue = { - baseState: current.baseState, - firstBaseUpdate: current.firstBaseUpdate, - lastBaseUpdate: current.lastBaseUpdate, - shared: current.shared, - callbacks: null - }); + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; } - function createUpdate(lane) { - return { - lane: lane, - tag: UpdateState, - payload: null, - callback: null, - next: null - }; + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions, offscreenWorkInProgress) + : null === newTransitions + ? push( + transitionStack, + transitionStack.current, + offscreenWorkInProgress + ) + : push( + transitionStack, + transitionStack.current.concat(newTransitions), + offscreenWorkInProgress + )); } - function enqueueUpdate(fiber, update, lane) { - var updateQueue = fiber.updateQueue; - if (null === updateQueue) return null; - updateQueue = updateQueue.shared; - if ( - currentlyProcessingQueue === updateQueue && - !didWarnUpdateInsideUpdate - ) { - var componentName = getComponentNameFromFiber(fiber); - error$jscomp$0( - "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", - componentName - ); - didWarnUpdateInsideUpdate = !0; - } - if ((executionContext & RenderContext) !== NoContext) - return ( - (componentName = updateQueue.pending), - null === componentName - ? (update.next = update) - : ((update.next = componentName.next), - (componentName.next = update)), - (updateQueue.pending = update), - (update = getRootForUpdatedFiber(fiber)), - markUpdateLaneFromFiberToRoot(fiber, null, lane), - update - ); - enqueueUpdate$1(fiber, updateQueue, update, lane); - return getRootForUpdatedFiber(fiber); + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack, workInProgress), + pop(resumedCache, workInProgress)); } - function entangleTransitions(root, fiber, lane) { - fiber = fiber.updateQueue; - if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { - var queueLanes = fiber.lanes; - queueLanes &= root.pendingLanes; - lane |= queueLanes; - fiber.lanes = lane; - markRootEntangled(root, lane); - } + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { + parent: isPrimaryRenderer + ? CacheContext._currentValue + : CacheContext._currentValue2, + pool: cacheFromPool + }; } - function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - var queue = workInProgress.updateQueue, - current = workInProgress.alternate; + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; if ( - null !== current && - ((current = current.updateQueue), queue === current) - ) { - var newFirst = null, - newLast = null; - queue = queue.firstBaseUpdate; - if (null !== queue) { - do { - var clone = { - lane: queue.lane, - tag: queue.tag, - payload: queue.payload, - callback: null, - next: null - }; - null === newLast - ? (newFirst = newLast = clone) - : (newLast = newLast.next = clone); - queue = queue.next; - } while (null !== queue); - null === newLast - ? (newFirst = newLast = capturedUpdate) - : (newLast = newLast.next = capturedUpdate); - } else newFirst = newLast = capturedUpdate; - queue = { - baseState: current.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: current.shared, - callbacks: current.callbacks - }; - workInProgress.updateQueue = queue; - return; + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; } - workInProgress = queue.lastBaseUpdate; - null === workInProgress - ? (queue.firstBaseUpdate = capturedUpdate) - : (workInProgress.next = capturedUpdate); - queue.lastBaseUpdate = capturedUpdate; + return !0; } - function suspendIfUpdateReadFromEntangledAsyncAction() { - if (didReadFromEntangledAsyncAction) { - var entangledActionThenable = currentEntangledActionThenable; - if (null !== entangledActionThenable) throw entangledActionThenable; - } - } - function processUpdateQueue( - workInProgress, - props, - instance$jscomp$0, - renderLanes - ) { - didReadFromEntangledAsyncAction = !1; - var queue = workInProgress.updateQueue; - hasForceUpdate = !1; - currentlyProcessingQueue = queue.shared; - var firstBaseUpdate = queue.firstBaseUpdate, - lastBaseUpdate = queue.lastBaseUpdate, - pendingQueue = queue.shared.pending; - if (null !== pendingQueue) { - queue.shared.pending = null; - var lastPendingUpdate = pendingQueue, - firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; - null === lastBaseUpdate - ? (firstBaseUpdate = firstPendingUpdate) - : (lastBaseUpdate.next = firstPendingUpdate); - lastBaseUpdate = lastPendingUpdate; - var current = workInProgress.alternate; - null !== current && - ((current = current.updateQueue), - (pendingQueue = current.lastBaseUpdate), - pendingQueue !== lastBaseUpdate && - (null === pendingQueue - ? (current.firstBaseUpdate = firstPendingUpdate) - : (pendingQueue.next = firstPendingUpdate), - (current.lastBaseUpdate = lastPendingUpdate))); - } - if (null !== firstBaseUpdate) { - var newState = queue.baseState; - lastBaseUpdate = 0; - current = firstPendingUpdate = lastPendingUpdate = null; - pendingQueue = firstBaseUpdate; - do { - var updateLane = pendingQueue.lane & -536870913, - isHiddenUpdate = updateLane !== pendingQueue.lane; - if ( - isHiddenUpdate - ? (workInProgressRootRenderLanes & updateLane) === updateLane - : (renderLanes & updateLane) === updateLane - ) { - 0 !== updateLane && - updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction = !0); - null !== current && - (current = current.next = - { - lane: 0, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: null, - next: null - }); - a: { - updateLane = workInProgress; - var partialState = pendingQueue; - var nextProps = props, - instance = instance$jscomp$0; - switch (partialState.tag) { - case ReplaceState: - partialState = partialState.payload; - if ("function" === typeof partialState) { - isDisallowedContextReadInDEV = !0; - var nextState = partialState.call( - instance, - newState, - nextProps - ); - if (updateLane.mode & 8) { - setIsStrictModeForDevtools(!0); - try { - partialState.call(instance, newState, nextProps); - } finally { - setIsStrictModeForDevtools(!1); - } - } - isDisallowedContextReadInDEV = !1; - newState = nextState; - break a; - } - newState = partialState; - break a; - case CaptureUpdate: - updateLane.flags = (updateLane.flags & -65537) | 128; - case UpdateState: - nextState = partialState.payload; - if ("function" === typeof nextState) { - isDisallowedContextReadInDEV = !0; - partialState = nextState.call( - instance, - newState, - nextProps - ); - if (updateLane.mode & 8) { - setIsStrictModeForDevtools(!0); - try { - nextState.call(instance, newState, nextProps); - } finally { - setIsStrictModeForDevtools(!1); - } - } - isDisallowedContextReadInDEV = !1; - } else partialState = nextState; - if (null === partialState || void 0 === partialState) break a; - newState = assign({}, newState, partialState); - break a; - case ForceUpdate: - hasForceUpdate = !0; - } - } - updateLane = pendingQueue.callback; - null !== updateLane && - ((workInProgress.flags |= 64), - isHiddenUpdate && (workInProgress.flags |= 8192), - (isHiddenUpdate = queue.callbacks), - null === isHiddenUpdate - ? (queue.callbacks = [updateLane]) - : isHiddenUpdate.push(updateLane)); - } else - (isHiddenUpdate = { - lane: updateLane, - tag: pendingQueue.tag, - payload: pendingQueue.payload, - callback: pendingQueue.callback, - next: null - }), - null === current - ? ((firstPendingUpdate = current = isHiddenUpdate), - (lastPendingUpdate = newState)) - : (current = current.next = isHiddenUpdate), - (lastBaseUpdate |= updateLane); - pendingQueue = pendingQueue.next; - if (null === pendingQueue) - if (((pendingQueue = queue.shared.pending), null === pendingQueue)) - break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress.lanes = lastBaseUpdate; - workInProgress.memoizedState = newState; - } - currentlyProcessingQueue = null; - } - function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error( - "Invalid argument passed as callback. Expected a function. Instead received: " + - callback - ); - callback.call(context); - } - function commitHiddenCallbacks(updateQueue, context) { - var hiddenCallbacks = updateQueue.shared.hiddenCallbacks; - if (null !== hiddenCallbacks) - for ( - updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; - updateQueue < hiddenCallbacks.length; - updateQueue++ - ) - callCallback(hiddenCallbacks[updateQueue], context); - } - function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); - } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; - } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; } function isThenableResolved(thenable) { thenable = thenable.status; @@ -2878,257 +2804,640 @@ __DEV__ && "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." ); } - function pushHiddenContext(fiber, context) { - var prevEntangledRenderLanes = entangledRenderLanes; - push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); - push(currentTreeHiddenStackCursor, context, fiber); - entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } } - function reuseHiddenContextOnStack(fiber) { - push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); - push( - currentTreeHiddenStackCursor, - currentTreeHiddenStackCursor.current, - fiber - ); + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); } - function popHiddenContext(fiber) { - entangledRenderLanes = prevEntangledRenderLanesCursor.current; - pop(currentTreeHiddenStackCursor, fiber); - pop(prevEntangledRenderLanesCursor, fiber); + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); } - function mountHookTypesDev() { - var hookName = currentHookNameInDev; - null === hookTypesDev - ? (hookTypesDev = [hookName]) - : hookTypesDev.push(hookName); + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } - function updateHookTypesDev() { - var hookName = currentHookNameInDev; - if ( - null !== hookTypesDev && - (hookTypesUpdateIndexDev++, - hookTypesDev[hookTypesUpdateIndexDev] !== hookName) - ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); - if ( - !didWarnAboutMismatchedHooksForComponent.has(componentName) && - (didWarnAboutMismatchedHooksForComponent.add(componentName), - null !== hookTypesDev) - ) { - for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { - var oldHookName = hookTypesDev[i], - newHookName = - i === hookTypesUpdateIndexDev ? hookName : oldHookName; - for ( - oldHookName = i + 1 + ". " + oldHookName; - 30 > oldHookName.length; - - ) - oldHookName += " "; - oldHookName += newHookName + "\n"; - table += oldHookName; - } - error$jscomp$0( - "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - componentName, - table - ); - } - } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } - function checkDepsAreArrayDev(deps) { - void 0 === deps || - null === deps || - isArrayImpl(deps) || - error$jscomp$0( - "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", - currentHookNameInDev, - typeof deps - ); + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; } - function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); - didWarnAboutUseFormState.has(componentName) || - (didWarnAboutUseFormState.add(componentName), - error$jscomp$0( - "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.", - componentName - )); + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; } - function throwInvalidHookError() { - throw Error( - "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." - ); + function cloneUpdateQueue(current, workInProgress) { + current = current.updateQueue; + workInProgress.updateQueue === current && + (workInProgress.updateQueue = { + baseState: current.baseState, + firstBaseUpdate: current.firstBaseUpdate, + lastBaseUpdate: current.lastBaseUpdate, + shared: current.shared, + callbacks: null + }); } - function areHookInputsEqual(nextDeps, prevDeps) { - if (ignorePreviousDependencies) return !1; - if (null === prevDeps) - return ( - error$jscomp$0( - "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", - currentHookNameInDev - ), - !1 - ); - nextDeps.length !== prevDeps.length && + function createUpdate(lane) { + return { + lane: lane, + tag: UpdateState, + payload: null, + callback: null, + next: null + }; + } + function enqueueUpdate(fiber, update, lane) { + var updateQueue = fiber.updateQueue; + if (null === updateQueue) return null; + updateQueue = updateQueue.shared; + if ( + currentlyProcessingQueue === updateQueue && + !didWarnUpdateInsideUpdate + ) { + var componentName = getComponentNameFromFiber(fiber); error$jscomp$0( - "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", - currentHookNameInDev, - "[" + prevDeps.join(", ") + "]", - "[" + nextDeps.join(", ") + "]" + "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s", + componentName ); - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) - if (!objectIs(nextDeps[i], prevDeps[i])) return !1; - return !0; + didWarnUpdateInsideUpdate = !0; + } + if ((executionContext & RenderContext) !== NoContext) + return ( + (componentName = updateQueue.pending), + null === componentName + ? (update.next = update) + : ((update.next = componentName.next), + (componentName.next = update)), + (updateQueue.pending = update), + (update = getRootForUpdatedFiber(fiber)), + markUpdateLaneFromFiberToRoot(fiber, null, lane), + update + ); + enqueueUpdate$1(fiber, updateQueue, update, lane); + return getRootForUpdatedFiber(fiber); } - function renderWithHooks( - current, + function entangleTransitions(root, fiber, lane) { + fiber = fiber.updateQueue; + if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194176))) { + var queueLanes = fiber.lanes; + queueLanes &= root.pendingLanes; + lane |= queueLanes; + fiber.lanes = lane; + markRootEntangled(root, lane); + } + } + function enqueueCapturedUpdate(workInProgress, capturedUpdate) { + var queue = workInProgress.updateQueue, + current = workInProgress.alternate; + if ( + null !== current && + ((current = current.updateQueue), queue === current) + ) { + var newFirst = null, + newLast = null; + queue = queue.firstBaseUpdate; + if (null !== queue) { + do { + var clone = { + lane: queue.lane, + tag: queue.tag, + payload: queue.payload, + callback: null, + next: null + }; + null === newLast + ? (newFirst = newLast = clone) + : (newLast = newLast.next = clone); + queue = queue.next; + } while (null !== queue); + null === newLast + ? (newFirst = newLast = capturedUpdate) + : (newLast = newLast.next = capturedUpdate); + } else newFirst = newLast = capturedUpdate; + queue = { + baseState: current.baseState, + firstBaseUpdate: newFirst, + lastBaseUpdate: newLast, + shared: current.shared, + callbacks: current.callbacks + }; + workInProgress.updateQueue = queue; + return; + } + workInProgress = queue.lastBaseUpdate; + null === workInProgress + ? (queue.firstBaseUpdate = capturedUpdate) + : (workInProgress.next = capturedUpdate); + queue.lastBaseUpdate = capturedUpdate; + } + function suspendIfUpdateReadFromEntangledAsyncAction() { + if (didReadFromEntangledAsyncAction) { + var entangledActionThenable = currentEntangledActionThenable; + if (null !== entangledActionThenable) throw entangledActionThenable; + } + } + function processUpdateQueue( workInProgress, - Component, props, - secondArg, - nextRenderLanes + instance$jscomp$0, + renderLanes ) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; - hookTypesDev = null !== current ? current._debugHookTypes : null; - hookTypesUpdateIndexDev = -1; - ignorePreviousDependencies = - null !== current && current.type !== workInProgress.type; - if ( - "[object AsyncFunction]" === - Object.prototype.toString.call(Component) || - "[object AsyncGeneratorFunction]" === - Object.prototype.toString.call(Component) - ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), - didWarnAboutAsyncClientComponent.has(nextRenderLanes) || - (didWarnAboutAsyncClientComponent.add(nextRenderLanes), - error$jscomp$0( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - )); - workInProgress.memoizedState = null; - workInProgress.updateQueue = null; - workInProgress.lanes = 0; - ReactSharedInternals.H = - null !== current && null !== current.memoizedState - ? HooksDispatcherOnUpdateInDEV - : null !== hookTypesDev - ? HooksDispatcherOnMountWithHookTypesInDEV - : HooksDispatcherOnMountInDEV; - shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = - (workInProgress.mode & 8) !== NoMode; - var children = callComponentInDEV(Component, props, secondArg); - shouldDoubleInvokeUserFnsInHooksDEV = !1; - didScheduleRenderPhaseUpdateDuringThisPass && - (children = renderWithHooksAgain( - workInProgress, - Component, - props, - secondArg - )); - if (nextRenderLanes) { - setIsStrictModeForDevtools(!0); - try { - children = renderWithHooksAgain( - workInProgress, - Component, - props, - secondArg - ); - } finally { - setIsStrictModeForDevtools(!1); - } + didReadFromEntangledAsyncAction = !1; + var queue = workInProgress.updateQueue; + hasForceUpdate = !1; + currentlyProcessingQueue = queue.shared; + var firstBaseUpdate = queue.firstBaseUpdate, + lastBaseUpdate = queue.lastBaseUpdate, + pendingQueue = queue.shared.pending; + if (null !== pendingQueue) { + queue.shared.pending = null; + var lastPendingUpdate = pendingQueue, + firstPendingUpdate = lastPendingUpdate.next; + lastPendingUpdate.next = null; + null === lastBaseUpdate + ? (firstBaseUpdate = firstPendingUpdate) + : (lastBaseUpdate.next = firstPendingUpdate); + lastBaseUpdate = lastPendingUpdate; + var current = workInProgress.alternate; + null !== current && + ((current = current.updateQueue), + (pendingQueue = current.lastBaseUpdate), + pendingQueue !== lastBaseUpdate && + (null === pendingQueue + ? (current.firstBaseUpdate = firstPendingUpdate) + : (pendingQueue.next = firstPendingUpdate), + (current.lastBaseUpdate = lastPendingUpdate))); } - finishRenderingHooks(current, workInProgress); - return children; + if (null !== firstBaseUpdate) { + var newState = queue.baseState; + lastBaseUpdate = 0; + current = firstPendingUpdate = lastPendingUpdate = null; + pendingQueue = firstBaseUpdate; + do { + var updateLane = pendingQueue.lane & -536870913, + isHiddenUpdate = updateLane !== pendingQueue.lane; + if ( + isHiddenUpdate + ? (workInProgressRootRenderLanes & updateLane) === updateLane + : (renderLanes & updateLane) === updateLane + ) { + 0 !== updateLane && + updateLane === currentEntangledLane && + (didReadFromEntangledAsyncAction = !0); + null !== current && + (current = current.next = + { + lane: 0, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: null, + next: null + }); + a: { + updateLane = workInProgress; + var partialState = pendingQueue; + var nextProps = props, + instance = instance$jscomp$0; + switch (partialState.tag) { + case ReplaceState: + partialState = partialState.payload; + if ("function" === typeof partialState) { + isDisallowedContextReadInDEV = !0; + var nextState = partialState.call( + instance, + newState, + nextProps + ); + if (updateLane.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + partialState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } + isDisallowedContextReadInDEV = !1; + newState = nextState; + break a; + } + newState = partialState; + break a; + case CaptureUpdate: + updateLane.flags = (updateLane.flags & -65537) | 128; + case UpdateState: + nextState = partialState.payload; + if ("function" === typeof nextState) { + isDisallowedContextReadInDEV = !0; + partialState = nextState.call( + instance, + newState, + nextProps + ); + if (updateLane.mode & 8) { + setIsStrictModeForDevtools(!0); + try { + nextState.call(instance, newState, nextProps); + } finally { + setIsStrictModeForDevtools(!1); + } + } + isDisallowedContextReadInDEV = !1; + } else partialState = nextState; + if (null === partialState || void 0 === partialState) break a; + newState = assign({}, newState, partialState); + break a; + case ForceUpdate: + hasForceUpdate = !0; + } + } + updateLane = pendingQueue.callback; + null !== updateLane && + ((workInProgress.flags |= 64), + isHiddenUpdate && (workInProgress.flags |= 8192), + (isHiddenUpdate = queue.callbacks), + null === isHiddenUpdate + ? (queue.callbacks = [updateLane]) + : isHiddenUpdate.push(updateLane)); + } else + (isHiddenUpdate = { + lane: updateLane, + tag: pendingQueue.tag, + payload: pendingQueue.payload, + callback: pendingQueue.callback, + next: null + }), + null === current + ? ((firstPendingUpdate = current = isHiddenUpdate), + (lastPendingUpdate = newState)) + : (current = current.next = isHiddenUpdate), + (lastBaseUpdate |= updateLane); + pendingQueue = pendingQueue.next; + if (null === pendingQueue) + if (((pendingQueue = queue.shared.pending), null === pendingQueue)) + break; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress.lanes = lastBaseUpdate; + workInProgress.memoizedState = newState; + } + currentlyProcessingQueue = null; } - function finishRenderingHooks(current, workInProgress) { - workInProgress._debugHookTypes = hookTypesDev; - null === workInProgress.dependencies - ? null !== thenableState$1 && - (workInProgress.dependencies = { - lanes: 0, - firstContext: null, - _debugThenableState: thenableState$1 - }) - : (workInProgress.dependencies._debugThenableState = thenableState$1); - ReactSharedInternals.H = ContextOnlyDispatcher; - var didRenderTooFewHooks = - null !== currentHook && null !== currentHook.next; - renderLanes = 0; - hookTypesDev = - currentHookNameInDev = - workInProgressHook = - currentHook = - currentlyRenderingFiber$1 = - null; - hookTypesUpdateIndexDev = -1; - null !== current && - (current.flags & 31457280) !== (workInProgress.flags & 31457280) && - error$jscomp$0( - "Internal React error: Expected static flag was missing. Please notify the React team." - ); - didScheduleRenderPhaseUpdate = !1; - thenableIndexCounter$1 = 0; - thenableState$1 = null; - if (didRenderTooFewHooks) + function callCallback(callback, context) { + if ("function" !== typeof callback) throw Error( - "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." + "Invalid argument passed as callback. Expected a function. Instead received: " + + callback ); - null === current || - didReceiveUpdate || - ((current = current.dependencies), - null !== current && - checkIfContextChanged(current) && - (didReceiveUpdate = !0)); - needsToResetSuspendedThenableDEV - ? ((needsToResetSuspendedThenableDEV = !1), (current = !0)) - : (current = !1); - current && - ((workInProgress = - getComponentNameFromFiber(workInProgress) || "Unknown"), - didWarnAboutUseWrappedInTryCatch.has(workInProgress) || - didWarnAboutAsyncClientComponent.has(workInProgress) || - (didWarnAboutUseWrappedInTryCatch.add(workInProgress), - error$jscomp$0( - "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary." - ))); + callback.call(context); } - function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; - var numberOfReRenders = 0; - do { - didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); - thenableIndexCounter$1 = 0; - didScheduleRenderPhaseUpdateDuringThisPass = !1; - if (numberOfReRenders >= RE_RENDER_LIMIT) - throw Error( - "Too many re-renders. React limits the number of renders to prevent an infinite loop." - ); - numberOfReRenders += 1; - ignorePreviousDependencies = !1; - workInProgressHook = currentHook = null; - if (null != workInProgress.updateQueue) { - var children = workInProgress.updateQueue; - children.lastEffect = null; - children.events = null; - children.stores = null; - null != children.memoCache && (children.memoCache.index = 0); - } - hookTypesUpdateIndexDev = -1; - ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; - children = callComponentInDEV(Component, props, secondArg); - } while (didScheduleRenderPhaseUpdateDuringThisPass); - return children; + function commitHiddenCallbacks(updateQueue, context) { + var hiddenCallbacks = updateQueue.shared.hiddenCallbacks; + if (null !== hiddenCallbacks) + for ( + updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; + updateQueue < hiddenCallbacks.length; + updateQueue++ + ) + callCallback(hiddenCallbacks[updateQueue], context); } - function TransitionAwareHostComponent() { - var dispatcher = ReactSharedInternals.H, + function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); + } + function pushHiddenContext(fiber, context) { + var prevEntangledRenderLanes = entangledRenderLanes; + push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); + push(currentTreeHiddenStackCursor, context, fiber); + entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes; + } + function reuseHiddenContextOnStack(fiber) { + push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber); + push( + currentTreeHiddenStackCursor, + currentTreeHiddenStackCursor.current, + fiber + ); + } + function popHiddenContext(fiber) { + entangledRenderLanes = prevEntangledRenderLanesCursor.current; + pop(currentTreeHiddenStackCursor, fiber); + pop(prevEntangledRenderLanesCursor, fiber); + } + function mountHookTypesDev() { + var hookName = currentHookNameInDev; + null === hookTypesDev + ? (hookTypesDev = [hookName]) + : hookTypesDev.push(hookName); + } + function updateHookTypesDev() { + var hookName = currentHookNameInDev; + if ( + null !== hookTypesDev && + (hookTypesUpdateIndexDev++, + hookTypesDev[hookTypesUpdateIndexDev] !== hookName) + ) { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); + if ( + !didWarnAboutMismatchedHooksForComponent.has(componentName) && + (didWarnAboutMismatchedHooksForComponent.add(componentName), + null !== hookTypesDev) + ) { + for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) { + var oldHookName = hookTypesDev[i], + newHookName = + i === hookTypesUpdateIndexDev ? hookName : oldHookName; + for ( + oldHookName = i + 1 + ". " + oldHookName; + 30 > oldHookName.length; + + ) + oldHookName += " "; + oldHookName += newHookName + "\n"; + table += oldHookName; + } + error$jscomp$0( + "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + componentName, + table + ); + } + } + } + function checkDepsAreArrayDev(deps) { + void 0 === deps || + null === deps || + isArrayImpl(deps) || + error$jscomp$0( + "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", + currentHookNameInDev, + typeof deps + ); + } + function warnOnUseFormStateInDev() { + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); + didWarnAboutUseFormState.has(componentName) || + (didWarnAboutUseFormState.add(componentName), + error$jscomp$0( + "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.", + componentName + )); + } + function throwInvalidHookError() { + throw Error( + "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." + ); + } + function areHookInputsEqual(nextDeps, prevDeps) { + if (ignorePreviousDependencies) return !1; + if (null === prevDeps) + return ( + error$jscomp$0( + "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", + currentHookNameInDev + ), + !1 + ); + nextDeps.length !== prevDeps.length && + error$jscomp$0( + "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", + currentHookNameInDev, + "[" + prevDeps.join(", ") + "]", + "[" + nextDeps.join(", ") + "]" + ); + for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) + if (!objectIs(nextDeps[i], prevDeps[i])) return !1; + return !0; + } + function renderWithHooks( + current, + workInProgress, + Component, + props, + secondArg, + nextRenderLanes + ) { + renderLanes = nextRenderLanes; + currentlyRenderingFiber = workInProgress; + hookTypesDev = null !== current ? current._debugHookTypes : null; + hookTypesUpdateIndexDev = -1; + ignorePreviousDependencies = + null !== current && current.type !== workInProgress.type; + if ( + "[object AsyncFunction]" === + Object.prototype.toString.call(Component) || + "[object AsyncGeneratorFunction]" === + Object.prototype.toString.call(Component) + ) + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), + didWarnAboutAsyncClientComponent.has(nextRenderLanes) || + (didWarnAboutAsyncClientComponent.add(nextRenderLanes), + error$jscomp$0( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + )); + workInProgress.memoizedState = null; + workInProgress.updateQueue = null; + workInProgress.lanes = 0; + ReactSharedInternals.H = + null !== current && null !== current.memoizedState + ? HooksDispatcherOnUpdateInDEV + : null !== hookTypesDev + ? HooksDispatcherOnMountWithHookTypesInDEV + : HooksDispatcherOnMountInDEV; + shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = + (workInProgress.mode & 8) !== NoMode; + var children = callComponentInDEV(Component, props, secondArg); + shouldDoubleInvokeUserFnsInHooksDEV = !1; + didScheduleRenderPhaseUpdateDuringThisPass && + (children = renderWithHooksAgain( + workInProgress, + Component, + props, + secondArg + )); + if (nextRenderLanes) { + setIsStrictModeForDevtools(!0); + try { + children = renderWithHooksAgain( + workInProgress, + Component, + props, + secondArg + ); + } finally { + setIsStrictModeForDevtools(!1); + } + } + finishRenderingHooks(current, workInProgress); + return children; + } + function finishRenderingHooks(current, workInProgress) { + workInProgress._debugHookTypes = hookTypesDev; + null === workInProgress.dependencies + ? null !== thenableState$1 && + (workInProgress.dependencies = { + lanes: 0, + firstContext: null, + _debugThenableState: thenableState$1 + }) + : (workInProgress.dependencies._debugThenableState = thenableState$1); + ReactSharedInternals.H = ContextOnlyDispatcher; + var didRenderTooFewHooks = + null !== currentHook && null !== currentHook.next; + renderLanes = 0; + hookTypesDev = + currentHookNameInDev = + workInProgressHook = + currentHook = + currentlyRenderingFiber = + null; + hookTypesUpdateIndexDev = -1; + null !== current && + (current.flags & 31457280) !== (workInProgress.flags & 31457280) && + error$jscomp$0( + "Internal React error: Expected static flag was missing. Please notify the React team." + ); + didScheduleRenderPhaseUpdate = !1; + thenableIndexCounter$1 = 0; + thenableState$1 = null; + if (didRenderTooFewHooks) + throw Error( + "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." + ); + null === current || + didReceiveUpdate || + ((current = current.dependencies), + null !== current && + checkIfContextChanged(current) && + (didReceiveUpdate = !0)); + needsToResetSuspendedThenableDEV + ? ((needsToResetSuspendedThenableDEV = !1), (current = !0)) + : (current = !1); + current && + ((workInProgress = + getComponentNameFromFiber(workInProgress) || "Unknown"), + didWarnAboutUseWrappedInTryCatch.has(workInProgress) || + didWarnAboutAsyncClientComponent.has(workInProgress) || + (didWarnAboutUseWrappedInTryCatch.add(workInProgress), + error$jscomp$0( + "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary." + ))); + } + function renderWithHooksAgain(workInProgress, Component, props, secondArg) { + currentlyRenderingFiber = workInProgress; + var numberOfReRenders = 0; + do { + didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); + thenableIndexCounter$1 = 0; + didScheduleRenderPhaseUpdateDuringThisPass = !1; + if (numberOfReRenders >= RE_RENDER_LIMIT) + throw Error( + "Too many re-renders. React limits the number of renders to prevent an infinite loop." + ); + numberOfReRenders += 1; + ignorePreviousDependencies = !1; + workInProgressHook = currentHook = null; + if (null != workInProgress.updateQueue) { + var children = workInProgress.updateQueue; + children.lastEffect = null; + children.events = null; + children.stores = null; + null != children.memoCache && (children.memoCache.index = 0); + } + hookTypesUpdateIndexDev = -1; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; + children = callComponentInDEV(Component, props, secondArg); + } while (didScheduleRenderPhaseUpdateDuringThisPass); + return children; + } + function TransitionAwareHostComponent() { + var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0]; maybeThenable = "function" === typeof maybeThenable.then @@ -3136,7 +3445,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -3169,7 +3478,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -3186,26 +3495,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -3220,7 +3529,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -3234,7 +3543,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -3255,10 +3564,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -3276,7 +3585,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -3324,7 +3633,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3402,7 +3711,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -3423,7 +3732,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -3470,7 +3779,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -3527,7 +3836,7 @@ __DEV__ && getSnapshot, getServerSnapshot ) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -3588,10 +3897,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3649,11 +3958,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -3670,7 +3975,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3826,7 +4131,7 @@ __DEV__ && var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var isMatching = currentlyRenderingFiber$1; + var isMatching = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { var markerInstance = canHydrateFormStateMarker( @@ -3859,14 +4164,14 @@ __DEV__ && ssrFormState.queue = isMatching; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, isMatching ); isMatching.dispatch = ssrFormState; isMatching = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, isMatching.queue ); @@ -3880,7 +4185,7 @@ __DEV__ && isMatching.queue = markerInstance; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, markerInstance, setPendingState, ssrFormState @@ -3916,7 +4221,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -3978,10 +4283,10 @@ __DEV__ && }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -4004,7 +4309,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -4020,7 +4325,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -4029,8 +4334,8 @@ __DEV__ && ))); } function mountEffect(create, deps) { - (currentlyRenderingFiber$1.mode & 16) !== NoMode && - (currentlyRenderingFiber$1.mode & 64) === NoMode + (currentlyRenderingFiber.mode & 16) !== NoMode && + (currentlyRenderingFiber.mode & 64) === NoMode ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } @@ -4042,12 +4347,12 @@ __DEV__ && destroy ) { if ( - (currentlyRenderingFiber$1.mode & 16) !== NoMode && - (currentlyRenderingFiber$1.mode & 64) === NoMode + (currentlyRenderingFiber.mode & 16) !== NoMode && + (currentlyRenderingFiber.mode & 64) === NoMode ) { var hookFlags = Passive, hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 142608384; + currentlyRenderingFiber.flags |= 142608384; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -4062,7 +4367,7 @@ __DEV__ && } else (hookFlags = Passive), (hook = mountWorkInProgressHook()), - (currentlyRenderingFiber$1.flags |= 8390656), + (currentlyRenderingFiber.flags |= 8390656), (inst = createEffectInstance()), (inst.destroy = destroy), (hook.memoizedState = pushResourceEffect( @@ -4118,7 +4423,7 @@ __DEV__ && } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= fiberFlags); + (currentlyRenderingFiber.flags |= fiberFlags); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? hookFlags : HasEffect | hookFlags, isUpdateDepsSame ? hookFlags : HasEffect | hookFlags, @@ -4130,11 +4435,11 @@ __DEV__ && ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -4168,7 +4473,7 @@ __DEV__ && } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & 16) !== NoMode && + (currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } @@ -4202,7 +4507,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - (currentlyRenderingFiber$1.mode & 16) !== NoMode && + (currentlyRenderingFiber.mode & 16) !== NoMode && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, @@ -4303,7 +4608,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -4318,7 +4623,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -4430,7 +4735,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -4484,7 +4789,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -4509,19 +4814,15 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, + args = requestUpdateLane(fiber); + var update = { + lane: args, revertLane: 0, action: action, hasEagerState: !1, @@ -4529,46 +4830,22 @@ __DEV__ && next: null }; isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p0); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); - enableSchedulingProfiler && - markStateUpdateScheduled(fiber, JSCompiler_OptimizeArgumentsArray_p1); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); + enableSchedulingProfiler && markStateUpdateScheduled(fiber, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -4653,8 +4930,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -7390,7 +7667,8 @@ __DEV__ && null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (didSuspend = createFiber(18, null, null, NoMode)), (didSuspend.stateNode = JSCompiler_temp$jscomp$0), @@ -8849,415 +9127,114 @@ __DEV__ && renderLanes ), workInProgress.child - ); - case 22: - return updateOffscreenComponent(current, workInProgress, renderLanes); - case 23: - return updateLegacyHiddenComponent( - current, - workInProgress, - renderLanes - ); - case 24: - return ( - prepareToReadContext(workInProgress), - (returnFiber = readContext(CacheContext)), - null === current - ? ((prevSibling = peekCacheFromPool()), - null === prevSibling && - ((prevSibling = workInProgressRoot), - (nextProps = createCache()), - (prevSibling.pooledCache = nextProps), - retainCache(nextProps), - null !== nextProps && - (prevSibling.pooledCacheLanes |= renderLanes), - (prevSibling = nextProps)), - (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), - (nextProps = 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 = nextProps.cache), - pushProvider(workInProgress, CacheContext, returnFiber), - returnFiber !== prevSibling.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current - ? ((returnFiber = enableTransitionTracing - ? transitionStack.current - : null), - null !== returnFiber && - ((returnFiber = { - tag: TransitionTracingMarker, - transitions: new Set(returnFiber), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = returnFiber), - (workInProgress.flags |= 2048))) - : current.memoizedProps.name !== - workInProgress.pendingProps.name && - error$jscomp$0( - "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." - ), - (returnFiber = workInProgress.stateNode), - null !== returnFiber && - pushMarkerInstance(workInProgress, returnFiber), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error( - "Unknown unit of work tag (" + - workInProgress.tag + - "). This error is likely caused by a bug in React. Please file an issue." - ); - } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - isPrimaryRenderer - ? (push(valueCursor, context._currentValue, providerFiber), - (context._currentValue = nextValue), - push(rendererCursorDEV, context._currentRenderer, providerFiber), - void 0 !== context._currentRenderer && - null !== context._currentRenderer && - context._currentRenderer !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ), - (context._currentRenderer = rendererSigil)) - : (push(valueCursor, context._currentValue2, providerFiber), - (context._currentValue2 = nextValue), - push(renderer2CursorDEV, context._currentRenderer2, providerFiber), - void 0 !== context._currentRenderer2 && - null !== context._currentRenderer2 && - context._currentRenderer2 !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ), - (context._currentRenderer2 = rendererSigil)); - } - function popProvider(context, providerFiber) { - var currentValue = valueCursor.current; - isPrimaryRenderer - ? ((context._currentValue = currentValue), - (currentValue = rendererCursorDEV.current), - pop(rendererCursorDEV, providerFiber), - (context._currentRenderer = currentValue)) - : ((context._currentValue2 = currentValue), - (currentValue = renderer2CursorDEV.current), - pop(renderer2CursorDEV, providerFiber), - (context._currentRenderer2 = currentValue)); - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - var context = currentDependencies.context; - if ( - !objectIs( - isPrimaryRenderer ? context._currentValue : context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions, offscreenWorkInProgress) - : null === newTransitions - ? push( - transitionStack, - transitionStack.current, - offscreenWorkInProgress - ) - : push( - transitionStack, - transitionStack.current.concat(newTransitions), - offscreenWorkInProgress - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack, workInProgress), - pop(resumedCache, workInProgress)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { - parent: isPrimaryRenderer - ? CacheContext._currentValue - : CacheContext._currentValue2, - pool: cacheFromPool - }; + ); + case 22: + return updateOffscreenComponent(current, workInProgress, renderLanes); + case 23: + return updateLegacyHiddenComponent( + current, + workInProgress, + renderLanes + ); + case 24: + return ( + prepareToReadContext(workInProgress), + (returnFiber = readContext(CacheContext)), + null === current + ? ((prevSibling = peekCacheFromPool()), + null === prevSibling && + ((prevSibling = workInProgressRoot), + (nextProps = createCache()), + (prevSibling.pooledCache = nextProps), + retainCache(nextProps), + null !== nextProps && + (prevSibling.pooledCacheLanes |= renderLanes), + (prevSibling = nextProps)), + (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), + (nextProps = 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 = nextProps.cache), + pushProvider(workInProgress, CacheContext, returnFiber), + returnFiber !== prevSibling.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current + ? ((returnFiber = enableTransitionTracing + ? transitionStack.current + : null), + null !== returnFiber && + ((returnFiber = { + tag: TransitionTracingMarker, + transitions: new Set(returnFiber), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = returnFiber), + (workInProgress.flags |= 2048))) + : current.memoizedProps.name !== + workInProgress.pendingProps.name && + error$jscomp$0( + "Changing the name of a tracing marker after mount is not supported. To remount the tracing marker, pass it a new key." + ), + (returnFiber = workInProgress.stateNode), + null !== returnFiber && + pushMarkerInstance(workInProgress, returnFiber), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; + } + throw Error( + "Unknown unit of work tag (" + + workInProgress.tag + + "). This error is likely caused by a bug in React. Please file an issue." + ); } function collectScopedNodesFromChildren( startingChild, @@ -9725,9 +9702,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); updateHostContainer(current, workInProgress); bubbleProperties(workInProgress); enableTransitionTracing && @@ -9995,9 +9970,10 @@ __DEV__ && nextResource.treeBaseDuration)); nextResource = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (nextResource = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = nextResource), (nextResource = !0); if (!nextResource) { if (workInProgress.flags & 256) @@ -12856,6 +12832,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -13781,7 +13765,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = errorRetryLanes; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = errorRetryLanes$jscomp$0; } @@ -13897,14 +13887,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -14106,7 +14088,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -14769,9 +14751,6 @@ __DEV__ && throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -14786,53 +14765,59 @@ __DEV__ && root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); commitStartTime = now(); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = getCurrentUpdatePriority()), - setCurrentUpdatePriority(2), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - (suspendedRetryLanes = commitBeforeMutationEffects( - root, - finishedWork - )), - commitMutationEffects(root, finishedWork, lanes), - suspendedRetryLanes && afterActiveInstanceBlur(), - resetAfterCommit(root.containerInfo), - (root.current = finishedWork), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + suspendedRetryLanes = executionContext; + executionContext |= CommitContext; + var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffects(root, finishedWork, lanes); + shouldFireAfterActiveInstanceBlur && afterActiveInstanceBlur(); + resetAfterCommit(root.containerInfo); + root.current = finishedWork; + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStarted && - injectedProfilingHooks.markLayoutEffectsStarted(lanes), - commitLayoutEffects(finishedWork, root, lanes), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStarted && + injectedProfilingHooks.markLayoutEffectsStarted(lanes); + commitLayoutEffects(finishedWork, root, lanes); + enableSchedulingProfiler && enableSchedulingProfiler && - enableSchedulingProfiler && - null !== injectedProfilingHooks && - "function" === - typeof injectedProfilingHooks.markLayoutEffectsStopped && - injectedProfilingHooks.markLayoutEffectsStopped(), - requestPaint(), - (executionContext = updatedLanes), - setCurrentUpdatePriority(spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), + null !== injectedProfilingHooks && + "function" === + typeof injectedProfilingHooks.markLayoutEffectsStopped && + injectedProfilingHooks.markLayoutEffectsStopped(); + requestPaint(); + executionContext = suspendedRetryLanes; + setCurrentUpdatePriority(updatedLanes); + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + (transitions = spawnedLane) + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : (releaseRootPooledCache(root, remainingLanes), @@ -14844,7 +14829,6 @@ __DEV__ && onCommitRoot$1(finishedWork.stateNode, renderPriorityLevel); isDevToolsPresent && root.memoizedUpdaters.clear(); onCommitRoot(); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -14852,14 +14836,15 @@ __DEV__ && finishedWork++ ) (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), + (spawnedLane = makeErrorInfo(remainingLanes.stack)), runWithFiberInDEV( remainingLanes.source, renderPriorityLevel, remainingLanes.value, - transitions + spawnedLane ); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -15218,7 +15203,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -16315,9 +16300,43 @@ __DEV__ && "Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React." ), NoMode = 0, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var rendererCursorDEV = createCursor(null); + var renderer2CursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler.unstable_now, commitStartTime = -0, profilerStartTime = -1.1, @@ -16336,14 +16355,17 @@ __DEV__ && currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -16561,6 +16583,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -16571,7 +16604,7 @@ __DEV__ && var ResourceEffectIdentityKind = 0, ResourceEffectUpdateKind = 1, renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -18112,56 +18145,13 @@ __DEV__ && var didWarnAboutTailOptions = {}; var didWarnAboutDefaultPropsOnFunctionComponent = {}; var updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var rendererCursorDEV = createCursor(null); - var renderer2CursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), + hasWarnedAboutUsingNoValuePropOnContextProvider = !1, emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -18256,7 +18246,6 @@ __DEV__ && currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -18834,7 +18823,7 @@ __DEV__ && version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index 230c7591e1c43..15543c967c04a 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -1058,86 +1058,215 @@ module.exports = function ($$$config) { ((nextHydratableInstance = hydrationParentFiber = null), (isHydrating = !1)); } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) : hydrationErrors.push(error); } - function finishQueueingConcurrentUpdates() { + function pushProvider(providerFiber, context, nextValue) { + isPrimaryRenderer + ? (push(valueCursor, context._currentValue), + (context._currentValue = nextValue)) + : (push(valueCursor, context._currentValue2), + (context._currentValue2 = nextValue)); + } + function popProvider(context) { + var currentValue = valueCursor.current; + isPrimaryRenderer + ? (context._currentValue = currentValue) + : (context._currentValue2 = currentValue); + pop(valueCursor); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + var context = currentDependencies.context; + if ( + !objectIs( + isPrimaryRenderer ? context._currentValue : context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; + function readContextForConsumer(consumer, context) { + var value = isPrimaryRenderer + ? context._currentValue + : context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function ensureRootIsScheduled(root) { root !== lastScheduledRoot && @@ -1393,15 +1522,224 @@ module.exports = function ($$$config) { ); return thenableWithOverride; } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; - } + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; + } + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); + } + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); + } + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { + parent: isPrimaryRenderer + ? CacheContext._currentValue + : CacheContext._currentValue2, + pool: cacheFromPool + }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop$1() {} + function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop$1, noop$1); + else { + thenableState = workInProgressRoot; + if (null !== thenableState && 100 < thenableState.shellSuspendCounter) + throw Error(formatProdErrorMessage(482)); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error(formatProdErrorMessage(483)); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); + } + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); + } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); + } + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; + } + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; + } function cloneUpdateQueue(current, workInProgress) { current = current.updateQueue; workInProgress.updateQueue === current && @@ -1607,131 +1945,37 @@ module.exports = function ($$$config) { if (null === pendingQueue) if (((pendingQueue = queue.shared.pending), null === pendingQueue)) break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; - } - } - function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error(formatProdErrorMessage(191, callback)); - callback.call(context); - } - function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); - } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop$1() {} - function trackUsedThenable(thenableState, thenable, index) { - index = thenableState[index]; - void 0 === index - ? thenableState.push(thenable) - : index !== thenable && - (thenable.then(noop$1, noop$1), (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop$1, noop$1); - else { - thenableState = workInProgressRoot; - if (null !== thenableState && 100 < thenableState.shellSuspendCounter) - throw Error(formatProdErrorMessage(482)); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - throw SuspenseException; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress$jscomp$0.lanes = lastBaseUpdate; + workInProgress$jscomp$0.memoizedState = newState; } } - function getSuspendedThenable() { - if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); - var thenable = suspendedThenable; - suspendedThenable = null; - return thenable; + function callCallback(callback, context) { + if ("function" !== typeof callback) + throw Error(formatProdErrorMessage(191, callback)); + callback.call(context); } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error(formatProdErrorMessage(483)); + function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); } function pushHiddenContext(fiber, context) { fiber = entangledRenderLanes; @@ -1766,7 +2010,7 @@ module.exports = function ($$$config) { nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -1792,7 +2036,7 @@ module.exports = function ($$$config) { var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -1805,7 +2049,7 @@ module.exports = function ($$$config) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -1835,7 +2079,7 @@ module.exports = function ($$$config) { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -1862,7 +2106,7 @@ module.exports = function ($$$config) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = localIdCounter = 0; thenableState$1 = null; @@ -1876,26 +2120,26 @@ module.exports = function ($$$config) { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -1908,7 +2152,7 @@ module.exports = function ($$$config) { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -1922,7 +2166,7 @@ module.exports = function ($$$config) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -1943,10 +2187,10 @@ module.exports = function ($$$config) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -1964,7 +2208,7 @@ module.exports = function ($$$config) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -2007,7 +2251,7 @@ module.exports = function ($$$config) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$25 = !1; + didReadFromEntangledAsyncAction$27 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2028,11 +2272,11 @@ module.exports = function ($$$config) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$25 = !0); + (didReadFromEntangledAsyncAction$27 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$25 = !0); + (didReadFromEntangledAsyncAction$27 = !0); continue; } else (updateLane = { @@ -2047,7 +2291,7 @@ module.exports = function ($$$config) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -2068,7 +2312,7 @@ module.exports = function ($$$config) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -2078,7 +2322,7 @@ module.exports = function ($$$config) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$25 && + didReadFromEntangledAsyncAction$27 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -2111,7 +2355,7 @@ module.exports = function ($$$config) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -2157,10 +2401,10 @@ module.exports = function ($$$config) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -2281,8 +2525,8 @@ module.exports = function ($$$config) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$29) { - onActionError(actionQueue, node, error$29); + } catch (error$31) { + onActionError(actionQueue, node, error$31); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -2339,7 +2583,7 @@ module.exports = function ($$$config) { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { var markerInstance = canHydrateFormStateMarker( @@ -2373,14 +2617,14 @@ module.exports = function ($$$config) { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, JSCompiler_inline_result.queue ); @@ -2394,7 +2638,7 @@ module.exports = function ($$$config) { JSCompiler_inline_result.queue = markerInstance; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, markerInstance, setPendingState, ssrFormState @@ -2430,7 +2674,7 @@ module.exports = function ($$$config) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -2492,10 +2736,10 @@ module.exports = function ($$$config) { }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -2516,7 +2760,7 @@ module.exports = function ($$$config) { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -2532,7 +2776,7 @@ module.exports = function ($$$config) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -2554,7 +2798,7 @@ module.exports = function ($$$config) { destroy ) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -2596,7 +2840,7 @@ module.exports = function ($$$config) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -2608,11 +2852,11 @@ module.exports = function ($$$config) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -2695,7 +2939,7 @@ module.exports = function ($$$config) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -2710,7 +2954,7 @@ module.exports = function ($$$config) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -2931,8 +3175,8 @@ module.exports = function ($$$config) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -3803,9 +4047,9 @@ module.exports = function ($$$config) { (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$59 in Component) - void 0 === newProps[propName$59] && - (newProps[propName$59] = Component[propName$59]); + for (var propName$61 in Component) + void 0 === newProps[propName$61] && + (newProps[propName$61] = Component[propName$61]); } return newProps; } @@ -4899,7 +5143,8 @@ module.exports = function ($$$config) { null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), (JSCompiler_temp$jscomp$0.stateNode = nextInstance), @@ -6029,300 +6274,68 @@ module.exports = function ($$$config) { (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); - } - function pushProvider(providerFiber, context, nextValue) { - isPrimaryRenderer - ? (push(valueCursor, context._currentValue), - (context._currentValue = nextValue)) - : (push(valueCursor, context._currentValue2), - (context._currentValue2 = nextValue)); - } - function popProvider(context) { - var currentValue = valueCursor.current; - isPrimaryRenderer - ? (context._currentValue = currentValue) - : (context._currentValue2 = currentValue); - pop(valueCursor); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - var context = currentDependencies.context; - if ( - !objectIs( - isPrimaryRenderer ? context._currentValue : context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { - parent: isPrimaryRenderer - ? CacheContext._currentValue - : CacheContext._currentValue2, - pool: cacheFromPool - }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } function collectScopedNodesFromChildren( startingChild, @@ -6751,9 +6764,7 @@ module.exports = function ($$$config) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); updateHostContainer(current, workInProgress); bubbleProperties(workInProgress); enableTransitionTracing && @@ -6955,9 +6966,10 @@ module.exports = function ($$$config) { bubbleProperties(workInProgress); nextResource = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (nextResource = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = nextResource), (nextResource = !0); if (!nextResource) { if (workInProgress.flags & 256) @@ -6978,11 +6990,11 @@ module.exports = function ($$$config) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (nextResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$122 = null; + var cache$123 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$122 = newProps.memoizedState.cachePool.pool); - cache$122 !== nextResource && (newProps.flags |= 2048); + (cache$123 = newProps.memoizedState.cachePool.pool); + cache$123 !== nextResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -7018,8 +7030,8 @@ module.exports = function ($$$config) { if (null === nextResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$122 = nextResource.rendering; - if (null === cache$122) + cache$123 = nextResource.rendering; + if (null === cache$123) if (newProps) cutOffTailIfNeeded(nextResource, !1); else { if ( @@ -7027,11 +7039,11 @@ module.exports = function ($$$config) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$122 = findFirstSuspended(current); - if (null !== cache$122) { + cache$123 = findFirstSuspended(current); + if (null !== cache$123) { workInProgress.flags |= 128; cutOffTailIfNeeded(nextResource, !1); - current = cache$122.updateQueue; + current = cache$123.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7060,7 +7072,7 @@ module.exports = function ($$$config) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$122)), null !== current)) { + if (((current = findFirstSuspended(cache$123)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -7070,7 +7082,7 @@ module.exports = function ($$$config) { cutOffTailIfNeeded(nextResource, !0), null === nextResource.tail && "hidden" === nextResource.tailMode && - !cache$122.alternate && + !cache$123.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7083,13 +7095,13 @@ module.exports = function ($$$config) { cutOffTailIfNeeded(nextResource, !1), (workInProgress.lanes = 4194304)); nextResource.isBackwards - ? ((cache$122.sibling = workInProgress.child), - (workInProgress.child = cache$122)) + ? ((cache$123.sibling = workInProgress.child), + (workInProgress.child = cache$123)) : ((current = nextResource.last), null !== current - ? (current.sibling = cache$122) - : (workInProgress.child = cache$122), - (nextResource.last = cache$122)); + ? (current.sibling = cache$123) + : (workInProgress.child = cache$123), + (nextResource.last = cache$123)); } if (null !== nextResource.tail) return ( @@ -7348,10 +7360,10 @@ module.exports = function ($$$config) { inst.destroy = lastEffect; } } else { - var create$139 = updateQueue.create, - inst$140 = updateQueue.inst; - lastEffect = create$139(); - inst$140.destroy = lastEffect; + var create$140 = updateQueue.create, + inst$141 = updateQueue.inst; + lastEffect = create$140(); + inst$141.destroy = lastEffect; } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -7506,8 +7518,8 @@ module.exports = function ($$$config) { else if ("function" === typeof ref) try { ref(null); - } catch (error$142) { - captureCommitPhaseError(current, nearestMountedAncestor, error$142); + } catch (error$143) { + captureCommitPhaseError(current, nearestMountedAncestor, error$143); } else ref.current = null; } @@ -7777,11 +7789,11 @@ module.exports = function ($$$config) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$141) { + } catch (error$142) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$141 + error$142 ); } } @@ -8793,21 +8805,21 @@ module.exports = function ($$$config) { break; } case 5: - var parent$143 = JSCompiler_inline_result.stateNode; + var parent$144 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (resetTextContent(parent$143), + (resetTextContent(parent$144), (JSCompiler_inline_result.flags &= -33)); - var before$144 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$144, parent$143); + var before$145 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$145, parent$144); break; case 3: case 4: - var parent$145 = JSCompiler_inline_result.stateNode.containerInfo, - before$146 = getHostSibling(finishedWork); + var parent$146 = JSCompiler_inline_result.stateNode.containerInfo, + before$147 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$146, - parent$145 + before$147, + parent$146 ); break; default: @@ -9177,6 +9189,14 @@ module.exports = function ($$$config) { committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -9302,9 +9322,9 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$158 = finishedWork.stateNode; + var instance$159 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$158._visibility & 4 + ? instance$159._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9316,7 +9336,7 @@ module.exports = function ($$$config) { finishedRoot, finishedWork ) - : ((instance$158._visibility |= 4), + : ((instance$159._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9329,7 +9349,7 @@ module.exports = function ($$$config) { commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$158 + instance$159 ); break; case 24: @@ -9995,7 +10015,13 @@ module.exports = function ($$$config) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = + renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -10093,14 +10119,6 @@ module.exports = function ($$$config) { } while (1); ensureRootIsScheduled(root$jscomp$0); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -10236,7 +10254,7 @@ module.exports = function ($$$config) { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -10293,7 +10311,7 @@ module.exports = function ($$$config) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException || thrownValue === SuspenseActionException ? ((thrownValue = getSuspendedThenable()), @@ -10415,12 +10433,12 @@ module.exports = function ($$$config) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$173) { - handleThrow(root, thrownValue$173); + } catch (thrownValue$174) { + handleThrow(root, thrownValue$174); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -10537,11 +10555,11 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$175) { - handleThrow(root, thrownValue$175); + } catch (thrownValue$176) { + handleThrow(root, thrownValue$176); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -10628,7 +10646,7 @@ module.exports = function ($$$config) { thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -10796,9 +10814,6 @@ module.exports = function ($$$config) { root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -10813,44 +10828,52 @@ module.exports = function ($$$config) { root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = getCurrentUpdatePriority()), - setCurrentUpdatePriority(2), - (updatedLanes = executionContext), - (executionContext |= 4), - (suspendedRetryLanes = commitBeforeMutationEffects(root, finishedWork)), - commitMutationEffectsOnFiber(finishedWork, root), - suspendedRetryLanes && afterActiveInstanceBlur(), - resetAfterCommit(root.containerInfo), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - setCurrentUpdatePriority(spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + suspendedRetryLanes = executionContext; + executionContext |= 4; + var shouldFireAfterActiveInstanceBlur$180 = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffectsOnFiber(finishedWork, root); + shouldFireAfterActiveInstanceBlur$180 && afterActiveInstanceBlur(); + resetAfterCommit(root.containerInfo); + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = suspendedRetryLanes; + setCurrentUpdatePriority(updatedLanes); + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -10862,6 +10885,7 @@ module.exports = function ($$$config) { componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -11854,9 +11878,37 @@ module.exports = function ($$$config) { hydrationErrors = null, rootOrSingletonContext = !1, HydrationMismatchException = Error(formatProdErrorMessage(519)), - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = !1, @@ -11867,18 +11919,32 @@ module.exports = function ($$$config) { currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - hasForceUpdate = !1, - didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, SuspenseException = Error(formatProdErrorMessage(460)), SuspenseyCommitException = Error(formatProdErrorMessage(474)), SuspenseActionException = Error(formatProdErrorMessage(542)), noopSuspenseyCommitThenable = { then: function () {} }, suspendedThenable = null, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + hasForceUpdate = !1, + didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -11982,7 +12048,7 @@ module.exports = function ($$$config) { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -11995,11 +12061,7 @@ module.exports = function ($$$config) { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -12012,7 +12074,7 @@ module.exports = function ($$$config) { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -12021,7 +12083,7 @@ module.exports = function ($$$config) { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -12097,7 +12159,7 @@ module.exports = function ($$$config) { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -12108,7 +12170,7 @@ module.exports = function ($$$config) { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -12316,49 +12378,12 @@ module.exports = function ($$$config) { SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1, updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), emptyObject = {}, offscreenSubtreeIsHidden = !1, offscreenSubtreeWasHidden = !1, @@ -12423,7 +12448,6 @@ module.exports = function ($$$config) { currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -12781,7 +12805,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index c2d44c1a82ba7..4a517a45e497d 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -924,86 +924,215 @@ module.exports = function ($$$config) { ((nextHydratableInstance = hydrationParentFiber = null), (isHydrating = !1)); } + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; + } function queueHydrationError(error) { null === hydrationErrors ? (hydrationErrors = [error]) : hydrationErrors.push(error); } - function finishQueueingConcurrentUpdates() { + function pushProvider(providerFiber, context, nextValue) { + isPrimaryRenderer + ? (push(valueCursor, context._currentValue), + (context._currentValue = nextValue)) + : (push(valueCursor, context._currentValue2), + (context._currentValue2 = nextValue)); + } + function popProvider(context) { + var currentValue = valueCursor.current; + isPrimaryRenderer + ? (context._currentValue = currentValue) + : (context._currentValue2 = currentValue); + pop(valueCursor); + } + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; + } + } + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) throw Error(formatProdErrorMessage(341)); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; + } + } + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = enableRenderableContext + ? parent.type + : parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current ? current.push(context) : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) throw Error(formatProdErrorMessage(387)); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + parent = parent.return; } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + var context = currentDependencies.context; + if ( + !objectIs( + isPrimaryRenderer ? context._currentValue : context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function readContext(context) { + return readContextForConsumer(currentlyRenderingFiber$1, context); } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); } - function getRootForUpdatedFiber(sourceFiber) { - throwIfInfiniteUpdateLoopDetected(); - for (var parent = sourceFiber.return; null !== parent; ) - (sourceFiber = parent), (parent = sourceFiber.return); - return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; + function readContextForConsumer(consumer, context) { + var value = isPrimaryRenderer + ? context._currentValue + : context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) throw Error(formatProdErrorMessage(308)); + lastContextDependency = context; + consumer.dependencies = { lanes: 0, firstContext: context }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function releaseCache(cache) { + cache.refCount--; + 0 === cache.refCount && + scheduleCallback$2(NormalPriority, function () { + cache.controller.abort(); + }); } function ensureRootIsScheduled(root) { root !== lastScheduledRoot && @@ -1259,15 +1388,224 @@ module.exports = function ($$$config) { ); return thenableWithOverride; } - function initializeUpdateQueue(fiber) { - fiber.updateQueue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { pending: null, lanes: 0, hiddenCallbacks: null }, - callbacks: null - }; - } + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; + } + function pushTransition( + offscreenWorkInProgress, + prevCachePool, + newTransitions + ) { + null === prevCachePool + ? push(resumedCache, resumedCache.current) + : push(resumedCache, prevCachePool.pool); + enableTransitionTracing && + (null === transitionStack.current + ? push(transitionStack, newTransitions) + : null === newTransitions + ? push(transitionStack, transitionStack.current) + : push( + transitionStack, + transitionStack.current.concat(newTransitions) + )); + } + function popTransition(workInProgress, current) { + null !== current && + (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); + } + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { + parent: isPrimaryRenderer + ? CacheContext._currentValue + : CacheContext._currentValue2, + pool: cacheFromPool + }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop$1() {} + function trackUsedThenable(thenableState, thenable, index) { + index = thenableState[index]; + void 0 === index + ? thenableState.push(thenable) + : index !== thenable && + (thenable.then(noop$1, noop$1), (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop$1, noop$1); + else { + thenableState = workInProgressRoot; + if (null !== thenableState && 100 < thenableState.shellSuspendCounter) + throw Error(formatProdErrorMessage(482)); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); + var thenable = suspendedThenable; + suspendedThenable = null; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error(formatProdErrorMessage(483)); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); + } + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); + } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); + } + function getRootForUpdatedFiber(sourceFiber) { + throwIfInfiniteUpdateLoopDetected(); + for (var parent = sourceFiber.return; null !== parent; ) + (sourceFiber = parent), (parent = sourceFiber.return); + return 3 === sourceFiber.tag ? sourceFiber.stateNode : null; + } + function initializeUpdateQueue(fiber) { + fiber.updateQueue = { + baseState: fiber.memoizedState, + firstBaseUpdate: null, + lastBaseUpdate: null, + shared: { pending: null, lanes: 0, hiddenCallbacks: null }, + callbacks: null + }; + } function cloneUpdateQueue(current, workInProgress) { current = current.updateQueue; workInProgress.updateQueue === current && @@ -1473,131 +1811,37 @@ module.exports = function ($$$config) { if (null === pendingQueue) if (((pendingQueue = queue.shared.pending), null === pendingQueue)) break; - else - (isHiddenUpdate = pendingQueue), - (pendingQueue = isHiddenUpdate.next), - (isHiddenUpdate.next = null), - (queue.lastBaseUpdate = isHiddenUpdate), - (queue.shared.pending = null); - } while (1); - null === current && (lastPendingUpdate = newState); - queue.baseState = lastPendingUpdate; - queue.firstBaseUpdate = firstPendingUpdate; - queue.lastBaseUpdate = current; - null === firstBaseUpdate && (queue.shared.lanes = 0); - workInProgressRootSkippedLanes |= lastBaseUpdate; - workInProgress$jscomp$0.lanes = lastBaseUpdate; - workInProgress$jscomp$0.memoizedState = newState; - } - } - function callCallback(callback, context) { - if ("function" !== typeof callback) - throw Error(formatProdErrorMessage(191, callback)); - callback.call(context); - } - function commitCallbacks(updateQueue, context) { - var callbacks = updateQueue.callbacks; - if (null !== callbacks) - for ( - updateQueue.callbacks = null, updateQueue = 0; - updateQueue < callbacks.length; - updateQueue++ - ) - callCallback(callbacks[updateQueue], context); - } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop$1() {} - function trackUsedThenable(thenableState, thenable, index) { - index = thenableState[index]; - void 0 === index - ? thenableState.push(thenable) - : index !== thenable && - (thenable.then(noop$1, noop$1), (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop$1, noop$1); - else { - thenableState = workInProgressRoot; - if (null !== thenableState && 100 < thenableState.shellSuspendCounter) - throw Error(formatProdErrorMessage(482)); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - throw SuspenseException; + else + (isHiddenUpdate = pendingQueue), + (pendingQueue = isHiddenUpdate.next), + (isHiddenUpdate.next = null), + (queue.lastBaseUpdate = isHiddenUpdate), + (queue.shared.pending = null); + } while (1); + null === current && (lastPendingUpdate = newState); + queue.baseState = lastPendingUpdate; + queue.firstBaseUpdate = firstPendingUpdate; + queue.lastBaseUpdate = current; + null === firstBaseUpdate && (queue.shared.lanes = 0); + workInProgressRootSkippedLanes |= lastBaseUpdate; + workInProgress$jscomp$0.lanes = lastBaseUpdate; + workInProgress$jscomp$0.memoizedState = newState; } } - function getSuspendedThenable() { - if (null === suspendedThenable) throw Error(formatProdErrorMessage(459)); - var thenable = suspendedThenable; - suspendedThenable = null; - return thenable; + function callCallback(callback, context) { + if ("function" !== typeof callback) + throw Error(formatProdErrorMessage(191, callback)); + callback.call(context); } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error(formatProdErrorMessage(483)); + function commitCallbacks(updateQueue, context) { + var callbacks = updateQueue.callbacks; + if (null !== callbacks) + for ( + updateQueue.callbacks = null, updateQueue = 0; + updateQueue < callbacks.length; + updateQueue++ + ) + callCallback(callbacks[updateQueue], context); } function pushHiddenContext(fiber, context) { fiber = entangledRenderLanes; @@ -1632,7 +1876,7 @@ module.exports = function ($$$config) { nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; @@ -1658,7 +1902,7 @@ module.exports = function ($$$config) { var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdate = !1; thenableIndexCounter$1 = 0; thenableState$1 = null; @@ -1671,7 +1915,7 @@ module.exports = function ($$$config) { (didReceiveUpdate = !0)); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -1701,7 +1945,7 @@ module.exports = function ($$$config) { : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && - (currentlyRenderingFiber$1.flags |= 1024); + (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function checkDidRenderIdHook() { @@ -1728,7 +1972,7 @@ module.exports = function ($$$config) { didScheduleRenderPhaseUpdate = !1; } renderLanes = 0; - workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; + workInProgressHook = currentHook = currentlyRenderingFiber = null; didScheduleRenderPhaseUpdateDuringThisPass = !1; thenableIndexCounter$1 = localIdCounter = 0; thenableState$1 = null; @@ -1742,26 +1986,26 @@ module.exports = function ($$$config) { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error(formatProdErrorMessage(467)); throw Error(formatProdErrorMessage(310)); } @@ -1774,7 +2018,7 @@ module.exports = function ($$$config) { next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -1788,7 +2032,7 @@ module.exports = function ($$$config) { thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = []); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -1809,10 +2053,10 @@ module.exports = function ($$$config) { } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -1830,7 +2074,7 @@ module.exports = function ($$$config) { null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue) @@ -1873,7 +2117,7 @@ module.exports = function ($$$config) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$25 = !1; + didReadFromEntangledAsyncAction$27 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -1894,11 +2138,11 @@ module.exports = function ($$$config) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$25 = !0); + (didReadFromEntangledAsyncAction$27 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$25 = !0); + (didReadFromEntangledAsyncAction$27 = !0); continue; } else (updateLane = { @@ -1913,7 +2157,7 @@ module.exports = function ($$$config) { ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -1934,7 +2178,7 @@ module.exports = function ($$$config) { ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -1944,7 +2188,7 @@ module.exports = function ($$$config) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$25 && + didReadFromEntangledAsyncAction$27 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -1977,7 +2221,7 @@ module.exports = function ($$$config) { return [newState, dispatch]; } function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating; if (isHydrating$jscomp$0) { @@ -2023,10 +2267,10 @@ module.exports = function ($$$config) { function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -2147,8 +2391,8 @@ module.exports = function ($$$config) { try { (prevTransition = action(prevState, payload)), handleActionReturnValue(actionQueue, node, prevTransition); - } catch (error$29) { - onActionError(actionQueue, node, error$29); + } catch (error$31) { + onActionError(actionQueue, node, error$31); } } function handleActionReturnValue(actionQueue, node, returnValue) { @@ -2205,7 +2449,7 @@ module.exports = function ($$$config) { var ssrFormState = workInProgressRoot.formState; if (null !== ssrFormState) { a: { - var JSCompiler_inline_result = currentlyRenderingFiber$1; + var JSCompiler_inline_result = currentlyRenderingFiber; if (isHydrating) { if (nextHydratableInstance) { var markerInstance = canHydrateFormStateMarker( @@ -2239,14 +2483,14 @@ module.exports = function ($$$config) { ssrFormState.queue = JSCompiler_inline_result; ssrFormState = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, JSCompiler_inline_result ); JSCompiler_inline_result.dispatch = ssrFormState; JSCompiler_inline_result = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, JSCompiler_inline_result.queue ); @@ -2260,7 +2504,7 @@ module.exports = function ($$$config) { JSCompiler_inline_result.queue = markerInstance; ssrFormState = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, markerInstance, setPendingState, ssrFormState @@ -2296,7 +2540,7 @@ module.exports = function ($$$config) { var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( 9, createEffectInstance(), @@ -2358,10 +2602,10 @@ module.exports = function ($$$config) { }); } function pushEffectImpl(effect) { - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; null === componentUpdateQueue && ((componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue)); + (currentlyRenderingFiber.updateQueue = componentUpdateQueue)); var lastEffect = componentUpdateQueue.lastEffect; if (null === lastEffect) componentUpdateQueue.lastEffect = effect.next = effect; @@ -2382,7 +2626,7 @@ module.exports = function ($$$config) { function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( 1 | hookFlags, createEffectInstance(), @@ -2398,7 +2642,7 @@ module.exports = function ($$$config) { null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( 1 | hookFlags, inst, @@ -2420,7 +2664,7 @@ module.exports = function ($$$config) { destroy ) { var hook = mountWorkInProgressHook(); - currentlyRenderingFiber$1.flags |= 8390656; + currentlyRenderingFiber.flags |= 8390656; var inst = createEffectInstance(); inst.destroy = destroy; hook.memoizedState = pushResourceEffect( @@ -2462,7 +2706,7 @@ module.exports = function ($$$config) { } } (isCreateDepsSame && isUpdateDepsSame) || - (currentlyRenderingFiber$1.flags |= 2048); + (currentlyRenderingFiber.flags |= 2048); hook.memoizedState = pushResourceEffect( isCreateDepsSame ? 8 : 9, isUpdateDepsSame ? 8 : 9, @@ -2474,11 +2718,11 @@ module.exports = function ($$$config) { ); } function useEffectEventImpl(payload) { - currentlyRenderingFiber$1.flags |= 4; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; + currentlyRenderingFiber.flags |= 4; + var componentUpdateQueue = currentlyRenderingFiber.updateQueue; if (null === componentUpdateQueue) (componentUpdateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = componentUpdateQueue), + (currentlyRenderingFiber.updateQueue = componentUpdateQueue), (componentUpdateQueue.events = [payload]); else { var events = componentUpdateQueue.events; @@ -2561,7 +2805,7 @@ module.exports = function ($$$config) { return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -2576,7 +2820,7 @@ module.exports = function ($$$config) { if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -2797,8 +3041,8 @@ module.exports = function ($$$config) { function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -3669,9 +3913,9 @@ module.exports = function ($$$config) { (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$59 in Component) - void 0 === newProps[propName$59] && - (newProps[propName$59] = Component[propName$59]); + for (var propName$61 in Component) + void 0 === newProps[propName$61] && + (newProps[propName$61] = Component[propName$61]); } return newProps; } @@ -4681,7 +4925,8 @@ module.exports = function ($$$config) { null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null, - retryLane: 536870912 + retryLane: 536870912, + hydrationErrors: null }), (JSCompiler_temp$jscomp$0 = createFiber(18, null, null, 0)), (JSCompiler_temp$jscomp$0.stateNode = nextInstance), @@ -5810,300 +6055,68 @@ module.exports = function ($$$config) { (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), - (nextProps = workInProgress.memoizedState), - init.parent !== props - ? ((init = { parent: props, cache: props }), - (workInProgress.memoizedState = init), - 0 === workInProgress.lanes && - (workInProgress.memoizedState = - workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, props)) - : ((props = nextProps.cache), - pushProvider(workInProgress, CacheContext, props), - props !== init.cache && - propagateContextChanges( - workInProgress, - [CacheContext], - renderLanes, - !0 - ))), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - workInProgress.child - ); - case 25: - if (enableTransitionTracing) - return ( - enableTransitionTracing - ? (null === current && - ((props = enableTransitionTracing - ? transitionStack.current - : null), - null !== props && - ((props = { - tag: 1, - transitions: new Set(props), - pendingBoundaries: null, - name: workInProgress.pendingProps.name, - aborts: null - }), - (workInProgress.stateNode = props), - (workInProgress.flags |= 2048))), - (props = workInProgress.stateNode), - null !== props && pushMarkerInstance(workInProgress, props), - reconcileChildren( - current, - workInProgress, - workInProgress.pendingProps.children, - renderLanes - ), - (workInProgress = workInProgress.child)) - : (workInProgress = null), - workInProgress - ); - break; - case 29: - throw workInProgress.pendingProps; - } - throw Error(formatProdErrorMessage(156, workInProgress.tag)); - } - function pushProvider(providerFiber, context, nextValue) { - isPrimaryRenderer - ? (push(valueCursor, context._currentValue), - (context._currentValue = nextValue)) - : (push(valueCursor, context._currentValue2), - (context._currentValue2 = nextValue)); - } - function popProvider(context) { - var currentValue = valueCursor.current; - isPrimaryRenderer - ? (context._currentValue = currentValue) - : (context._currentValue2 = currentValue); - pop(valueCursor); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) throw Error(formatProdErrorMessage(341)); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = enableRenderableContext - ? parent.type - : parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current ? current.push(context) : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) throw Error(formatProdErrorMessage(387)); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - var context = currentDependencies.context; - if ( - !objectIs( - isPrimaryRenderer ? context._currentValue : context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; + (init = current.memoizedState), + (nextProps = workInProgress.memoizedState), + init.parent !== props + ? ((init = { parent: props, cache: props }), + (workInProgress.memoizedState = init), + 0 === workInProgress.lanes && + (workInProgress.memoizedState = + workInProgress.updateQueue.baseState = + init), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== init.cache && + propagateContextChanges( + workInProgress, + [CacheContext], + renderLanes, + !0 + ))), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + workInProgress.child + ); + case 25: + if (enableTransitionTracing) + return ( + enableTransitionTracing + ? (null === current && + ((props = enableTransitionTracing + ? transitionStack.current + : null), + null !== props && + ((props = { + tag: 1, + transitions: new Set(props), + pendingBoundaries: null, + name: workInProgress.pendingProps.name, + aborts: null + }), + (workInProgress.stateNode = props), + (workInProgress.flags |= 2048))), + (props = workInProgress.stateNode), + null !== props && pushMarkerInstance(workInProgress, props), + reconcileChildren( + current, + workInProgress, + workInProgress.pendingProps.children, + renderLanes + ), + (workInProgress = workInProgress.child)) + : (workInProgress = null), + workInProgress + ); + break; + case 29: + throw workInProgress.pendingProps; } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) throw Error(formatProdErrorMessage(308)); - lastContextDependency = context; - consumer.dependencies = { lanes: 0, firstContext: context }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function releaseCache(cache) { - cache.refCount--; - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition( - offscreenWorkInProgress, - prevCachePool, - newTransitions - ) { - null === prevCachePool - ? push(resumedCache, resumedCache.current) - : push(resumedCache, prevCachePool.pool); - enableTransitionTracing && - (null === transitionStack.current - ? push(transitionStack, newTransitions) - : null === newTransitions - ? push(transitionStack, transitionStack.current) - : push( - transitionStack, - transitionStack.current.concat(newTransitions) - )); - } - function popTransition(workInProgress, current) { - null !== current && - (enableTransitionTracing && pop(transitionStack), pop(resumedCache)); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { - parent: isPrimaryRenderer - ? CacheContext._currentValue - : CacheContext._currentValue2, - pool: cacheFromPool - }; + throw Error(formatProdErrorMessage(156, workInProgress.tag)); } function collectScopedNodesFromChildren( startingChild, @@ -6525,9 +6538,7 @@ module.exports = function ($$$config) { (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))); + upgradeHydrationErrorsToRecoverable()); updateHostContainer(current, workInProgress); bubbleProperties(workInProgress); enableTransitionTracing && @@ -6729,9 +6740,10 @@ module.exports = function ($$$config) { bubbleProperties(workInProgress); nextResource = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (nextResource = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = nextResource), (nextResource = !0); if (!nextResource) { if (workInProgress.flags & 256) @@ -6752,11 +6764,11 @@ module.exports = function ($$$config) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (nextResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$122 = null; + var cache$123 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$122 = newProps.memoizedState.cachePool.pool); - cache$122 !== nextResource && (newProps.flags |= 2048); + (cache$123 = newProps.memoizedState.cachePool.pool); + cache$123 !== nextResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6792,8 +6804,8 @@ module.exports = function ($$$config) { if (null === nextResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$122 = nextResource.rendering; - if (null === cache$122) + cache$123 = nextResource.rendering; + if (null === cache$123) if (newProps) cutOffTailIfNeeded(nextResource, !1); else { if ( @@ -6801,11 +6813,11 @@ module.exports = function ($$$config) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$122 = findFirstSuspended(current); - if (null !== cache$122) { + cache$123 = findFirstSuspended(current); + if (null !== cache$123) { workInProgress.flags |= 128; cutOffTailIfNeeded(nextResource, !1); - current = cache$122.updateQueue; + current = cache$123.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6834,7 +6846,7 @@ module.exports = function ($$$config) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$122)), null !== current)) { + if (((current = findFirstSuspended(cache$123)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6844,7 +6856,7 @@ module.exports = function ($$$config) { cutOffTailIfNeeded(nextResource, !0), null === nextResource.tail && "hidden" === nextResource.tailMode && - !cache$122.alternate && + !cache$123.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -6857,13 +6869,13 @@ module.exports = function ($$$config) { cutOffTailIfNeeded(nextResource, !1), (workInProgress.lanes = 4194304)); nextResource.isBackwards - ? ((cache$122.sibling = workInProgress.child), - (workInProgress.child = cache$122)) + ? ((cache$123.sibling = workInProgress.child), + (workInProgress.child = cache$123)) : ((current = nextResource.last), null !== current - ? (current.sibling = cache$122) - : (workInProgress.child = cache$122), - (nextResource.last = cache$122)); + ? (current.sibling = cache$123) + : (workInProgress.child = cache$123), + (nextResource.last = cache$123)); } if (null !== nextResource.tail) return ( @@ -7110,10 +7122,10 @@ module.exports = function ($$$config) { inst.destroy = lastEffect; } } else { - var create$139 = updateQueue.create, - inst$140 = updateQueue.inst; - lastEffect = create$139(); - inst$140.destroy = lastEffect; + var create$140 = updateQueue.create, + inst$141 = updateQueue.inst; + lastEffect = create$140(); + inst$141.destroy = lastEffect; } updateQueue = updateQueue.next; } while (updateQueue !== firstEffect); @@ -7268,8 +7280,8 @@ module.exports = function ($$$config) { else if ("function" === typeof ref) try { ref(null); - } catch (error$142) { - captureCommitPhaseError(current, nearestMountedAncestor, error$142); + } catch (error$143) { + captureCommitPhaseError(current, nearestMountedAncestor, error$143); } else ref.current = null; } @@ -7539,11 +7551,11 @@ module.exports = function ($$$config) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$141) { + } catch (error$142) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$141 + error$142 ); } } @@ -8555,21 +8567,21 @@ module.exports = function ($$$config) { break; } case 5: - var parent$143 = JSCompiler_inline_result.stateNode; + var parent$144 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (resetTextContent(parent$143), + (resetTextContent(parent$144), (JSCompiler_inline_result.flags &= -33)); - var before$144 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$144, parent$143); + var before$145 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$145, parent$144); break; case 3: case 4: - var parent$145 = JSCompiler_inline_result.stateNode.containerInfo, - before$146 = getHostSibling(finishedWork); + var parent$146 = JSCompiler_inline_result.stateNode.containerInfo, + before$147 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$146, - parent$145 + before$147, + parent$146 ); break; default: @@ -8939,6 +8951,14 @@ module.exports = function ($$$config) { committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: recursivelyTraversePassiveMountEffects( finishedRoot, @@ -9064,9 +9084,9 @@ module.exports = function ($$$config) { ); break; case 22: - var instance$158 = finishedWork.stateNode; + var instance$159 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$158._visibility & 4 + ? instance$159._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9078,7 +9098,7 @@ module.exports = function ($$$config) { finishedRoot, finishedWork ) - : ((instance$158._visibility |= 4), + : ((instance$159._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9091,7 +9111,7 @@ module.exports = function ($$$config) { commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$158 + instance$159 ); break; case 24: @@ -9757,7 +9777,13 @@ module.exports = function ($$$config) { renderWasConcurrent = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = exitStatus; null !== renderWasConcurrent && - queueRecoverableErrors(renderWasConcurrent); + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = + renderWasConcurrent) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + renderWasConcurrent + )); } exitStatus = JSCompiler_inline_result; } @@ -9855,14 +9881,6 @@ module.exports = function ($$$config) { } while (1); ensureRootIsScheduled(root$jscomp$0); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -9998,7 +10016,7 @@ module.exports = function ($$$config) { var interruptedWork = workInProgress.return; else (interruptedWork = workInProgress), - (lastContextDependency = currentlyRenderingFiber = null), + (lastContextDependency = currentlyRenderingFiber$1 = null), resetHooksOnUnwind(interruptedWork), (thenableState = null), (thenableIndexCounter = 0), @@ -10055,7 +10073,7 @@ module.exports = function ($$$config) { return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; thrownValue === SuspenseException || thrownValue === SuspenseActionException ? ((thrownValue = getSuspendedThenable()), @@ -10177,12 +10195,12 @@ module.exports = function ($$$config) { workLoopSync(); exitStatus = workInProgressRootExitStatus; break; - } catch (thrownValue$173) { - handleThrow(root, thrownValue$173); + } catch (thrownValue$174) { + handleThrow(root, thrownValue$174); } while (1); lanes && root.shellSuspendCounter++; - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; executionContext = prevExecutionContext; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; @@ -10299,11 +10317,11 @@ module.exports = function ($$$config) { } workLoopConcurrent(); break; - } catch (thrownValue$175) { - handleThrow(root, thrownValue$175); + } catch (thrownValue$176) { + handleThrow(root, thrownValue$176); } while (1); - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; ReactSharedInternals.H = prevDispatcher; ReactSharedInternals.A = prevAsyncDispatcher; executionContext = prevExecutionContext; @@ -10386,7 +10404,7 @@ module.exports = function ($$$config) { thrownValue, suspendedReason ) { - lastContextDependency = currentlyRenderingFiber = null; + lastContextDependency = currentlyRenderingFiber$1 = null; resetHooksOnUnwind(unitOfWork); thenableState = null; thenableIndexCounter = 0; @@ -10554,9 +10572,6 @@ module.exports = function ($$$config) { root.finishedWork = null; root.finishedLanes = 0; if (finishedWork === root.current) throw Error(formatProdErrorMessage(177)); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; var remainingLanes = finishedWork.lanes | finishedWork.childLanes; remainingLanes |= concurrentlyUpdatedLanes; markRootFinished( @@ -10571,44 +10586,52 @@ module.exports = function ($$$config) { root === workInProgressRoot && ((workInProgress = workInProgressRoot = null), (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions), + (root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null), + scheduleCallback(NormalPriority$1, function () { + flushPassiveEffects(!0); + return null; + })) + : ((root.callbackNode = null), + (root.callbackPriority = 0), + (root.cancelPendingCommit = null)); transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = getCurrentUpdatePriority()), - setCurrentUpdatePriority(2), - (updatedLanes = executionContext), - (executionContext |= 4), - (suspendedRetryLanes = commitBeforeMutationEffects(root, finishedWork)), - commitMutationEffectsOnFiber(finishedWork, root), - suspendedRetryLanes && afterActiveInstanceBlur(), - resetAfterCommit(root.containerInfo), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - setCurrentUpdatePriority(spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - rootDoesHavePassiveEffects - ? ((rootDoesHavePassiveEffects = !1), + if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; + updatedLanes = getCurrentUpdatePriority(); + setCurrentUpdatePriority(2); + suspendedRetryLanes = executionContext; + executionContext |= 4; + var shouldFireAfterActiveInstanceBlur$180 = commitBeforeMutationEffects( + root, + finishedWork + ); + commitMutationEffectsOnFiber(finishedWork, root); + shouldFireAfterActiveInstanceBlur$180 && afterActiveInstanceBlur(); + resetAfterCommit(root.containerInfo); + root.current = finishedWork; + commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork); + requestPaint(); + executionContext = suspendedRetryLanes; + setCurrentUpdatePriority(updatedLanes); + ReactSharedInternals.T = transitions; + } else root.current = finishedWork; + spawnedLane + ? ((spawnedLane = !1), (rootWithPendingPassiveEffects = root), (pendingPassiveEffectsLanes = lanes)) : releaseRootPooledCache(root, remainingLanes); remainingLanes = root.pendingLanes; 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); if (null !== recoverableErrors) for ( renderPriorityLevel = root.onRecoverableError, finishedWork = 0; @@ -10620,6 +10643,7 @@ module.exports = function ($$$config) { componentStack: remainingLanes.stack }); 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root); remainingLanes = root.pendingLanes; (enableInfiniteRenderLoopDetection && (didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) || @@ -11573,9 +11597,37 @@ module.exports = function ($$$config) { hydrationErrors = null, rootOrSingletonContext = !1, HydrationMismatchException = Error(formatProdErrorMessage(519)), - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null), + currentlyRenderingFiber$1 = null, + lastContextDependency = null, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$2 = Scheduler.unstable_scheduleCallback, + NormalPriority = Scheduler.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = !1, @@ -11586,18 +11638,32 @@ module.exports = function ($$$config) { currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - hasForceUpdate = !1, - didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), + transitionStack = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, SuspenseException = Error(formatProdErrorMessage(460)), SuspenseyCommitException = Error(formatProdErrorMessage(474)), SuspenseActionException = Error(formatProdErrorMessage(542)), noopSuspenseyCommitThenable = { then: function () {} }, suspendedThenable = null, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + hasForceUpdate = !1, + didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -11701,7 +11767,7 @@ module.exports = function ($$$config) { hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -11714,11 +11780,7 @@ module.exports = function ($$$config) { useState: function (initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; }, @@ -11731,7 +11793,7 @@ module.exports = function ($$$config) { var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -11740,7 +11802,7 @@ module.exports = function ($$$config) { return [!1, stateHook]; }, useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); if (isHydrating) { if (void 0 === getServerSnapshot) @@ -11816,7 +11878,7 @@ module.exports = function ($$$config) { hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -11827,7 +11889,7 @@ module.exports = function ($$$config) { useCacheRefresh: function () { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); }, useEffectEvent: function (callback) { @@ -12035,49 +12097,12 @@ module.exports = function ($$$config) { SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1, updateLegacyHiddenComponent = updateOffscreenComponent, - SUSPENDED_MARKER = { dehydrated: null, treeContext: null, retryLane: 0 }, - valueCursor = createCursor(null), - currentlyRenderingFiber = null, - lastContextDependency = null, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler.unstable_scheduleCallback, - NormalPriority = Scheduler.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 + SUSPENDED_MARKER = { + dehydrated: null, + treeContext: null, + retryLane: 0, + hydrationErrors: null }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), - transitionStack = createCursor(null), emptyObject = {}, offscreenSubtreeIsHidden = !1, offscreenSubtreeWasHidden = !1, @@ -12142,7 +12167,6 @@ module.exports = function ($$$config) { currentPendingTransitionCallbacks = null, currentEndTime = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -12500,7 +12524,7 @@ module.exports = function ($$$config) { version: rendererVersion, rendererPackageName: rendererPackageName, currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index ea435294231ae..c1df4883557e8 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1094() { + function JSCompiler_object_inline_createNodeMock_1119() { return null; } function findHook(fiber, id) { @@ -702,41 +702,6 @@ __DEV__ && } return hook.checkDCE ? !0 : !1; } - function onCommitRoot(root, eventPriority) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - var didError = 128 === (root.current.flags & 128); - switch (eventPriority) { - case DiscreteEventPriority: - var schedulerPriority = ImmediatePriority; - break; - case ContinuousEventPriority: - schedulerPriority = UserBlockingPriority; - break; - case DefaultEventPriority: - schedulerPriority = NormalPriority$1; - break; - case IdleEventPriority: - schedulerPriority = IdlePriority; - break; - default: - schedulerPriority = NormalPriority$1; - } - injectedHook.onCommitFiberRoot( - rendererID, - root, - schedulerPriority, - didError - ); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - error$jscomp$0( - "React instrumentation encountered an error: %s", - err - )); - } - } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && (unstable_setDisableYieldValue(newIsStrictMode), @@ -933,54 +898,6 @@ __DEV__ && (root.pingedLanes = 0), (root.warmLanes = 0)); } - function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ) { - var previouslyPendingLanes = root.pendingLanes; - root.pendingLanes = remainingLanes; - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.warmLanes = 0; - root.expiredLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - root.errorRecoveryDisabledLanes &= remainingLanes; - root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - for ( - remainingLanes = previouslyPendingLanes & ~remainingLanes; - 0 < remainingLanes; - - ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; - expirationTimes[index] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index]; - if (null !== hiddenUpdatesForLane) - for ( - hiddenUpdates[index] = null, index = 0; - index < hiddenUpdatesForLane.length; - index++ - ) { - var update = hiddenUpdatesForLane[index]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; - } - 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); - } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; root.suspendedLanes &= ~spawnedLane; @@ -1712,138 +1629,288 @@ __DEV__ && )); return skipToNode + debugInfo + propName; } - function finishQueueingConcurrentUpdates() { - for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; - - ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; - } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); - } - } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); - } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); - } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; } - function getRootForUpdatedFiber(sourceFiber) { - if (nestedUpdateCount > NESTED_UPDATE_LIMIT) - throw ( - ((nestedPassiveUpdateCount = nestedUpdateCount = 0), - (rootWithPassiveNestedUpdates = rootWithNestedUpdates = null), - Error( - "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." - )) - ); - nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && - ((nestedPassiveUpdateCount = 0), - (rootWithPassiveNestedUpdates = null), + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue2, providerFiber); + context._currentValue2 = nextValue; + push(renderer2CursorDEV, context._currentRenderer2, providerFiber); + void 0 !== context._currentRenderer2 && + null !== context._currentRenderer2 && + context._currentRenderer2 !== rendererSigil && error$jscomp$0( - "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render." - )); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; - } - function pushNestedEffectDurations() { - var prevEffectDuration = profilerEffectDuration; - profilerEffectDuration = 0; - return prevEffectDuration; - } - function popNestedEffectDurations(prevEffectDuration) { - var elapsedTime = profilerEffectDuration; - profilerEffectDuration = prevEffectDuration; - return elapsedTime; - } - function bubbleNestedEffectDurations(prevEffectDuration) { - var elapsedTime = profilerEffectDuration; - profilerEffectDuration += prevEffectDuration; - return elapsedTime; + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ); + context._currentRenderer2 = rendererSigil; } - function startProfilerTimer(fiber) { - profilerStartTime = now(); - 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); + function popProvider(context, providerFiber) { + context._currentValue2 = valueCursor.current; + var currentRenderer2 = renderer2CursorDEV.current; + pop(renderer2CursorDEV, providerFiber); + context._currentRenderer2 = currentRenderer2; + pop(valueCursor, providerFiber); } - function stopProfilerTimerIfRunningAndRecordDuration(fiber) { - if (0 <= profilerStartTime) { - var elapsedTime = now() - profilerStartTime; - fiber.actualDuration += elapsedTime; - fiber.selfBaseDuration = elapsedTime; - profilerStartTime = -1; + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); } - function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) { - if (0 <= profilerStartTime) { - var elapsedTime = now() - profilerStartTime; - fiber.actualDuration += elapsedTime; - profilerStartTime = -1; + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } - function recordEffectDuration() { - if (0 <= profilerStartTime) { + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; + + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); + } + parent = parent.return; + } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; + } + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; + } + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); + } + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); + } + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); + } + function readContextForConsumer(consumer, context) { + var value = context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$1(NormalPriority, function () { + cache.controller.abort(); + }); + } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } + function startProfilerTimer(fiber) { + profilerStartTime = now(); + 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); + } + function stopProfilerTimerIfRunningAndRecordDuration(fiber) { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + fiber.actualDuration += elapsedTime; + fiber.selfBaseDuration = elapsedTime; + profilerStartTime = -1; + } + } + function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + fiber.actualDuration += elapsedTime; + profilerStartTime = -1; + } + } + function recordEffectDuration() { + if (0 <= profilerStartTime) { var elapsedTime = now() - profilerStartTime; profilerStartTime = -1; profilerEffectDuration += elapsedTime; @@ -1954,12 +2021,13 @@ __DEV__ && } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } + suspendedLanes = pendingPassiveEffectsLanes; currentTime = workInProgressRoot; - suspendedLanes = workInProgressRootRenderLanes; - suspendedLanes = getNextLanes( - root, - root === currentTime ? suspendedLanes : 0 - ); + pingedLanes = workInProgressRootRenderLanes; + suspendedLanes = + root === rootWithPendingPassiveEffects + ? suspendedLanes + : getNextLanes(root, root === currentTime ? pingedLanes : 0); pingedLanes = root.callbackNode; if ( 0 === suspendedLanes || @@ -1974,44 +2042,45 @@ __DEV__ && (root.callbackPriority = 0) ); if ( - 0 === (suspendedLanes & 3) || - checkIfRootIsPrerendering(root, suspendedLanes) - ) { - currentTime = suspendedLanes & -suspendedLanes; - if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; - } - null !== pingedLanes && cancelCallback(pingedLanes); - root.callbackPriority = 2; - root.callbackNode = null; - return 2; + 0 !== (suspendedLanes & 3) && + !checkIfRootIsPrerendering(root, suspendedLanes) + ) + return ( + null !== pingedLanes && cancelCallback(pingedLanes), + (root.callbackPriority = 2), + (root.callbackNode = null), + 2 + ); + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode)) + : (suspendedLanes = scheduleCallback$2(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -2043,7 +2112,7 @@ __DEV__ && performWorkOnRoot(root, lanes, !0); } function cancelCallback(callbackNode) { - callbackNode !== fakeActCallbackNode$1 && + callbackNode !== fakeActCallbackNode && null !== callbackNode && cancelCallback$1(callbackNode); } @@ -2053,68 +2122,299 @@ __DEV__ && cb(); return null; }); - scheduleCallback$3(ImmediatePriority, cb); + scheduleCallback$2(ImmediatePriority, cb); } function requestTransitionLane() { 0 === currentEventTransitionLane && (currentEventTransitionLane = claimNextTransitionLane()); return currentEventTransitionLane; } - function entangleAsyncAction(transition, thenable) { - if (null === currentEntangledListeners) { - var entangledListeners = (currentEntangledListeners = []); - currentEntangledPendingCount = 0; - currentEntangledLane = requestTransitionLane(); - currentEntangledActionThenable = { - status: "pending", - value: void 0, - then: function (resolve) { - entangledListeners.push(resolve); - } - }; - } - currentEntangledPendingCount++; - thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); - return thenable; + function entangleAsyncAction(transition, thenable) { + if (null === currentEntangledListeners) { + var entangledListeners = (currentEntangledListeners = []); + currentEntangledPendingCount = 0; + currentEntangledLane = requestTransitionLane(); + currentEntangledActionThenable = { + status: "pending", + value: void 0, + then: function (resolve) { + entangledListeners.push(resolve); + } + }; + } + currentEntangledPendingCount++; + thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); + return thenable; + } + function pingEngtangledActionScope() { + if ( + 0 === --currentEntangledPendingCount && + null !== currentEntangledListeners + ) { + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } + } + function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); + } + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; + } + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; + } + function pushTransition(offscreenWorkInProgress, prevCachePool) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + } + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue2, pool: cacheFromPool }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; + } + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), + error$jscomp$0( + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop, noop), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop, noop); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error( + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); + } + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } - function pingEngtangledActionScope() { - if ( - 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners - ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); - } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } - function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; + function getRootForUpdatedFiber(sourceFiber) { + if (nestedUpdateCount > NESTED_UPDATE_LIMIT) + throw ( + ((nestedPassiveUpdateCount = nestedUpdateCount = 0), + (rootWithPassiveNestedUpdates = rootWithNestedUpdates = null), + Error( + "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." + )) + ); + nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && + ((nestedPassiveUpdateCount = 0), + (rootWithPassiveNestedUpdates = null), + error$jscomp$0( + "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render." + )); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; } function initializeUpdateQueue(fiber) { fiber.updateQueue = { @@ -2420,124 +2720,6 @@ __DEV__ && ) callCallback(callbacks[updateQueue], context); } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; - } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop, noop), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop, noop); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; - } - } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - } function pushHiddenContext(fiber, context) { var prevEntangledRenderLanes = entangledRenderLanes; push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); @@ -2570,9 +2752,7 @@ __DEV__ && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName) ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); if ( !didWarnAboutMismatchedHooksForComponent.has(componentName) && (didWarnAboutMismatchedHooksForComponent.add(componentName), @@ -2610,7 +2790,7 @@ __DEV__ && ); } function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), error$jscomp$0( @@ -2653,7 +2833,7 @@ __DEV__ && nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; hookTypesDev = null !== current ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -2664,9 +2844,7 @@ __DEV__ && "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component) ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), error$jscomp$0( @@ -2726,7 +2904,7 @@ __DEV__ && currentHookNameInDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; null !== current && @@ -2761,7 +2939,7 @@ __DEV__ && ))); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2796,7 +2974,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function bailoutHooks(current, workInProgress, lanes) { @@ -2824,7 +3002,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -2841,26 +3019,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -2875,7 +3053,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -2889,7 +3067,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -2910,10 +3088,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2929,7 +3107,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -2977,7 +3155,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3055,7 +3233,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -3076,7 +3254,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -3123,7 +3301,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (!didWarnUncachedGetSnapshot) { @@ -3163,7 +3341,7 @@ __DEV__ && return nextSnapshot; } function updateSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (!didWarnUncachedGetSnapshot) { @@ -3215,10 +3393,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3276,11 +3454,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -3297,7 +3471,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3461,14 +3635,14 @@ __DEV__ && stateHook.queue = stateQueue; stateHook = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateQueue ); stateQueue.dispatch = stateHook; stateQueue = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, stateQueue.queue ); @@ -3482,7 +3656,7 @@ __DEV__ && stateQueue.queue = actionQueue; stateHook = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, actionQueue, setPendingState, stateHook @@ -3518,7 +3692,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -3544,10 +3718,10 @@ __DEV__ && } function pushSimpleEffect(tag, inst, create, deps) { tag = { tag: tag, create: create, deps: deps, inst: inst, next: null }; - inst = currentlyRenderingFiber$1.updateQueue; + inst = currentlyRenderingFiber.updateQueue; null === inst && ((inst = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = inst)); + (currentlyRenderingFiber.updateQueue = inst)); create = inst.lastEffect; null === create ? (inst.lastEffect = tag.next = tag) @@ -3568,7 +3742,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -3584,7 +3758,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -3593,14 +3767,14 @@ __DEV__ && ))); } function mountEffect(create, deps) { - 0 !== (currentlyRenderingFiber$1.mode & 16) && - 0 === (currentlyRenderingFiber$1.mode & 64) + 0 !== (currentlyRenderingFiber.mode & 16) && + 0 === (currentlyRenderingFiber.mode & 64) ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - 0 !== (currentlyRenderingFiber$1.mode & 16) && (fiberFlags |= 67108864); + 0 !== (currentlyRenderingFiber.mode & 16) && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } function imperativeHandleEffect(create, ref) { @@ -3633,7 +3807,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - 0 !== (currentlyRenderingFiber$1.mode & 16) && (fiberFlags |= 67108864); + 0 !== (currentlyRenderingFiber.mode & 16) && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, Layout, @@ -3733,7 +3907,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -3748,7 +3922,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -3820,7 +3994,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -3862,7 +4036,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -3887,62 +4061,36 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, - revertLane: 0, - action: action, - hasEagerState: !1, - eagerState: null, - next: null - }; - isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + args = requestUpdateLane(fiber); + var update = { + lane: args, + revertLane: 0, + action: action, + hasEagerState: !1, + eagerState: null, + next: null + }; + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -4026,8 +4174,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -7694,257 +7842,6 @@ __DEV__ && "). This error is likely caused by a bug in React. Please file an issue." ); } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue2, providerFiber); - context._currentValue2 = nextValue; - push(renderer2CursorDEV, context._currentRenderer2, providerFiber); - void 0 !== context._currentRenderer2 && - null !== context._currentRenderer2 && - context._currentRenderer2 !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ); - context._currentRenderer2 = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue2 = valueCursor.current; - var currentRenderer2 = renderer2CursorDEV.current; - pop(renderer2CursorDEV, providerFiber); - context._currentRenderer2 = currentRenderer2; - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition(offscreenWorkInProgress, prevCachePool) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue2, pool: cacheFromPool }; - } function collectScopedNodesFromChildren( startingChild, fn$jscomp$0, @@ -8187,9 +8084,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))), + upgradeHydrationErrorsToRecoverable()), bubbleProperties(workInProgress), null ); @@ -8315,9 +8210,10 @@ __DEV__ && (workInProgress.treeBaseDuration -= child.treeBaseDuration)); child = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (child = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = child), (child = !0); if (!child) { if (workInProgress.flags & 256) @@ -9142,59 +9038,6 @@ __DEV__ && ); } } - function commitBeforeMutationEffects(root, firstChild) { - for (nextEffect = firstChild; null !== nextEffect; ) - if ( - ((root = nextEffect), - (firstChild = root.child), - 0 !== (root.subtreeFlags & 1028) && null !== firstChild) - ) - (firstChild.return = root), (nextEffect = firstChild); - else - for (; null !== nextEffect; ) { - firstChild = root = nextEffect; - var current = firstChild.alternate, - flags = firstChild.flags; - switch (firstChild.tag) { - case 0: - break; - case 11: - case 15: - break; - case 1: - 0 !== (flags & 1024) && - null !== current && - commitClassSnapshot(firstChild, current); - break; - case 3: - 0 !== (flags & 1024) && - firstChild.stateNode.containerInfo.children.splice(0); - break; - case 5: - case 26: - case 27: - case 6: - case 4: - case 17: - break; - default: - if (0 !== (flags & 1024)) - throw Error( - "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." - ); - } - firstChild = root.sibling; - if (null !== firstChild) { - firstChild.return = root.return; - nextEffect = firstChild; - break; - } - nextEffect = root.return; - } - root = shouldFireAfterActiveInstanceBlur; - shouldFireAfterActiveInstanceBlur = !1; - return root; - } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; switch (finishedWork.tag) { @@ -10295,6 +10138,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: break; case 22: @@ -10846,7 +10697,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = renderWasConcurrent; } @@ -10860,9 +10717,8 @@ __DEV__ && break; } a: { - renderWasConcurrent = root; - shouldTimeSlice = exitStatus; - switch (shouldTimeSlice) { + shouldTimeSlice = root; + switch (exitStatus) { case RootInProgress: case RootFatalErrored: throw Error("Root did not complete. This is a bug in React."); @@ -10870,7 +10726,7 @@ __DEV__ && if ((lanes & 4194176) !== lanes) break; case RootSuspendedAtTheShell: markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings @@ -10885,62 +10741,42 @@ __DEV__ && default: throw Error("Unknown root exit status."); } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - shouldTimeSlice, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + exitStatus, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { if ( (lanes & 62914560) === lanes && - ((exitStatus = + ((renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1()), - 10 < exitStatus) + 10 < renderWasConcurrent) ) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -10950,17 +10786,17 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, THROTTLED_COMMIT, -0, 0 ), - exitStatus + renderWasConcurrent ); break a; } commitRootWhenReady( - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -10970,7 +10806,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, IMMEDIATE_COMMIT, -0, 0 @@ -10982,14 +10818,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -11009,29 +10837,19 @@ __DEV__ && lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && accumulateSuspenseyCommitOnFiber(finishedWork); - finishedWork = ReactSharedInternals.T; - lanes = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - lanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = finishedWork), - (currentUpdatePriority = lanes); - } + commitRoot( + root, + recoverableErrors, + transitions, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes, + exitStatus, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime + ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -11177,7 +10995,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -11657,116 +11475,243 @@ __DEV__ && workInProgressRootExitStatus = RootSuspendedAtTheShell; workInProgress = null; } - function commitRootImpl( - root, + function commitRoot( + root$jscomp$0, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - renderPriorityLevel, spawnedLane, updatedLanes, suspendedRetryLanes ) { - do flushPassiveEffects(); - while (null !== rootWithPendingPassiveEffects); - ReactStrictModeWarnings.flushLegacyContextWarning(); - ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) - throw Error("Should not already be working."); - var finishedWork = root.finishedWork; - didIncludeRenderPhaseUpdate = root.finishedLanes; - if (null === finishedWork) return null; - 0 === didIncludeRenderPhaseUpdate && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." - ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." - ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - didIncludeRenderPhaseUpdate, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), - (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate)) - : (releaseRootPooledCache(root, remainingLanes), - (nestedPassiveUpdateCount = 0), - (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), - runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - transitions + didIncludeRenderPhaseUpdate = ReactSharedInternals.T; + var previousUpdateLanePriority = currentUpdatePriority; + try { + currentUpdatePriority = DiscreteEventPriority; + ReactSharedInternals.T = null; + do flushPassiveEffects(); + while (null !== rootWithPendingPassiveEffects); + ReactStrictModeWarnings.flushLegacyContextWarning(); + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) + throw Error("Should not already be working."); + var finishedWork = root$jscomp$0.finishedWork, + lanes = root$jscomp$0.finishedLanes; + if (null !== finishedWork) { + 0 === lanes && + error$jscomp$0( + "root.finishedLanes should not be empty during a commit. This is a bug in React." ); - 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); - remainingLanes = root.pendingLanes; - 0 !== (didIncludeRenderPhaseUpdate & 4194218) && - 0 !== (remainingLanes & 42) - ? ((nestedUpdateScheduled = !0), - root === rootWithNestedUpdates - ? nestedUpdateCount++ - : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))) - : (nestedUpdateCount = 0); - flushSyncWorkAcrossRoots_impl(0, !1); - return null; + root$jscomp$0.finishedWork = null; + root$jscomp$0.finishedLanes = 0; + if (finishedWork === root$jscomp$0.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes, + remainingLanes$jscomp$0 = (remainingLanes |= + concurrentlyUpdatedLanes), + previouslyPendingLanes = root$jscomp$0.pendingLanes; + root$jscomp$0.pendingLanes = remainingLanes$jscomp$0; + root$jscomp$0.suspendedLanes = 0; + root$jscomp$0.pingedLanes = 0; + root$jscomp$0.warmLanes = 0; + root$jscomp$0.expiredLanes &= remainingLanes$jscomp$0; + root$jscomp$0.entangledLanes &= remainingLanes$jscomp$0; + root$jscomp$0.errorRecoveryDisabledLanes &= remainingLanes$jscomp$0; + root$jscomp$0.shellSuspendCounter = 0; + var entanglements = root$jscomp$0.entanglements, + expirationTimes = root$jscomp$0.expirationTimes, + hiddenUpdates = root$jscomp$0.hiddenUpdates; + for ( + remainingLanes$jscomp$0 = + previouslyPendingLanes & ~remainingLanes$jscomp$0; + 0 < remainingLanes$jscomp$0; + + ) { + var index = 31 - clz32(remainingLanes$jscomp$0), + lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) { + hiddenUpdates[index] = null; + for (var i = 0; i < hiddenUpdatesForLane.length; i++) { + var update = hiddenUpdatesForLane[i]; + null !== update && (update.lane &= -536870913); + } + } + remainingLanes$jscomp$0 &= ~lane; + } + 0 !== spawnedLane && + markSpawnedDeferredLane(root$jscomp$0, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root$jscomp$0.tag && + (root$jscomp$0.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~lanes)); + root$jscomp$0 === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions)) + : ((root$jscomp$0.callbackNode = null), + (root$jscomp$0.callbackPriority = 0), + (root$jscomp$0.cancelPendingCommit = null)); + commitStartTime = now(); + var rootHasEffect = 0 !== (finishedWork.flags & 15990); + if (0 !== (finishedWork.subtreeFlags & 15990) || rootHasEffect) { + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; + transitions = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + rootHasEffect = executionContext; + executionContext |= CommitContext; + for (nextEffect = finishedWork; null !== nextEffect; ) { + updatedLanes = nextEffect; + var child = updatedLanes.child; + if (0 !== (updatedLanes.subtreeFlags & 1028) && null !== child) + (child.return = updatedLanes), (nextEffect = child); + else + b: for (; null !== nextEffect; ) { + suspendedRetryLanes = updatedLanes = nextEffect; + var current = suspendedRetryLanes.alternate, + flags = suspendedRetryLanes.flags; + switch (suspendedRetryLanes.tag) { + case 0: + break; + case 11: + case 15: + break; + case 1: + 0 !== (flags & 1024) && + null !== current && + commitClassSnapshot(suspendedRetryLanes, current); + break; + case 3: + 0 !== (flags & 1024) && + suspendedRetryLanes.stateNode.containerInfo.children.splice( + 0 + ); + break; + case 5: + case 26: + case 27: + case 6: + case 4: + case 17: + break; + default: + if (0 !== (flags & 1024)) + throw Error( + "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." + ); + } + var sibling = updatedLanes.sibling; + if (null !== sibling) { + sibling.return = updatedLanes.return; + nextEffect = sibling; + break b; + } + nextEffect = updatedLanes.return; + } + } + commitMutationEffectsOnFiber(finishedWork, root$jscomp$0); + root$jscomp$0.current = finishedWork; + commitLayoutEffectOnFiber( + root$jscomp$0, + finishedWork.alternate, + finishedWork + ); + requestPaint(); + executionContext = rootHasEffect; + currentUpdatePriority = transitions; + ReactSharedInternals.T = prevTransition; + } else root$jscomp$0.current = finishedWork; + (prevTransition = spawnedLane) + ? ((rootWithPendingPassiveEffects = root$jscomp$0), + (pendingPassiveEffectsLanes = lanes)) + : (releaseRootPooledCache(root$jscomp$0, remainingLanes), + (nestedPassiveUpdateCount = 0), + (rootWithPassiveNestedUpdates = null)); + remainingLanes = root$jscomp$0.pendingLanes; + 0 === remainingLanes && + (legacyErrorBoundariesThatAlreadyFailed = null); + prevTransition || commitDoubleInvokeEffectsInDEV(root$jscomp$0); + var root = finishedWork.stateNode; + if ( + injectedHook && + "function" === typeof injectedHook.onCommitFiberRoot + ) + try { + var didError = 128 === (root.current.flags & 128); + switch (previousUpdateLanePriority) { + case DiscreteEventPriority: + var schedulerPriority = ImmediatePriority; + break; + case ContinuousEventPriority: + schedulerPriority = UserBlockingPriority; + break; + case DefaultEventPriority: + schedulerPriority = NormalPriority$1; + break; + case IdleEventPriority: + schedulerPriority = IdlePriority; + break; + default: + schedulerPriority = NormalPriority$1; + } + injectedHook.onCommitFiberRoot( + rendererID, + root, + schedulerPriority, + didError + ); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + error$jscomp$0( + "React instrumentation encountered an error: %s", + err + )); + } + if (null !== recoverableErrors) { + var onRecoverableError = root$jscomp$0.onRecoverableError; + for ( + finishedWork = 0; + finishedWork < recoverableErrors.length; + finishedWork++ + ) { + var recoverableError = recoverableErrors[finishedWork], + errorInfo = makeErrorInfo(recoverableError.stack); + runWithFiberInDEV( + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo + ); + } + } + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root$jscomp$0); + remainingLanes = root$jscomp$0.pendingLanes; + 0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42) + ? ((nestedUpdateScheduled = !0), + root$jscomp$0 === rootWithNestedUpdates + ? nestedUpdateCount++ + : ((nestedUpdateCount = 0), + (rootWithNestedUpdates = root$jscomp$0))) + : (nestedUpdateCount = 0); + flushSyncWorkAcrossRoots_impl(0, !1); + } + } finally { + (ReactSharedInternals.T = didIncludeRenderPhaseUpdate), + (currentUpdatePriority = previousUpdateLanePriority); + } } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -11809,6 +11754,9 @@ __DEV__ && lanes = pendingPassiveEffectsLanes; rootWithPendingPassiveEffects = null; pendingPassiveEffectsLanes = 0; + root$jscomp$0.callbackNode = null; + root$jscomp$0.callbackPriority = 0; + root$jscomp$0.cancelPendingCommit = null; if ( (executionContext & (RenderContext | CommitContext)) !== NoContext @@ -11838,6 +11786,7 @@ __DEV__ && : (nestedPassiveUpdateCount = 0); didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1; + ensureRootIsScheduled(root$jscomp$0); if ( injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot @@ -12052,7 +12001,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -12090,12 +12039,6 @@ __DEV__ && } } } - function scheduleCallback(priorityLevel, callback) { - var actQueue = ReactSharedInternals.actQueue; - return null !== actQueue - ? (actQueue.push(callback), fakeActCallbackNode) - : scheduleCallback$3(priorityLevel, callback); - } function warnIfUpdatesNotWrappedWithActDEV(fiber) { isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && @@ -13015,7 +12958,7 @@ __DEV__ && var current = null, isRendering = !1, isArrayImpl = Array.isArray, - scheduleCallback$3 = Scheduler$1.unstable_scheduleCallback, + scheduleCallback$2 = Scheduler$1.unstable_scheduleCallback, cancelCallback$1 = Scheduler$1.unstable_cancelCallback, shouldYield = Scheduler$1.unstable_shouldYield, requestPaint = Scheduler$1.unstable_requestPaint, @@ -13083,9 +13026,42 @@ __DEV__ && needsEscaping = /["'&<>\n\t]|^\s|\s$/, hydrationDiffRootDEV = null, hydrationErrors = null, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var renderer2CursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback, + NormalPriority = Scheduler$1.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler$1.unstable_now, commitStartTime = -0, profilerStartTime = -1.1, @@ -13099,19 +13075,21 @@ __DEV__ && mightHavePendingSyncWork = !1, isFlushingWork = !1, currentEventTransitionLane = 0, - fakeActCallbackNode$1 = {}, + fakeActCallbackNode = {}, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -13329,6 +13307,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -13337,7 +13326,7 @@ __DEV__ && var didWarnAboutAsyncClientComponent = new Set(); var didWarnAboutUseFormState = new Set(); var renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -14608,55 +14597,10 @@ __DEV__ && var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, - retryLane: 0 + retryLane: 0, + hydrationErrors: null }, hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var renderer2CursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback, - NormalPriority = Scheduler$1.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null - }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -14664,7 +14608,6 @@ __DEV__ && offscreenSubtreeWasHidden = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, - shouldFireAfterActiveInstanceBlur = !1, hostParent = null, hostParentIsContainer = !1, suspenseyCommitFlag = 8192, @@ -14735,7 +14678,6 @@ __DEV__ && RENDER_TIMEOUT_MS = 500, workInProgressTransitions = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -14754,8 +14696,7 @@ __DEV__ && didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = !1; var didWarnAboutUpdateInRenderForAnotherComponent = new Set(); - var fakeActCallbackNode = {}, - resolveFamily = null, + var resolveFamily = null, failedBoundaries = null; var hasBadMapPolyfill = !1; try { @@ -14968,10 +14909,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-classic-d4287258-20241217", + version: "19.1.0-www-classic-a9bbe346-20241219", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-classic-d4287258-20241217" + reconcilerVersion: "19.1.0-www-classic-a9bbe346-20241219" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -14991,7 +14932,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1094, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1119, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15106,5 +15047,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.1.0-www-classic-d4287258-20241217"; + exports.version = "19.1.0-www-classic-a9bbe346-20241219"; })(); diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index 9596d7513e2d6..5f9041df10e8f 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -13,7 +13,7 @@ "use strict"; __DEV__ && (function () { - function JSCompiler_object_inline_createNodeMock_1094() { + function JSCompiler_object_inline_createNodeMock_1119() { return null; } function findHook(fiber, id) { @@ -702,41 +702,6 @@ __DEV__ && } return hook.checkDCE ? !0 : !1; } - function onCommitRoot(root, eventPriority) { - if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot) - try { - var didError = 128 === (root.current.flags & 128); - switch (eventPriority) { - case DiscreteEventPriority: - var schedulerPriority = ImmediatePriority; - break; - case ContinuousEventPriority: - schedulerPriority = UserBlockingPriority; - break; - case DefaultEventPriority: - schedulerPriority = NormalPriority$1; - break; - case IdleEventPriority: - schedulerPriority = IdlePriority; - break; - default: - schedulerPriority = NormalPriority$1; - } - injectedHook.onCommitFiberRoot( - rendererID, - root, - schedulerPriority, - didError - ); - } catch (err) { - hasLoggedError || - ((hasLoggedError = !0), - error$jscomp$0( - "React instrumentation encountered an error: %s", - err - )); - } - } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && (unstable_setDisableYieldValue(newIsStrictMode), @@ -933,54 +898,6 @@ __DEV__ && (root.pingedLanes = 0), (root.warmLanes = 0)); } - function markRootFinished( - root, - finishedLanes, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ) { - var previouslyPendingLanes = root.pendingLanes; - root.pendingLanes = remainingLanes; - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.warmLanes = 0; - root.expiredLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - root.errorRecoveryDisabledLanes &= remainingLanes; - root.shellSuspendCounter = 0; - var entanglements = root.entanglements, - expirationTimes = root.expirationTimes, - hiddenUpdates = root.hiddenUpdates; - for ( - remainingLanes = previouslyPendingLanes & ~remainingLanes; - 0 < remainingLanes; - - ) { - var index = 31 - clz32(remainingLanes), - lane = 1 << index; - entanglements[index] = 0; - expirationTimes[index] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index]; - if (null !== hiddenUpdatesForLane) - for ( - hiddenUpdates[index] = null, index = 0; - index < hiddenUpdatesForLane.length; - index++ - ) { - var update = hiddenUpdatesForLane[index]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; - } - 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && - 0 === updatedLanes && - 0 !== root.tag && - (root.suspendedLanes |= - suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); - } function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { root.pendingLanes |= spawnedLane; root.suspendedLanes &= ~spawnedLane; @@ -1712,138 +1629,288 @@ __DEV__ && )); return skipToNode + debugInfo + propName; } - function finishQueueingConcurrentUpdates() { - for ( - var endIndex = concurrentQueuesIndex, - i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); - i < endIndex; - - ) { - var fiber = concurrentQueues[i]; - concurrentQueues[i++] = null; - var queue = concurrentQueues[i]; - concurrentQueues[i++] = null; - var update = concurrentQueues[i]; - concurrentQueues[i++] = null; - var lane = concurrentQueues[i]; - concurrentQueues[i++] = null; - if (null !== queue && null !== update) { - var pending = queue.pending; - null === pending - ? (update.next = update) - : ((update.next = pending.next), (pending.next = update)); - queue.pending = update; - } - 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); - } - } - function enqueueUpdate$1(fiber, queue, update, lane) { - concurrentQueues[concurrentQueuesIndex++] = fiber; - concurrentQueues[concurrentQueuesIndex++] = queue; - concurrentQueues[concurrentQueuesIndex++] = update; - concurrentQueues[concurrentQueuesIndex++] = lane; - concurrentlyUpdatedLanes |= lane; - fiber.lanes |= lane; - fiber = fiber.alternate; - null !== fiber && (fiber.lanes |= lane); - } - function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { - enqueueUpdate$1(fiber, queue, update, lane); - return getRootForUpdatedFiber(fiber); - } - function enqueueConcurrentRenderForLane(fiber, lane) { - enqueueUpdate$1(fiber, null, null, lane); - return getRootForUpdatedFiber(fiber); + function upgradeHydrationErrorsToRecoverable() { + var queuedErrors = hydrationErrors; + null !== queuedErrors && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = queuedErrors) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + queuedErrors + ), + (hydrationErrors = null)); + return queuedErrors; } - function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { - sourceFiber.lanes |= lane; - var alternate = sourceFiber.alternate; - null !== alternate && (alternate.lanes |= lane); - for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) - (parent.childLanes |= lane), - (alternate = parent.alternate), - null !== alternate && (alternate.childLanes |= lane), - 22 === parent.tag && - ((sourceFiber = parent.stateNode), - null === sourceFiber || - sourceFiber._visibility & 1 || - (isHidden = !0)), - (sourceFiber = parent), - (parent = parent.return); - isHidden && - null !== update && - 3 === sourceFiber.tag && - ((parent = sourceFiber.stateNode), - (isHidden = 31 - clz32(lane)), - (parent = parent.hiddenUpdates), - (sourceFiber = parent[isHidden]), - null === sourceFiber - ? (parent[isHidden] = [update]) - : sourceFiber.push(update), - (update.lane = lane | 536870912)); + function resetContextDependencies() { + lastContextDependency = currentlyRenderingFiber$1 = null; + isDisallowedContextReadInDEV = !1; } - function getRootForUpdatedFiber(sourceFiber) { - if (nestedUpdateCount > NESTED_UPDATE_LIMIT) - throw ( - ((nestedPassiveUpdateCount = nestedUpdateCount = 0), - (rootWithPassiveNestedUpdates = rootWithNestedUpdates = null), - Error( - "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." - )) - ); - nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && - ((nestedPassiveUpdateCount = 0), - (rootWithPassiveNestedUpdates = null), + function pushProvider(providerFiber, context, nextValue) { + push(valueCursor, context._currentValue2, providerFiber); + context._currentValue2 = nextValue; + push(renderer2CursorDEV, context._currentRenderer2, providerFiber); + void 0 !== context._currentRenderer2 && + null !== context._currentRenderer2 && + context._currentRenderer2 !== rendererSigil && error$jscomp$0( - "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render." - )); - null === sourceFiber.alternate && - 0 !== (sourceFiber.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - for (var node = sourceFiber, parent = node.return; null !== parent; ) - null === node.alternate && - 0 !== (node.flags & 4098) && - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), - (node = parent), - (parent = node.return); - return 3 === node.tag ? node.stateNode : null; - } - function pushNestedEffectDurations() { - var prevEffectDuration = profilerEffectDuration; - profilerEffectDuration = 0; - return prevEffectDuration; - } - function popNestedEffectDurations(prevEffectDuration) { - var elapsedTime = profilerEffectDuration; - profilerEffectDuration = prevEffectDuration; - return elapsedTime; - } - function bubbleNestedEffectDurations(prevEffectDuration) { - var elapsedTime = profilerEffectDuration; - profilerEffectDuration += prevEffectDuration; - return elapsedTime; + "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." + ); + context._currentRenderer2 = rendererSigil; } - function startProfilerTimer(fiber) { - profilerStartTime = now(); - 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); + function popProvider(context, providerFiber) { + context._currentValue2 = valueCursor.current; + var currentRenderer2 = renderer2CursorDEV.current; + pop(renderer2CursorDEV, providerFiber); + context._currentRenderer2 = currentRenderer2; + pop(valueCursor, providerFiber); } - function stopProfilerTimerIfRunningAndRecordDuration(fiber) { - if (0 <= profilerStartTime) { - var elapsedTime = now() - profilerStartTime; - fiber.actualDuration += elapsedTime; - fiber.selfBaseDuration = elapsedTime; - profilerStartTime = -1; + function scheduleContextWorkOnParentPath( + parent, + renderLanes, + propagationRoot + ) { + for (; null !== parent; ) { + var alternate = parent.alternate; + (parent.childLanes & renderLanes) !== renderLanes + ? ((parent.childLanes |= renderLanes), + null !== alternate && (alternate.childLanes |= renderLanes)) + : null !== alternate && + (alternate.childLanes & renderLanes) !== renderLanes && + (alternate.childLanes |= renderLanes); + if (parent === propagationRoot) break; + parent = parent.return; } + parent !== propagationRoot && + error$jscomp$0( + "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." + ); } - function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) { - if (0 <= profilerStartTime) { - var elapsedTime = now() - profilerStartTime; - fiber.actualDuration += elapsedTime; - profilerStartTime = -1; + function propagateContextChanges( + workInProgress, + contexts, + renderLanes, + forcePropagateEntireTree + ) { + var fiber = workInProgress.child; + null !== fiber && (fiber.return = workInProgress); + for (; null !== fiber; ) { + var list = fiber.dependencies; + if (null !== list) { + var nextFiber = fiber.child; + list = list.firstContext; + a: for (; null !== list; ) { + var dependency = list; + list = fiber; + for (var i = 0; i < contexts.length; i++) + if (dependency.context === contexts[i]) { + list.lanes |= renderLanes; + dependency = list.alternate; + null !== dependency && (dependency.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + list.return, + renderLanes, + workInProgress + ); + forcePropagateEntireTree || (nextFiber = null); + break a; + } + list = dependency.next; + } + } else if (18 === fiber.tag) { + nextFiber = fiber.return; + if (null === nextFiber) + throw Error( + "We just came from a parent so we must have had a parent. This is a bug in React." + ); + nextFiber.lanes |= renderLanes; + list = nextFiber.alternate; + null !== list && (list.lanes |= renderLanes); + scheduleContextWorkOnParentPath( + nextFiber, + renderLanes, + workInProgress + ); + nextFiber = null; + } else nextFiber = fiber.child; + if (null !== nextFiber) nextFiber.return = fiber; + else + for (nextFiber = fiber; null !== nextFiber; ) { + if (nextFiber === workInProgress) { + nextFiber = null; + break; + } + fiber = nextFiber.sibling; + if (null !== fiber) { + fiber.return = nextFiber.return; + nextFiber = fiber; + break; + } + nextFiber = nextFiber.return; + } + fiber = nextFiber; } } - function recordEffectDuration() { - if (0 <= profilerStartTime) { + function propagateParentContextChanges( + current, + workInProgress, + renderLanes, + forcePropagateEntireTree + ) { + current = null; + for ( + var parent = workInProgress, isInsidePropagationBailout = !1; + null !== parent; + + ) { + if (!isInsidePropagationBailout) + if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; + else if (0 !== (parent.flags & 262144)) break; + if (10 === parent.tag) { + var currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent = currentParent.memoizedProps; + if (null !== currentParent) { + var context = parent.type._context; + objectIs(parent.pendingProps.value, currentParent.value) || + (null !== current + ? current.push(context) + : (current = [context])); + } + } else if (parent === hostTransitionProviderCursor.current) { + currentParent = parent.alternate; + if (null === currentParent) + throw Error("Should have a current fiber. This is a bug in React."); + currentParent.memoizedState.memoizedState !== + parent.memoizedState.memoizedState && + (null !== current + ? current.push(HostTransitionContext) + : (current = [HostTransitionContext])); + } + parent = parent.return; + } + null !== current && + propagateContextChanges( + workInProgress, + current, + renderLanes, + forcePropagateEntireTree + ); + workInProgress.flags |= 262144; + } + function checkIfContextChanged(currentDependencies) { + for ( + currentDependencies = currentDependencies.firstContext; + null !== currentDependencies; + + ) { + if ( + !objectIs( + currentDependencies.context._currentValue2, + currentDependencies.memoizedValue + ) + ) + return !0; + currentDependencies = currentDependencies.next; + } + return !1; + } + function prepareToReadContext(workInProgress) { + currentlyRenderingFiber$1 = workInProgress; + lastContextDependency = null; + workInProgress = workInProgress.dependencies; + null !== workInProgress && (workInProgress.firstContext = null); + } + function readContext(context) { + isDisallowedContextReadInDEV && + error$jscomp$0( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + return readContextForConsumer(currentlyRenderingFiber$1, context); + } + function readContextDuringReconciliation(consumer, context) { + null === currentlyRenderingFiber$1 && prepareToReadContext(consumer); + return readContextForConsumer(consumer, context); + } + function readContextForConsumer(consumer, context) { + var value = context._currentValue2; + context = { context: context, memoizedValue: value, next: null }; + if (null === lastContextDependency) { + if (null === consumer) + throw Error( + "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." + ); + lastContextDependency = context; + consumer.dependencies = { + lanes: 0, + firstContext: context, + _debugThenableState: null + }; + consumer.flags |= 524288; + } else lastContextDependency = lastContextDependency.next = context; + return value; + } + function createCache() { + return { + controller: new AbortControllerLocal(), + data: new Map(), + refCount: 0 + }; + } + function retainCache(cache) { + cache.controller.signal.aborted && + warn( + "A cache instance was retained after it was already freed. This likely indicates a bug in React." + ); + cache.refCount++; + } + function releaseCache(cache) { + cache.refCount--; + 0 > cache.refCount && + warn( + "A cache instance was released after it was already freed. This likely indicates a bug in React." + ); + 0 === cache.refCount && + scheduleCallback$1(NormalPriority, function () { + cache.controller.abort(); + }); + } + function pushNestedEffectDurations() { + var prevEffectDuration = profilerEffectDuration; + profilerEffectDuration = 0; + return prevEffectDuration; + } + function popNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration = prevEffectDuration; + return elapsedTime; + } + function bubbleNestedEffectDurations(prevEffectDuration) { + var elapsedTime = profilerEffectDuration; + profilerEffectDuration += prevEffectDuration; + return elapsedTime; + } + function startProfilerTimer(fiber) { + profilerStartTime = now(); + 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime); + } + function stopProfilerTimerIfRunningAndRecordDuration(fiber) { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + fiber.actualDuration += elapsedTime; + fiber.selfBaseDuration = elapsedTime; + profilerStartTime = -1; + } + } + function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) { + if (0 <= profilerStartTime) { + var elapsedTime = now() - profilerStartTime; + fiber.actualDuration += elapsedTime; + profilerStartTime = -1; + } + } + function recordEffectDuration() { + if (0 <= profilerStartTime) { var elapsedTime = now() - profilerStartTime; profilerStartTime = -1; profilerEffectDuration += elapsedTime; @@ -1954,12 +2021,13 @@ __DEV__ && } else expirationTime <= currentTime && (root.expiredLanes |= lane); lanes &= ~lane; } + suspendedLanes = pendingPassiveEffectsLanes; currentTime = workInProgressRoot; - suspendedLanes = workInProgressRootRenderLanes; - suspendedLanes = getNextLanes( - root, - root === currentTime ? suspendedLanes : 0 - ); + pingedLanes = workInProgressRootRenderLanes; + suspendedLanes = + root === rootWithPendingPassiveEffects + ? suspendedLanes + : getNextLanes(root, root === currentTime ? pingedLanes : 0); pingedLanes = root.callbackNode; if ( 0 === suspendedLanes || @@ -1974,44 +2042,45 @@ __DEV__ && (root.callbackPriority = 0) ); if ( - 0 === (suspendedLanes & 3) || - checkIfRootIsPrerendering(root, suspendedLanes) - ) { - currentTime = suspendedLanes & -suspendedLanes; - if ( - currentTime !== root.callbackPriority || - (null !== ReactSharedInternals.actQueue && - pingedLanes !== fakeActCallbackNode$1) - ) - cancelCallback(pingedLanes); - else return currentTime; - switch (lanesToEventPriority(suspendedLanes)) { - case DiscreteEventPriority: - case ContinuousEventPriority: - suspendedLanes = UserBlockingPriority; - break; - case DefaultEventPriority: - suspendedLanes = NormalPriority$1; - break; - case IdleEventPriority: - suspendedLanes = IdlePriority; - break; - default: - suspendedLanes = NormalPriority$1; - } - pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); - null !== ReactSharedInternals.actQueue - ? (ReactSharedInternals.actQueue.push(pingedLanes), - (suspendedLanes = fakeActCallbackNode$1)) - : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes)); - root.callbackPriority = currentTime; - root.callbackNode = suspendedLanes; - return currentTime; - } - null !== pingedLanes && cancelCallback(pingedLanes); - root.callbackPriority = 2; - root.callbackNode = null; - return 2; + 0 !== (suspendedLanes & 3) && + !checkIfRootIsPrerendering(root, suspendedLanes) + ) + return ( + null !== pingedLanes && cancelCallback(pingedLanes), + (root.callbackPriority = 2), + (root.callbackNode = null), + 2 + ); + currentTime = suspendedLanes & -suspendedLanes; + if ( + currentTime !== root.callbackPriority || + (null !== ReactSharedInternals.actQueue && + pingedLanes !== fakeActCallbackNode) + ) + cancelCallback(pingedLanes); + else return currentTime; + switch (lanesToEventPriority(suspendedLanes)) { + case DiscreteEventPriority: + case ContinuousEventPriority: + suspendedLanes = UserBlockingPriority; + break; + case DefaultEventPriority: + suspendedLanes = NormalPriority$1; + break; + case IdleEventPriority: + suspendedLanes = IdlePriority; + break; + default: + suspendedLanes = NormalPriority$1; + } + pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root); + null !== ReactSharedInternals.actQueue + ? (ReactSharedInternals.actQueue.push(pingedLanes), + (suspendedLanes = fakeActCallbackNode)) + : (suspendedLanes = scheduleCallback$2(suspendedLanes, pingedLanes)); + root.callbackPriority = currentTime; + root.callbackNode = suspendedLanes; + return currentTime; } function performWorkOnRootViaSchedulerTask(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; @@ -2043,7 +2112,7 @@ __DEV__ && performWorkOnRoot(root, lanes, !0); } function cancelCallback(callbackNode) { - callbackNode !== fakeActCallbackNode$1 && + callbackNode !== fakeActCallbackNode && null !== callbackNode && cancelCallback$1(callbackNode); } @@ -2053,68 +2122,299 @@ __DEV__ && cb(); return null; }); - scheduleCallback$3(ImmediatePriority, cb); + scheduleCallback$2(ImmediatePriority, cb); } function requestTransitionLane() { 0 === currentEventTransitionLane && (currentEventTransitionLane = claimNextTransitionLane()); return currentEventTransitionLane; } - function entangleAsyncAction(transition, thenable) { - if (null === currentEntangledListeners) { - var entangledListeners = (currentEntangledListeners = []); - currentEntangledPendingCount = 0; - currentEntangledLane = requestTransitionLane(); - currentEntangledActionThenable = { - status: "pending", - value: void 0, - then: function (resolve) { - entangledListeners.push(resolve); - } - }; - } - currentEntangledPendingCount++; - thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); - return thenable; + function entangleAsyncAction(transition, thenable) { + if (null === currentEntangledListeners) { + var entangledListeners = (currentEntangledListeners = []); + currentEntangledPendingCount = 0; + currentEntangledLane = requestTransitionLane(); + currentEntangledActionThenable = { + status: "pending", + value: void 0, + then: function (resolve) { + entangledListeners.push(resolve); + } + }; + } + currentEntangledPendingCount++; + thenable.then(pingEngtangledActionScope, pingEngtangledActionScope); + return thenable; + } + function pingEngtangledActionScope() { + if ( + 0 === --currentEntangledPendingCount && + null !== currentEntangledListeners + ) { + null !== currentEntangledActionThenable && + (currentEntangledActionThenable.status = "fulfilled"); + var listeners = currentEntangledListeners; + currentEntangledListeners = null; + currentEntangledLane = 0; + currentEntangledActionThenable = null; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); + } + } + function chainThenableValue(thenable, result) { + var listeners = [], + thenableWithOverride = { + status: "pending", + value: null, + reason: null, + then: function (resolve) { + listeners.push(resolve); + } + }; + thenable.then( + function () { + thenableWithOverride.status = "fulfilled"; + thenableWithOverride.value = result; + for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); + }, + function (error) { + thenableWithOverride.status = "rejected"; + thenableWithOverride.reason = error; + for (error = 0; error < listeners.length; error++) + (0, listeners[error])(void 0); + } + ); + return thenableWithOverride; + } + function peekCacheFromPool() { + var cacheResumedFromPreviousRender = resumedCache.current; + return null !== cacheResumedFromPreviousRender + ? cacheResumedFromPreviousRender + : workInProgressRoot.pooledCache; + } + function pushTransition(offscreenWorkInProgress, prevCachePool) { + null === prevCachePool + ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) + : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); + } + function getSuspendedCache() { + var cacheFromPool = peekCacheFromPool(); + return null === cacheFromPool + ? null + : { parent: CacheContext._currentValue2, pool: cacheFromPool }; + } + function shallowEqual(objA, objB) { + if (objectIs(objA, objB)) return !0; + if ( + "object" !== typeof objA || + null === objA || + "object" !== typeof objB || + null === objB + ) + return !1; + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return !1; + for (keysB = 0; keysB < keysA.length; keysB++) { + var currentKey = keysA[keysB]; + if ( + !hasOwnProperty.call(objB, currentKey) || + !objectIs(objA[currentKey], objB[currentKey]) + ) + return !1; + } + return !0; + } + function createThenableState() { + return { didWarnAboutUncachedPromise: !1, thenables: [] }; + } + function isThenableResolved(thenable) { + thenable = thenable.status; + return "fulfilled" === thenable || "rejected" === thenable; + } + function noop() {} + function trackUsedThenable(thenableState, thenable, index) { + null !== ReactSharedInternals.actQueue && + (ReactSharedInternals.didUsePromise = !0); + var trackedThenables = thenableState.thenables; + index = trackedThenables[index]; + void 0 === index + ? trackedThenables.push(thenable) + : index !== thenable && + (thenableState.didWarnAboutUncachedPromise || + ((thenableState.didWarnAboutUncachedPromise = !0), + error$jscomp$0( + "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." + )), + thenable.then(noop, noop), + (thenable = index)); + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + default: + if ("string" === typeof thenable.status) thenable.then(noop, noop); + else { + thenableState = workInProgressRoot; + if ( + null !== thenableState && + 100 < thenableState.shellSuspendCounter + ) + throw Error( + "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + thenableState = thenable; + thenableState.status = "pending"; + thenableState.then( + function (fulfilledValue) { + if ("pending" === thenable.status) { + var fulfilledThenable = thenable; + fulfilledThenable.status = "fulfilled"; + fulfilledThenable.value = fulfilledValue; + } + }, + function (error) { + if ("pending" === thenable.status) { + var rejectedThenable = thenable; + rejectedThenable.status = "rejected"; + rejectedThenable.reason = error; + } + } + ); + } + switch (thenable.status) { + case "fulfilled": + return thenable.value; + case "rejected": + throw ( + ((thenableState = thenable.reason), + checkIfUseWrappedInAsyncCatch(thenableState), + thenableState) + ); + } + suspendedThenable = thenable; + needsToResetSuspendedThenableDEV = !0; + throw SuspenseException; + } + } + function getSuspendedThenable() { + if (null === suspendedThenable) + throw Error( + "Expected a suspended thenable. This is a bug in React. Please file an issue." + ); + var thenable = suspendedThenable; + suspendedThenable = null; + needsToResetSuspendedThenableDEV = !1; + return thenable; + } + function checkIfUseWrappedInAsyncCatch(rejectedReason) { + if ( + rejectedReason === SuspenseException || + rejectedReason === SuspenseActionException + ) + throw Error( + "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." + ); + } + function finishQueueingConcurrentUpdates() { + for ( + var endIndex = concurrentQueuesIndex, + i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0); + i < endIndex; + + ) { + var fiber = concurrentQueues[i]; + concurrentQueues[i++] = null; + var queue = concurrentQueues[i]; + concurrentQueues[i++] = null; + var update = concurrentQueues[i]; + concurrentQueues[i++] = null; + var lane = concurrentQueues[i]; + concurrentQueues[i++] = null; + if (null !== queue && null !== update) { + var pending = queue.pending; + null === pending + ? (update.next = update) + : ((update.next = pending.next), (pending.next = update)); + queue.pending = update; + } + 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane); + } + } + function enqueueUpdate$1(fiber, queue, update, lane) { + concurrentQueues[concurrentQueuesIndex++] = fiber; + concurrentQueues[concurrentQueuesIndex++] = queue; + concurrentQueues[concurrentQueuesIndex++] = update; + concurrentQueues[concurrentQueuesIndex++] = lane; + concurrentlyUpdatedLanes |= lane; + fiber.lanes |= lane; + fiber = fiber.alternate; + null !== fiber && (fiber.lanes |= lane); + } + function enqueueConcurrentHookUpdate(fiber, queue, update, lane) { + enqueueUpdate$1(fiber, queue, update, lane); + return getRootForUpdatedFiber(fiber); + } + function enqueueConcurrentRenderForLane(fiber, lane) { + enqueueUpdate$1(fiber, null, null, lane); + return getRootForUpdatedFiber(fiber); } - function pingEngtangledActionScope() { - if ( - 0 === --currentEntangledPendingCount && - null !== currentEntangledListeners - ) { - null !== currentEntangledActionThenable && - (currentEntangledActionThenable.status = "fulfilled"); - var listeners = currentEntangledListeners; - currentEntangledListeners = null; - currentEntangledLane = 0; - currentEntangledActionThenable = null; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(); - } + function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) { + sourceFiber.lanes |= lane; + var alternate = sourceFiber.alternate; + null !== alternate && (alternate.lanes |= lane); + for (var isHidden = !1, parent = sourceFiber.return; null !== parent; ) + (parent.childLanes |= lane), + (alternate = parent.alternate), + null !== alternate && (alternate.childLanes |= lane), + 22 === parent.tag && + ((sourceFiber = parent.stateNode), + null === sourceFiber || + sourceFiber._visibility & 1 || + (isHidden = !0)), + (sourceFiber = parent), + (parent = parent.return); + isHidden && + null !== update && + 3 === sourceFiber.tag && + ((parent = sourceFiber.stateNode), + (isHidden = 31 - clz32(lane)), + (parent = parent.hiddenUpdates), + (sourceFiber = parent[isHidden]), + null === sourceFiber + ? (parent[isHidden] = [update]) + : sourceFiber.push(update), + (update.lane = lane | 536870912)); } - function chainThenableValue(thenable, result) { - var listeners = [], - thenableWithOverride = { - status: "pending", - value: null, - reason: null, - then: function (resolve) { - listeners.push(resolve); - } - }; - thenable.then( - function () { - thenableWithOverride.status = "fulfilled"; - thenableWithOverride.value = result; - for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result); - }, - function (error) { - thenableWithOverride.status = "rejected"; - thenableWithOverride.reason = error; - for (error = 0; error < listeners.length; error++) - (0, listeners[error])(void 0); - } - ); - return thenableWithOverride; + function getRootForUpdatedFiber(sourceFiber) { + if (nestedUpdateCount > NESTED_UPDATE_LIMIT) + throw ( + ((nestedPassiveUpdateCount = nestedUpdateCount = 0), + (rootWithPassiveNestedUpdates = rootWithNestedUpdates = null), + Error( + "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." + )) + ); + nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && + ((nestedPassiveUpdateCount = 0), + (rootWithPassiveNestedUpdates = null), + error$jscomp$0( + "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render." + )); + null === sourceFiber.alternate && + 0 !== (sourceFiber.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); + for (var node = sourceFiber, parent = node.return; null !== parent; ) + null === node.alternate && + 0 !== (node.flags & 4098) && + warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), + (node = parent), + (parent = node.return); + return 3 === node.tag ? node.stateNode : null; } function initializeUpdateQueue(fiber) { fiber.updateQueue = { @@ -2420,124 +2720,6 @@ __DEV__ && ) callCallback(callbacks[updateQueue], context); } - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) return !0; - if ( - "object" !== typeof objA || - null === objA || - "object" !== typeof objB || - null === objB - ) - return !1; - var keysA = Object.keys(objA), - keysB = Object.keys(objB); - if (keysA.length !== keysB.length) return !1; - for (keysB = 0; keysB < keysA.length; keysB++) { - var currentKey = keysA[keysB]; - if ( - !hasOwnProperty.call(objB, currentKey) || - !objectIs(objA[currentKey], objB[currentKey]) - ) - return !1; - } - return !0; - } - function createThenableState() { - return { didWarnAboutUncachedPromise: !1, thenables: [] }; - } - function isThenableResolved(thenable) { - thenable = thenable.status; - return "fulfilled" === thenable || "rejected" === thenable; - } - function noop() {} - function trackUsedThenable(thenableState, thenable, index) { - null !== ReactSharedInternals.actQueue && - (ReactSharedInternals.didUsePromise = !0); - var trackedThenables = thenableState.thenables; - index = trackedThenables[index]; - void 0 === index - ? trackedThenables.push(thenable) - : index !== thenable && - (thenableState.didWarnAboutUncachedPromise || - ((thenableState.didWarnAboutUncachedPromise = !0), - error$jscomp$0( - "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework." - )), - thenable.then(noop, noop), - (thenable = index)); - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - default: - if ("string" === typeof thenable.status) thenable.then(noop, noop); - else { - thenableState = workInProgressRoot; - if ( - null !== thenableState && - 100 < thenableState.shellSuspendCounter - ) - throw Error( - "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - thenableState = thenable; - thenableState.status = "pending"; - thenableState.then( - function (fulfilledValue) { - if ("pending" === thenable.status) { - var fulfilledThenable = thenable; - fulfilledThenable.status = "fulfilled"; - fulfilledThenable.value = fulfilledValue; - } - }, - function (error) { - if ("pending" === thenable.status) { - var rejectedThenable = thenable; - rejectedThenable.status = "rejected"; - rejectedThenable.reason = error; - } - } - ); - } - switch (thenable.status) { - case "fulfilled": - return thenable.value; - case "rejected": - throw ( - ((thenableState = thenable.reason), - checkIfUseWrappedInAsyncCatch(thenableState), - thenableState) - ); - } - suspendedThenable = thenable; - needsToResetSuspendedThenableDEV = !0; - throw SuspenseException; - } - } - function getSuspendedThenable() { - if (null === suspendedThenable) - throw Error( - "Expected a suspended thenable. This is a bug in React. Please file an issue." - ); - var thenable = suspendedThenable; - suspendedThenable = null; - needsToResetSuspendedThenableDEV = !1; - return thenable; - } - function checkIfUseWrappedInAsyncCatch(rejectedReason) { - if ( - rejectedReason === SuspenseException || - rejectedReason === SuspenseActionException - ) - throw Error( - "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server." - ); - } function pushHiddenContext(fiber, context) { var prevEntangledRenderLanes = entangledRenderLanes; push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber); @@ -2570,9 +2752,7 @@ __DEV__ && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName) ) { - var componentName = getComponentNameFromFiber( - currentlyRenderingFiber$1 - ); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); if ( !didWarnAboutMismatchedHooksForComponent.has(componentName) && (didWarnAboutMismatchedHooksForComponent.add(componentName), @@ -2610,7 +2790,7 @@ __DEV__ && ); } function warnOnUseFormStateInDev() { - var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1); + var componentName = getComponentNameFromFiber(currentlyRenderingFiber); didWarnAboutUseFormState.has(componentName) || (didWarnAboutUseFormState.add(componentName), error$jscomp$0( @@ -2653,7 +2833,7 @@ __DEV__ && nextRenderLanes ) { renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; hookTypesDev = null !== current ? current._debugHookTypes : null; hookTypesUpdateIndexDev = -1; ignorePreviousDependencies = @@ -2664,9 +2844,7 @@ __DEV__ && "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component) ) - (nextRenderLanes = getComponentNameFromFiber( - currentlyRenderingFiber$1 - )), + (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), error$jscomp$0( @@ -2726,7 +2904,7 @@ __DEV__ && currentHookNameInDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; null !== current && @@ -2761,7 +2939,7 @@ __DEV__ && ))); } function renderWithHooksAgain(workInProgress, Component, props, secondArg) { - currentlyRenderingFiber$1 = workInProgress; + currentlyRenderingFiber = workInProgress; var numberOfReRenders = 0; do { didScheduleRenderPhaseUpdateDuringThisPass && (thenableState$1 = null); @@ -2796,7 +2974,7 @@ __DEV__ && : maybeThenable; dispatcher = dispatcher.useState()[0]; (null !== currentHook ? currentHook.memoizedState : null) !== - dispatcher && (currentlyRenderingFiber$1.flags |= 1024); + dispatcher && (currentlyRenderingFiber.flags |= 1024); return maybeThenable; } function bailoutHooks(current, workInProgress, lanes) { @@ -2824,7 +3002,7 @@ __DEV__ && hookTypesDev = workInProgressHook = currentHook = - currentlyRenderingFiber$1 = + currentlyRenderingFiber = null; hookTypesUpdateIndexDev = -1; currentHookNameInDev = null; @@ -2841,26 +3019,26 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook) + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook) : (workInProgressHook = workInProgressHook.next = hook); return workInProgressHook; } function updateWorkInProgressHook() { if (null === currentHook) { - var nextCurrentHook = currentlyRenderingFiber$1.alternate; + var nextCurrentHook = currentlyRenderingFiber.alternate; nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null; } else nextCurrentHook = currentHook.next; var nextWorkInProgressHook = null === workInProgressHook - ? currentlyRenderingFiber$1.memoizedState + ? currentlyRenderingFiber.memoizedState : workInProgressHook.next; if (null !== nextWorkInProgressHook) (workInProgressHook = nextWorkInProgressHook), (currentHook = nextCurrentHook); else { if (null === nextCurrentHook) { - if (null === currentlyRenderingFiber$1.alternate) + if (null === currentlyRenderingFiber.alternate) throw Error( "Update hook called on initial render. This is likely a bug in React. Please file an issue." ); @@ -2875,7 +3053,7 @@ __DEV__ && next: null }; null === workInProgressHook - ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = + ? (currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook) : (workInProgressHook = workInProgressHook.next = nextCurrentHook); } @@ -2889,7 +3067,7 @@ __DEV__ && thenableIndexCounter$1 += 1; null === thenableState$1 && (thenableState$1 = createThenableState()); thenable = trackUsedThenable(thenableState$1, thenable, index); - index = currentlyRenderingFiber$1; + index = currentlyRenderingFiber; null === (null === workInProgressHook ? index.memoizedState @@ -2910,10 +3088,10 @@ __DEV__ && } function useMemoCache(size) { var memoCache = null, - updateQueue = currentlyRenderingFiber$1.updateQueue; + updateQueue = currentlyRenderingFiber.updateQueue; null !== updateQueue && (memoCache = updateQueue.memoCache); if (null == memoCache) { - var current = currentlyRenderingFiber$1.alternate; + var current = currentlyRenderingFiber.alternate; null !== current && ((current = current.updateQueue), null !== current && @@ -2929,7 +3107,7 @@ __DEV__ && null == memoCache && (memoCache = { data: [], index: 0 }); null === updateQueue && ((updateQueue = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = updateQueue)); + (currentlyRenderingFiber.updateQueue = updateQueue)); updateQueue.memoCache = memoCache; updateQueue = memoCache.data[memoCache.index]; if (void 0 === updateQueue || ignorePreviousDependencies) @@ -2977,7 +3155,7 @@ __DEV__ && hook.queue = reducer; reducer = reducer.dispatch = dispatchReducerAction.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, reducer ); return [hook.memoizedState, reducer]; @@ -3055,7 +3233,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = updateLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = updateLane), - (currentlyRenderingFiber$1.lanes |= revertLane), + (currentlyRenderingFiber.lanes |= revertLane), (workInProgressRootSkippedLanes |= revertLane); updateLane = update.action; shouldDoubleInvokeUserFnsInHooksDEV && @@ -3076,7 +3254,7 @@ __DEV__ && ? ((newBaseQueueFirst = newBaseQueueLast = revertLane), (baseFirst = pendingQueue)) : (newBaseQueueLast = newBaseQueueLast.next = revertLane), - (currentlyRenderingFiber$1.lanes |= updateLane), + (currentlyRenderingFiber.lanes |= updateLane), (workInProgressRootSkippedLanes |= updateLane); update = update.next; } while (null !== update && update !== current); @@ -3123,7 +3301,7 @@ __DEV__ && return [newState, dispatch]; } function mountSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (!didWarnUncachedGetSnapshot) { @@ -3163,7 +3341,7 @@ __DEV__ && return nextSnapshot; } function updateSyncExternalStore(subscribe, getSnapshot) { - var fiber = currentlyRenderingFiber$1, + var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(); var nextSnapshot = getSnapshot(); if (!didWarnUncachedGetSnapshot) { @@ -3215,10 +3393,10 @@ __DEV__ && function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) { fiber.flags |= 16384; fiber = { getSnapshot: getSnapshot, value: renderedSnapshot }; - getSnapshot = currentlyRenderingFiber$1.updateQueue; + getSnapshot = currentlyRenderingFiber.updateQueue; null === getSnapshot ? ((getSnapshot = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = getSnapshot), + (currentlyRenderingFiber.updateQueue = getSnapshot), (getSnapshot.stores = [fiber])) : ((renderedSnapshot = getSnapshot.stores), null === renderedSnapshot @@ -3276,11 +3454,7 @@ __DEV__ && function mountState(initialState) { initialState = mountStateImpl(initialState); var queue = initialState.queue, - dispatch = dispatchSetState.bind( - null, - currentlyRenderingFiber$1, - queue - ); + dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue); queue.dispatch = dispatch; return [initialState.memoizedState, dispatch]; } @@ -3297,7 +3471,7 @@ __DEV__ && hook.queue = queue; hook = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !0, queue ); @@ -3461,14 +3635,14 @@ __DEV__ && stateHook.queue = stateQueue; stateHook = dispatchSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateQueue ); stateQueue.dispatch = stateHook; stateQueue = mountStateImpl(!1); var setPendingState = dispatchOptimisticSetState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, !1, stateQueue.queue ); @@ -3482,7 +3656,7 @@ __DEV__ && stateQueue.queue = actionQueue; stateHook = dispatchActionState.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, actionQueue, setPendingState, stateHook @@ -3518,7 +3692,7 @@ __DEV__ && var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch; action !== currentStateHook.memoizedState && - ((currentlyRenderingFiber$1.flags |= 2048), + ((currentlyRenderingFiber.flags |= 2048), pushSimpleEffect( HasEffect | Passive, createEffectInstance(), @@ -3544,10 +3718,10 @@ __DEV__ && } function pushSimpleEffect(tag, inst, create, deps) { tag = { tag: tag, create: create, deps: deps, inst: inst, next: null }; - inst = currentlyRenderingFiber$1.updateQueue; + inst = currentlyRenderingFiber.updateQueue; null === inst && ((inst = createFunctionComponentUpdateQueue()), - (currentlyRenderingFiber$1.updateQueue = inst)); + (currentlyRenderingFiber.updateQueue = inst)); create = inst.lastEffect; null === create ? (inst.lastEffect = tag.next = tag) @@ -3568,7 +3742,7 @@ __DEV__ && function mountEffectImpl(fiberFlags, hookFlags, create, deps) { var hook = mountWorkInProgressHook(); deps = void 0 === deps ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; + currentlyRenderingFiber.flags |= fiberFlags; hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, createEffectInstance(), @@ -3584,7 +3758,7 @@ __DEV__ && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps)) - : ((currentlyRenderingFiber$1.flags |= fiberFlags), + : ((currentlyRenderingFiber.flags |= fiberFlags), (hook.memoizedState = pushSimpleEffect( HasEffect | hookFlags, inst, @@ -3593,14 +3767,14 @@ __DEV__ && ))); } function mountEffect(create, deps) { - 0 !== (currentlyRenderingFiber$1.mode & 16) && - 0 === (currentlyRenderingFiber$1.mode & 64) + 0 !== (currentlyRenderingFiber.mode & 16) && + 0 === (currentlyRenderingFiber.mode & 64) ? mountEffectImpl(142608384, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps); } function mountLayoutEffect(create, deps) { var fiberFlags = 4194308; - 0 !== (currentlyRenderingFiber$1.mode & 16) && (fiberFlags |= 67108864); + 0 !== (currentlyRenderingFiber.mode & 16) && (fiberFlags |= 67108864); return mountEffectImpl(fiberFlags, Layout, create, deps); } function imperativeHandleEffect(create, ref) { @@ -3633,7 +3807,7 @@ __DEV__ && ); deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null; var fiberFlags = 4194308; - 0 !== (currentlyRenderingFiber$1.mode & 16) && (fiberFlags |= 67108864); + 0 !== (currentlyRenderingFiber.mode & 16) && (fiberFlags |= 67108864); mountEffectImpl( fiberFlags, Layout, @@ -3733,7 +3907,7 @@ __DEV__ && return (hook.memoizedState = value); hook.memoizedState = initialValue; hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return initialValue; } @@ -3748,7 +3922,7 @@ __DEV__ && if (0 === (renderLanes & 42)) return (didReceiveUpdate = !0), (hook.memoizedState = value); hook = requestDeferredLane(); - currentlyRenderingFiber$1.lanes |= hook; + currentlyRenderingFiber.lanes |= hook; workInProgressRootSkippedLanes |= hook; return prevValue; } @@ -3820,7 +3994,7 @@ __DEV__ && var stateHook = mountStateImpl(!1); stateHook = startTransition.bind( null, - currentlyRenderingFiber$1, + currentlyRenderingFiber, stateHook.queue, !0, !1 @@ -3862,7 +4036,7 @@ __DEV__ && function mountRefresh() { return (mountWorkInProgressHook().memoizedState = refreshCache.bind( null, - currentlyRenderingFiber$1 + currentlyRenderingFiber )); } function refreshCache(fiber, seedKey, seedValue) { @@ -3887,62 +4061,36 @@ __DEV__ && provider = provider.return; } } - function dispatchReducerAction( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p0 && + function dispatchReducerAction(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p0 = requestUpdateLane(fiber); - action = { - lane: JSCompiler_OptimizeArgumentsArray_p0, - revertLane: 0, - action: action, - hasEagerState: !1, - eagerState: null, - next: null - }; - isRenderPhaseUpdate(fiber) - ? enqueueRenderPhaseUpdate(queue, action) - : ((action = enqueueConcurrentHookUpdate( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p0 - )), - null !== action && - (scheduleUpdateOnFiber( - action, - fiber, - JSCompiler_OptimizeArgumentsArray_p0 - ), - entangleTransitionUpdate( - action, - queue, - JSCompiler_OptimizeArgumentsArray_p0 - ))); - } - function dispatchSetState( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ) { - "function" === typeof JSCompiler_OptimizeArgumentsArray_p1 && + args = requestUpdateLane(fiber); + var update = { + lane: args, + revertLane: 0, + action: action, + hasEagerState: !1, + eagerState: null, + next: null + }; + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, update) + : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)), + null !== update && + (scheduleUpdateOnFiber(update, fiber, args), + entangleTransitionUpdate(update, queue, args))); + } + function dispatchSetState(fiber, queue, action) { + var args = arguments; + "function" === typeof args[3] && error$jscomp$0( "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()." ); - JSCompiler_OptimizeArgumentsArray_p1 = requestUpdateLane(fiber); - dispatchSetStateInternal( - fiber, - queue, - action, - JSCompiler_OptimizeArgumentsArray_p1 - ); + args = requestUpdateLane(fiber); + dispatchSetStateInternal(fiber, queue, action, args); } function dispatchSetStateInternal(fiber, queue, action, lane) { var update = { @@ -4026,8 +4174,8 @@ __DEV__ && function isRenderPhaseUpdate(fiber) { var alternate = fiber.alternate; return ( - fiber === currentlyRenderingFiber$1 || - (null !== alternate && alternate === currentlyRenderingFiber$1) + fiber === currentlyRenderingFiber || + (null !== alternate && alternate === currentlyRenderingFiber) ); } function enqueueRenderPhaseUpdate(queue, update) { @@ -7694,257 +7842,6 @@ __DEV__ && "). This error is likely caused by a bug in React. Please file an issue." ); } - function resetContextDependencies() { - lastContextDependency = currentlyRenderingFiber = null; - isDisallowedContextReadInDEV = !1; - } - function pushProvider(providerFiber, context, nextValue) { - push(valueCursor, context._currentValue2, providerFiber); - context._currentValue2 = nextValue; - push(renderer2CursorDEV, context._currentRenderer2, providerFiber); - void 0 !== context._currentRenderer2 && - null !== context._currentRenderer2 && - context._currentRenderer2 !== rendererSigil && - error$jscomp$0( - "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported." - ); - context._currentRenderer2 = rendererSigil; - } - function popProvider(context, providerFiber) { - context._currentValue2 = valueCursor.current; - var currentRenderer2 = renderer2CursorDEV.current; - pop(renderer2CursorDEV, providerFiber); - context._currentRenderer2 = currentRenderer2; - pop(valueCursor, providerFiber); - } - function scheduleContextWorkOnParentPath( - parent, - renderLanes, - propagationRoot - ) { - for (; null !== parent; ) { - var alternate = parent.alternate; - (parent.childLanes & renderLanes) !== renderLanes - ? ((parent.childLanes |= renderLanes), - null !== alternate && (alternate.childLanes |= renderLanes)) - : null !== alternate && - (alternate.childLanes & renderLanes) !== renderLanes && - (alternate.childLanes |= renderLanes); - if (parent === propagationRoot) break; - parent = parent.return; - } - parent !== propagationRoot && - error$jscomp$0( - "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue." - ); - } - function propagateContextChanges( - workInProgress, - contexts, - renderLanes, - forcePropagateEntireTree - ) { - var fiber = workInProgress.child; - null !== fiber && (fiber.return = workInProgress); - for (; null !== fiber; ) { - var list = fiber.dependencies; - if (null !== list) { - var nextFiber = fiber.child; - list = list.firstContext; - a: for (; null !== list; ) { - var dependency = list; - list = fiber; - for (var i = 0; i < contexts.length; i++) - if (dependency.context === contexts[i]) { - list.lanes |= renderLanes; - dependency = list.alternate; - null !== dependency && (dependency.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - list.return, - renderLanes, - workInProgress - ); - forcePropagateEntireTree || (nextFiber = null); - break a; - } - list = dependency.next; - } - } else if (18 === fiber.tag) { - nextFiber = fiber.return; - if (null === nextFiber) - throw Error( - "We just came from a parent so we must have had a parent. This is a bug in React." - ); - nextFiber.lanes |= renderLanes; - list = nextFiber.alternate; - null !== list && (list.lanes |= renderLanes); - scheduleContextWorkOnParentPath( - nextFiber, - renderLanes, - workInProgress - ); - nextFiber = null; - } else nextFiber = fiber.child; - if (null !== nextFiber) nextFiber.return = fiber; - else - for (nextFiber = fiber; null !== nextFiber; ) { - if (nextFiber === workInProgress) { - nextFiber = null; - break; - } - fiber = nextFiber.sibling; - if (null !== fiber) { - fiber.return = nextFiber.return; - nextFiber = fiber; - break; - } - nextFiber = nextFiber.return; - } - fiber = nextFiber; - } - } - function propagateParentContextChanges( - current, - workInProgress, - renderLanes, - forcePropagateEntireTree - ) { - current = null; - for ( - var parent = workInProgress, isInsidePropagationBailout = !1; - null !== parent; - - ) { - if (!isInsidePropagationBailout) - if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0; - else if (0 !== (parent.flags & 262144)) break; - if (10 === parent.tag) { - var currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent = currentParent.memoizedProps; - if (null !== currentParent) { - var context = parent.type._context; - objectIs(parent.pendingProps.value, currentParent.value) || - (null !== current - ? current.push(context) - : (current = [context])); - } - } else if (parent === hostTransitionProviderCursor.current) { - currentParent = parent.alternate; - if (null === currentParent) - throw Error("Should have a current fiber. This is a bug in React."); - currentParent.memoizedState.memoizedState !== - parent.memoizedState.memoizedState && - (null !== current - ? current.push(HostTransitionContext) - : (current = [HostTransitionContext])); - } - parent = parent.return; - } - null !== current && - propagateContextChanges( - workInProgress, - current, - renderLanes, - forcePropagateEntireTree - ); - workInProgress.flags |= 262144; - } - function checkIfContextChanged(currentDependencies) { - for ( - currentDependencies = currentDependencies.firstContext; - null !== currentDependencies; - - ) { - if ( - !objectIs( - currentDependencies.context._currentValue2, - currentDependencies.memoizedValue - ) - ) - return !0; - currentDependencies = currentDependencies.next; - } - return !1; - } - function prepareToReadContext(workInProgress) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - workInProgress = workInProgress.dependencies; - null !== workInProgress && (workInProgress.firstContext = null); - } - function readContext(context) { - isDisallowedContextReadInDEV && - error$jscomp$0( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - return readContextForConsumer(currentlyRenderingFiber, context); - } - function readContextDuringReconciliation(consumer, context) { - null === currentlyRenderingFiber && prepareToReadContext(consumer); - return readContextForConsumer(consumer, context); - } - function readContextForConsumer(consumer, context) { - var value = context._currentValue2; - context = { context: context, memoizedValue: value, next: null }; - if (null === lastContextDependency) { - if (null === consumer) - throw Error( - "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." - ); - lastContextDependency = context; - consumer.dependencies = { - lanes: 0, - firstContext: context, - _debugThenableState: null - }; - consumer.flags |= 524288; - } else lastContextDependency = lastContextDependency.next = context; - return value; - } - function createCache() { - return { - controller: new AbortControllerLocal(), - data: new Map(), - refCount: 0 - }; - } - function retainCache(cache) { - cache.controller.signal.aborted && - warn( - "A cache instance was retained after it was already freed. This likely indicates a bug in React." - ); - cache.refCount++; - } - function releaseCache(cache) { - cache.refCount--; - 0 > cache.refCount && - warn( - "A cache instance was released after it was already freed. This likely indicates a bug in React." - ); - 0 === cache.refCount && - scheduleCallback$1(NormalPriority, function () { - cache.controller.abort(); - }); - } - function peekCacheFromPool() { - var cacheResumedFromPreviousRender = resumedCache.current; - return null !== cacheResumedFromPreviousRender - ? cacheResumedFromPreviousRender - : workInProgressRoot.pooledCache; - } - function pushTransition(offscreenWorkInProgress, prevCachePool) { - null === prevCachePool - ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) - : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress); - } - function getSuspendedCache() { - var cacheFromPool = peekCacheFromPool(); - return null === cacheFromPool - ? null - : { parent: CacheContext._currentValue2, pool: cacheFromPool }; - } function collectScopedNodesFromChildren( startingChild, fn$jscomp$0, @@ -8187,9 +8084,7 @@ __DEV__ && (current.memoizedState.isDehydrated && 0 === (workInProgress.flags & 256)) || ((workInProgress.flags |= 1024), - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null))), + upgradeHydrationErrorsToRecoverable()), bubbleProperties(workInProgress), null ); @@ -8315,9 +8210,10 @@ __DEV__ && (workInProgress.treeBaseDuration -= child.treeBaseDuration)); child = !1; } else - null !== hydrationErrors && - (queueRecoverableErrors(hydrationErrors), - (hydrationErrors = null)), + (child = upgradeHydrationErrorsToRecoverable()), + null !== current && + null !== current.memoizedState && + (current.memoizedState.hydrationErrors = child), (child = !0); if (!child) { if (workInProgress.flags & 256) @@ -9142,59 +9038,6 @@ __DEV__ && ); } } - function commitBeforeMutationEffects(root, firstChild) { - for (nextEffect = firstChild; null !== nextEffect; ) - if ( - ((root = nextEffect), - (firstChild = root.child), - 0 !== (root.subtreeFlags & 1028) && null !== firstChild) - ) - (firstChild.return = root), (nextEffect = firstChild); - else - for (; null !== nextEffect; ) { - firstChild = root = nextEffect; - var current = firstChild.alternate, - flags = firstChild.flags; - switch (firstChild.tag) { - case 0: - break; - case 11: - case 15: - break; - case 1: - 0 !== (flags & 1024) && - null !== current && - commitClassSnapshot(firstChild, current); - break; - case 3: - 0 !== (flags & 1024) && - firstChild.stateNode.containerInfo.children.splice(0); - break; - case 5: - case 26: - case 27: - case 6: - case 4: - case 17: - break; - default: - if (0 !== (flags & 1024)) - throw Error( - "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." - ); - } - firstChild = root.sibling; - if (null !== firstChild) { - firstChild.return = root.return; - nextEffect = firstChild; - break; - } - nextEffect = root.return; - } - root = shouldFireAfterActiveInstanceBlur; - shouldFireAfterActiveInstanceBlur = !1; - return root; - } function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { var flags = finishedWork.flags; switch (finishedWork.tag) { @@ -10295,6 +10138,14 @@ __DEV__ && committedTransitions ); break; + case 13: + recursivelyTraversePassiveMountEffects( + finishedRoot, + finishedWork, + committedLanes, + committedTransitions + ); + break; case 23: break; case 22: @@ -10846,7 +10697,13 @@ __DEV__ && } exitStatus = workInProgressRootRecoverableErrors; workInProgressRootRecoverableErrors = lanesThatJustErrored; - null !== exitStatus && queueRecoverableErrors(exitStatus); + null !== exitStatus && + (null === workInProgressRootRecoverableErrors + ? (workInProgressRootRecoverableErrors = exitStatus) + : workInProgressRootRecoverableErrors.push.apply( + workInProgressRootRecoverableErrors, + exitStatus + )); } exitStatus = renderWasConcurrent; } @@ -10860,9 +10717,8 @@ __DEV__ && break; } a: { - renderWasConcurrent = root; - shouldTimeSlice = exitStatus; - switch (shouldTimeSlice) { + shouldTimeSlice = root; + switch (exitStatus) { case RootInProgress: case RootFatalErrored: throw Error("Root did not complete. This is a bug in React."); @@ -10870,7 +10726,7 @@ __DEV__ && if ((lanes & 4194176) !== lanes) break; case RootSuspendedAtTheShell: markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings @@ -10885,62 +10741,42 @@ __DEV__ && default: throw Error("Unknown root exit status."); } - renderWasConcurrent.finishedWork = forceSync; - renderWasConcurrent.finishedLanes = lanes; - if (null !== ReactSharedInternals.actQueue) { - lanes = renderWasConcurrent; - forceSync = workInProgressRootRecoverableErrors; - exitStatus = workInProgressTransitions; - renderWasConcurrent = - workInProgressRootDidIncludeRecursiveRenderUpdate; - lanesThatJustErrored = workInProgressDeferredLane; - originallyAttemptedLanes = - workInProgressRootInterleavedUpdatedLanes; - var suspendedRetryLanes = workInProgressSuspendedRetryLanes, - suspendedCommitReason = IMMEDIATE_COMMIT, - prevTransition = ReactSharedInternals.T, - previousUpdateLanePriority = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - lanes, - forceSync, - exitStatus, - renderWasConcurrent, - previousUpdateLanePriority, - lanesThatJustErrored, - originallyAttemptedLanes, - suspendedRetryLanes, - shouldTimeSlice, - suspendedCommitReason, - -0, - 0 - ); - } finally { - (ReactSharedInternals.T = prevTransition), - (currentUpdatePriority = previousUpdateLanePriority); - } - } else { + shouldTimeSlice.finishedWork = forceSync; + shouldTimeSlice.finishedLanes = lanes; + if (null !== ReactSharedInternals.actQueue) + commitRoot( + shouldTimeSlice, + workInProgressRootRecoverableErrors, + workInProgressTransitions, + workInProgressRootDidIncludeRecursiveRenderUpdate, + workInProgressDeferredLane, + workInProgressRootInterleavedUpdatedLanes, + workInProgressSuspendedRetryLanes, + exitStatus, + IMMEDIATE_COMMIT, + -0, + 0 + ); + else { if ( (lanes & 62914560) === lanes && - ((exitStatus = + ((renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1()), - 10 < exitStatus) + 10 < renderWasConcurrent) ) { markRootSuspended( - renderWasConcurrent, + shouldTimeSlice, lanes, workInProgressDeferredLane, !workInProgressRootDidSkipSuspendedSiblings ); - if (0 !== getNextLanes(renderWasConcurrent, 0)) break a; - renderWasConcurrent.timeoutHandle = scheduleTimeout( + if (0 !== getNextLanes(shouldTimeSlice, 0)) break a; + shouldTimeSlice.timeoutHandle = scheduleTimeout( commitRootWhenReady.bind( null, - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -10950,17 +10786,17 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, THROTTLED_COMMIT, -0, 0 ), - exitStatus + renderWasConcurrent ); break a; } commitRootWhenReady( - renderWasConcurrent, + shouldTimeSlice, forceSync, workInProgressRootRecoverableErrors, workInProgressTransitions, @@ -10970,7 +10806,7 @@ __DEV__ && workInProgressRootInterleavedUpdatedLanes, workInProgressSuspendedRetryLanes, workInProgressRootDidSkipSuspendedSiblings, - shouldTimeSlice, + exitStatus, IMMEDIATE_COMMIT, -0, 0 @@ -10982,14 +10818,6 @@ __DEV__ && } while (1); ensureRootIsScheduled(root); } - function queueRecoverableErrors(errors) { - null === workInProgressRootRecoverableErrors - ? (workInProgressRootRecoverableErrors = errors) - : workInProgressRootRecoverableErrors.push.apply( - workInProgressRootRecoverableErrors, - errors - ); - } function commitRootWhenReady( root, finishedWork, @@ -11009,29 +10837,19 @@ __DEV__ && lanes = finishedWork.subtreeFlags; (lanes & 8192 || 16785408 === (lanes & 16785408)) && accumulateSuspenseyCommitOnFiber(finishedWork); - finishedWork = ReactSharedInternals.T; - lanes = currentUpdatePriority; - try { - (currentUpdatePriority = DiscreteEventPriority), - (ReactSharedInternals.T = null), - commitRootImpl( - root, - recoverableErrors, - transitions, - didIncludeRenderPhaseUpdate, - lanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes, - exitStatus, - suspendedCommitReason, - completedRenderStartTime, - completedRenderEndTime - ); - } finally { - (ReactSharedInternals.T = finishedWork), - (currentUpdatePriority = lanes); - } + commitRoot( + root, + recoverableErrors, + transitions, + didIncludeRenderPhaseUpdate, + spawnedLane, + updatedLanes, + suspendedRetryLanes, + exitStatus, + suspendedCommitReason, + completedRenderStartTime, + completedRenderEndTime + ); } function isRenderConsistentWithExternalStores(finishedWork) { for (var node = finishedWork; ; ) { @@ -11177,7 +10995,7 @@ __DEV__ && return timeoutHandle; } function handleThrow(root, thrownValue) { - currentlyRenderingFiber$1 = null; + currentlyRenderingFiber = null; ReactSharedInternals.H = ContextOnlyDispatcher; ReactSharedInternals.getCurrentStack = null; isRendering = !1; @@ -11657,116 +11475,243 @@ __DEV__ && workInProgressRootExitStatus = RootSuspendedAtTheShell; workInProgress = null; } - function commitRootImpl( - root, + function commitRoot( + root$jscomp$0, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, - renderPriorityLevel, spawnedLane, updatedLanes, suspendedRetryLanes ) { - do flushPassiveEffects(); - while (null !== rootWithPendingPassiveEffects); - ReactStrictModeWarnings.flushLegacyContextWarning(); - ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) - throw Error("Should not already be working."); - var finishedWork = root.finishedWork; - didIncludeRenderPhaseUpdate = root.finishedLanes; - if (null === finishedWork) return null; - 0 === didIncludeRenderPhaseUpdate && - error$jscomp$0( - "root.finishedLanes should not be empty during a commit. This is a bug in React." - ); - root.finishedWork = null; - root.finishedLanes = 0; - if (finishedWork === root.current) - throw Error( - "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." - ); - root.callbackNode = null; - root.callbackPriority = 0; - root.cancelPendingCommit = null; - var remainingLanes = finishedWork.lanes | finishedWork.childLanes; - remainingLanes |= concurrentlyUpdatedLanes; - markRootFinished( - root, - didIncludeRenderPhaseUpdate, - remainingLanes, - spawnedLane, - updatedLanes, - suspendedRetryLanes - ); - root === workInProgressRoot && - ((workInProgress = workInProgressRoot = null), - (workInProgressRootRenderLanes = 0)); - (0 === (finishedWork.subtreeFlags & 10256) && - 0 === (finishedWork.flags & 10256)) || - rootDoesHavePassiveEffects || - ((rootDoesHavePassiveEffects = !0), - (pendingPassiveEffectsRemainingLanes = remainingLanes), - (pendingPassiveTransitions = transitions), - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(!0); - return null; - })); - commitStartTime = now(); - transitions = 0 !== (finishedWork.flags & 15990); - 0 !== (finishedWork.subtreeFlags & 15990) || transitions - ? ((transitions = ReactSharedInternals.T), - (ReactSharedInternals.T = null), - (spawnedLane = currentUpdatePriority), - (currentUpdatePriority = DiscreteEventPriority), - (updatedLanes = executionContext), - (executionContext |= CommitContext), - commitBeforeMutationEffects(root, finishedWork), - commitMutationEffectsOnFiber(finishedWork, root), - (root.current = finishedWork), - commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork), - requestPaint(), - (executionContext = updatedLanes), - (currentUpdatePriority = spawnedLane), - (ReactSharedInternals.T = transitions)) - : (root.current = finishedWork); - (transitions = rootDoesHavePassiveEffects) - ? ((rootDoesHavePassiveEffects = !1), - (rootWithPendingPassiveEffects = root), - (pendingPassiveEffectsLanes = didIncludeRenderPhaseUpdate)) - : (releaseRootPooledCache(root, remainingLanes), - (nestedPassiveUpdateCount = 0), - (rootWithPassiveNestedUpdates = null)); - remainingLanes = root.pendingLanes; - 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null); - transitions || commitDoubleInvokeEffectsInDEV(root); - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - ensureRootIsScheduled(root); - if (null !== recoverableErrors) - for ( - renderPriorityLevel = root.onRecoverableError, finishedWork = 0; - finishedWork < recoverableErrors.length; - finishedWork++ - ) - (remainingLanes = recoverableErrors[finishedWork]), - (transitions = makeErrorInfo(remainingLanes.stack)), - runWithFiberInDEV( - remainingLanes.source, - renderPriorityLevel, - remainingLanes.value, - transitions + didIncludeRenderPhaseUpdate = ReactSharedInternals.T; + var previousUpdateLanePriority = currentUpdatePriority; + try { + currentUpdatePriority = DiscreteEventPriority; + ReactSharedInternals.T = null; + do flushPassiveEffects(); + while (null !== rootWithPendingPassiveEffects); + ReactStrictModeWarnings.flushLegacyContextWarning(); + ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); + if ((executionContext & (RenderContext | CommitContext)) !== NoContext) + throw Error("Should not already be working."); + var finishedWork = root$jscomp$0.finishedWork, + lanes = root$jscomp$0.finishedLanes; + if (null !== finishedWork) { + 0 === lanes && + error$jscomp$0( + "root.finishedLanes should not be empty during a commit. This is a bug in React." ); - 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); - remainingLanes = root.pendingLanes; - 0 !== (didIncludeRenderPhaseUpdate & 4194218) && - 0 !== (remainingLanes & 42) - ? ((nestedUpdateScheduled = !0), - root === rootWithNestedUpdates - ? nestedUpdateCount++ - : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))) - : (nestedUpdateCount = 0); - flushSyncWorkAcrossRoots_impl(0, !1); - return null; + root$jscomp$0.finishedWork = null; + root$jscomp$0.finishedLanes = 0; + if (finishedWork === root$jscomp$0.current) + throw Error( + "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." + ); + var remainingLanes = finishedWork.lanes | finishedWork.childLanes, + remainingLanes$jscomp$0 = (remainingLanes |= + concurrentlyUpdatedLanes), + previouslyPendingLanes = root$jscomp$0.pendingLanes; + root$jscomp$0.pendingLanes = remainingLanes$jscomp$0; + root$jscomp$0.suspendedLanes = 0; + root$jscomp$0.pingedLanes = 0; + root$jscomp$0.warmLanes = 0; + root$jscomp$0.expiredLanes &= remainingLanes$jscomp$0; + root$jscomp$0.entangledLanes &= remainingLanes$jscomp$0; + root$jscomp$0.errorRecoveryDisabledLanes &= remainingLanes$jscomp$0; + root$jscomp$0.shellSuspendCounter = 0; + var entanglements = root$jscomp$0.entanglements, + expirationTimes = root$jscomp$0.expirationTimes, + hiddenUpdates = root$jscomp$0.hiddenUpdates; + for ( + remainingLanes$jscomp$0 = + previouslyPendingLanes & ~remainingLanes$jscomp$0; + 0 < remainingLanes$jscomp$0; + + ) { + var index = 31 - clz32(remainingLanes$jscomp$0), + lane = 1 << index; + entanglements[index] = 0; + expirationTimes[index] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index]; + if (null !== hiddenUpdatesForLane) { + hiddenUpdates[index] = null; + for (var i = 0; i < hiddenUpdatesForLane.length; i++) { + var update = hiddenUpdatesForLane[i]; + null !== update && (update.lane &= -536870913); + } + } + remainingLanes$jscomp$0 &= ~lane; + } + 0 !== spawnedLane && + markSpawnedDeferredLane(root$jscomp$0, spawnedLane, 0); + 0 !== suspendedRetryLanes && + 0 === updatedLanes && + 0 !== root$jscomp$0.tag && + (root$jscomp$0.suspendedLanes |= + suspendedRetryLanes & ~(previouslyPendingLanes & ~lanes)); + root$jscomp$0 === workInProgressRoot && + ((workInProgress = workInProgressRoot = null), + (workInProgressRootRenderLanes = 0)); + spawnedLane = !1; + 0 !== (finishedWork.subtreeFlags & 10256) || + 0 !== (finishedWork.flags & 10256) + ? ((spawnedLane = !0), + (pendingPassiveEffectsRemainingLanes = remainingLanes), + (pendingPassiveTransitions = transitions)) + : ((root$jscomp$0.callbackNode = null), + (root$jscomp$0.callbackPriority = 0), + (root$jscomp$0.cancelPendingCommit = null)); + commitStartTime = now(); + var rootHasEffect = 0 !== (finishedWork.flags & 15990); + if (0 !== (finishedWork.subtreeFlags & 15990) || rootHasEffect) { + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; + transitions = currentUpdatePriority; + currentUpdatePriority = DiscreteEventPriority; + rootHasEffect = executionContext; + executionContext |= CommitContext; + for (nextEffect = finishedWork; null !== nextEffect; ) { + updatedLanes = nextEffect; + var child = updatedLanes.child; + if (0 !== (updatedLanes.subtreeFlags & 1028) && null !== child) + (child.return = updatedLanes), (nextEffect = child); + else + b: for (; null !== nextEffect; ) { + suspendedRetryLanes = updatedLanes = nextEffect; + var current = suspendedRetryLanes.alternate, + flags = suspendedRetryLanes.flags; + switch (suspendedRetryLanes.tag) { + case 0: + break; + case 11: + case 15: + break; + case 1: + 0 !== (flags & 1024) && + null !== current && + commitClassSnapshot(suspendedRetryLanes, current); + break; + case 3: + 0 !== (flags & 1024) && + suspendedRetryLanes.stateNode.containerInfo.children.splice( + 0 + ); + break; + case 5: + case 26: + case 27: + case 6: + case 4: + case 17: + break; + default: + if (0 !== (flags & 1024)) + throw Error( + "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." + ); + } + var sibling = updatedLanes.sibling; + if (null !== sibling) { + sibling.return = updatedLanes.return; + nextEffect = sibling; + break b; + } + nextEffect = updatedLanes.return; + } + } + commitMutationEffectsOnFiber(finishedWork, root$jscomp$0); + root$jscomp$0.current = finishedWork; + commitLayoutEffectOnFiber( + root$jscomp$0, + finishedWork.alternate, + finishedWork + ); + requestPaint(); + executionContext = rootHasEffect; + currentUpdatePriority = transitions; + ReactSharedInternals.T = prevTransition; + } else root$jscomp$0.current = finishedWork; + (prevTransition = spawnedLane) + ? ((rootWithPendingPassiveEffects = root$jscomp$0), + (pendingPassiveEffectsLanes = lanes)) + : (releaseRootPooledCache(root$jscomp$0, remainingLanes), + (nestedPassiveUpdateCount = 0), + (rootWithPassiveNestedUpdates = null)); + remainingLanes = root$jscomp$0.pendingLanes; + 0 === remainingLanes && + (legacyErrorBoundariesThatAlreadyFailed = null); + prevTransition || commitDoubleInvokeEffectsInDEV(root$jscomp$0); + var root = finishedWork.stateNode; + if ( + injectedHook && + "function" === typeof injectedHook.onCommitFiberRoot + ) + try { + var didError = 128 === (root.current.flags & 128); + switch (previousUpdateLanePriority) { + case DiscreteEventPriority: + var schedulerPriority = ImmediatePriority; + break; + case ContinuousEventPriority: + schedulerPriority = UserBlockingPriority; + break; + case DefaultEventPriority: + schedulerPriority = NormalPriority$1; + break; + case IdleEventPriority: + schedulerPriority = IdlePriority; + break; + default: + schedulerPriority = NormalPriority$1; + } + injectedHook.onCommitFiberRoot( + rendererID, + root, + schedulerPriority, + didError + ); + } catch (err) { + hasLoggedError || + ((hasLoggedError = !0), + error$jscomp$0( + "React instrumentation encountered an error: %s", + err + )); + } + if (null !== recoverableErrors) { + var onRecoverableError = root$jscomp$0.onRecoverableError; + for ( + finishedWork = 0; + finishedWork < recoverableErrors.length; + finishedWork++ + ) { + var recoverableError = recoverableErrors[finishedWork], + errorInfo = makeErrorInfo(recoverableError.stack); + runWithFiberInDEV( + recoverableError.source, + onRecoverableError, + recoverableError.value, + errorInfo + ); + } + } + 0 !== (pendingPassiveEffectsLanes & 3) && flushPassiveEffects(); + ensureRootIsScheduled(root$jscomp$0); + remainingLanes = root$jscomp$0.pendingLanes; + 0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42) + ? ((nestedUpdateScheduled = !0), + root$jscomp$0 === rootWithNestedUpdates + ? nestedUpdateCount++ + : ((nestedUpdateCount = 0), + (rootWithNestedUpdates = root$jscomp$0))) + : (nestedUpdateCount = 0); + flushSyncWorkAcrossRoots_impl(0, !1); + } + } finally { + (ReactSharedInternals.T = didIncludeRenderPhaseUpdate), + (currentUpdatePriority = previousUpdateLanePriority); + } } function makeErrorInfo(componentStack) { componentStack = { componentStack: componentStack }; @@ -11809,6 +11754,9 @@ __DEV__ && lanes = pendingPassiveEffectsLanes; rootWithPendingPassiveEffects = null; pendingPassiveEffectsLanes = 0; + root$jscomp$0.callbackNode = null; + root$jscomp$0.callbackPriority = 0; + root$jscomp$0.cancelPendingCommit = null; if ( (executionContext & (RenderContext | CommitContext)) !== NoContext @@ -11838,6 +11786,7 @@ __DEV__ && : (nestedPassiveUpdateCount = 0); didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1; + ensureRootIsScheduled(root$jscomp$0); if ( injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot @@ -12052,7 +12001,7 @@ __DEV__ && shouldDoubleInvokePassiveEffects && disconnectPassiveEffect(fiber), reappearLayoutEffects(root, fiber.alternate, fiber, !1), shouldDoubleInvokePassiveEffects && - reconnectPassiveEffects(root, fiber, 0, null, !1); + reconnectPassiveEffects(root, fiber, 0, null, !1, 0); } finally { setIsStrictModeForDevtools(!1); } @@ -12090,12 +12039,6 @@ __DEV__ && } } } - function scheduleCallback(priorityLevel, callback) { - var actQueue = ReactSharedInternals.actQueue; - return null !== actQueue - ? (actQueue.push(callback), fakeActCallbackNode) - : scheduleCallback$3(priorityLevel, callback); - } function warnIfUpdatesNotWrappedWithActDEV(fiber) { isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && @@ -13015,7 +12958,7 @@ __DEV__ && var current = null, isRendering = !1, isArrayImpl = Array.isArray, - scheduleCallback$3 = Scheduler$1.unstable_scheduleCallback, + scheduleCallback$2 = Scheduler$1.unstable_scheduleCallback, cancelCallback$1 = Scheduler$1.unstable_cancelCallback, shouldYield = Scheduler$1.unstable_shouldYield, requestPaint = Scheduler$1.unstable_requestPaint, @@ -13083,9 +13026,42 @@ __DEV__ && needsEscaping = /["'&<>\n\t]|^\s|\s$/, hydrationDiffRootDEV = null, hydrationErrors = null, - concurrentQueues = [], - concurrentQueuesIndex = 0, - concurrentlyUpdatedLanes = 0, + valueCursor = createCursor(null); + var renderer2CursorDEV = createCursor(null); + var rendererSigil = {}; + var currentlyRenderingFiber$1 = null, + lastContextDependency = null, + isDisallowedContextReadInDEV = !1, + AbortControllerLocal = + "undefined" !== typeof AbortController + ? AbortController + : function () { + var listeners = [], + signal = (this.signal = { + aborted: !1, + addEventListener: function (type, listener) { + listeners.push(listener); + } + }); + this.abort = function () { + signal.aborted = !0; + listeners.forEach(function (listener) { + return listener(); + }); + }; + }, + scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback, + NormalPriority = Scheduler$1.unstable_NormalPriority, + CacheContext = { + $$typeof: REACT_CONTEXT_TYPE, + Consumer: null, + Provider: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0, + _currentRenderer: null, + _currentRenderer2: null + }, now = Scheduler$1.unstable_now, commitStartTime = -0, profilerStartTime = -1.1, @@ -13099,19 +13075,21 @@ __DEV__ && mightHavePendingSyncWork = !1, isFlushingWork = !1, currentEventTransitionLane = 0, - fakeActCallbackNode$1 = {}, + fakeActCallbackNode = {}, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, - UpdateState = 0, - ReplaceState = 1, - ForceUpdate = 2, - CaptureUpdate = 3, - hasForceUpdate = !1; - var didWarnUpdateInsideUpdate = !1; - var currentlyProcessingQueue = null; - var didReadFromEntangledAsyncAction = !1, + prevOnStartTransitionFinish = ReactSharedInternals.S; + ReactSharedInternals.S = function (transition, returnValue) { + "object" === typeof returnValue && + null !== returnValue && + "function" === typeof returnValue.then && + entangleAsyncAction(transition, returnValue); + null !== prevOnStartTransitionFinish && + prevOnStartTransitionFinish(transition, returnValue); + }; + var resumedCache = createCursor(null), hasOwnProperty = Object.prototype.hasOwnProperty, ReactStrictModeWarnings = { recordUnsafeLifecycleWarnings: function () {}, @@ -13329,6 +13307,17 @@ __DEV__ && Insertion = 2, Layout = 4, Passive = 8, + concurrentQueues = [], + concurrentQueuesIndex = 0, + concurrentlyUpdatedLanes = 0, + UpdateState = 0, + ReplaceState = 1, + ForceUpdate = 2, + CaptureUpdate = 3, + hasForceUpdate = !1; + var didWarnUpdateInsideUpdate = !1; + var currentlyProcessingQueue = null; + var didReadFromEntangledAsyncAction = !1, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), didWarnUncachedGetSnapshot; @@ -13337,7 +13326,7 @@ __DEV__ && var didWarnAboutAsyncClientComponent = new Set(); var didWarnAboutUseFormState = new Set(); var renderLanes = 0, - currentlyRenderingFiber$1 = null, + currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = !1, @@ -14608,55 +14597,10 @@ __DEV__ && var SUSPENDED_MARKER = { dehydrated: null, treeContext: null, - retryLane: 0 + retryLane: 0, + hydrationErrors: null }, hasWarnedAboutUsingNoValuePropOnContextProvider = !1, - valueCursor = createCursor(null); - var renderer2CursorDEV = createCursor(null); - var rendererSigil = {}; - var currentlyRenderingFiber = null, - lastContextDependency = null, - isDisallowedContextReadInDEV = !1, - AbortControllerLocal = - "undefined" !== typeof AbortController - ? AbortController - : function () { - var listeners = [], - signal = (this.signal = { - aborted: !1, - addEventListener: function (type, listener) { - listeners.push(listener); - } - }); - this.abort = function () { - signal.aborted = !0; - listeners.forEach(function (listener) { - return listener(); - }); - }; - }, - scheduleCallback$1 = Scheduler$1.unstable_scheduleCallback, - NormalPriority = Scheduler$1.unstable_NormalPriority, - CacheContext = { - $$typeof: REACT_CONTEXT_TYPE, - Consumer: null, - Provider: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0, - _currentRenderer: null, - _currentRenderer2: null - }, - prevOnStartTransitionFinish = ReactSharedInternals.S; - ReactSharedInternals.S = function (transition, returnValue) { - "object" === typeof returnValue && - null !== returnValue && - "function" === typeof returnValue.then && - entangleAsyncAction(transition, returnValue); - null !== prevOnStartTransitionFinish && - prevOnStartTransitionFinish(transition, returnValue); - }; - var resumedCache = createCursor(null), emptyObject = {}, didWarnAboutUndefinedSnapshotBeforeUpdate = null; didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); @@ -14664,7 +14608,6 @@ __DEV__ && offscreenSubtreeWasHidden = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null, - shouldFireAfterActiveInstanceBlur = !1, hostParent = null, hostParentIsContainer = !1, suspenseyCommitFlag = 8192, @@ -14735,7 +14678,6 @@ __DEV__ && RENDER_TIMEOUT_MS = 500, workInProgressTransitions = null, legacyErrorBoundariesThatAlreadyFailed = null, - rootDoesHavePassiveEffects = !1, rootWithPendingPassiveEffects = null, pendingPassiveEffectsLanes = 0, pendingPassiveEffectsRemainingLanes = 0, @@ -14754,8 +14696,7 @@ __DEV__ && didWarnStateUpdateForNotYetMountedComponent = null, didWarnAboutUpdateInRender = !1; var didWarnAboutUpdateInRenderForAnotherComponent = new Set(); - var fakeActCallbackNode = {}, - resolveFamily = null, + var resolveFamily = null, failedBoundaries = null; var hasBadMapPolyfill = !1; try { @@ -14968,10 +14909,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.1.0-www-modern-d4287258-20241217", + version: "19.1.0-www-modern-a9bbe346-20241219", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.1.0-www-modern-d4287258-20241217" + reconcilerVersion: "19.1.0-www-modern-a9bbe346-20241219" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -14991,7 +14932,7 @@ __DEV__ && exports._Scheduler = Scheduler; exports.act = act; exports.create = function (element, options) { - var createNodeMock = JSCompiler_object_inline_createNodeMock_1094, + var createNodeMock = JSCompiler_object_inline_createNodeMock_1119, isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT, isConcurrent = isConcurrentOnly, isStrictMode = !1; @@ -15106,5 +15047,5 @@ __DEV__ && exports.unstable_batchedUpdates = function (fn, a) { return fn(a); }; - exports.version = "19.1.0-www-modern-d4287258-20241217"; + exports.version = "19.1.0-www-modern-a9bbe346-20241219"; })(); diff --git a/compiled/facebook-www/Scheduler-dev.classic.js b/compiled/facebook-www/Scheduler-dev.classic.js index 8ed077262214c..81ddeb5cda8d8 100644 --- a/compiled/facebook-www/Scheduler-dev.classic.js +++ b/compiled/facebook-www/Scheduler-dev.classic.js @@ -217,7 +217,9 @@ __DEV__ && advanceTimers(currentTime); if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) - (isHostCallbackScheduled = !0), requestHostCallback(); + (isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); else { var firstTimer = peek(timerQueue); null !== firstTimer && @@ -234,10 +236,6 @@ __DEV__ && ? !1 : !0; } - function requestHostCallback() { - isMessageLoopRunning || - ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); - } function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function () { callback(exports.unstable_now()); @@ -327,11 +325,6 @@ __DEV__ && } task.callback = null; }; - exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback()); - }; exports.unstable_forceFrameRate = function (fps) { 0 > fps || 125 < fps ? console.error( @@ -342,9 +335,6 @@ __DEV__ && exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; - exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); - }; exports.unstable_next = function (eventHandler) { switch (currentPriorityLevel) { case 1: @@ -363,7 +353,6 @@ __DEV__ && currentPriorityLevel = previousPriorityLevel; } }; - exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { enableRequestPaint && (needsPaint = !0); }; @@ -446,7 +435,10 @@ __DEV__ && (priorityLevel.isQueued = !0), isHostCallbackScheduled || isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback())); + ((isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), + schedulePerformWorkUntilDeadline()))); return priorityLevel; }; exports.unstable_shouldYield = shouldYieldToHost; diff --git a/compiled/facebook-www/Scheduler-dev.modern.js b/compiled/facebook-www/Scheduler-dev.modern.js index 8ed077262214c..81ddeb5cda8d8 100644 --- a/compiled/facebook-www/Scheduler-dev.modern.js +++ b/compiled/facebook-www/Scheduler-dev.modern.js @@ -217,7 +217,9 @@ __DEV__ && advanceTimers(currentTime); if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) - (isHostCallbackScheduled = !0), requestHostCallback(); + (isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); else { var firstTimer = peek(timerQueue); null !== firstTimer && @@ -234,10 +236,6 @@ __DEV__ && ? !1 : !0; } - function requestHostCallback() { - isMessageLoopRunning || - ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); - } function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function () { callback(exports.unstable_now()); @@ -327,11 +325,6 @@ __DEV__ && } task.callback = null; }; - exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback()); - }; exports.unstable_forceFrameRate = function (fps) { 0 > fps || 125 < fps ? console.error( @@ -342,9 +335,6 @@ __DEV__ && exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; - exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); - }; exports.unstable_next = function (eventHandler) { switch (currentPriorityLevel) { case 1: @@ -363,7 +353,6 @@ __DEV__ && currentPriorityLevel = previousPriorityLevel; } }; - exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { enableRequestPaint && (needsPaint = !0); }; @@ -446,7 +435,10 @@ __DEV__ && (priorityLevel.isQueued = !0), isHostCallbackScheduled || isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback())); + ((isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), + schedulePerformWorkUntilDeadline()))); return priorityLevel; }; exports.unstable_shouldYield = shouldYieldToHost; diff --git a/compiled/facebook-www/Scheduler-prod.classic.js b/compiled/facebook-www/Scheduler-prod.classic.js index 7754d6b8b4f7c..4aaf05294be7c 100644 --- a/compiled/facebook-www/Scheduler-prod.classic.js +++ b/compiled/facebook-www/Scheduler-prod.classic.js @@ -101,7 +101,9 @@ function handleTimeout(currentTime) { advanceTimers(currentTime); if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) - (isHostCallbackScheduled = !0), requestHostCallback(); + (isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); else { var firstTimer = peek(timerQueue); null !== firstTimer && @@ -206,10 +208,6 @@ else if ("undefined" !== typeof MessageChannel) { schedulePerformWorkUntilDeadline = function () { localSetTimeout(performWorkUntilDeadline, 0); }; -function requestHostCallback() { - isMessageLoopRunning || - ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); -} function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function () { callback(exports.unstable_now()); @@ -224,11 +222,6 @@ exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (task) { task.callback = null; }; -exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback()); -}; exports.unstable_forceFrameRate = function (fps) { 0 > fps || 125 < fps ? console.error( @@ -239,9 +232,6 @@ exports.unstable_forceFrameRate = function (fps) { exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; -exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); -}; exports.unstable_next = function (eventHandler) { switch (currentPriorityLevel) { case 1: @@ -260,7 +250,6 @@ exports.unstable_next = function (eventHandler) { currentPriorityLevel = previousPriorityLevel; } }; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { enableRequestPaint && (needsPaint = !0); }; @@ -334,7 +323,9 @@ exports.unstable_scheduleCallback = function ( push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback())); + ((isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()))); return priorityLevel; }; exports.unstable_shouldYield = shouldYieldToHost; diff --git a/compiled/facebook-www/Scheduler-prod.modern.js b/compiled/facebook-www/Scheduler-prod.modern.js index 7754d6b8b4f7c..4aaf05294be7c 100644 --- a/compiled/facebook-www/Scheduler-prod.modern.js +++ b/compiled/facebook-www/Scheduler-prod.modern.js @@ -101,7 +101,9 @@ function handleTimeout(currentTime) { advanceTimers(currentTime); if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) - (isHostCallbackScheduled = !0), requestHostCallback(); + (isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); else { var firstTimer = peek(timerQueue); null !== firstTimer && @@ -206,10 +208,6 @@ else if ("undefined" !== typeof MessageChannel) { schedulePerformWorkUntilDeadline = function () { localSetTimeout(performWorkUntilDeadline, 0); }; -function requestHostCallback() { - isMessageLoopRunning || - ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); -} function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function () { callback(exports.unstable_now()); @@ -224,11 +222,6 @@ exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (task) { task.callback = null; }; -exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback()); -}; exports.unstable_forceFrameRate = function (fps) { 0 > fps || 125 < fps ? console.error( @@ -239,9 +232,6 @@ exports.unstable_forceFrameRate = function (fps) { exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; -exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); -}; exports.unstable_next = function (eventHandler) { switch (currentPriorityLevel) { case 1: @@ -260,7 +250,6 @@ exports.unstable_next = function (eventHandler) { currentPriorityLevel = previousPriorityLevel; } }; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { enableRequestPaint && (needsPaint = !0); }; @@ -334,7 +323,9 @@ exports.unstable_scheduleCallback = function ( push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback())); + ((isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()))); return priorityLevel; }; exports.unstable_shouldYield = shouldYieldToHost; diff --git a/compiled/facebook-www/Scheduler-profiling.classic.js b/compiled/facebook-www/Scheduler-profiling.classic.js index 734df5b3e114c..6e304d59cf34a 100644 --- a/compiled/facebook-www/Scheduler-profiling.classic.js +++ b/compiled/facebook-www/Scheduler-profiling.classic.js @@ -105,7 +105,9 @@ function handleTimeout(currentTime) { advanceTimers(currentTime); if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) - (isHostCallbackScheduled = !0), requestHostCallback(); + (isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); else { var firstTimer = peek(timerQueue); null !== firstTimer && @@ -210,10 +212,6 @@ else if ("undefined" !== typeof MessageChannel) { schedulePerformWorkUntilDeadline = function () { localSetTimeout(performWorkUntilDeadline, 0); }; -function requestHostCallback() { - isMessageLoopRunning || - ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); -} function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function () { callback(exports.unstable_now()); @@ -228,11 +226,6 @@ exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (task) { task.callback = null; }; -exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback()); -}; exports.unstable_forceFrameRate = function (fps) { 0 > fps || 125 < fps ? console.error( @@ -243,9 +236,6 @@ exports.unstable_forceFrameRate = function (fps) { exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; -exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); -}; exports.unstable_next = function (eventHandler) { switch (currentPriorityLevel) { case 1: @@ -264,7 +254,6 @@ exports.unstable_next = function (eventHandler) { currentPriorityLevel = previousPriorityLevel; } }; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { enableRequestPaint && (needsPaint = !0); }; @@ -338,7 +327,9 @@ exports.unstable_scheduleCallback = function ( push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback())); + ((isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()))); return priorityLevel; }; exports.unstable_shouldYield = shouldYieldToHost; diff --git a/compiled/facebook-www/Scheduler-profiling.modern.js b/compiled/facebook-www/Scheduler-profiling.modern.js index 734df5b3e114c..6e304d59cf34a 100644 --- a/compiled/facebook-www/Scheduler-profiling.modern.js +++ b/compiled/facebook-www/Scheduler-profiling.modern.js @@ -105,7 +105,9 @@ function handleTimeout(currentTime) { advanceTimers(currentTime); if (!isHostCallbackScheduled) if (null !== peek(taskQueue)) - (isHostCallbackScheduled = !0), requestHostCallback(); + (isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); else { var firstTimer = peek(timerQueue); null !== firstTimer && @@ -210,10 +212,6 @@ else if ("undefined" !== typeof MessageChannel) { schedulePerformWorkUntilDeadline = function () { localSetTimeout(performWorkUntilDeadline, 0); }; -function requestHostCallback() { - isMessageLoopRunning || - ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()); -} function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function () { callback(exports.unstable_now()); @@ -228,11 +226,6 @@ exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (task) { task.callback = null; }; -exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback()); -}; exports.unstable_forceFrameRate = function (fps) { 0 > fps || 125 < fps ? console.error( @@ -243,9 +236,6 @@ exports.unstable_forceFrameRate = function (fps) { exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; -exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); -}; exports.unstable_next = function (eventHandler) { switch (currentPriorityLevel) { case 1: @@ -264,7 +254,6 @@ exports.unstable_next = function (eventHandler) { currentPriorityLevel = previousPriorityLevel; } }; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { enableRequestPaint && (needsPaint = !0); }; @@ -338,7 +327,9 @@ exports.unstable_scheduleCallback = function ( push(taskQueue, priorityLevel), isHostCallbackScheduled || isPerformingWork || - ((isHostCallbackScheduled = !0), requestHostCallback())); + ((isHostCallbackScheduled = !0), + isMessageLoopRunning || + ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline()))); return priorityLevel; }; exports.unstable_shouldYield = shouldYieldToHost; diff --git a/compiled/facebook-www/SchedulerMock-dev.classic.js b/compiled/facebook-www/SchedulerMock-dev.classic.js index a6e6ba4bab727..52dcf61a919f7 100644 --- a/compiled/facebook-www/SchedulerMock-dev.classic.js +++ b/compiled/facebook-www/SchedulerMock-dev.classic.js @@ -317,11 +317,6 @@ __DEV__ && yieldedValues = null; return values; }; - exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); - }; exports.unstable_flushAll = function () { if (null !== yieldedValues) throw Error( @@ -384,9 +379,6 @@ __DEV__ && exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; - exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); - }; exports.unstable_hasPendingWork = function () { return null !== scheduledCallback; }; @@ -411,7 +403,6 @@ __DEV__ && exports.unstable_now = function () { return currentMockTime; }; - exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { needsPaint = !0; }; diff --git a/compiled/facebook-www/SchedulerMock-dev.modern.js b/compiled/facebook-www/SchedulerMock-dev.modern.js index a6e6ba4bab727..52dcf61a919f7 100644 --- a/compiled/facebook-www/SchedulerMock-dev.modern.js +++ b/compiled/facebook-www/SchedulerMock-dev.modern.js @@ -317,11 +317,6 @@ __DEV__ && yieldedValues = null; return values; }; - exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); - }; exports.unstable_flushAll = function () { if (null !== yieldedValues) throw Error( @@ -384,9 +379,6 @@ __DEV__ && exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; - exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); - }; exports.unstable_hasPendingWork = function () { return null !== scheduledCallback; }; @@ -411,7 +403,6 @@ __DEV__ && exports.unstable_now = function () { return currentMockTime; }; - exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { needsPaint = !0; }; diff --git a/compiled/facebook-www/SchedulerMock-prod.classic.js b/compiled/facebook-www/SchedulerMock-prod.classic.js index dab82b06cb255..2a5003a101496 100644 --- a/compiled/facebook-www/SchedulerMock-prod.classic.js +++ b/compiled/facebook-www/SchedulerMock-prod.classic.js @@ -229,11 +229,6 @@ exports.unstable_clearLog = function () { yieldedValues = null; return values; }; -exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); -}; exports.unstable_flushAll = function () { if (null !== yieldedValues) throw Error( @@ -295,9 +290,6 @@ exports.unstable_forceFrameRate = function () {}; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; -exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); -}; exports.unstable_hasPendingWork = function () { return null !== scheduledCallback; }; @@ -322,7 +314,6 @@ exports.unstable_next = function (eventHandler) { exports.unstable_now = function () { return currentMockTime; }; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { needsPaint = !0; }; diff --git a/compiled/facebook-www/SchedulerMock-prod.modern.js b/compiled/facebook-www/SchedulerMock-prod.modern.js index dab82b06cb255..2a5003a101496 100644 --- a/compiled/facebook-www/SchedulerMock-prod.modern.js +++ b/compiled/facebook-www/SchedulerMock-prod.modern.js @@ -229,11 +229,6 @@ exports.unstable_clearLog = function () { yieldedValues = null; return values; }; -exports.unstable_continueExecution = function () { - isHostCallbackScheduled || - isPerformingWork || - ((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)); -}; exports.unstable_flushAll = function () { if (null !== yieldedValues) throw Error( @@ -295,9 +290,6 @@ exports.unstable_forceFrameRate = function () {}; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; }; -exports.unstable_getFirstCallbackNode = function () { - return peek(taskQueue); -}; exports.unstable_hasPendingWork = function () { return null !== scheduledCallback; }; @@ -322,7 +314,6 @@ exports.unstable_next = function (eventHandler) { exports.unstable_now = function () { return currentMockTime; }; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () { needsPaint = !0; }; diff --git a/compiled/facebook-www/SchedulerPostTask-dev.classic.js b/compiled/facebook-www/SchedulerPostTask-dev.classic.js index 860d98edf7dd6..b591714e99562 100644 --- a/compiled/facebook-www/SchedulerPostTask-dev.classic.js +++ b/compiled/facebook-www/SchedulerPostTask-dev.classic.js @@ -60,14 +60,10 @@ __DEV__ && exports.unstable_cancelCallback = function (node) { node._controller.abort(); }; - exports.unstable_continueExecution = function () {}; exports.unstable_forceFrameRate = function () {}; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel_DEPRECATED; }; - exports.unstable_getFirstCallbackNode = function () { - return null; - }; exports.unstable_next = function (callback) { switch (currentPriorityLevel_DEPRECATED) { case 1: @@ -87,7 +83,6 @@ __DEV__ && } }; exports.unstable_now = getCurrentTime; - exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, callback) { var previousPriorityLevel = currentPriorityLevel_DEPRECATED; diff --git a/compiled/facebook-www/SchedulerPostTask-dev.modern.js b/compiled/facebook-www/SchedulerPostTask-dev.modern.js index 860d98edf7dd6..b591714e99562 100644 --- a/compiled/facebook-www/SchedulerPostTask-dev.modern.js +++ b/compiled/facebook-www/SchedulerPostTask-dev.modern.js @@ -60,14 +60,10 @@ __DEV__ && exports.unstable_cancelCallback = function (node) { node._controller.abort(); }; - exports.unstable_continueExecution = function () {}; exports.unstable_forceFrameRate = function () {}; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel_DEPRECATED; }; - exports.unstable_getFirstCallbackNode = function () { - return null; - }; exports.unstable_next = function (callback) { switch (currentPriorityLevel_DEPRECATED) { case 1: @@ -87,7 +83,6 @@ __DEV__ && } }; exports.unstable_now = getCurrentTime; - exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, callback) { var previousPriorityLevel = currentPriorityLevel_DEPRECATED; diff --git a/compiled/facebook-www/SchedulerPostTask-prod.classic.js b/compiled/facebook-www/SchedulerPostTask-prod.classic.js index 1639c8ae41207..04953f7e3dd87 100644 --- a/compiled/facebook-www/SchedulerPostTask-prod.classic.js +++ b/compiled/facebook-www/SchedulerPostTask-prod.classic.js @@ -58,14 +58,10 @@ exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (node) { node._controller.abort(); }; -exports.unstable_continueExecution = function () {}; exports.unstable_forceFrameRate = function () {}; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel_DEPRECATED; }; -exports.unstable_getFirstCallbackNode = function () { - return null; -}; exports.unstable_next = function (callback) { switch (currentPriorityLevel_DEPRECATED) { case 1: @@ -85,7 +81,6 @@ exports.unstable_next = function (callback) { } }; exports.unstable_now = getCurrentTime; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, callback) { var previousPriorityLevel = currentPriorityLevel_DEPRECATED; diff --git a/compiled/facebook-www/SchedulerPostTask-prod.modern.js b/compiled/facebook-www/SchedulerPostTask-prod.modern.js index 1639c8ae41207..04953f7e3dd87 100644 --- a/compiled/facebook-www/SchedulerPostTask-prod.modern.js +++ b/compiled/facebook-www/SchedulerPostTask-prod.modern.js @@ -58,14 +58,10 @@ exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (node) { node._controller.abort(); }; -exports.unstable_continueExecution = function () {}; exports.unstable_forceFrameRate = function () {}; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel_DEPRECATED; }; -exports.unstable_getFirstCallbackNode = function () { - return null; -}; exports.unstable_next = function (callback) { switch (currentPriorityLevel_DEPRECATED) { case 1: @@ -85,7 +81,6 @@ exports.unstable_next = function (callback) { } }; exports.unstable_now = getCurrentTime; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, callback) { var previousPriorityLevel = currentPriorityLevel_DEPRECATED; diff --git a/compiled/facebook-www/SchedulerPostTask-profiling.classic.js b/compiled/facebook-www/SchedulerPostTask-profiling.classic.js index 1639c8ae41207..04953f7e3dd87 100644 --- a/compiled/facebook-www/SchedulerPostTask-profiling.classic.js +++ b/compiled/facebook-www/SchedulerPostTask-profiling.classic.js @@ -58,14 +58,10 @@ exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (node) { node._controller.abort(); }; -exports.unstable_continueExecution = function () {}; exports.unstable_forceFrameRate = function () {}; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel_DEPRECATED; }; -exports.unstable_getFirstCallbackNode = function () { - return null; -}; exports.unstable_next = function (callback) { switch (currentPriorityLevel_DEPRECATED) { case 1: @@ -85,7 +81,6 @@ exports.unstable_next = function (callback) { } }; exports.unstable_now = getCurrentTime; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, callback) { var previousPriorityLevel = currentPriorityLevel_DEPRECATED; diff --git a/compiled/facebook-www/SchedulerPostTask-profiling.modern.js b/compiled/facebook-www/SchedulerPostTask-profiling.modern.js index 1639c8ae41207..04953f7e3dd87 100644 --- a/compiled/facebook-www/SchedulerPostTask-profiling.modern.js +++ b/compiled/facebook-www/SchedulerPostTask-profiling.modern.js @@ -58,14 +58,10 @@ exports.unstable_UserBlockingPriority = 2; exports.unstable_cancelCallback = function (node) { node._controller.abort(); }; -exports.unstable_continueExecution = function () {}; exports.unstable_forceFrameRate = function () {}; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel_DEPRECATED; }; -exports.unstable_getFirstCallbackNode = function () { - return null; -}; exports.unstable_next = function (callback) { switch (currentPriorityLevel_DEPRECATED) { case 1: @@ -85,7 +81,6 @@ exports.unstable_next = function (callback) { } }; exports.unstable_now = getCurrentTime; -exports.unstable_pauseExecution = function () {}; exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, callback) { var previousPriorityLevel = currentPriorityLevel_DEPRECATED; diff --git a/compiled/facebook-www/VERSION_CLASSIC b/compiled/facebook-www/VERSION_CLASSIC index 5fce29989657a..660d7df1bdcdf 100644 --- a/compiled/facebook-www/VERSION_CLASSIC +++ b/compiled/facebook-www/VERSION_CLASSIC @@ -1 +1 @@ -19.1.0-www-classic-d4287258-20241217 \ No newline at end of file +19.1.0-www-classic-a9bbe346-20241219 \ No newline at end of file diff --git a/compiled/facebook-www/VERSION_MODERN b/compiled/facebook-www/VERSION_MODERN index f885ee12837ae..88ea81a6b9f9e 100644 --- a/compiled/facebook-www/VERSION_MODERN +++ b/compiled/facebook-www/VERSION_MODERN @@ -1 +1 @@ -19.1.0-www-modern-d4287258-20241217 \ No newline at end of file +19.1.0-www-modern-a9bbe346-20241219 \ No newline at end of file