From e45e8f386bb28d66fb9320be442800ae28110639 Mon Sep 17 00:00:00 2001 From: acdlite Date: Wed, 10 Apr 2024 21:01:38 +0000 Subject: [PATCH] ReactDOM.requestFormReset (#28809) Based on: - #28808 - #28804 --- This adds a React DOM method called requestFormReset that schedules a form reset to occur when the current transition completes. Internally, it's the same method that's called automatically whenever a form action is submitted. It only affects uncontrolled form inputs. See https://github.com/facebook/react/pull/28804 for details. The reason for the public API is so UI libraries can implement their own action-based APIs and maintain the form-resetting behavior, something like this: ```js function onSubmit(event) { // Disable default form submission behavior event.preventDefault(); const form = event.target; startTransition(async () => { // Request the form to reset once the action // has completed requestFormReset(form); // Call the user-provided action prop await action(new FormData(form)); }) } ``` DiffTrain build for [da69b6af9697b8042834644b14d0e715d4ace18a](https://github.com/facebook/react/commit/da69b6af9697b8042834644b14d0e715d4ace18a) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/ReactDOM-dev.classic.js | 145 ++--- compiled/facebook-www/ReactDOM-dev.modern.js | 145 ++--- .../facebook-www/ReactDOM-prod.classic.js | 517 ++++++++-------- compiled/facebook-www/ReactDOM-prod.modern.js | 365 ++++++------ .../ReactDOM-profiling.classic.js | 561 +++++++++--------- .../facebook-www/ReactDOM-profiling.modern.js | 409 ++++++------- .../ReactDOMTesting-dev.classic.js | 141 ++--- .../ReactDOMTesting-dev.modern.js | 141 ++--- .../ReactDOMTesting-prod.classic.js | 493 +++++++-------- .../ReactDOMTesting-prod.modern.js | 341 +++++------ 11 files changed, 1661 insertions(+), 1599 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index adb9b9b75ac5f..04046fbcb4ae1 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -374b5d26c2a379fe87ee6817217c8956c4e39aac +da69b6af9697b8042834644b14d0e715d4ace18a diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 2e4d3877eb61c..f875ee022c758 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -2747,7 +2747,7 @@ if (__DEV__) { return dispatcher.useFormState(action, initialState, permalink); } } - function requestFormReset$1(form) { + function requestFormReset$2(form) { Internals.d /* ReactDOMCurrentDispatcher */ .r( @@ -15848,68 +15848,8 @@ if (__DEV__) { ); } - var queue; - - if (formFiber.memoizedState === null) { - // Upgrade this host component fiber to be stateful. We're going to pretend - // it was stateful all along so we can reuse most of the implementation - // for function components and useTransition. - // - // Create the state hook used by TransitionAwareHostComponent. This is - // essentially an inlined version of mountState. - var newQueue = { - pending: null, - lanes: NoLanes, - // We're going to cheat and intentionally not create a bound dispatch - // method, because we can call it directly in startTransition. - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: NotPendingTransition - }; - queue = newQueue; - var stateHook = { - memoizedState: NotPendingTransition, - baseState: NotPendingTransition, - baseQueue: null, - queue: newQueue, - next: null - }; // We use another state hook to track whether the form needs to be reset. - // The state is an empty object. To trigger a reset, we update the state - // to a new object. Then during rendering, we detect that the state has - // changed and schedule a commit effect. - - var initialResetState = {}; - var newResetStateQueue = { - pending: null, - lanes: NoLanes, - // We're going to cheat and intentionally not create a bound dispatch - // method, because we can call it directly in startTransition. - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }; - var resetStateHook = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: newResetStateQueue, - next: null - }; - stateHook.next = resetStateHook; // Add the hook list to both fiber alternates. The idea is that the fiber - // had this hook all along. - - formFiber.memoizedState = stateHook; - var alternate = formFiber.alternate; - - if (alternate !== null) { - alternate.memoizedState = stateHook; - } - } else { - // This fiber was already upgraded to be stateful. - var _stateHook = formFiber.memoizedState; - queue = _stateHook.queue; - } - + var stateHook = ensureFormComponentIsStateful(formFiber); + var queue = stateHook.queue; startTransition( formFiber, queue, @@ -15918,13 +15858,76 @@ if (__DEV__) { // once more of this function is implemented. function () { // Automatically reset the form when the action completes. - requestFormResetImpl(formFiber); + requestFormReset$1(formFiber); return callback(formData); } ); } - function requestFormResetImpl(formFiber) { + function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + + if (existingStateHook !== null) { + // This fiber was already upgraded to be stateful. + return existingStateHook; + } // Upgrade this host component fiber to be stateful. We're going to pretend + // it was stateful all along so we can reuse most of the implementation + // for function components and useTransition. + // + // Create the state hook used by TransitionAwareHostComponent. This is + // essentially an inlined version of mountState. + + var newQueue = { + pending: null, + lanes: NoLanes, + // We're going to cheat and intentionally not create a bound dispatch + // method, because we can call it directly in startTransition. + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: NotPendingTransition + }; + var stateHook = { + memoizedState: NotPendingTransition, + baseState: NotPendingTransition, + baseQueue: null, + queue: newQueue, + next: null + }; // We use another state hook to track whether the form needs to be reset. + // The state is an empty object. To trigger a reset, we update the state + // to a new object. Then during rendering, we detect that the state has + // changed and schedule a commit effect. + + var initialResetState = {}; + var newResetStateQueue = { + pending: null, + lanes: NoLanes, + // We're going to cheat and intentionally not create a bound dispatch + // method, because we can call it directly in startTransition. + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }; + var resetStateHook = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: newResetStateQueue, + next: null + }; + stateHook.next = resetStateHook; // Add the hook list to both fiber alternates. The idea is that the fiber + // had this hook all along. + + formFiber.memoizedState = stateHook; + var alternate = formFiber.alternate; + + if (alternate !== null) { + alternate.memoizedState = stateHook; + } + + return stateHook; + } + + function requestFormReset$1(formFiber) { var transition = requestCurrentTransition(); { @@ -15945,8 +15948,9 @@ if (__DEV__) { } } + var stateHook = ensureFormComponentIsStateful(formFiber); var newResetState = {}; - var resetStateHook = formFiber.memoizedState.next; + var resetStateHook = stateHook.next; var resetStateQueue = resetStateHook.queue; dispatchSetState(formFiber, resetStateQueue, newResetState); } @@ -36226,7 +36230,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-c937066f"; + var ReactVersion = "19.0.0-www-classic-3b25da96"; function createPortal$1( children, @@ -45708,8 +45712,9 @@ if (__DEV__) { formInst !== null && formInst.tag === HostComponent && formInst.type === "form" - ); - else { + ) { + requestFormReset$1(formInst); + } else { // This form was either not rendered by this React renderer (or it's an // invalid type). Try the next one. // @@ -49788,7 +49793,7 @@ if (__DEV__) { exports.preload = preload; exports.preloadModule = preloadModule; exports.render = render; - exports.requestFormReset = requestFormReset$1; + exports.requestFormReset = requestFormReset$2; exports.unmountComponentAtNode = unmountComponentAtNode; exports.unstable_batchedUpdates = batchedUpdates$1; exports.unstable_createEventHandle = createEventHandle; diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index f5d4654e487be..cda906fb17afc 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -2682,7 +2682,7 @@ if (__DEV__) { return dispatcher.useFormState(action, initialState, permalink); } } - function requestFormReset$1(form) { + function requestFormReset$2(form) { Internals.d /* ReactDOMCurrentDispatcher */ .r( @@ -23400,68 +23400,8 @@ if (__DEV__) { ); } - var queue; - - if (formFiber.memoizedState === null) { - // Upgrade this host component fiber to be stateful. We're going to pretend - // it was stateful all along so we can reuse most of the implementation - // for function components and useTransition. - // - // Create the state hook used by TransitionAwareHostComponent. This is - // essentially an inlined version of mountState. - var newQueue = { - pending: null, - lanes: NoLanes, - // We're going to cheat and intentionally not create a bound dispatch - // method, because we can call it directly in startTransition. - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: NotPendingTransition - }; - queue = newQueue; - var stateHook = { - memoizedState: NotPendingTransition, - baseState: NotPendingTransition, - baseQueue: null, - queue: newQueue, - next: null - }; // We use another state hook to track whether the form needs to be reset. - // The state is an empty object. To trigger a reset, we update the state - // to a new object. Then during rendering, we detect that the state has - // changed and schedule a commit effect. - - var initialResetState = {}; - var newResetStateQueue = { - pending: null, - lanes: NoLanes, - // We're going to cheat and intentionally not create a bound dispatch - // method, because we can call it directly in startTransition. - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }; - var resetStateHook = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: newResetStateQueue, - next: null - }; - stateHook.next = resetStateHook; // Add the hook list to both fiber alternates. The idea is that the fiber - // had this hook all along. - - formFiber.memoizedState = stateHook; - var alternate = formFiber.alternate; - - if (alternate !== null) { - alternate.memoizedState = stateHook; - } - } else { - // This fiber was already upgraded to be stateful. - var _stateHook = formFiber.memoizedState; - queue = _stateHook.queue; - } - + var stateHook = ensureFormComponentIsStateful(formFiber); + var queue = stateHook.queue; startTransition( formFiber, queue, @@ -23470,13 +23410,76 @@ if (__DEV__) { // once more of this function is implemented. function () { // Automatically reset the form when the action completes. - requestFormResetImpl(formFiber); + requestFormReset$1(formFiber); return callback(formData); } ); } - function requestFormResetImpl(formFiber) { + function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + + if (existingStateHook !== null) { + // This fiber was already upgraded to be stateful. + return existingStateHook; + } // Upgrade this host component fiber to be stateful. We're going to pretend + // it was stateful all along so we can reuse most of the implementation + // for function components and useTransition. + // + // Create the state hook used by TransitionAwareHostComponent. This is + // essentially an inlined version of mountState. + + var newQueue = { + pending: null, + lanes: NoLanes, + // We're going to cheat and intentionally not create a bound dispatch + // method, because we can call it directly in startTransition. + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: NotPendingTransition + }; + var stateHook = { + memoizedState: NotPendingTransition, + baseState: NotPendingTransition, + baseQueue: null, + queue: newQueue, + next: null + }; // We use another state hook to track whether the form needs to be reset. + // The state is an empty object. To trigger a reset, we update the state + // to a new object. Then during rendering, we detect that the state has + // changed and schedule a commit effect. + + var initialResetState = {}; + var newResetStateQueue = { + pending: null, + lanes: NoLanes, + // We're going to cheat and intentionally not create a bound dispatch + // method, because we can call it directly in startTransition. + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }; + var resetStateHook = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: newResetStateQueue, + next: null + }; + stateHook.next = resetStateHook; // Add the hook list to both fiber alternates. The idea is that the fiber + // had this hook all along. + + formFiber.memoizedState = stateHook; + var alternate = formFiber.alternate; + + if (alternate !== null) { + alternate.memoizedState = stateHook; + } + + return stateHook; + } + + function requestFormReset$1(formFiber) { var transition = requestCurrentTransition(); { @@ -23497,8 +23500,9 @@ if (__DEV__) { } } + var stateHook = ensureFormComponentIsStateful(formFiber); var newResetState = {}; - var resetStateHook = formFiber.memoizedState.next; + var resetStateHook = stateHook.next; var resetStateQueue = resetStateHook.queue; dispatchSetState(formFiber, resetStateQueue, newResetState); } @@ -44029,8 +44033,9 @@ if (__DEV__) { formInst !== null && formInst.tag === HostComponent && formInst.type === "form" - ); - else { + ) { + requestFormReset$1(formInst); + } else { // This form was either not rendered by this React renderer (or it's an // invalid type). Try the next one. // @@ -45741,7 +45746,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-b64de750"; + var ReactVersion = "19.0.0-www-modern-0cae82b3"; function createPortal$1( children, @@ -48306,7 +48311,7 @@ if (__DEV__) { exports.preinitModule = preinitModule; exports.preload = preload; exports.preloadModule = preloadModule; - exports.requestFormReset = requestFormReset$1; + exports.requestFormReset = requestFormReset$2; exports.unstable_batchedUpdates = unstable_batchedUpdates; exports.unstable_createEventHandle = createEventHandle; exports.unstable_runWithPriority = runWithPriority; diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index a03fbcb6577b6..1a6ae8185c79c 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -4119,52 +4119,58 @@ function startTransition( } function startHostTransition(formFiber, pendingState, callback, formData) { if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476)); - if (null === formFiber.memoizedState) { - var newQueue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: sharedNotPendingObject - }; - var queue = newQueue; - newQueue = { - memoizedState: sharedNotPendingObject, - baseState: sharedNotPendingObject, - baseQueue: null, - queue: newQueue, - next: null - }; - var initialResetState = {}; - newQueue.next = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }, - next: null - }; - formFiber.memoizedState = newQueue; - initialResetState = formFiber.alternate; - null !== initialResetState && (initialResetState.memoizedState = newQueue); - } else queue = formFiber.memoizedState.queue; + var queue = ensureFormComponentIsStateful(formFiber).queue; startTransition( formFiber, queue, pendingState, sharedNotPendingObject, function () { - requestCurrentTransition(); - dispatchSetState(formFiber, formFiber.memoizedState.next.queue, {}); + requestFormReset$1(formFiber); return callback(formData); } ); } +function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + if (null !== existingStateHook) return existingStateHook; + existingStateHook = { + memoizedState: sharedNotPendingObject, + baseState: sharedNotPendingObject, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: sharedNotPendingObject + }, + next: null + }; + var initialResetState = {}; + existingStateHook.next = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }, + next: null + }; + formFiber.memoizedState = existingStateHook; + formFiber = formFiber.alternate; + null !== formFiber && (formFiber.memoizedState = existingStateHook); + return existingStateHook; +} +function requestFormReset$1(formFiber) { + requestCurrentTransition(); + var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetState(formFiber, resetStateQueue, {}); +} function useHostTransitionStatus() { var status = readContext(HostTransitionContext); return null !== status ? status : sharedNotPendingObject; @@ -4182,14 +4188,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$60 = enqueueUpdate(provider, fiber, lane); - null !== root$60 && - (scheduleUpdateOnFiber(root$60, provider, lane), - entangleTransitions(root$60, provider, lane)); + var root$59 = enqueueUpdate(provider, fiber, lane); + null !== root$59 && + (scheduleUpdateOnFiber(root$59, provider, lane), + entangleTransitions(root$59, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$60 && + null !== root$59 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4783,9 +4789,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps, baseProps)); - for (var propName$64 in Component) - void 0 === newProps[propName$64] && - (newProps[propName$64] = Component[propName$64]); + for (var propName$63 in Component) + void 0 === newProps[propName$63] && + (newProps[propName$63] = Component[propName$63]); } return newProps; } @@ -5230,10 +5236,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$76 = workInProgress.stateNode; + root$75 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$76.incompleteTransitions.has(transition)) { + if (!root$75.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5241,11 +5247,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$76.incompleteTransitions.set(transition, markerInstance); + root$75.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$76.incompleteTransitions.forEach(function (markerInstance) { + root$75.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -7688,14 +7694,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$119 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$119 = lastTailNode), + for (var lastTailNode$118 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$118 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$119 + null === lastTailNode$118 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$119.sibling = null); + : (lastTailNode$118.sibling = null); } } function bubbleProperties(completedWork) { @@ -7705,19 +7711,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 31457280), - (subtreeFlags |= child$120.flags & 31457280), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (var child$119 = completedWork.child; null !== child$119; ) + (newChildLanes |= child$119.lanes | child$119.childLanes), + (subtreeFlags |= child$119.subtreeFlags & 31457280), + (subtreeFlags |= child$119.flags & 31457280), + (child$119.return = completedWork), + (child$119 = child$119.sibling); else - for (child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags), - (subtreeFlags |= child$120.flags), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (child$119 = completedWork.child; null !== child$119; ) + (newChildLanes |= child$119.lanes | child$119.childLanes), + (subtreeFlags |= child$119.subtreeFlags), + (subtreeFlags |= child$119.flags), + (child$119.return = completedWork), + (child$119 = child$119.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8033,11 +8039,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$132 = null; + var cache$131 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$132 = newProps.memoizedState.cachePool.pool); - cache$132 !== currentResource && (newProps.flags |= 2048); + (cache$131 = newProps.memoizedState.cachePool.pool); + cache$131 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8078,8 +8084,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$132 = currentResource.rendering; - if (null === cache$132) + cache$131 = currentResource.rendering; + if (null === cache$131) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8087,11 +8093,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$132 = findFirstSuspended(current); - if (null !== cache$132) { + cache$131 = findFirstSuspended(current); + if (null !== cache$131) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$132.updateQueue; + current = cache$131.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8116,7 +8122,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$132)), null !== current)) { + if (((current = findFirstSuspended(cache$131)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8126,7 +8132,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$132.alternate && + !cache$131.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8139,13 +8145,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$132.sibling = workInProgress.child), - (workInProgress.child = cache$132)) + ? ((cache$131.sibling = workInProgress.child), + (workInProgress.child = cache$131)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$132) - : (workInProgress.child = cache$132), - (currentResource.last = cache$132)); + ? (current.sibling = cache$131) + : (workInProgress.child = cache$131), + (currentResource.last = cache$131)); } if (null !== currentResource.tail) return ( @@ -8420,8 +8426,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$150) { - captureCommitPhaseError(current, nearestMountedAncestor, error$150); + } catch (error$149) { + captureCommitPhaseError(current, nearestMountedAncestor, error$149); } else ref.current = null; } @@ -8458,7 +8464,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$201) { + } catch (e$200) { JSCompiler_temp = null; break a; } @@ -8726,11 +8732,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$152) { + } catch (error$151) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$152 + error$151 ); } } @@ -9408,8 +9414,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } } break; @@ -9583,11 +9589,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$166) { + } catch (error$165) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$166 + error$165 ); } } @@ -9625,8 +9631,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$167) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$167); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -9637,8 +9643,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$170) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$170); + } catch (error$169) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$169); } } flags & 1024 && (needsFormReset = !0); @@ -9653,8 +9659,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$171) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$171); + } catch (error$170) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$170); } } break; @@ -9668,8 +9674,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$172) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$172); + } catch (error$171) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$171); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -9701,8 +9707,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$174) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$174); + } catch (error$173) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$173); } flags = finishedWork.updateQueue; null !== flags && @@ -9780,11 +9786,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$155) { + } catch (error$154) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$155 + error$154 ); } } else if ( @@ -9859,21 +9865,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$156 = JSCompiler_inline_result.stateNode; + var parent$155 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$156, ""), + (setTextContent(parent$155, ""), (JSCompiler_inline_result.flags &= -33)); - var before$157 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$157, parent$156); + var before$156 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$156, parent$155); break; case 3: case 4: - var parent$158 = JSCompiler_inline_result.stateNode.containerInfo, - before$159 = getHostSibling(finishedWork); + var parent$157 = JSCompiler_inline_result.stateNode.containerInfo, + before$158 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$159, - parent$158 + before$158, + parent$157 ); break; default: @@ -10349,9 +10355,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$181 = finishedWork.stateNode; + var instance$180 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$181._visibility & 4 + ? instance$180._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10364,7 +10370,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$181._visibility |= 4), + : ((instance$180._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10372,7 +10378,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$181._visibility |= 4), + : ((instance$180._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10385,7 +10391,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$181 + instance$180 ); break; case 24: @@ -11345,8 +11351,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$189) { - handleThrow(root, thrownValue$189); + } catch (thrownValue$188) { + handleThrow(root, thrownValue$188); } while (1); lanes && root.shellSuspendCounter++; @@ -11451,8 +11457,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$191) { - handleThrow(root, thrownValue$191); + } catch (thrownValue$190) { + handleThrow(root, thrownValue$190); } while (1); resetContextDependencies(); @@ -11681,12 +11687,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactSharedInternals.owner = null; - var shouldFireAfterActiveInstanceBlur$195 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$194 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$195 && + shouldFireAfterActiveInstanceBlur$194 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11758,7 +11764,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$196 = rootWithPendingPassiveEffects, + var root$195 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -11773,7 +11779,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$196, remainingLanes); + releaseRootPooledCache(root$195, remainingLanes); } } return !1; @@ -13054,19 +13060,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$352; + var JSCompiler_inline_result$jscomp$351; if (canUseDOM) { - var isSupported$jscomp$inline_1503 = "oninput" in document; - if (!isSupported$jscomp$inline_1503) { - var element$jscomp$inline_1504 = document.createElement("div"); - element$jscomp$inline_1504.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1503 = - "function" === typeof element$jscomp$inline_1504.oninput; + var isSupported$jscomp$inline_1497 = "oninput" in document; + if (!isSupported$jscomp$inline_1497) { + var element$jscomp$inline_1498 = document.createElement("div"); + element$jscomp$inline_1498.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1497 = + "function" === typeof element$jscomp$inline_1498.oninput; } - JSCompiler_inline_result$jscomp$352 = isSupported$jscomp$inline_1503; - } else JSCompiler_inline_result$jscomp$352 = !1; + JSCompiler_inline_result$jscomp$351 = isSupported$jscomp$inline_1497; + } else JSCompiler_inline_result$jscomp$351 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$352 && + JSCompiler_inline_result$jscomp$351 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13444,20 +13450,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1544 = 0; - i$jscomp$inline_1544 < simpleEventPluginEvents.length; - i$jscomp$inline_1544++ + var i$jscomp$inline_1538 = 0; + i$jscomp$inline_1538 < simpleEventPluginEvents.length; + i$jscomp$inline_1538++ ) { - var eventName$jscomp$inline_1545 = - simpleEventPluginEvents[i$jscomp$inline_1544], - domEventName$jscomp$inline_1546 = - eventName$jscomp$inline_1545.toLowerCase(), - capitalizedEvent$jscomp$inline_1547 = - eventName$jscomp$inline_1545[0].toUpperCase() + - eventName$jscomp$inline_1545.slice(1); + var eventName$jscomp$inline_1539 = + simpleEventPluginEvents[i$jscomp$inline_1538], + domEventName$jscomp$inline_1540 = + eventName$jscomp$inline_1539.toLowerCase(), + capitalizedEvent$jscomp$inline_1541 = + eventName$jscomp$inline_1539[0].toUpperCase() + + eventName$jscomp$inline_1539.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1546, - "on" + capitalizedEvent$jscomp$inline_1547 + domEventName$jscomp$inline_1540, + "on" + capitalizedEvent$jscomp$inline_1541 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14926,14 +14932,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$228 in nextProps) { - var propKey = nextProps[propKey$228]; - lastProp = lastProps[propKey$228]; + for (var propKey$227 in nextProps) { + var propKey = nextProps[propKey$227]; + lastProp = lastProps[propKey$227]; if ( - nextProps.hasOwnProperty(propKey$228) && + nextProps.hasOwnProperty(propKey$227) && (null != propKey || null != lastProp) ) - switch (propKey$228) { + switch (propKey$227) { case "type": type = propKey; break; @@ -14962,7 +14968,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$228, + propKey$227, propKey, nextProps, lastProp @@ -14981,7 +14987,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$228 = null; + propKey = value = defaultValue = propKey$227 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15012,7 +15018,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$228 = type; + propKey$227 = type; break; case "defaultValue": defaultValue = type; @@ -15033,15 +15039,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$228 - ? updateOptions(domElement, !!lastProps, propKey$228, !1) + null != propKey$227 + ? updateOptions(domElement, !!lastProps, propKey$227, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$228 = null; + propKey = propKey$227 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15065,7 +15071,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$228 = name; + propKey$227 = name; break; case "defaultValue": propKey = name; @@ -15079,17 +15085,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$228, propKey); + updateTextarea(domElement, propKey$227, propKey); return; case "option": - for (var propKey$244 in lastProps) + for (var propKey$243 in lastProps) if ( - ((propKey$228 = lastProps[propKey$244]), - lastProps.hasOwnProperty(propKey$244) && - null != propKey$228 && - !nextProps.hasOwnProperty(propKey$244)) + ((propKey$227 = lastProps[propKey$243]), + lastProps.hasOwnProperty(propKey$243) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$243)) ) - switch (propKey$244) { + switch (propKey$243) { case "selected": domElement.selected = !1; break; @@ -15097,33 +15103,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$244, + propKey$243, null, nextProps, - propKey$228 + propKey$227 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$228 = nextProps[lastDefaultValue]), + ((propKey$227 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$228 !== propKey && - (null != propKey$228 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$228 && - "function" !== typeof propKey$228 && - "symbol" !== typeof propKey$228; + propKey$227 && + "function" !== typeof propKey$227 && + "symbol" !== typeof propKey$227; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$228, + propKey$227, nextProps, propKey ); @@ -15144,24 +15150,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$249 in lastProps) - (propKey$228 = lastProps[propKey$249]), - lastProps.hasOwnProperty(propKey$249) && - null != propKey$228 && - !nextProps.hasOwnProperty(propKey$249) && - setProp(domElement, tag, propKey$249, null, nextProps, propKey$228); + for (var propKey$248 in lastProps) + (propKey$227 = lastProps[propKey$248]), + lastProps.hasOwnProperty(propKey$248) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$248) && + setProp(domElement, tag, propKey$248, null, nextProps, propKey$227); for (checked in nextProps) if ( - ((propKey$228 = nextProps[checked]), + ((propKey$227 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$228 !== propKey && - (null != propKey$228 || null != propKey)) + propKey$227 !== propKey && + (null != propKey$227 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$228) + if (null != propKey$227) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15169,7 +15175,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$228, + propKey$227, nextProps, propKey ); @@ -15177,49 +15183,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$254 in lastProps) - (propKey$228 = lastProps[propKey$254]), - lastProps.hasOwnProperty(propKey$254) && - void 0 !== propKey$228 && - !nextProps.hasOwnProperty(propKey$254) && + for (var propKey$253 in lastProps) + (propKey$227 = lastProps[propKey$253]), + lastProps.hasOwnProperty(propKey$253) && + void 0 !== propKey$227 && + !nextProps.hasOwnProperty(propKey$253) && setPropOnCustomElement( domElement, tag, - propKey$254, + propKey$253, void 0, nextProps, - propKey$228 + propKey$227 ); for (defaultChecked in nextProps) - (propKey$228 = nextProps[defaultChecked]), + (propKey$227 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$228 === propKey || - (void 0 === propKey$228 && void 0 === propKey) || + propKey$227 === propKey || + (void 0 === propKey$227 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$228, + propKey$227, nextProps, propKey ); return; } } - for (var propKey$259 in lastProps) - (propKey$228 = lastProps[propKey$259]), - lastProps.hasOwnProperty(propKey$259) && - null != propKey$228 && - !nextProps.hasOwnProperty(propKey$259) && - setProp(domElement, tag, propKey$259, null, nextProps, propKey$228); + for (var propKey$258 in lastProps) + (propKey$227 = lastProps[propKey$258]), + lastProps.hasOwnProperty(propKey$258) && + null != propKey$227 && + !nextProps.hasOwnProperty(propKey$258) && + setProp(domElement, tag, propKey$258, null, nextProps, propKey$227); for (lastProp in nextProps) - (propKey$228 = nextProps[lastProp]), + (propKey$227 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$228 === propKey || - (null == propKey$228 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$228, nextProps, propKey); + propKey$227 === propKey || + (null == propKey$227 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$227, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15533,8 +15539,9 @@ Internals.d = { }; function requestFormReset(form) { var formInst = getInstanceFromNode(form); - (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || - previousDispatcher.r(form); + null !== formInst && 5 === formInst.tag && "form" === formInst.type + ? requestFormReset$1(formInst) + : previousDispatcher.r(form); } var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { @@ -15797,17 +15804,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$267 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$268 = styles$267.get(type); - resource$268 || + var styles$266 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$267 = styles$266.get(type); + resource$267 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$268 = { + (resource$267 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$267.set(type, resource$268), + styles$266.set(type, resource$267), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -15822,9 +15829,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$268.state + resource$267.state )); - return resource$268; + return resource$267; } return null; case "script": @@ -15920,37 +15927,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$272 = hoistableRoot.querySelector( + var instance$271 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$272) + if (instance$271) return ( (resource.state.loading |= 4), - (resource.instance = instance$272), - markNodeAsHoistable(instance$272), - instance$272 + (resource.instance = instance$271), + markNodeAsHoistable(instance$271), + instance$271 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$272 = ( + instance$271 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$272); - var linkInstance = instance$272; + markNodeAsHoistable(instance$271); + var linkInstance = instance$271; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$272, "link", instance); + setInitialProperties(instance$271, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$272, props.precedence, hoistableRoot); - return (resource.instance = instance$272); + insertStylesheet(instance$271, props.precedence, hoistableRoot); + return (resource.instance = instance$271); case "script": - instance$272 = getScriptKey(props.src); + instance$271 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$272) + getScriptSelectorFromKey(instance$271) )) ) return ( @@ -15959,7 +15966,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$272))) + if ((styleProps = preloadPropsMap.get(instance$271))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17009,17 +17016,17 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1735 = { +var devToolsConfig$jscomp$inline_1729 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-0eb250d3", + version: "19.0.0-www-classic-7999906a", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2166 = { - bundleType: devToolsConfig$jscomp$inline_1735.bundleType, - version: devToolsConfig$jscomp$inline_1735.version, - rendererPackageName: devToolsConfig$jscomp$inline_1735.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1735.rendererConfig, +var internals$jscomp$inline_2160 = { + bundleType: devToolsConfig$jscomp$inline_1729.bundleType, + version: devToolsConfig$jscomp$inline_1729.version, + rendererPackageName: devToolsConfig$jscomp$inline_1729.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1729.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17035,26 +17042,26 @@ var internals$jscomp$inline_2166 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1735.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1729.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-0eb250d3" + reconcilerVersion: "19.0.0-www-classic-7999906a" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2167 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2161 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2167.isDisabled && - hook$jscomp$inline_2167.supportsFiber + !hook$jscomp$inline_2161.isDisabled && + hook$jscomp$inline_2161.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2167.inject( - internals$jscomp$inline_2166 + (rendererID = hook$jscomp$inline_2161.inject( + internals$jscomp$inline_2160 )), - (injectedHook = hook$jscomp$inline_2167); + (injectedHook = hook$jscomp$inline_2161); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17090,11 +17097,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$293); + var instance = getPublicRootInstance(root$292); originalCallback.call(instance); }; } - var root$293 = createHydrationContainer( + var root$292 = createHydrationContainer( initialChildren, callback, container, @@ -17109,23 +17116,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$293; - container[internalContainerInstanceKey] = root$293.current; + container._reactRootContainer = root$292; + container[internalContainerInstanceKey] = root$292.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork(); - return root$293; + return root$292; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$294 = callback; + var originalCallback$293 = callback; callback = function () { - var instance = getPublicRootInstance(root$295); - originalCallback$294.call(instance); + var instance = getPublicRootInstance(root$294); + originalCallback$293.call(instance); }; } - var root$295 = createFiberRoot( + var root$294 = createFiberRoot( container, 0, !1, @@ -17140,14 +17147,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$295; - container[internalContainerInstanceKey] = root$295.current; + container._reactRootContainer = root$294; + container[internalContainerInstanceKey] = root$294.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$295, parentComponent, callback); + updateContainerSync(initialChildren, root$294, parentComponent, callback); flushSyncWork(); - return root$295; + return root$294; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17508,4 +17515,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-0eb250d3"; +exports.version = "19.0.0-www-classic-7999906a"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 9b9e883e52b68..5a08ef81019bd 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -2043,19 +2043,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$296; + var JSCompiler_inline_result$jscomp$295; if (canUseDOM) { - var isSupported$jscomp$inline_428 = "oninput" in document; - if (!isSupported$jscomp$inline_428) { - var element$jscomp$inline_429 = document.createElement("div"); - element$jscomp$inline_429.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_428 = - "function" === typeof element$jscomp$inline_429.oninput; + var isSupported$jscomp$inline_427 = "oninput" in document; + if (!isSupported$jscomp$inline_427) { + var element$jscomp$inline_428 = document.createElement("div"); + element$jscomp$inline_428.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_427 = + "function" === typeof element$jscomp$inline_428.oninput; } - JSCompiler_inline_result$jscomp$296 = isSupported$jscomp$inline_428; - } else JSCompiler_inline_result$jscomp$296 = !1; + JSCompiler_inline_result$jscomp$295 = isSupported$jscomp$inline_427; + } else JSCompiler_inline_result$jscomp$295 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$296 && + JSCompiler_inline_result$jscomp$295 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -2488,19 +2488,19 @@ for ( } console.error(error); }, - i$jscomp$inline_469 = 0; - i$jscomp$inline_469 < simpleEventPluginEvents.length; - i$jscomp$inline_469++ + i$jscomp$inline_468 = 0; + i$jscomp$inline_468 < simpleEventPluginEvents.length; + i$jscomp$inline_468++ ) { - var eventName$jscomp$inline_470 = - simpleEventPluginEvents[i$jscomp$inline_469], - domEventName$jscomp$inline_471 = eventName$jscomp$inline_470.toLowerCase(), - capitalizedEvent$jscomp$inline_472 = - eventName$jscomp$inline_470[0].toUpperCase() + - eventName$jscomp$inline_470.slice(1); + var eventName$jscomp$inline_469 = + simpleEventPluginEvents[i$jscomp$inline_468], + domEventName$jscomp$inline_470 = eventName$jscomp$inline_469.toLowerCase(), + capitalizedEvent$jscomp$inline_471 = + eventName$jscomp$inline_469[0].toUpperCase() + + eventName$jscomp$inline_469.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_471, - "on" + capitalizedEvent$jscomp$inline_472 + domEventName$jscomp$inline_470, + "on" + capitalizedEvent$jscomp$inline_471 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -6724,52 +6724,58 @@ function startTransition( } function startHostTransition(formFiber, pendingState, callback, formData) { if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476)); - if (null === formFiber.memoizedState) { - var newQueue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: sharedNotPendingObject - }; - var queue = newQueue; - newQueue = { - memoizedState: sharedNotPendingObject, - baseState: sharedNotPendingObject, - baseQueue: null, - queue: newQueue, - next: null - }; - var initialResetState = {}; - newQueue.next = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }, - next: null - }; - formFiber.memoizedState = newQueue; - initialResetState = formFiber.alternate; - null !== initialResetState && (initialResetState.memoizedState = newQueue); - } else queue = formFiber.memoizedState.queue; + var queue = ensureFormComponentIsStateful(formFiber).queue; startTransition( formFiber, queue, pendingState, sharedNotPendingObject, function () { - requestCurrentTransition(); - dispatchSetState(formFiber, formFiber.memoizedState.next.queue, {}); + requestFormReset$1(formFiber); return callback(formData); } ); } +function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + if (null !== existingStateHook) return existingStateHook; + existingStateHook = { + memoizedState: sharedNotPendingObject, + baseState: sharedNotPendingObject, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: sharedNotPendingObject + }, + next: null + }; + var initialResetState = {}; + existingStateHook.next = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }, + next: null + }; + formFiber.memoizedState = existingStateHook; + formFiber = formFiber.alternate; + null !== formFiber && (formFiber.memoizedState = existingStateHook); + return existingStateHook; +} +function requestFormReset$1(formFiber) { + requestCurrentTransition(); + var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetState(formFiber, resetStateQueue, {}); +} function useHostTransitionStatus() { var status = readContext(HostTransitionContext); return null !== status ? status : sharedNotPendingObject; @@ -6787,14 +6793,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$120 = enqueueUpdate(provider, fiber, lane); - null !== root$120 && - (scheduleUpdateOnFiber(root$120, provider, lane), - entangleTransitions(root$120, provider, lane)); + var root$119 = enqueueUpdate(provider, fiber, lane); + null !== root$119 && + (scheduleUpdateOnFiber(root$119, provider, lane), + entangleTransitions(root$119, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$120 && + null !== root$119 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -7248,9 +7254,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$124) { + } catch (e$123) { setTimeout(function () { - throw e$124; + throw e$123; }); } } @@ -7261,9 +7267,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$125) { + } catch (e$124) { setTimeout(function () { - throw e$125; + throw e$124; }); } } @@ -9885,9 +9891,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps, baseProps)); - for (var propName$175 in Component) - void 0 === newProps[propName$175] && - (newProps[propName$175] = Component[propName$175]); + for (var propName$174 in Component) + void 0 === newProps[propName$174] && + (newProps[propName$174] = Component[propName$174]); } return newProps; } @@ -9945,8 +9951,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$176) { - captureCommitPhaseError(current, nearestMountedAncestor, error$176); + } catch (error$175) { + captureCommitPhaseError(current, nearestMountedAncestor, error$175); } else ref.current = null; } @@ -10264,11 +10270,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$178) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$178 + error$177 ); } } @@ -10935,8 +10941,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$191) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$191); + } catch (error$190) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$190); } } break; @@ -11110,11 +11116,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$192) { + } catch (error$191) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$192 + error$191 ); } } @@ -11152,8 +11158,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$193) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$193); + } catch (error$192) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$192); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -11164,8 +11170,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$196) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$196); + } catch (error$195) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$195); } } flags & 1024 && (needsFormReset = !0); @@ -11180,8 +11186,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$197) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$197); + } catch (error$196) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$196); } } break; @@ -11195,8 +11201,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$198) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$198); + } catch (error$197) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$197); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -11228,8 +11234,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$200) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$200); + } catch (error$199) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$199); } flags = finishedWork.updateQueue; null !== flags && @@ -11304,11 +11310,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$181) { + } catch (error$180) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$181 + error$180 ); } } else if ( @@ -11383,21 +11389,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$182 = JSCompiler_inline_result.stateNode; + var parent$181 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$182, ""), + (setTextContent(parent$181, ""), (JSCompiler_inline_result.flags &= -33)); - var before$183 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$183, parent$182); + var before$182 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$182, parent$181); break; case 3: case 4: - var parent$184 = JSCompiler_inline_result.stateNode.containerInfo, - before$185 = getHostSibling(finishedWork); + var parent$183 = JSCompiler_inline_result.stateNode.containerInfo, + before$184 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$185, - parent$184 + before$184, + parent$183 ); break; default: @@ -11865,9 +11871,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$207 = finishedWork.stateNode; + var instance$206 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$207._visibility & 4 + ? instance$206._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11879,7 +11885,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$207._visibility |= 4), + : ((instance$206._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -11892,7 +11898,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$207 + instance$206 ); break; case 24: @@ -12636,14 +12642,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$216 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$216 = lastTailNode), + for (var lastTailNode$215 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$215 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$216 + null === lastTailNode$215 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$216.sibling = null); + : (lastTailNode$215.sibling = null); } } function bubbleProperties(completedWork) { @@ -12653,19 +12659,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$217 = completedWork.child; null !== child$217; ) - (newChildLanes |= child$217.lanes | child$217.childLanes), - (subtreeFlags |= child$217.subtreeFlags & 31457280), - (subtreeFlags |= child$217.flags & 31457280), - (child$217.return = completedWork), - (child$217 = child$217.sibling); + for (var child$216 = completedWork.child; null !== child$216; ) + (newChildLanes |= child$216.lanes | child$216.childLanes), + (subtreeFlags |= child$216.subtreeFlags & 31457280), + (subtreeFlags |= child$216.flags & 31457280), + (child$216.return = completedWork), + (child$216 = child$216.sibling); else - for (child$217 = completedWork.child; null !== child$217; ) - (newChildLanes |= child$217.lanes | child$217.childLanes), - (subtreeFlags |= child$217.subtreeFlags), - (subtreeFlags |= child$217.flags), - (child$217.return = completedWork), - (child$217 = child$217.sibling); + for (child$216 = completedWork.child; null !== child$216; ) + (newChildLanes |= child$216.lanes | child$216.childLanes), + (subtreeFlags |= child$216.subtreeFlags), + (subtreeFlags |= child$216.flags), + (child$216.return = completedWork), + (child$216 = child$216.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -12974,11 +12980,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$229 = null; + var cache$228 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$229 = newProps.memoizedState.cachePool.pool); - cache$229 !== currentResource && (newProps.flags |= 2048); + (cache$228 = newProps.memoizedState.cachePool.pool); + cache$228 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -13013,8 +13019,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$229 = currentResource.rendering; - if (null === cache$229) + cache$228 = currentResource.rendering; + if (null === cache$228) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -13022,11 +13028,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$229 = findFirstSuspended(current); - if (null !== cache$229) { + cache$228 = findFirstSuspended(current); + if (null !== cache$228) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$229.updateQueue; + current = cache$228.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -13051,7 +13057,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$229)), null !== current)) { + if (((current = findFirstSuspended(cache$228)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -13061,7 +13067,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$229.alternate && + !cache$228.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -13074,13 +13080,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$229.sibling = workInProgress.child), - (workInProgress.child = cache$229)) + ? ((cache$228.sibling = workInProgress.child), + (workInProgress.child = cache$228)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$229) - : (workInProgress.child = cache$229), - (currentResource.last = cache$229)); + ? (current.sibling = cache$228) + : (workInProgress.child = cache$228), + (currentResource.last = cache$228)); } if (null !== currentResource.tail) return ( @@ -13929,8 +13935,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$246) { - handleThrow(root, thrownValue$246); + } catch (thrownValue$245) { + handleThrow(root, thrownValue$245); } while (1); lanes && root.shellSuspendCounter++; @@ -14035,8 +14041,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$248) { - handleThrow(root, thrownValue$248); + } catch (thrownValue$247) { + handleThrow(root, thrownValue$247); } while (1); resetContextDependencies(); @@ -14261,12 +14267,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactSharedInternals.owner = null; - var shouldFireAfterActiveInstanceBlur$252 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$251 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$252 && + shouldFireAfterActiveInstanceBlur$251 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -14336,7 +14342,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$253 = rootWithPendingPassiveEffects, + var root$252 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -14351,7 +14357,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$253, remainingLanes); + releaseRootPooledCache(root$252, remainingLanes); } } return !1; @@ -14827,8 +14833,9 @@ function flushSyncWork() { } function requestFormReset(form) { var formInst = getInstanceFromNode$1(form); - (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || - previousDispatcher.r(form); + null !== formInst && 5 === formInst.tag && "form" === formInst.type + ? requestFormReset$1(formInst) + : previousDispatcher.r(form); } var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { @@ -15091,17 +15098,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$258 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$259 = styles$258.get(type); - resource$259 || + var styles$257 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$258 = styles$257.get(type); + resource$258 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$259 = { + (resource$258 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$258.set(type, resource$259), + styles$257.set(type, resource$258), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -15116,9 +15123,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$259.state + resource$258.state )); - return resource$259; + return resource$258; } return null; case "script": @@ -15214,37 +15221,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$263 = hoistableRoot.querySelector( + var instance$262 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$263) + if (instance$262) return ( (resource.state.loading |= 4), - (resource.instance = instance$263), - markNodeAsHoistable(instance$263), - instance$263 + (resource.instance = instance$262), + markNodeAsHoistable(instance$262), + instance$262 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$263 = ( + instance$262 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$263); - var linkInstance = instance$263; + markNodeAsHoistable(instance$262); + var linkInstance = instance$262; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$263, "link", instance); + setInitialProperties(instance$262, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$263, props.precedence, hoistableRoot); - return (resource.instance = instance$263); + insertStylesheet(instance$262, props.precedence, hoistableRoot); + return (resource.instance = instance$262); case "script": - instance$263 = getScriptKey(props.src); + instance$262 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$263) + getScriptSelectorFromKey(instance$262) )) ) return ( @@ -15253,7 +15260,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$263))) + if ((styleProps = preloadPropsMap.get(instance$262))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16371,17 +16378,17 @@ Internals.Events = [ restoreStateIfNeeded, unstable_batchedUpdates ]; -var devToolsConfig$jscomp$inline_1728 = { +var devToolsConfig$jscomp$inline_1722 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-a454c9c5", + version: "19.0.0-www-modern-35d2c5f0", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2168 = { - bundleType: devToolsConfig$jscomp$inline_1728.bundleType, - version: devToolsConfig$jscomp$inline_1728.version, - rendererPackageName: devToolsConfig$jscomp$inline_1728.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1728.rendererConfig, +var internals$jscomp$inline_2162 = { + bundleType: devToolsConfig$jscomp$inline_1722.bundleType, + version: devToolsConfig$jscomp$inline_1722.version, + rendererPackageName: devToolsConfig$jscomp$inline_1722.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1722.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -16397,26 +16404,26 @@ var internals$jscomp$inline_2168 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1728.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1722.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-a454c9c5" + reconcilerVersion: "19.0.0-www-modern-35d2c5f0" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2169 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2163 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2169.isDisabled && - hook$jscomp$inline_2169.supportsFiber + !hook$jscomp$inline_2163.isDisabled && + hook$jscomp$inline_2163.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2169.inject( - internals$jscomp$inline_2168 + (rendererID = hook$jscomp$inline_2163.inject( + internals$jscomp$inline_2162 )), - (injectedHook = hook$jscomp$inline_2169); + (injectedHook = hook$jscomp$inline_2163); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -16712,4 +16719,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-a454c9c5"; +exports.version = "19.0.0-www-modern-35d2c5f0"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index ba38449c24a23..e1a79d62590e7 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -4255,52 +4255,58 @@ function startTransition( } function startHostTransition(formFiber, pendingState, callback, formData) { if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476)); - if (null === formFiber.memoizedState) { - var newQueue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: sharedNotPendingObject - }; - var queue = newQueue; - newQueue = { - memoizedState: sharedNotPendingObject, - baseState: sharedNotPendingObject, - baseQueue: null, - queue: newQueue, - next: null - }; - var initialResetState = {}; - newQueue.next = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }, - next: null - }; - formFiber.memoizedState = newQueue; - initialResetState = formFiber.alternate; - null !== initialResetState && (initialResetState.memoizedState = newQueue); - } else queue = formFiber.memoizedState.queue; + var queue = ensureFormComponentIsStateful(formFiber).queue; startTransition( formFiber, queue, pendingState, sharedNotPendingObject, function () { - requestCurrentTransition(); - dispatchSetState(formFiber, formFiber.memoizedState.next.queue, {}); + requestFormReset$1(formFiber); return callback(formData); } ); } +function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + if (null !== existingStateHook) return existingStateHook; + existingStateHook = { + memoizedState: sharedNotPendingObject, + baseState: sharedNotPendingObject, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: sharedNotPendingObject + }, + next: null + }; + var initialResetState = {}; + existingStateHook.next = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }, + next: null + }; + formFiber.memoizedState = existingStateHook; + formFiber = formFiber.alternate; + null !== formFiber && (formFiber.memoizedState = existingStateHook); + return existingStateHook; +} +function requestFormReset$1(formFiber) { + requestCurrentTransition(); + var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetState(formFiber, resetStateQueue, {}); +} function useHostTransitionStatus() { var status = readContext(HostTransitionContext); return null !== status ? status : sharedNotPendingObject; @@ -4318,14 +4324,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$63 = enqueueUpdate(provider, fiber, lane); - null !== root$63 && - (scheduleUpdateOnFiber(root$63, provider, lane), - entangleTransitions(root$63, provider, lane)); + var root$62 = enqueueUpdate(provider, fiber, lane); + null !== root$62 && + (scheduleUpdateOnFiber(root$62, provider, lane), + entangleTransitions(root$62, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$63 && + null !== root$62 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4991,9 +4997,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps, baseProps)); - for (var propName$69 in Component) - void 0 === newProps[propName$69] && - (newProps[propName$69] = Component[propName$69]); + for (var propName$68 in Component) + void 0 === newProps[propName$68] && + (newProps[propName$68] = Component[propName$68]); } return newProps; } @@ -5439,10 +5445,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$81 = workInProgress.stateNode; + root$80 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$81.incompleteTransitions.has(transition)) { + if (!root$80.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5450,11 +5456,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$81.incompleteTransitions.set(transition, markerInstance); + root$80.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$81.incompleteTransitions.forEach(function (markerInstance) { + root$80.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -7936,14 +7942,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$125 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$125 = lastTailNode), + for (var lastTailNode$124 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$124 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$125 + null === lastTailNode$124 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$125.sibling = null); + : (lastTailNode$124.sibling = null); } } function bubbleProperties(completedWork) { @@ -7955,53 +7961,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$127 = completedWork.selfBaseDuration, - child$128 = completedWork.child; - null !== child$128; + var treeBaseDuration$126 = completedWork.selfBaseDuration, + child$127 = completedWork.child; + null !== child$127; ) - (newChildLanes |= child$128.lanes | child$128.childLanes), - (subtreeFlags |= child$128.subtreeFlags & 31457280), - (subtreeFlags |= child$128.flags & 31457280), - (treeBaseDuration$127 += child$128.treeBaseDuration), - (child$128 = child$128.sibling); - completedWork.treeBaseDuration = treeBaseDuration$127; + (newChildLanes |= child$127.lanes | child$127.childLanes), + (subtreeFlags |= child$127.subtreeFlags & 31457280), + (subtreeFlags |= child$127.flags & 31457280), + (treeBaseDuration$126 += child$127.treeBaseDuration), + (child$127 = child$127.sibling); + completedWork.treeBaseDuration = treeBaseDuration$126; } else for ( - treeBaseDuration$127 = completedWork.child; - null !== treeBaseDuration$127; + treeBaseDuration$126 = completedWork.child; + null !== treeBaseDuration$126; ) (newChildLanes |= - treeBaseDuration$127.lanes | treeBaseDuration$127.childLanes), - (subtreeFlags |= treeBaseDuration$127.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$127.flags & 31457280), - (treeBaseDuration$127.return = completedWork), - (treeBaseDuration$127 = treeBaseDuration$127.sibling); + treeBaseDuration$126.lanes | treeBaseDuration$126.childLanes), + (subtreeFlags |= treeBaseDuration$126.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$126.flags & 31457280), + (treeBaseDuration$126.return = completedWork), + (treeBaseDuration$126 = treeBaseDuration$126.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$127 = completedWork.actualDuration; - child$128 = completedWork.selfBaseDuration; + treeBaseDuration$126 = completedWork.actualDuration; + child$127 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$127 += child.actualDuration), - (child$128 += child.treeBaseDuration), + (treeBaseDuration$126 += child.actualDuration), + (child$127 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$127; - completedWork.treeBaseDuration = child$128; + completedWork.actualDuration = treeBaseDuration$126; + completedWork.treeBaseDuration = child$127; } else for ( - treeBaseDuration$127 = completedWork.child; - null !== treeBaseDuration$127; + treeBaseDuration$126 = completedWork.child; + null !== treeBaseDuration$126; ) (newChildLanes |= - treeBaseDuration$127.lanes | treeBaseDuration$127.childLanes), - (subtreeFlags |= treeBaseDuration$127.subtreeFlags), - (subtreeFlags |= treeBaseDuration$127.flags), - (treeBaseDuration$127.return = completedWork), - (treeBaseDuration$127 = treeBaseDuration$127.sibling); + treeBaseDuration$126.lanes | treeBaseDuration$126.childLanes), + (subtreeFlags |= treeBaseDuration$126.subtreeFlags), + (subtreeFlags |= treeBaseDuration$126.flags), + (treeBaseDuration$126.return = completedWork), + (treeBaseDuration$126 = treeBaseDuration$126.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8335,11 +8341,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$143 = null; + var cache$142 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$143 = newProps.memoizedState.cachePool.pool); - cache$143 !== currentResource && (newProps.flags |= 2048); + (cache$142 = newProps.memoizedState.cachePool.pool); + cache$142 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8385,8 +8391,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$143 = currentResource.rendering; - if (null === cache$143) + cache$142 = currentResource.rendering; + if (null === cache$142) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8394,11 +8400,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$143 = findFirstSuspended(current); - if (null !== cache$143) { + cache$142 = findFirstSuspended(current); + if (null !== cache$142) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$143.updateQueue; + current = cache$142.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8423,7 +8429,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$143)), null !== current)) { + if (((current = findFirstSuspended(cache$142)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8433,7 +8439,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$143.alternate && + !cache$142.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8446,13 +8452,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$143.sibling = workInProgress.child), - (workInProgress.child = cache$143)) + ? ((cache$142.sibling = workInProgress.child), + (workInProgress.child = cache$142)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$143) - : (workInProgress.child = cache$143), - (currentResource.last = cache$143)); + ? (current.sibling = cache$142) + : (workInProgress.child = cache$142), + (currentResource.last = cache$142)); } if (null !== currentResource.tail) return ( @@ -8765,8 +8771,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$161) { - captureCommitPhaseError(current, nearestMountedAncestor, error$161); + } catch (error$160) { + captureCommitPhaseError(current, nearestMountedAncestor, error$160); } else ref.current = null; } @@ -8803,7 +8809,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$222) { + } catch (e$221) { JSCompiler_temp = null; break a; } @@ -9061,11 +9067,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$163 = commitTime, + var commitTime$162 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$163); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$162); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -9092,8 +9098,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } } function commitClassCallbacks(finishedWork) { @@ -9192,11 +9198,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$166) { + } catch (error$165) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$166 + error$165 ); } else { @@ -9214,11 +9220,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$167) { + } catch (error$166) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$167 + error$166 ); } recordLayoutEffectDuration(finishedWork); @@ -9229,11 +9235,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$168) { + } catch (error$167) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$168 + error$167 ); } } @@ -9939,22 +9945,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$183) { + } catch (error$182) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$183 + error$182 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$184) { + } catch (error$183) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$184 + error$183 ); } } @@ -10129,11 +10135,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$185) { + } catch (error$184) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$185 + error$184 ); } } @@ -10171,8 +10177,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$186) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$186); + } catch (error$185) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$185); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -10183,8 +10189,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$189) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$189); + } catch (error$188) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$188); } } flags & 1024 && (needsFormReset = !0); @@ -10199,8 +10205,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$190) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$190); + } catch (error$189) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$189); } } break; @@ -10214,8 +10220,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$191) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$191); + } catch (error$190) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$190); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -10247,8 +10253,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$193) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$193); + } catch (error$192) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$192); } flags = finishedWork.updateQueue; null !== flags && @@ -10326,11 +10332,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$173) { + } catch (error$172) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$173 + error$172 ); } } else if ( @@ -10405,21 +10411,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$174 = JSCompiler_inline_result.stateNode; + var parent$173 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$174, ""), + (setTextContent(parent$173, ""), (JSCompiler_inline_result.flags &= -33)); - var before$175 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$175, parent$174); + var before$174 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$174, parent$173); break; case 3: case 4: - var parent$176 = JSCompiler_inline_result.stateNode.containerInfo, - before$177 = getHostSibling(finishedWork); + var parent$175 = JSCompiler_inline_result.stateNode.containerInfo, + before$176 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$177, - parent$176 + before$176, + parent$175 ); break; default: @@ -10620,8 +10626,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$196) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$196); + } catch (error$195) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$195); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10920,9 +10926,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$201 = finishedWork.stateNode; + var instance$200 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$201._visibility & 4 + ? instance$200._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10935,7 +10941,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$201._visibility |= 4), + : ((instance$200._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10943,7 +10949,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$201._visibility |= 4), + : ((instance$200._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10956,7 +10962,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$201 + instance$200 ); break; case 24: @@ -11979,8 +11985,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$209) { - handleThrow(root, thrownValue$209); + } catch (thrownValue$208) { + handleThrow(root, thrownValue$208); } while (1); lanes && root.shellSuspendCounter++; @@ -12096,8 +12102,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$211) { - handleThrow(root, thrownValue$211); + } catch (thrownValue$210) { + handleThrow(root, thrownValue$210); } while (1); resetContextDependencies(); @@ -12360,13 +12366,13 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactSharedInternals.owner = null; - var shouldFireAfterActiveInstanceBlur$215 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$214 = commitBeforeMutationEffects( root, finishedWork ); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$215 && + shouldFireAfterActiveInstanceBlur$214 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12451,7 +12457,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$216 = rootWithPendingPassiveEffects, + var root$215 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12466,7 +12472,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$216, remainingLanes); + releaseRootPooledCache(root$215, remainingLanes); } } return !1; @@ -13802,19 +13808,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$373; + var JSCompiler_inline_result$jscomp$372; if (canUseDOM) { - var isSupported$jscomp$inline_1589 = "oninput" in document; - if (!isSupported$jscomp$inline_1589) { - var element$jscomp$inline_1590 = document.createElement("div"); - element$jscomp$inline_1590.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1589 = - "function" === typeof element$jscomp$inline_1590.oninput; + var isSupported$jscomp$inline_1583 = "oninput" in document; + if (!isSupported$jscomp$inline_1583) { + var element$jscomp$inline_1584 = document.createElement("div"); + element$jscomp$inline_1584.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1583 = + "function" === typeof element$jscomp$inline_1584.oninput; } - JSCompiler_inline_result$jscomp$373 = isSupported$jscomp$inline_1589; - } else JSCompiler_inline_result$jscomp$373 = !1; + JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1583; + } else JSCompiler_inline_result$jscomp$372 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$373 && + JSCompiler_inline_result$jscomp$372 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14192,20 +14198,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1630 = 0; - i$jscomp$inline_1630 < simpleEventPluginEvents.length; - i$jscomp$inline_1630++ + var i$jscomp$inline_1624 = 0; + i$jscomp$inline_1624 < simpleEventPluginEvents.length; + i$jscomp$inline_1624++ ) { - var eventName$jscomp$inline_1631 = - simpleEventPluginEvents[i$jscomp$inline_1630], - domEventName$jscomp$inline_1632 = - eventName$jscomp$inline_1631.toLowerCase(), - capitalizedEvent$jscomp$inline_1633 = - eventName$jscomp$inline_1631[0].toUpperCase() + - eventName$jscomp$inline_1631.slice(1); + var eventName$jscomp$inline_1625 = + simpleEventPluginEvents[i$jscomp$inline_1624], + domEventName$jscomp$inline_1626 = + eventName$jscomp$inline_1625.toLowerCase(), + capitalizedEvent$jscomp$inline_1627 = + eventName$jscomp$inline_1625[0].toUpperCase() + + eventName$jscomp$inline_1625.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1632, - "on" + capitalizedEvent$jscomp$inline_1633 + domEventName$jscomp$inline_1626, + "on" + capitalizedEvent$jscomp$inline_1627 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15674,14 +15680,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$248 in nextProps) { + var propKey = nextProps[propKey$248]; + lastProp = lastProps[propKey$248]; if ( - nextProps.hasOwnProperty(propKey$249) && + nextProps.hasOwnProperty(propKey$248) && (null != propKey || null != lastProp) ) - switch (propKey$249) { + switch (propKey$248) { case "type": type = propKey; break; @@ -15710,7 +15716,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$249, + propKey$248, propKey, nextProps, lastProp @@ -15729,7 +15735,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$249 = null; + propKey = value = defaultValue = propKey$248 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15760,7 +15766,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$249 = type; + propKey$248 = type; break; case "defaultValue": defaultValue = type; @@ -15781,15 +15787,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$249 - ? updateOptions(domElement, !!lastProps, propKey$249, !1) + null != propKey$248 + ? updateOptions(domElement, !!lastProps, propKey$248, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$249 = null; + propKey = propKey$248 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15813,7 +15819,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$249 = name; + propKey$248 = name; break; case "defaultValue": propKey = name; @@ -15827,17 +15833,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$249, propKey); + updateTextarea(domElement, propKey$248, propKey); return; case "option": - for (var propKey$265 in lastProps) + for (var propKey$264 in lastProps) if ( - ((propKey$249 = lastProps[propKey$265]), - lastProps.hasOwnProperty(propKey$265) && - null != propKey$249 && - !nextProps.hasOwnProperty(propKey$265)) + ((propKey$248 = lastProps[propKey$264]), + lastProps.hasOwnProperty(propKey$264) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$264)) ) - switch (propKey$265) { + switch (propKey$264) { case "selected": domElement.selected = !1; break; @@ -15845,33 +15851,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$265, + propKey$264, null, nextProps, - propKey$249 + propKey$248 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$249 = nextProps[lastDefaultValue]), + ((propKey$248 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$249 && - "function" !== typeof propKey$249 && - "symbol" !== typeof propKey$249; + propKey$248 && + "function" !== typeof propKey$248 && + "symbol" !== typeof propKey$248; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$249, + propKey$248, nextProps, propKey ); @@ -15892,24 +15898,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$269 in lastProps) + (propKey$248 = lastProps[propKey$269]), + lastProps.hasOwnProperty(propKey$269) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$269) && + setProp(domElement, tag, propKey$269, null, nextProps, propKey$248); for (checked in nextProps) if ( - ((propKey$249 = nextProps[checked]), + ((propKey$248 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$249 !== propKey && - (null != propKey$249 || null != propKey)) + propKey$248 !== propKey && + (null != propKey$248 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$249) + if (null != propKey$248) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15917,7 +15923,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$249, + propKey$248, nextProps, propKey ); @@ -15925,49 +15931,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$274 in lastProps) + (propKey$248 = lastProps[propKey$274]), + lastProps.hasOwnProperty(propKey$274) && + void 0 !== propKey$248 && + !nextProps.hasOwnProperty(propKey$274) && setPropOnCustomElement( domElement, tag, - propKey$275, + propKey$274, void 0, nextProps, - propKey$249 + propKey$248 ); for (defaultChecked in nextProps) - (propKey$249 = nextProps[defaultChecked]), + (propKey$248 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$249 === propKey || - (void 0 === propKey$249 && void 0 === propKey) || + propKey$248 === propKey || + (void 0 === propKey$248 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$249, + propKey$248, 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$279 in lastProps) + (propKey$248 = lastProps[propKey$279]), + lastProps.hasOwnProperty(propKey$279) && + null != propKey$248 && + !nextProps.hasOwnProperty(propKey$279) && + setProp(domElement, tag, propKey$279, null, nextProps, propKey$248); for (lastProp in nextProps) - (propKey$249 = nextProps[lastProp]), + (propKey$248 = 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$248 === propKey || + (null == propKey$248 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$248, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16281,8 +16287,9 @@ Internals.d = { }; function requestFormReset(form) { var formInst = getInstanceFromNode(form); - (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || - previousDispatcher.r(form); + null !== formInst && 5 === formInst.tag && "form" === formInst.type + ? requestFormReset$1(formInst) + : previousDispatcher.r(form); } var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { @@ -16545,17 +16552,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$288 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$289 = styles$288.get(type); - resource$289 || + var styles$287 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$288 = styles$287.get(type); + resource$288 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$289 = { + (resource$288 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$288.set(type, resource$289), + styles$287.set(type, resource$288), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16570,9 +16577,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$289.state + resource$288.state )); - return resource$289; + return resource$288; } return null; case "script": @@ -16668,37 +16675,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$293 = hoistableRoot.querySelector( + var instance$292 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$293) + if (instance$292) return ( (resource.state.loading |= 4), - (resource.instance = instance$293), - markNodeAsHoistable(instance$293), - instance$293 + (resource.instance = instance$292), + markNodeAsHoistable(instance$292), + instance$292 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$293 = ( + instance$292 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$293); - var linkInstance = instance$293; + markNodeAsHoistable(instance$292); + var linkInstance = instance$292; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$293, "link", instance); + setInitialProperties(instance$292, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$293, props.precedence, hoistableRoot); - return (resource.instance = instance$293); + insertStylesheet(instance$292, props.precedence, hoistableRoot); + return (resource.instance = instance$292); case "script": - instance$293 = getScriptKey(props.src); + instance$292 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$293) + getScriptSelectorFromKey(instance$292) )) ) return ( @@ -16707,7 +16714,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$293))) + if ((styleProps = preloadPropsMap.get(instance$292))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17757,10 +17764,10 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1821 = { +var devToolsConfig$jscomp$inline_1815 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-ee61b9a0", + version: "19.0.0-www-classic-3d57a178", rendererPackageName: "react-dom" }; (function (internals) { @@ -17778,10 +17785,10 @@ var devToolsConfig$jscomp$inline_1821 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1821.bundleType, - version: devToolsConfig$jscomp$inline_1821.version, - rendererPackageName: devToolsConfig$jscomp$inline_1821.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1821.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1815.bundleType, + version: devToolsConfig$jscomp$inline_1815.version, + rendererPackageName: devToolsConfig$jscomp$inline_1815.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1815.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17797,14 +17804,14 @@ var devToolsConfig$jscomp$inline_1821 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1821.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1815.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-ee61b9a0" + reconcilerVersion: "19.0.0-www-classic-3d57a178" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17839,11 +17846,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$314); + var instance = getPublicRootInstance(root$313); originalCallback.call(instance); }; } - var root$314 = createHydrationContainer( + var root$313 = createHydrationContainer( initialChildren, callback, container, @@ -17858,23 +17865,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$314; - container[internalContainerInstanceKey] = root$314.current; + container._reactRootContainer = root$313; + container[internalContainerInstanceKey] = root$313.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork(); - return root$314; + return root$313; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$315 = callback; + var originalCallback$314 = callback; callback = function () { - var instance = getPublicRootInstance(root$316); - originalCallback$315.call(instance); + var instance = getPublicRootInstance(root$315); + originalCallback$314.call(instance); }; } - var root$316 = createFiberRoot( + var root$315 = createFiberRoot( container, 0, !1, @@ -17889,14 +17896,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$316; - container[internalContainerInstanceKey] = root$316.current; + container._reactRootContainer = root$315; + container[internalContainerInstanceKey] = root$315.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$316, parentComponent, callback); + updateContainerSync(initialChildren, root$315, parentComponent, callback); flushSyncWork(); - return root$316; + return root$315; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -18257,7 +18264,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-ee61b9a0"; +exports.version = "19.0.0-www-classic-3d57a178"; "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 2856cf95b8b45..450b2a32dca10 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -2179,19 +2179,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$317; + var JSCompiler_inline_result$jscomp$316; if (canUseDOM) { - var isSupported$jscomp$inline_449 = "oninput" in document; - if (!isSupported$jscomp$inline_449) { - var element$jscomp$inline_450 = document.createElement("div"); - element$jscomp$inline_450.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_449 = - "function" === typeof element$jscomp$inline_450.oninput; + var isSupported$jscomp$inline_448 = "oninput" in document; + if (!isSupported$jscomp$inline_448) { + var element$jscomp$inline_449 = document.createElement("div"); + element$jscomp$inline_449.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_448 = + "function" === typeof element$jscomp$inline_449.oninput; } - JSCompiler_inline_result$jscomp$317 = isSupported$jscomp$inline_449; - } else JSCompiler_inline_result$jscomp$317 = !1; + JSCompiler_inline_result$jscomp$316 = isSupported$jscomp$inline_448; + } else JSCompiler_inline_result$jscomp$316 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$317 && + JSCompiler_inline_result$jscomp$316 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -2624,19 +2624,19 @@ for ( } console.error(error); }, - i$jscomp$inline_490 = 0; - i$jscomp$inline_490 < simpleEventPluginEvents.length; - i$jscomp$inline_490++ + i$jscomp$inline_489 = 0; + i$jscomp$inline_489 < simpleEventPluginEvents.length; + i$jscomp$inline_489++ ) { - var eventName$jscomp$inline_491 = - simpleEventPluginEvents[i$jscomp$inline_490], - domEventName$jscomp$inline_492 = eventName$jscomp$inline_491.toLowerCase(), - capitalizedEvent$jscomp$inline_493 = - eventName$jscomp$inline_491[0].toUpperCase() + - eventName$jscomp$inline_491.slice(1); + var eventName$jscomp$inline_490 = + simpleEventPluginEvents[i$jscomp$inline_489], + domEventName$jscomp$inline_491 = eventName$jscomp$inline_490.toLowerCase(), + capitalizedEvent$jscomp$inline_492 = + eventName$jscomp$inline_490[0].toUpperCase() + + eventName$jscomp$inline_490.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_492, - "on" + capitalizedEvent$jscomp$inline_493 + domEventName$jscomp$inline_491, + "on" + capitalizedEvent$jscomp$inline_492 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -6860,52 +6860,58 @@ function startTransition( } function startHostTransition(formFiber, pendingState, callback, formData) { if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476)); - if (null === formFiber.memoizedState) { - var newQueue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: sharedNotPendingObject - }; - var queue = newQueue; - newQueue = { - memoizedState: sharedNotPendingObject, - baseState: sharedNotPendingObject, - baseQueue: null, - queue: newQueue, - next: null - }; - var initialResetState = {}; - newQueue.next = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }, - next: null - }; - formFiber.memoizedState = newQueue; - initialResetState = formFiber.alternate; - null !== initialResetState && (initialResetState.memoizedState = newQueue); - } else queue = formFiber.memoizedState.queue; + var queue = ensureFormComponentIsStateful(formFiber).queue; startTransition( formFiber, queue, pendingState, sharedNotPendingObject, function () { - requestCurrentTransition(); - dispatchSetState(formFiber, formFiber.memoizedState.next.queue, {}); + requestFormReset$1(formFiber); return callback(formData); } ); } +function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + if (null !== existingStateHook) return existingStateHook; + existingStateHook = { + memoizedState: sharedNotPendingObject, + baseState: sharedNotPendingObject, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: sharedNotPendingObject + }, + next: null + }; + var initialResetState = {}; + existingStateHook.next = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }, + next: null + }; + formFiber.memoizedState = existingStateHook; + formFiber = formFiber.alternate; + null !== formFiber && (formFiber.memoizedState = existingStateHook); + return existingStateHook; +} +function requestFormReset$1(formFiber) { + requestCurrentTransition(); + var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetState(formFiber, resetStateQueue, {}); +} function useHostTransitionStatus() { var status = readContext(HostTransitionContext); return null !== status ? status : sharedNotPendingObject; @@ -6923,14 +6929,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$123 = enqueueUpdate(provider, fiber, lane); - null !== root$123 && - (scheduleUpdateOnFiber(root$123, provider, lane), - entangleTransitions(root$123, provider, lane)); + var root$122 = enqueueUpdate(provider, fiber, lane); + null !== root$122 && + (scheduleUpdateOnFiber(root$122, provider, lane), + entangleTransitions(root$122, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$123 && + null !== root$122 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -7449,9 +7455,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$129) { + } catch (e$128) { setTimeout(function () { - throw e$129; + throw e$128; }); } } @@ -7462,9 +7468,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$130) { + } catch (e$129) { setTimeout(function () { - throw e$130; + throw e$129; }); } } @@ -10116,9 +10122,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps, baseProps)); - for (var propName$181 in Component) - void 0 === newProps[propName$181] && - (newProps[propName$181] = Component[propName$181]); + for (var propName$180 in Component) + void 0 === newProps[propName$180] && + (newProps[propName$180] = Component[propName$180]); } return newProps; } @@ -10205,8 +10211,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$182) { - captureCommitPhaseError(current, nearestMountedAncestor, error$182); + } catch (error$181) { + captureCommitPhaseError(current, nearestMountedAncestor, error$181); } else ref.current = null; } @@ -10514,11 +10520,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$184 = commitTime, + var commitTime$183 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$184); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$183); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -10545,8 +10551,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$186) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$186); + } catch (error$185) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$185); } } function commitClassCallbacks(finishedWork) { @@ -10645,11 +10651,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$187) { + } catch (error$186) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$187 + error$186 ); } else { @@ -10667,11 +10673,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$188) { + } catch (error$187) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$188 + error$187 ); } recordLayoutEffectDuration(finishedWork); @@ -10682,11 +10688,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$189) { + } catch (error$188) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$189 + error$188 ); } } @@ -11381,22 +11387,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$204) { + } catch (error$203) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$204 + error$203 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$205) { + } catch (error$204) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$205 + error$204 ); } } @@ -11571,11 +11577,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$206) { + } catch (error$205) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$206 + error$205 ); } } @@ -11613,8 +11619,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$207) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$207); + } catch (error$206) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$206); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -11625,8 +11631,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$210) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$210); + } catch (error$209) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$209); } } flags & 1024 && (needsFormReset = !0); @@ -11641,8 +11647,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$211) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$211); + } catch (error$210) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$210); } } break; @@ -11656,8 +11662,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$212) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$212); + } catch (error$211) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$211); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -11689,8 +11695,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$214) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$214); + } catch (error$213) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$213); } flags = finishedWork.updateQueue; null !== flags && @@ -11765,11 +11771,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$194) { + } catch (error$193) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$194 + error$193 ); } } else if ( @@ -11844,21 +11850,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$195 = JSCompiler_inline_result.stateNode; + var parent$194 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$195, ""), + (setTextContent(parent$194, ""), (JSCompiler_inline_result.flags &= -33)); - var before$196 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$196, parent$195); + var before$195 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$195, parent$194); break; case 3: case 4: - var parent$197 = JSCompiler_inline_result.stateNode.containerInfo, - before$198 = getHostSibling(finishedWork); + var parent$196 = JSCompiler_inline_result.stateNode.containerInfo, + before$197 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$198, - parent$197 + before$197, + parent$196 ); break; default: @@ -12059,8 +12065,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$217) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$217); + } catch (error$216) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$216); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -12351,9 +12357,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$222 = finishedWork.stateNode; + var instance$221 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$222._visibility & 4 + ? instance$221._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12365,7 +12371,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$222._visibility |= 4), + : ((instance$221._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12378,7 +12384,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$222 + instance$221 ); break; case 24: @@ -13153,14 +13159,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$231 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$231 = lastTailNode), + for (var lastTailNode$230 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$230 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$231 + null === lastTailNode$230 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$231.sibling = null); + : (lastTailNode$230.sibling = null); } } function bubbleProperties(completedWork) { @@ -13172,53 +13178,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$233 = completedWork.selfBaseDuration, - child$234 = completedWork.child; - null !== child$234; + var treeBaseDuration$232 = completedWork.selfBaseDuration, + child$233 = completedWork.child; + null !== child$233; ) - (newChildLanes |= child$234.lanes | child$234.childLanes), - (subtreeFlags |= child$234.subtreeFlags & 31457280), - (subtreeFlags |= child$234.flags & 31457280), - (treeBaseDuration$233 += child$234.treeBaseDuration), - (child$234 = child$234.sibling); - completedWork.treeBaseDuration = treeBaseDuration$233; + (newChildLanes |= child$233.lanes | child$233.childLanes), + (subtreeFlags |= child$233.subtreeFlags & 31457280), + (subtreeFlags |= child$233.flags & 31457280), + (treeBaseDuration$232 += child$233.treeBaseDuration), + (child$233 = child$233.sibling); + completedWork.treeBaseDuration = treeBaseDuration$232; } else for ( - treeBaseDuration$233 = completedWork.child; - null !== treeBaseDuration$233; + treeBaseDuration$232 = completedWork.child; + null !== treeBaseDuration$232; ) (newChildLanes |= - treeBaseDuration$233.lanes | treeBaseDuration$233.childLanes), - (subtreeFlags |= treeBaseDuration$233.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$233.flags & 31457280), - (treeBaseDuration$233.return = completedWork), - (treeBaseDuration$233 = treeBaseDuration$233.sibling); + treeBaseDuration$232.lanes | treeBaseDuration$232.childLanes), + (subtreeFlags |= treeBaseDuration$232.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$232.flags & 31457280), + (treeBaseDuration$232.return = completedWork), + (treeBaseDuration$232 = treeBaseDuration$232.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$233 = completedWork.actualDuration; - child$234 = completedWork.selfBaseDuration; + treeBaseDuration$232 = completedWork.actualDuration; + child$233 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$233 += child.actualDuration), - (child$234 += child.treeBaseDuration), + (treeBaseDuration$232 += child.actualDuration), + (child$233 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$233; - completedWork.treeBaseDuration = child$234; + completedWork.actualDuration = treeBaseDuration$232; + completedWork.treeBaseDuration = child$233; } else for ( - treeBaseDuration$233 = completedWork.child; - null !== treeBaseDuration$233; + treeBaseDuration$232 = completedWork.child; + null !== treeBaseDuration$232; ) (newChildLanes |= - treeBaseDuration$233.lanes | treeBaseDuration$233.childLanes), - (subtreeFlags |= treeBaseDuration$233.subtreeFlags), - (subtreeFlags |= treeBaseDuration$233.flags), - (treeBaseDuration$233.return = completedWork), - (treeBaseDuration$233 = treeBaseDuration$233.sibling); + treeBaseDuration$232.lanes | treeBaseDuration$232.childLanes), + (subtreeFlags |= treeBaseDuration$232.subtreeFlags), + (subtreeFlags |= treeBaseDuration$232.flags), + (treeBaseDuration$232.return = completedWork), + (treeBaseDuration$232 = treeBaseDuration$232.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -13545,11 +13551,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$249 = null; + var cache$248 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$249 = newProps.memoizedState.cachePool.pool); - cache$249 !== currentResource && (newProps.flags |= 2048); + (cache$248 = newProps.memoizedState.cachePool.pool); + cache$248 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -13589,8 +13595,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$249 = currentResource.rendering; - if (null === cache$249) + cache$248 = currentResource.rendering; + if (null === cache$248) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -13598,11 +13604,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$249 = findFirstSuspended(current); - if (null !== cache$249) { + cache$248 = findFirstSuspended(current); + if (null !== cache$248) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$249.updateQueue; + current = cache$248.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -13627,7 +13633,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$249)), null !== current)) { + if (((current = findFirstSuspended(cache$248)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -13637,7 +13643,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$249.alternate && + !cache$248.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -13650,13 +13656,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$249.sibling = workInProgress.child), - (workInProgress.child = cache$249)) + ? ((cache$248.sibling = workInProgress.child), + (workInProgress.child = cache$248)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$249) - : (workInProgress.child = cache$249), - (currentResource.last = cache$249)); + ? (current.sibling = cache$248) + : (workInProgress.child = cache$248), + (currentResource.last = cache$248)); } if (null !== currentResource.tail) return ( @@ -14558,8 +14564,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$266) { - handleThrow(root, thrownValue$266); + } catch (thrownValue$265) { + handleThrow(root, thrownValue$265); } while (1); lanes && root.shellSuspendCounter++; @@ -14675,8 +14681,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$268) { - handleThrow(root, thrownValue$268); + } catch (thrownValue$267) { + handleThrow(root, thrownValue$267); } while (1); resetContextDependencies(); @@ -14935,13 +14941,13 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactSharedInternals.owner = null; - var shouldFireAfterActiveInstanceBlur$272 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$271 = commitBeforeMutationEffects( root, finishedWork ); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$272 && + shouldFireAfterActiveInstanceBlur$271 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -15024,7 +15030,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$273 = rootWithPendingPassiveEffects, + var root$272 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -15039,7 +15045,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$273, remainingLanes); + releaseRootPooledCache(root$272, remainingLanes); } } return !1; @@ -15548,8 +15554,9 @@ function flushSyncWork() { } function requestFormReset(form) { var formInst = getInstanceFromNode$1(form); - (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || - previousDispatcher.r(form); + null !== formInst && 5 === formInst.tag && "form" === formInst.type + ? requestFormReset$1(formInst) + : previousDispatcher.r(form); } var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { @@ -15812,17 +15819,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$278 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$279 = styles$278.get(type); - resource$279 || + var styles$277 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$278 = styles$277.get(type); + resource$278 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$279 = { + (resource$278 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$278.set(type, resource$279), + styles$277.set(type, resource$278), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -15837,9 +15844,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$279.state + resource$278.state )); - return resource$279; + return resource$278; } return null; case "script": @@ -15935,37 +15942,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$283 = hoistableRoot.querySelector( + var instance$282 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$283) + if (instance$282) return ( (resource.state.loading |= 4), - (resource.instance = instance$283), - markNodeAsHoistable(instance$283), - instance$283 + (resource.instance = instance$282), + markNodeAsHoistable(instance$282), + instance$282 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$283 = ( + instance$282 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$283); - var linkInstance = instance$283; + markNodeAsHoistable(instance$282); + var linkInstance = instance$282; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$283, "link", instance); + setInitialProperties(instance$282, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$283, props.precedence, hoistableRoot); - return (resource.instance = instance$283); + insertStylesheet(instance$282, props.precedence, hoistableRoot); + return (resource.instance = instance$282); case "script": - instance$283 = getScriptKey(props.src); + instance$282 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$283) + getScriptSelectorFromKey(instance$282) )) ) return ( @@ -15974,7 +15981,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$283))) + if ((styleProps = preloadPropsMap.get(instance$282))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17102,10 +17109,10 @@ Internals.Events = [ restoreStateIfNeeded, unstable_batchedUpdates ]; -var devToolsConfig$jscomp$inline_1814 = { +var devToolsConfig$jscomp$inline_1808 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-e3932806", + version: "19.0.0-www-modern-4e6d77ed", rendererPackageName: "react-dom" }; (function (internals) { @@ -17123,10 +17130,10 @@ var devToolsConfig$jscomp$inline_1814 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1814.bundleType, - version: devToolsConfig$jscomp$inline_1814.version, - rendererPackageName: devToolsConfig$jscomp$inline_1814.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1814.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1808.bundleType, + version: devToolsConfig$jscomp$inline_1808.version, + rendererPackageName: devToolsConfig$jscomp$inline_1808.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1808.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17142,14 +17149,14 @@ var devToolsConfig$jscomp$inline_1814 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1814.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1808.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-e3932806" + reconcilerVersion: "19.0.0-www-modern-4e6d77ed" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17444,7 +17451,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-e3932806"; +exports.version = "19.0.0-www-modern-4e6d77ed"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 48dfe519ef673..5771ab2b54e37 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -15977,68 +15977,8 @@ if (__DEV__) { ); } - var queue; - - if (formFiber.memoizedState === null) { - // Upgrade this host component fiber to be stateful. We're going to pretend - // it was stateful all along so we can reuse most of the implementation - // for function components and useTransition. - // - // Create the state hook used by TransitionAwareHostComponent. This is - // essentially an inlined version of mountState. - var newQueue = { - pending: null, - lanes: NoLanes, - // We're going to cheat and intentionally not create a bound dispatch - // method, because we can call it directly in startTransition. - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: NotPendingTransition - }; - queue = newQueue; - var stateHook = { - memoizedState: NotPendingTransition, - baseState: NotPendingTransition, - baseQueue: null, - queue: newQueue, - next: null - }; // We use another state hook to track whether the form needs to be reset. - // The state is an empty object. To trigger a reset, we update the state - // to a new object. Then during rendering, we detect that the state has - // changed and schedule a commit effect. - - var initialResetState = {}; - var newResetStateQueue = { - pending: null, - lanes: NoLanes, - // We're going to cheat and intentionally not create a bound dispatch - // method, because we can call it directly in startTransition. - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }; - var resetStateHook = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: newResetStateQueue, - next: null - }; - stateHook.next = resetStateHook; // Add the hook list to both fiber alternates. The idea is that the fiber - // had this hook all along. - - formFiber.memoizedState = stateHook; - var alternate = formFiber.alternate; - - if (alternate !== null) { - alternate.memoizedState = stateHook; - } - } else { - // This fiber was already upgraded to be stateful. - var _stateHook = formFiber.memoizedState; - queue = _stateHook.queue; - } - + var stateHook = ensureFormComponentIsStateful(formFiber); + var queue = stateHook.queue; startTransition( formFiber, queue, @@ -16047,13 +15987,76 @@ if (__DEV__) { // once more of this function is implemented. function () { // Automatically reset the form when the action completes. - requestFormResetImpl(formFiber); + requestFormReset$2(formFiber); return callback(formData); } ); } - function requestFormResetImpl(formFiber) { + function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + + if (existingStateHook !== null) { + // This fiber was already upgraded to be stateful. + return existingStateHook; + } // Upgrade this host component fiber to be stateful. We're going to pretend + // it was stateful all along so we can reuse most of the implementation + // for function components and useTransition. + // + // Create the state hook used by TransitionAwareHostComponent. This is + // essentially an inlined version of mountState. + + var newQueue = { + pending: null, + lanes: NoLanes, + // We're going to cheat and intentionally not create a bound dispatch + // method, because we can call it directly in startTransition. + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: NotPendingTransition + }; + var stateHook = { + memoizedState: NotPendingTransition, + baseState: NotPendingTransition, + baseQueue: null, + queue: newQueue, + next: null + }; // We use another state hook to track whether the form needs to be reset. + // The state is an empty object. To trigger a reset, we update the state + // to a new object. Then during rendering, we detect that the state has + // changed and schedule a commit effect. + + var initialResetState = {}; + var newResetStateQueue = { + pending: null, + lanes: NoLanes, + // We're going to cheat and intentionally not create a bound dispatch + // method, because we can call it directly in startTransition. + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }; + var resetStateHook = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: newResetStateQueue, + next: null + }; + stateHook.next = resetStateHook; // Add the hook list to both fiber alternates. The idea is that the fiber + // had this hook all along. + + formFiber.memoizedState = stateHook; + var alternate = formFiber.alternate; + + if (alternate !== null) { + alternate.memoizedState = stateHook; + } + + return stateHook; + } + + function requestFormReset$2(formFiber) { var transition = requestCurrentTransition(); { @@ -16074,8 +16077,9 @@ if (__DEV__) { } } + var stateHook = ensureFormComponentIsStateful(formFiber); var newResetState = {}; - var resetStateHook = formFiber.memoizedState.next; + var resetStateHook = stateHook.next; var resetStateQueue = resetStateHook.queue; dispatchSetState(formFiber, resetStateQueue, newResetState); } @@ -36842,7 +36846,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-ca4f5be1"; + var ReactVersion = "19.0.0-www-classic-e5ad100e"; function createPortal$1( children, @@ -46456,8 +46460,9 @@ if (__DEV__) { formInst !== null && formInst.tag === HostComponent && formInst.type === "form" - ); - else { + ) { + requestFormReset$2(formInst); + } else { // This form was either not rendered by this React renderer (or it's an // invalid type). Try the next one. // diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index eebef735a717b..4fc8d5646a7fc 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -23529,68 +23529,8 @@ if (__DEV__) { ); } - var queue; - - if (formFiber.memoizedState === null) { - // Upgrade this host component fiber to be stateful. We're going to pretend - // it was stateful all along so we can reuse most of the implementation - // for function components and useTransition. - // - // Create the state hook used by TransitionAwareHostComponent. This is - // essentially an inlined version of mountState. - var newQueue = { - pending: null, - lanes: NoLanes, - // We're going to cheat and intentionally not create a bound dispatch - // method, because we can call it directly in startTransition. - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: NotPendingTransition - }; - queue = newQueue; - var stateHook = { - memoizedState: NotPendingTransition, - baseState: NotPendingTransition, - baseQueue: null, - queue: newQueue, - next: null - }; // We use another state hook to track whether the form needs to be reset. - // The state is an empty object. To trigger a reset, we update the state - // to a new object. Then during rendering, we detect that the state has - // changed and schedule a commit effect. - - var initialResetState = {}; - var newResetStateQueue = { - pending: null, - lanes: NoLanes, - // We're going to cheat and intentionally not create a bound dispatch - // method, because we can call it directly in startTransition. - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }; - var resetStateHook = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: newResetStateQueue, - next: null - }; - stateHook.next = resetStateHook; // Add the hook list to both fiber alternates. The idea is that the fiber - // had this hook all along. - - formFiber.memoizedState = stateHook; - var alternate = formFiber.alternate; - - if (alternate !== null) { - alternate.memoizedState = stateHook; - } - } else { - // This fiber was already upgraded to be stateful. - var _stateHook = formFiber.memoizedState; - queue = _stateHook.queue; - } - + var stateHook = ensureFormComponentIsStateful(formFiber); + var queue = stateHook.queue; startTransition( formFiber, queue, @@ -23599,13 +23539,76 @@ if (__DEV__) { // once more of this function is implemented. function () { // Automatically reset the form when the action completes. - requestFormResetImpl(formFiber); + requestFormReset$2(formFiber); return callback(formData); } ); } - function requestFormResetImpl(formFiber) { + function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + + if (existingStateHook !== null) { + // This fiber was already upgraded to be stateful. + return existingStateHook; + } // Upgrade this host component fiber to be stateful. We're going to pretend + // it was stateful all along so we can reuse most of the implementation + // for function components and useTransition. + // + // Create the state hook used by TransitionAwareHostComponent. This is + // essentially an inlined version of mountState. + + var newQueue = { + pending: null, + lanes: NoLanes, + // We're going to cheat and intentionally not create a bound dispatch + // method, because we can call it directly in startTransition. + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: NotPendingTransition + }; + var stateHook = { + memoizedState: NotPendingTransition, + baseState: NotPendingTransition, + baseQueue: null, + queue: newQueue, + next: null + }; // We use another state hook to track whether the form needs to be reset. + // The state is an empty object. To trigger a reset, we update the state + // to a new object. Then during rendering, we detect that the state has + // changed and schedule a commit effect. + + var initialResetState = {}; + var newResetStateQueue = { + pending: null, + lanes: NoLanes, + // We're going to cheat and intentionally not create a bound dispatch + // method, because we can call it directly in startTransition. + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }; + var resetStateHook = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: newResetStateQueue, + next: null + }; + stateHook.next = resetStateHook; // Add the hook list to both fiber alternates. The idea is that the fiber + // had this hook all along. + + formFiber.memoizedState = stateHook; + var alternate = formFiber.alternate; + + if (alternate !== null) { + alternate.memoizedState = stateHook; + } + + return stateHook; + } + + function requestFormReset$2(formFiber) { var transition = requestCurrentTransition(); { @@ -23626,8 +23629,9 @@ if (__DEV__) { } } + var stateHook = ensureFormComponentIsStateful(formFiber); var newResetState = {}; - var resetStateHook = formFiber.memoizedState.next; + var resetStateHook = stateHook.next; var resetStateQueue = resetStateHook.queue; dispatchSetState(formFiber, resetStateQueue, newResetState); } @@ -44777,8 +44781,9 @@ if (__DEV__) { formInst !== null && formInst.tag === HostComponent && formInst.type === "form" - ); - else { + ) { + requestFormReset$2(formInst); + } else { // This form was either not rendered by this React renderer (or it's an // invalid type). Try the next one. // @@ -46489,7 +46494,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-fc98b3e6"; + var ReactVersion = "19.0.0-www-modern-fe6ae4fa"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 8491a7df66403..97e2e37f79447 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -4205,52 +4205,58 @@ function startTransition( } function startHostTransition(formFiber, pendingState, callback, formData) { if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476)); - if (null === formFiber.memoizedState) { - var newQueue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: sharedNotPendingObject - }; - var queue = newQueue; - newQueue = { - memoizedState: sharedNotPendingObject, - baseState: sharedNotPendingObject, - baseQueue: null, - queue: newQueue, - next: null - }; - var initialResetState = {}; - newQueue.next = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }, - next: null - }; - formFiber.memoizedState = newQueue; - initialResetState = formFiber.alternate; - null !== initialResetState && (initialResetState.memoizedState = newQueue); - } else queue = formFiber.memoizedState.queue; + var queue = ensureFormComponentIsStateful(formFiber).queue; startTransition( formFiber, queue, pendingState, sharedNotPendingObject, function () { - requestCurrentTransition(); - dispatchSetState(formFiber, formFiber.memoizedState.next.queue, {}); + requestFormReset$1(formFiber); return callback(formData); } ); } +function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + if (null !== existingStateHook) return existingStateHook; + existingStateHook = { + memoizedState: sharedNotPendingObject, + baseState: sharedNotPendingObject, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: sharedNotPendingObject + }, + next: null + }; + var initialResetState = {}; + existingStateHook.next = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }, + next: null + }; + formFiber.memoizedState = existingStateHook; + formFiber = formFiber.alternate; + null !== formFiber && (formFiber.memoizedState = existingStateHook); + return existingStateHook; +} +function requestFormReset$1(formFiber) { + requestCurrentTransition(); + var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetState(formFiber, resetStateQueue, {}); +} function useHostTransitionStatus() { var status = readContext(HostTransitionContext); return null !== status ? status : sharedNotPendingObject; @@ -4268,14 +4274,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$60 = enqueueUpdate(provider, fiber, lane); - null !== root$60 && - (scheduleUpdateOnFiber(root$60, provider, lane), - entangleTransitions(root$60, provider, lane)); + var root$59 = enqueueUpdate(provider, fiber, lane); + null !== root$59 && + (scheduleUpdateOnFiber(root$59, provider, lane), + entangleTransitions(root$59, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$60 && + null !== root$59 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4869,9 +4875,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps, baseProps)); - for (var propName$64 in Component) - void 0 === newProps[propName$64] && - (newProps[propName$64] = Component[propName$64]); + for (var propName$63 in Component) + void 0 === newProps[propName$63] && + (newProps[propName$63] = Component[propName$63]); } return newProps; } @@ -5316,10 +5322,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$76 = workInProgress.stateNode; + root$75 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$76.incompleteTransitions.has(transition)) { + if (!root$75.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5327,11 +5333,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$76.incompleteTransitions.set(transition, markerInstance); + root$75.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$76.incompleteTransitions.forEach(function (markerInstance) { + root$75.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -7774,14 +7780,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$119 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$119 = lastTailNode), + for (var lastTailNode$118 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$118 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$119 + null === lastTailNode$118 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$119.sibling = null); + : (lastTailNode$118.sibling = null); } } function bubbleProperties(completedWork) { @@ -7791,19 +7797,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 31457280), - (subtreeFlags |= child$120.flags & 31457280), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (var child$119 = completedWork.child; null !== child$119; ) + (newChildLanes |= child$119.lanes | child$119.childLanes), + (subtreeFlags |= child$119.subtreeFlags & 31457280), + (subtreeFlags |= child$119.flags & 31457280), + (child$119.return = completedWork), + (child$119 = child$119.sibling); else - for (child$120 = completedWork.child; null !== child$120; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags), - (subtreeFlags |= child$120.flags), - (child$120.return = completedWork), - (child$120 = child$120.sibling); + for (child$119 = completedWork.child; null !== child$119; ) + (newChildLanes |= child$119.lanes | child$119.childLanes), + (subtreeFlags |= child$119.subtreeFlags), + (subtreeFlags |= child$119.flags), + (child$119.return = completedWork), + (child$119 = child$119.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8119,11 +8125,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$132 = null; + var cache$131 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$132 = newProps.memoizedState.cachePool.pool); - cache$132 !== currentResource && (newProps.flags |= 2048); + (cache$131 = newProps.memoizedState.cachePool.pool); + cache$131 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -8164,8 +8170,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$132 = currentResource.rendering; - if (null === cache$132) + cache$131 = currentResource.rendering; + if (null === cache$131) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -8173,11 +8179,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$132 = findFirstSuspended(current); - if (null !== cache$132) { + cache$131 = findFirstSuspended(current); + if (null !== cache$131) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$132.updateQueue; + current = cache$131.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -8202,7 +8208,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$132)), null !== current)) { + if (((current = findFirstSuspended(cache$131)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -8212,7 +8218,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$132.alternate && + !cache$131.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -8225,13 +8231,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$132.sibling = workInProgress.child), - (workInProgress.child = cache$132)) + ? ((cache$131.sibling = workInProgress.child), + (workInProgress.child = cache$131)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$132) - : (workInProgress.child = cache$132), - (currentResource.last = cache$132)); + ? (current.sibling = cache$131) + : (workInProgress.child = cache$131), + (currentResource.last = cache$131)); } if (null !== currentResource.tail) return ( @@ -8506,8 +8512,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$150) { - captureCommitPhaseError(current, nearestMountedAncestor, error$150); + } catch (error$149) { + captureCommitPhaseError(current, nearestMountedAncestor, error$149); } else ref.current = null; } @@ -8544,7 +8550,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$202) { + } catch (e$201) { JSCompiler_temp = null; break a; } @@ -8812,11 +8818,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$152) { + } catch (error$151) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$152 + error$151 ); } } @@ -9494,8 +9500,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } } break; @@ -9669,11 +9675,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$166) { + } catch (error$165) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$166 + error$165 ); } } @@ -9711,8 +9717,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$167) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$167); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -9723,8 +9729,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$170) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$170); + } catch (error$169) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$169); } } flags & 1024 && (needsFormReset = !0); @@ -9739,8 +9745,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$171) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$171); + } catch (error$170) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$170); } } break; @@ -9754,8 +9760,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$172) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$172); + } catch (error$171) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$171); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -9787,8 +9793,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$174) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$174); + } catch (error$173) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$173); } flags = finishedWork.updateQueue; null !== flags && @@ -9866,11 +9872,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$155) { + } catch (error$154) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$155 + error$154 ); } } else if ( @@ -9945,21 +9951,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$156 = JSCompiler_inline_result.stateNode; + var parent$155 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$156, ""), + (setTextContent(parent$155, ""), (JSCompiler_inline_result.flags &= -33)); - var before$157 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$157, parent$156); + var before$156 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$156, parent$155); break; case 3: case 4: - var parent$158 = JSCompiler_inline_result.stateNode.containerInfo, - before$159 = getHostSibling(finishedWork); + var parent$157 = JSCompiler_inline_result.stateNode.containerInfo, + before$158 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$159, - parent$158 + before$158, + parent$157 ); break; default: @@ -10435,9 +10441,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$181 = finishedWork.stateNode; + var instance$180 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$181._visibility & 4 + ? instance$180._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10450,7 +10456,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$181._visibility |= 4), + : ((instance$180._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10458,7 +10464,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$181._visibility |= 4), + : ((instance$180._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10471,7 +10477,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$181 + instance$180 ); break; case 24: @@ -11617,8 +11623,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$190) { - handleThrow(root, thrownValue$190); + } catch (thrownValue$189) { + handleThrow(root, thrownValue$189); } while (1); lanes && root.shellSuspendCounter++; @@ -11723,8 +11729,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$192) { - handleThrow(root, thrownValue$192); + } catch (thrownValue$191) { + handleThrow(root, thrownValue$191); } while (1); resetContextDependencies(); @@ -11953,12 +11959,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactSharedInternals.owner = null; - var shouldFireAfterActiveInstanceBlur$196 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$195 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$196 && + shouldFireAfterActiveInstanceBlur$195 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -12030,7 +12036,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$197 = rootWithPendingPassiveEffects, + var root$196 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -12045,7 +12051,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$197, remainingLanes); + releaseRootPooledCache(root$196, remainingLanes); } } return !1; @@ -12823,7 +12829,7 @@ function injectIntoDevTools(devToolsConfig) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-788f5c6a" + reconcilerVersion: "19.0.0-www-classic-ce1d0055" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -13370,19 +13376,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$354; + var JSCompiler_inline_result$jscomp$353; if (canUseDOM) { - var isSupported$jscomp$inline_1530 = "oninput" in document; - if (!isSupported$jscomp$inline_1530) { - var element$jscomp$inline_1531 = document.createElement("div"); - element$jscomp$inline_1531.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1530 = - "function" === typeof element$jscomp$inline_1531.oninput; + var isSupported$jscomp$inline_1524 = "oninput" in document; + if (!isSupported$jscomp$inline_1524) { + var element$jscomp$inline_1525 = document.createElement("div"); + element$jscomp$inline_1525.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1524 = + "function" === typeof element$jscomp$inline_1525.oninput; } - JSCompiler_inline_result$jscomp$354 = isSupported$jscomp$inline_1530; - } else JSCompiler_inline_result$jscomp$354 = !1; + JSCompiler_inline_result$jscomp$353 = isSupported$jscomp$inline_1524; + } else JSCompiler_inline_result$jscomp$353 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$354 && + JSCompiler_inline_result$jscomp$353 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13760,20 +13766,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1571 = 0; - i$jscomp$inline_1571 < simpleEventPluginEvents.length; - i$jscomp$inline_1571++ + var i$jscomp$inline_1565 = 0; + i$jscomp$inline_1565 < simpleEventPluginEvents.length; + i$jscomp$inline_1565++ ) { - var eventName$jscomp$inline_1572 = - simpleEventPluginEvents[i$jscomp$inline_1571], - domEventName$jscomp$inline_1573 = - eventName$jscomp$inline_1572.toLowerCase(), - capitalizedEvent$jscomp$inline_1574 = - eventName$jscomp$inline_1572[0].toUpperCase() + - eventName$jscomp$inline_1572.slice(1); + var eventName$jscomp$inline_1566 = + simpleEventPluginEvents[i$jscomp$inline_1565], + domEventName$jscomp$inline_1567 = + eventName$jscomp$inline_1566.toLowerCase(), + capitalizedEvent$jscomp$inline_1568 = + eventName$jscomp$inline_1566[0].toUpperCase() + + eventName$jscomp$inline_1566.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1573, - "on" + capitalizedEvent$jscomp$inline_1574 + domEventName$jscomp$inline_1567, + "on" + capitalizedEvent$jscomp$inline_1568 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15242,14 +15248,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$229 in nextProps) { - var propKey = nextProps[propKey$229]; - lastProp = lastProps[propKey$229]; + for (var propKey$228 in nextProps) { + var propKey = nextProps[propKey$228]; + lastProp = lastProps[propKey$228]; if ( - nextProps.hasOwnProperty(propKey$229) && + nextProps.hasOwnProperty(propKey$228) && (null != propKey || null != lastProp) ) - switch (propKey$229) { + switch (propKey$228) { case "type": type = propKey; break; @@ -15278,7 +15284,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$229, + propKey$228, propKey, nextProps, lastProp @@ -15297,7 +15303,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$229 = null; + propKey = value = defaultValue = propKey$228 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15328,7 +15334,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$229 = type; + propKey$228 = type; break; case "defaultValue": defaultValue = type; @@ -15349,15 +15355,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$229 - ? updateOptions(domElement, !!lastProps, propKey$229, !1) + null != propKey$228 + ? updateOptions(domElement, !!lastProps, propKey$228, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$229 = null; + propKey = propKey$228 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15381,7 +15387,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$229 = name; + propKey$228 = name; break; case "defaultValue": propKey = name; @@ -15395,17 +15401,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$229, propKey); + updateTextarea(domElement, propKey$228, propKey); return; case "option": - for (var propKey$245 in lastProps) + for (var propKey$244 in lastProps) if ( - ((propKey$229 = lastProps[propKey$245]), - lastProps.hasOwnProperty(propKey$245) && - null != propKey$229 && - !nextProps.hasOwnProperty(propKey$245)) + ((propKey$228 = lastProps[propKey$244]), + lastProps.hasOwnProperty(propKey$244) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$244)) ) - switch (propKey$245) { + switch (propKey$244) { case "selected": domElement.selected = !1; break; @@ -15413,33 +15419,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$245, + propKey$244, null, nextProps, - propKey$229 + propKey$228 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$229 = nextProps[lastDefaultValue]), + ((propKey$228 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$229 !== propKey && - (null != propKey$229 || null != propKey)) + propKey$228 !== propKey && + (null != propKey$228 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$229 && - "function" !== typeof propKey$229 && - "symbol" !== typeof propKey$229; + propKey$228 && + "function" !== typeof propKey$228 && + "symbol" !== typeof propKey$228; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$229, + propKey$228, nextProps, propKey ); @@ -15460,24 +15466,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$250 in lastProps) - (propKey$229 = lastProps[propKey$250]), - lastProps.hasOwnProperty(propKey$250) && - null != propKey$229 && - !nextProps.hasOwnProperty(propKey$250) && - setProp(domElement, tag, propKey$250, null, nextProps, propKey$229); + for (var propKey$249 in lastProps) + (propKey$228 = lastProps[propKey$249]), + lastProps.hasOwnProperty(propKey$249) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$249) && + setProp(domElement, tag, propKey$249, null, nextProps, propKey$228); for (checked in nextProps) if ( - ((propKey$229 = nextProps[checked]), + ((propKey$228 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$229 !== propKey && - (null != propKey$229 || null != propKey)) + propKey$228 !== propKey && + (null != propKey$228 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$229) + if (null != propKey$228) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15485,7 +15491,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$229, + propKey$228, nextProps, propKey ); @@ -15493,49 +15499,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$255 in lastProps) - (propKey$229 = lastProps[propKey$255]), - lastProps.hasOwnProperty(propKey$255) && - void 0 !== propKey$229 && - !nextProps.hasOwnProperty(propKey$255) && + for (var propKey$254 in lastProps) + (propKey$228 = lastProps[propKey$254]), + lastProps.hasOwnProperty(propKey$254) && + void 0 !== propKey$228 && + !nextProps.hasOwnProperty(propKey$254) && setPropOnCustomElement( domElement, tag, - propKey$255, + propKey$254, void 0, nextProps, - propKey$229 + propKey$228 ); for (defaultChecked in nextProps) - (propKey$229 = nextProps[defaultChecked]), + (propKey$228 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$229 === propKey || - (void 0 === propKey$229 && void 0 === propKey) || + propKey$228 === propKey || + (void 0 === propKey$228 && void 0 === propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$229, + propKey$228, nextProps, propKey ); return; } } - for (var propKey$260 in lastProps) - (propKey$229 = lastProps[propKey$260]), - lastProps.hasOwnProperty(propKey$260) && - null != propKey$229 && - !nextProps.hasOwnProperty(propKey$260) && - setProp(domElement, tag, propKey$260, null, nextProps, propKey$229); + for (var propKey$259 in lastProps) + (propKey$228 = lastProps[propKey$259]), + lastProps.hasOwnProperty(propKey$259) && + null != propKey$228 && + !nextProps.hasOwnProperty(propKey$259) && + setProp(domElement, tag, propKey$259, null, nextProps, propKey$228); for (lastProp in nextProps) - (propKey$229 = nextProps[lastProp]), + (propKey$228 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$229 === propKey || - (null == propKey$229 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$229, nextProps, propKey); + propKey$228 === propKey || + (null == propKey$228 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$228, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15906,8 +15912,9 @@ Internals.d = { }; function requestFormReset(form) { var formInst = getInstanceFromNode(form); - (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || - previousDispatcher.r(form); + null !== formInst && 5 === formInst.tag && "form" === formInst.type + ? requestFormReset$1(formInst) + : previousDispatcher.r(form); } var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { @@ -16170,17 +16177,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$268 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$269 = styles$268.get(type); - resource$269 || + var styles$267 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$268 = styles$267.get(type); + resource$268 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$269 = { + (resource$268 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$268.set(type, resource$269), + styles$267.set(type, resource$268), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16195,9 +16202,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$269.state + resource$268.state )); - return resource$269; + return resource$268; } return null; case "script": @@ -16293,37 +16300,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$273 = hoistableRoot.querySelector( + var instance$272 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$273) + if (instance$272) return ( (resource.state.loading |= 4), - (resource.instance = instance$273), - markNodeAsHoistable(instance$273), - instance$273 + (resource.instance = instance$272), + markNodeAsHoistable(instance$272), + instance$272 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$273 = ( + instance$272 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$273); - var linkInstance = instance$273; + markNodeAsHoistable(instance$272); + var linkInstance = instance$272; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$273, "link", instance); + setInitialProperties(instance$272, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$273, props.precedence, hoistableRoot); - return (resource.instance = instance$273); + insertStylesheet(instance$272, props.precedence, hoistableRoot); + return (resource.instance = instance$272); case "script": - instance$273 = getScriptKey(props.src); + instance$272 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$273) + getScriptSelectorFromKey(instance$272) )) ) return ( @@ -16332,7 +16339,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$273))) + if ((styleProps = preloadPropsMap.get(instance$272))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17385,7 +17392,7 @@ Internals.Events = [ injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-788f5c6a", + version: "19.0.0-www-classic-ce1d0055", rendererPackageName: "react-dom" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17421,11 +17428,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$294); + var instance = getPublicRootInstance(root$293); originalCallback.call(instance); }; } - var root$294 = createHydrationContainer( + var root$293 = createHydrationContainer( initialChildren, callback, container, @@ -17440,23 +17447,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$294; - container[internalContainerInstanceKey] = root$294.current; + container._reactRootContainer = root$293; + container[internalContainerInstanceKey] = root$293.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSyncWork(); - return root$294; + return root$293; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$295 = callback; + var originalCallback$294 = callback; callback = function () { - var instance = getPublicRootInstance(root$296); - originalCallback$295.call(instance); + var instance = getPublicRootInstance(root$295); + originalCallback$294.call(instance); }; } - var root$296 = createFiberRoot( + var root$295 = createFiberRoot( container, 0, !1, @@ -17471,14 +17478,14 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$296; - container[internalContainerInstanceKey] = root$296.current; + container._reactRootContainer = root$295; + container[internalContainerInstanceKey] = root$295.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); - updateContainerSync(initialChildren, root$296, parentComponent, callback); + updateContainerSync(initialChildren, root$295, parentComponent, callback); flushSyncWork(); - return root$296; + return root$295; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17518,7 +17525,7 @@ assign(Internals, { injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-788f5c6a", + version: "19.0.0-www-classic-ce1d0055", rendererPackageName: "react-dom" }); exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = @@ -17985,4 +17992,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-788f5c6a"; +exports.version = "19.0.0-www-classic-ce1d0055"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 1a1c22638aabb..4bfc8c7bb7772 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -2188,19 +2188,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$297; + var JSCompiler_inline_result$jscomp$296; if (canUseDOM) { - var isSupported$jscomp$inline_431 = "oninput" in document; - if (!isSupported$jscomp$inline_431) { - var element$jscomp$inline_432 = document.createElement("div"); - element$jscomp$inline_432.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_431 = - "function" === typeof element$jscomp$inline_432.oninput; + var isSupported$jscomp$inline_430 = "oninput" in document; + if (!isSupported$jscomp$inline_430) { + var element$jscomp$inline_431 = document.createElement("div"); + element$jscomp$inline_431.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_430 = + "function" === typeof element$jscomp$inline_431.oninput; } - JSCompiler_inline_result$jscomp$297 = isSupported$jscomp$inline_431; - } else JSCompiler_inline_result$jscomp$297 = !1; + JSCompiler_inline_result$jscomp$296 = isSupported$jscomp$inline_430; + } else JSCompiler_inline_result$jscomp$296 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$297 && + JSCompiler_inline_result$jscomp$296 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -2633,19 +2633,19 @@ for ( } console.error(error); }, - i$jscomp$inline_472 = 0; - i$jscomp$inline_472 < simpleEventPluginEvents.length; - i$jscomp$inline_472++ + i$jscomp$inline_471 = 0; + i$jscomp$inline_471 < simpleEventPluginEvents.length; + i$jscomp$inline_471++ ) { - var eventName$jscomp$inline_473 = - simpleEventPluginEvents[i$jscomp$inline_472], - domEventName$jscomp$inline_474 = eventName$jscomp$inline_473.toLowerCase(), - capitalizedEvent$jscomp$inline_475 = - eventName$jscomp$inline_473[0].toUpperCase() + - eventName$jscomp$inline_473.slice(1); + var eventName$jscomp$inline_472 = + simpleEventPluginEvents[i$jscomp$inline_471], + domEventName$jscomp$inline_473 = eventName$jscomp$inline_472.toLowerCase(), + capitalizedEvent$jscomp$inline_474 = + eventName$jscomp$inline_472[0].toUpperCase() + + eventName$jscomp$inline_472.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_474, - "on" + capitalizedEvent$jscomp$inline_475 + domEventName$jscomp$inline_473, + "on" + capitalizedEvent$jscomp$inline_474 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -6869,52 +6869,58 @@ function startTransition( } function startHostTransition(formFiber, pendingState, callback, formData) { if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476)); - if (null === formFiber.memoizedState) { - var newQueue = { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: sharedNotPendingObject - }; - var queue = newQueue; - newQueue = { - memoizedState: sharedNotPendingObject, - baseState: sharedNotPendingObject, - baseQueue: null, - queue: newQueue, - next: null - }; - var initialResetState = {}; - newQueue.next = { - memoizedState: initialResetState, - baseState: initialResetState, - baseQueue: null, - queue: { - pending: null, - lanes: 0, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialResetState - }, - next: null - }; - formFiber.memoizedState = newQueue; - initialResetState = formFiber.alternate; - null !== initialResetState && (initialResetState.memoizedState = newQueue); - } else queue = formFiber.memoizedState.queue; + var queue = ensureFormComponentIsStateful(formFiber).queue; startTransition( formFiber, queue, pendingState, sharedNotPendingObject, function () { - requestCurrentTransition(); - dispatchSetState(formFiber, formFiber.memoizedState.next.queue, {}); + requestFormReset$1(formFiber); return callback(formData); } ); } +function ensureFormComponentIsStateful(formFiber) { + var existingStateHook = formFiber.memoizedState; + if (null !== existingStateHook) return existingStateHook; + existingStateHook = { + memoizedState: sharedNotPendingObject, + baseState: sharedNotPendingObject, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: sharedNotPendingObject + }, + next: null + }; + var initialResetState = {}; + existingStateHook.next = { + memoizedState: initialResetState, + baseState: initialResetState, + baseQueue: null, + queue: { + pending: null, + lanes: 0, + dispatch: null, + lastRenderedReducer: basicStateReducer, + lastRenderedState: initialResetState + }, + next: null + }; + formFiber.memoizedState = existingStateHook; + formFiber = formFiber.alternate; + null !== formFiber && (formFiber.memoizedState = existingStateHook); + return existingStateHook; +} +function requestFormReset$1(formFiber) { + requestCurrentTransition(); + var resetStateQueue = ensureFormComponentIsStateful(formFiber).next.queue; + dispatchSetState(formFiber, resetStateQueue, {}); +} function useHostTransitionStatus() { var status = readContext(HostTransitionContext); return null !== status ? status : sharedNotPendingObject; @@ -6932,14 +6938,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(); fiber = createUpdate(lane); - var root$120 = enqueueUpdate(provider, fiber, lane); - null !== root$120 && - (scheduleUpdateOnFiber(root$120, provider, lane), - entangleTransitions(root$120, provider, lane)); + var root$119 = enqueueUpdate(provider, fiber, lane); + null !== root$119 && + (scheduleUpdateOnFiber(root$119, provider, lane), + entangleTransitions(root$119, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$120 && + null !== root$119 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -7393,9 +7399,9 @@ function logUncaughtError(root, errorInfo) { try { var onUncaughtError = root.onUncaughtError; onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack }); - } catch (e$124) { + } catch (e$123) { setTimeout(function () { - throw e$124; + throw e$123; }); } } @@ -7406,9 +7412,9 @@ function logCaughtError(root, boundary, errorInfo) { componentStack: errorInfo.stack, errorBoundary: 1 === boundary.tag ? boundary.stateNode : null }); - } catch (e$125) { + } catch (e$124) { setTimeout(function () { - throw e$125; + throw e$124; }); } } @@ -10030,9 +10036,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps, baseProps)); - for (var propName$175 in Component) - void 0 === newProps[propName$175] && - (newProps[propName$175] = Component[propName$175]); + for (var propName$174 in Component) + void 0 === newProps[propName$174] && + (newProps[propName$174] = Component[propName$174]); } return newProps; } @@ -10090,8 +10096,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$176) { - captureCommitPhaseError(current, nearestMountedAncestor, error$176); + } catch (error$175) { + captureCommitPhaseError(current, nearestMountedAncestor, error$175); } else ref.current = null; } @@ -10409,11 +10415,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$178) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$178 + error$177 ); } } @@ -11080,8 +11086,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$191) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$191); + } catch (error$190) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$190); } } break; @@ -11255,11 +11261,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$192) { + } catch (error$191) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$192 + error$191 ); } } @@ -11297,8 +11303,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$193) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$193); + } catch (error$192) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$192); } } if (flags & 4 && ((root = finishedWork.stateNode), null != root)) { @@ -11309,8 +11315,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(root, maybeNodes, current, hoistableRoot), (root[internalPropsKey] = hoistableRoot); - } catch (error$196) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$196); + } catch (error$195) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$195); } } flags & 1024 && (needsFormReset = !0); @@ -11325,8 +11331,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { current = finishedWork.memoizedProps; try { flags.nodeValue = current; - } catch (error$197) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$197); + } catch (error$196) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$196); } } break; @@ -11340,8 +11346,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$198) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$198); + } catch (error$197) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$197); } needsFormReset && ((needsFormReset = !1), recursivelyResetForms(finishedWork)); @@ -11373,8 +11379,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$200) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$200); + } catch (error$199) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$199); } flags = finishedWork.updateQueue; null !== flags && @@ -11449,11 +11455,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$181) { + } catch (error$180) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$181 + error$180 ); } } else if ( @@ -11528,21 +11534,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$182 = JSCompiler_inline_result.stateNode; + var parent$181 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$182, ""), + (setTextContent(parent$181, ""), (JSCompiler_inline_result.flags &= -33)); - var before$183 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$183, parent$182); + var before$182 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$182, parent$181); break; case 3: case 4: - var parent$184 = JSCompiler_inline_result.stateNode.containerInfo, - before$185 = getHostSibling(finishedWork); + var parent$183 = JSCompiler_inline_result.stateNode.containerInfo, + before$184 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$185, - parent$184 + before$184, + parent$183 ); break; default: @@ -12010,9 +12016,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$207 = finishedWork.stateNode; + var instance$206 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$207._visibility & 4 + ? instance$206._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12024,7 +12030,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$207._visibility |= 4), + : ((instance$206._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -12037,7 +12043,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$207 + instance$206 ); break; case 24: @@ -12781,14 +12787,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$216 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$216 = lastTailNode), + for (var lastTailNode$215 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$215 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$216 + null === lastTailNode$215 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$216.sibling = null); + : (lastTailNode$215.sibling = null); } } function bubbleProperties(completedWork) { @@ -12798,19 +12804,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$217 = completedWork.child; null !== child$217; ) - (newChildLanes |= child$217.lanes | child$217.childLanes), - (subtreeFlags |= child$217.subtreeFlags & 31457280), - (subtreeFlags |= child$217.flags & 31457280), - (child$217.return = completedWork), - (child$217 = child$217.sibling); + for (var child$216 = completedWork.child; null !== child$216; ) + (newChildLanes |= child$216.lanes | child$216.childLanes), + (subtreeFlags |= child$216.subtreeFlags & 31457280), + (subtreeFlags |= child$216.flags & 31457280), + (child$216.return = completedWork), + (child$216 = child$216.sibling); else - for (child$217 = completedWork.child; null !== child$217; ) - (newChildLanes |= child$217.lanes | child$217.childLanes), - (subtreeFlags |= child$217.subtreeFlags), - (subtreeFlags |= child$217.flags), - (child$217.return = completedWork), - (child$217 = child$217.sibling); + for (child$216 = completedWork.child; null !== child$216; ) + (newChildLanes |= child$216.lanes | child$216.childLanes), + (subtreeFlags |= child$216.subtreeFlags), + (subtreeFlags |= child$216.flags), + (child$216.return = completedWork), + (child$216 = child$216.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -13119,11 +13125,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool); - var cache$229 = null; + var cache$228 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$229 = newProps.memoizedState.cachePool.pool); - cache$229 !== currentResource && (newProps.flags |= 2048); + (cache$228 = newProps.memoizedState.cachePool.pool); + cache$228 !== currentResource && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -13158,8 +13164,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$229 = currentResource.rendering; - if (null === cache$229) + cache$228 = currentResource.rendering; + if (null === cache$228) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -13167,11 +13173,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$229 = findFirstSuspended(current); - if (null !== cache$229) { + cache$228 = findFirstSuspended(current); + if (null !== cache$228) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = cache$229.updateQueue; + current = cache$228.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -13196,7 +13202,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$229)), null !== current)) { + if (((current = findFirstSuspended(cache$228)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -13206,7 +13212,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !cache$229.alternate && + !cache$228.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -13219,13 +13225,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((cache$229.sibling = workInProgress.child), - (workInProgress.child = cache$229)) + ? ((cache$228.sibling = workInProgress.child), + (workInProgress.child = cache$228)) : ((current = currentResource.last), null !== current - ? (current.sibling = cache$229) - : (workInProgress.child = cache$229), - (currentResource.last = cache$229)); + ? (current.sibling = cache$228) + : (workInProgress.child = cache$228), + (currentResource.last = cache$228)); } if (null !== currentResource.tail) return ( @@ -14260,8 +14266,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$247) { - handleThrow(root, thrownValue$247); + } catch (thrownValue$246) { + handleThrow(root, thrownValue$246); } while (1); lanes && root.shellSuspendCounter++; @@ -14366,8 +14372,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$249) { - handleThrow(root, thrownValue$249); + } catch (thrownValue$248) { + handleThrow(root, thrownValue$248); } while (1); resetContextDependencies(); @@ -14592,12 +14598,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactSharedInternals.owner = null; - var shouldFireAfterActiveInstanceBlur$253 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$252 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$253 && + shouldFireAfterActiveInstanceBlur$252 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -14667,7 +14673,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$254 = rootWithPendingPassiveEffects, + var root$253 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), @@ -14682,7 +14688,7 @@ function flushPassiveEffects() { } finally { (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition), - releaseRootPooledCache(root$254, remainingLanes); + releaseRootPooledCache(root$253, remainingLanes); } } return !1; @@ -15215,8 +15221,9 @@ function flushSyncWork() { } function requestFormReset(form) { var formInst = getInstanceFromNode$1(form); - (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || - previousDispatcher.r(form); + null !== formInst && 5 === formInst.tag && "form" === formInst.type + ? requestFormReset$1(formInst) + : previousDispatcher.r(form); } var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { @@ -15479,17 +15486,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$259 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$260 = styles$259.get(type); - resource$260 || + var styles$258 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$259 = styles$258.get(type); + resource$259 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$260 = { + (resource$259 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$259.set(type, resource$260), + styles$258.set(type, resource$259), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -15504,9 +15511,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$260.state + resource$259.state )); - return resource$260; + return resource$259; } return null; case "script": @@ -15602,37 +15609,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$264 = hoistableRoot.querySelector( + var instance$263 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$264) + if (instance$263) return ( (resource.state.loading |= 4), - (resource.instance = instance$264), - markNodeAsHoistable(instance$264), - instance$264 + (resource.instance = instance$263), + markNodeAsHoistable(instance$263), + instance$263 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$264 = ( + instance$263 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$264); - var linkInstance = instance$264; + markNodeAsHoistable(instance$263); + var linkInstance = instance$263; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$264, "link", instance); + setInitialProperties(instance$263, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$264, props.precedence, hoistableRoot); - return (resource.instance = instance$264); + insertStylesheet(instance$263, props.precedence, hoistableRoot); + return (resource.instance = instance$263); case "script": - instance$264 = getScriptKey(props.src); + instance$263 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$264) + getScriptSelectorFromKey(instance$263) )) ) return ( @@ -15641,7 +15648,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$264))) + if ((styleProps = preloadPropsMap.get(instance$263))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16108,7 +16115,7 @@ function injectIntoDevTools(devToolsConfig) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-29122695" + reconcilerVersion: "19.0.0-www-modern-854157c3" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -16806,7 +16813,7 @@ Internals.Events = [ injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-29122695", + version: "19.0.0-www-modern-854157c3", rendererPackageName: "react-dom" }); if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) @@ -16814,7 +16821,7 @@ if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-29122695", + version: "19.0.0-www-modern-854157c3", rendererPackageName: "react-dom" }); exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = @@ -17228,4 +17235,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-29122695"; +exports.version = "19.0.0-www-modern-854157c3";