From b45dfdeccbc342f52ed6afde5371909242fed953 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 27 Feb 2024 23:15:49 +0000 Subject: [PATCH] Remove ReactTestUtils from ReactJSXElementValidator (#28335) DiffTrain build for [e7849b50bcefc0742ca342d70284d82cfcf990e5](https://github.com/facebook/react/commit/e7849b50bcefc0742ca342d70284d82cfcf990e5) --- .../facebook-www/JSXDEVRuntime-dev.classic.js | 31 +- .../facebook-www/JSXDEVRuntime-dev.modern.js | 31 +- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/React-dev.classic.js | 93 ++- compiled/facebook-www/React-dev.modern.js | 93 ++- compiled/facebook-www/React-prod.classic.js | 20 +- compiled/facebook-www/React-prod.modern.js | 20 +- .../facebook-www/React-profiling.classic.js | 20 +- .../facebook-www/React-profiling.modern.js | 20 +- compiled/facebook-www/ReactART-dev.classic.js | 116 ++- compiled/facebook-www/ReactART-dev.modern.js | 116 ++- .../facebook-www/ReactART-prod.classic.js | 348 ++++---- compiled/facebook-www/ReactART-prod.modern.js | 329 ++++---- compiled/facebook-www/ReactDOM-dev.classic.js | 116 ++- compiled/facebook-www/ReactDOM-dev.modern.js | 116 ++- .../facebook-www/ReactDOM-prod.classic.js | 698 ++++++++-------- compiled/facebook-www/ReactDOM-prod.modern.js | 571 ++++++------- .../ReactDOM-profiling.classic.js | 756 ++++++++++-------- .../facebook-www/ReactDOM-profiling.modern.js | 615 +++++++------- .../ReactDOMServer-dev.classic.js | 51 +- .../facebook-www/ReactDOMServer-dev.modern.js | 51 +- .../ReactDOMServer-prod.classic.js | 144 ++-- .../ReactDOMServer-prod.modern.js | 144 ++-- .../ReactDOMServerStreaming-dev.modern.js | 49 +- .../ReactDOMServerStreaming-prod.modern.js | 108 ++- .../ReactDOMTesting-dev.classic.js | 116 ++- .../ReactDOMTesting-dev.modern.js | 116 ++- .../ReactDOMTesting-prod.classic.js | 698 ++++++++-------- .../ReactDOMTesting-prod.modern.js | 582 +++++++------- compiled/facebook-www/ReactIs-dev.classic.js | 34 +- compiled/facebook-www/ReactIs-dev.modern.js | 34 +- compiled/facebook-www/ReactIs-prod.classic.js | 31 +- compiled/facebook-www/ReactIs-prod.modern.js | 31 +- .../facebook-www/ReactServer-dev.modern.js | 33 +- .../ReactTestRenderer-dev.classic.js | 51 +- .../ReactTestRenderer-dev.modern.js | 51 +- 36 files changed, 3733 insertions(+), 2702 deletions(-) diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js index bf153310a4b23..544c06e57d74d 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js @@ -109,9 +109,9 @@ if (__DEV__) { var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing, enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp; // On WWW, false is used for a new modern build. - var enableRenderableContext = true; function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; @@ -193,21 +193,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -347,8 +356,8 @@ if (__DEV__) { type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || - !enableRenderableContext || - type.$$typeof === REACT_CONSUMER_TYPE || + (!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) || + (enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js index e500e6d70618f..877685d8b495b 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js @@ -109,9 +109,9 @@ if (__DEV__) { var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing, enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp; // On WWW, true is used for a new modern build. - var enableRenderableContext = true; function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; @@ -193,21 +193,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -347,8 +356,8 @@ if (__DEV__) { type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || - !enableRenderableContext || - type.$$typeof === REACT_CONSUMER_TYPE || + (!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) || + (enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 623e2fab37b86..a989bd8051ecc 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -c9798954e26a2354a951cc65607f2901a45bf035 +e7849b50bcefc0742ca342d70284d82cfcf990e5 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 8abfcaf43ea72..7acb0b88e12d5 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -24,7 +24,7 @@ if (__DEV__) { ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = "18.3.0-www-classic-e2cea41c"; + var ReactVersion = "18.3.0-www-classic-7829c2f7"; // ATTENTION // When adding new symbols to this file, @@ -401,9 +401,9 @@ if (__DEV__) { var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing, enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp; // On WWW, false is used for a new modern build. - var enableRenderableContext = true; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol @@ -559,21 +559,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -722,8 +731,8 @@ if (__DEV__) { type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || - !enableRenderableContext || - type.$$typeof === REACT_CONSUMER_TYPE || + (!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) || + (enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used @@ -2639,12 +2648,70 @@ if (__DEV__) { Consumer: null }; - { + if (enableRenderableContext) { context.Provider = context; context.Consumer = { $$typeof: REACT_CONSUMER_TYPE, _context: context }; + } else { + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context + }; + Object.defineProperties(Consumer, { + Provider: { + get: function () { + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function () { + return context.Consumer; + } + }, + displayName: { + get: function () { + return context.displayName; + }, + set: function (displayName) {} + } + }); + context.Consumer = Consumer; + } } { diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 7b4b2430bb6d0..7f4515670dd6e 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -24,7 +24,7 @@ if (__DEV__) { ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = "18.3.0-www-modern-c68f569b"; + var ReactVersion = "18.3.0-www-modern-99dd25e6"; // ATTENTION // When adding new symbols to this file, @@ -401,9 +401,9 @@ if (__DEV__) { var enableDebugTracing = dynamicFeatureFlags.enableDebugTracing, enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp; // On WWW, true is used for a new modern build. - var enableRenderableContext = true; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol @@ -559,21 +559,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -722,8 +731,8 @@ if (__DEV__) { type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || - !enableRenderableContext || - type.$$typeof === REACT_CONSUMER_TYPE || + (!enableRenderableContext && type.$$typeof === REACT_PROVIDER_TYPE) || + (enableRenderableContext && type.$$typeof === REACT_CONSUMER_TYPE) || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used @@ -2595,12 +2604,70 @@ if (__DEV__) { Consumer: null }; - { + if (enableRenderableContext) { context.Provider = context; context.Consumer = { $$typeof: REACT_CONSUMER_TYPE, _context: context }; + } else { + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context + }; + Object.defineProperties(Consumer, { + Provider: { + get: function () { + return context.Provider; + }, + set: function (_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function () { + return context._currentValue; + }, + set: function (_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function () { + return context._currentValue2; + }, + set: function (_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function () { + return context._threadCount; + }, + set: function (_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function () { + return context.Consumer; + } + }, + displayName: { + get: function () { + return context.displayName; + }, + set: function (displayName) {} + } + }); + context.Consumer = Consumer; + } } { diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 26955277d1d92..eb3504b0b33c4 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -16,6 +16,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), @@ -83,6 +84,7 @@ pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray, dynamicFeatureFlags = require("ReactFeatureFlags"), enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, ReactCurrentDispatcher = { current: null }, ReactCurrentCache = { current: null }, @@ -474,11 +476,17 @@ exports.createContext = function (defaultValue) { Provider: null, Consumer: null }; - defaultValue.Provider = defaultValue; - defaultValue.Consumer = { - $$typeof: REACT_CONSUMER_TYPE, - _context: defaultValue - }; + enableRenderableContext + ? ((defaultValue.Provider = defaultValue), + (defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + })) + : ((defaultValue.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: defaultValue + }), + (defaultValue.Consumer = defaultValue)); return defaultValue; }; exports.createElement = createElement; @@ -625,4 +633,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-classic-17784f7e"; +exports.version = "18.3.0-www-classic-d4b2bc87"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 578322a5f4444..c3a66f095ce66 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -16,6 +16,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), @@ -82,6 +83,7 @@ pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray, dynamicFeatureFlags = require("ReactFeatureFlags"), enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, ReactCurrentDispatcher = { current: null }, ReactCurrentCache = { current: null }, @@ -435,11 +437,17 @@ exports.createContext = function (defaultValue) { Provider: null, Consumer: null }; - defaultValue.Provider = defaultValue; - defaultValue.Consumer = { - $$typeof: REACT_CONSUMER_TYPE, - _context: defaultValue - }; + enableRenderableContext + ? ((defaultValue.Provider = defaultValue), + (defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + })) + : ((defaultValue.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: defaultValue + }), + (defaultValue.Consumer = defaultValue)); return defaultValue; }; exports.createElement = function (type, config, children) { @@ -617,4 +625,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-7f5681e6"; +exports.version = "18.3.0-www-modern-4bf685e4"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 917f038d07cc7..c9d009b79b3d0 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -20,6 +20,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), @@ -87,6 +88,7 @@ pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray, dynamicFeatureFlags = require("ReactFeatureFlags"), enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, ReactCurrentDispatcher = { current: null }, ReactCurrentCache = { current: null }, @@ -478,11 +480,17 @@ exports.createContext = function (defaultValue) { Provider: null, Consumer: null }; - defaultValue.Provider = defaultValue; - defaultValue.Consumer = { - $$typeof: REACT_CONSUMER_TYPE, - _context: defaultValue - }; + enableRenderableContext + ? ((defaultValue.Provider = defaultValue), + (defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + })) + : ((defaultValue.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: defaultValue + }), + (defaultValue.Consumer = defaultValue)); return defaultValue; }; exports.createElement = createElement; @@ -629,7 +637,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-classic-f64bbc43"; +exports.version = "18.3.0-www-classic-012fabe8"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index eef4c6f93afaa..494c357a5fc27 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -20,6 +20,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), + REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), @@ -86,6 +87,7 @@ pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray, dynamicFeatureFlags = require("ReactFeatureFlags"), enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, ReactCurrentDispatcher = { current: null }, ReactCurrentCache = { current: null }, @@ -439,11 +441,17 @@ exports.createContext = function (defaultValue) { Provider: null, Consumer: null }; - defaultValue.Provider = defaultValue; - defaultValue.Consumer = { - $$typeof: REACT_CONSUMER_TYPE, - _context: defaultValue - }; + enableRenderableContext + ? ((defaultValue.Provider = defaultValue), + (defaultValue.Consumer = { + $$typeof: REACT_CONSUMER_TYPE, + _context: defaultValue + })) + : ((defaultValue.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: defaultValue + }), + (defaultValue.Consumer = defaultValue)); return defaultValue; }; exports.createElement = function (type, config, children) { @@ -621,7 +629,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-9c6d816f"; +exports.version = "18.3.0-www-modern-03577a43"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 9dc3103908f78..9978fe99ff98e 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "18.3.0-www-classic-1b14a8b4"; + var ReactVersion = "18.3.0-www-classic-f1606359"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -187,6 +187,7 @@ if (__DEV__) { dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, useModernStrictMode = dynamicFeatureFlags.useModernStrictMode, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp; // On WWW, false is used for a new modern build. @@ -354,21 +355,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName$1(context) + ".Provider"; + } else { + return getContextName$1(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName$1(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName$1(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName$1(type, type.render, "ForwardRef"); @@ -421,15 +431,23 @@ if (__DEV__) { case CacheComponent: return "Cache"; - case ContextConsumer: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case ContextConsumer: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + var context = type; + return getContextName(context) + ".Consumer"; + } - case ContextProvider: { - var _context = type; - return getContextName(_context) + ".Provider"; - } + case ContextProvider: + if (enableRenderableContext) { + var _context = type; + return getContextName(_context) + ".Provider"; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case DehydratedFragment: return "DehydratedFragment"; @@ -17415,8 +17433,10 @@ if (__DEV__) { function updateContextProvider(current, workInProgress, renderLanes) { var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } var newProps = workInProgress.pendingProps; @@ -17470,9 +17490,17 @@ if (__DEV__) { function updateContextConsumer(current, workInProgress, renderLanes) { var context; - { + if (enableRenderableContext) { var consumerType = workInProgress.type; context = consumerType._context; + } else { + context = workInProgress.type; + + { + if (context._context !== undefined) { + context = context._context; + } + } } var newProps = workInProgress.pendingProps; @@ -17718,8 +17746,10 @@ if (__DEV__) { var newValue = workInProgress.memoizedProps.value; var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } pushProvider(workInProgress, context, newValue); @@ -18692,8 +18722,10 @@ if (__DEV__) { if (oldProps !== null) { var context = void 0; - { + if (enableRenderableContext) { context = parent.type; + } else { + context = parent.type._context; } var newProps = parent.pendingProps; @@ -19232,7 +19264,10 @@ if (__DEV__) { } function collectNearestContextValues(node, context, childContextValues) { - if (node.tag === ContextProvider && node.type === context) { + if ( + node.tag === ContextProvider && + (enableRenderableContext ? node.type : node.type._context) === context + ) { var contextValue = node.memoizedProps.value; childContextValues.push(contextValue); } else { @@ -20081,8 +20116,10 @@ if (__DEV__) { // Pop provider fiber var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } popProvider(context, workInProgress); @@ -20568,8 +20605,10 @@ if (__DEV__) { case ContextProvider: var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } popProvider(context, workInProgress); @@ -20665,8 +20704,10 @@ if (__DEV__) { case ContextProvider: var context; - { + if (enableRenderableContext) { context = interruptedWork.type; + } else { + context = interruptedWork.type._context; } popProvider(context, interruptedWork); @@ -29608,18 +29649,27 @@ if (__DEV__) { if (typeof type === "object" && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } // Fall through - case REACT_CONTEXT_TYPE: { - fiberTag = ContextProvider; - break getTag; - } + case REACT_CONTEXT_TYPE: + if (enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } else { + fiberTag = ContextConsumer; + break getTag; + } - case REACT_CONSUMER_TYPE: { - fiberTag = ContextConsumer; - break getTag; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = ContextConsumer; + break getTag; + } // Fall through diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 5be6039b49627..f04a26005a95b 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "18.3.0-www-modern-bbc162b8"; + var ReactVersion = "18.3.0-www-modern-78796c31"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -187,6 +187,7 @@ if (__DEV__) { dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, useModernStrictMode = dynamicFeatureFlags.useModernStrictMode, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp; // On WWW, true is used for a new modern build. @@ -354,21 +355,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName$1(context) + ".Provider"; + } else { + return getContextName$1(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName$1(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName$1(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName$1(type, type.render, "ForwardRef"); @@ -421,15 +431,23 @@ if (__DEV__) { case CacheComponent: return "Cache"; - case ContextConsumer: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case ContextConsumer: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + var context = type; + return getContextName(context) + ".Consumer"; + } - case ContextProvider: { - var _context = type; - return getContextName(_context) + ".Provider"; - } + case ContextProvider: + if (enableRenderableContext) { + var _context = type; + return getContextName(_context) + ".Provider"; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case DehydratedFragment: return "DehydratedFragment"; @@ -17109,8 +17127,10 @@ if (__DEV__) { function updateContextProvider(current, workInProgress, renderLanes) { var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } var newProps = workInProgress.pendingProps; @@ -17164,9 +17184,17 @@ if (__DEV__) { function updateContextConsumer(current, workInProgress, renderLanes) { var context; - { + if (enableRenderableContext) { var consumerType = workInProgress.type; context = consumerType._context; + } else { + context = workInProgress.type; + + { + if (context._context !== undefined) { + context = context._context; + } + } } var newProps = workInProgress.pendingProps; @@ -17406,8 +17434,10 @@ if (__DEV__) { var newValue = workInProgress.memoizedProps.value; var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } pushProvider(workInProgress, context, newValue); @@ -18380,8 +18410,10 @@ if (__DEV__) { if (oldProps !== null) { var context = void 0; - { + if (enableRenderableContext) { context = parent.type; + } else { + context = parent.type._context; } var newProps = parent.pendingProps; @@ -18920,7 +18952,10 @@ if (__DEV__) { } function collectNearestContextValues(node, context, childContextValues) { - if (node.tag === ContextProvider && node.type === context) { + if ( + node.tag === ContextProvider && + (enableRenderableContext ? node.type : node.type._context) === context + ) { var contextValue = node.memoizedProps.value; childContextValues.push(contextValue); } else { @@ -19762,8 +19797,10 @@ if (__DEV__) { // Pop provider fiber var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } popProvider(context, workInProgress); @@ -20234,8 +20271,10 @@ if (__DEV__) { case ContextProvider: var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } popProvider(context, workInProgress); @@ -20324,8 +20363,10 @@ if (__DEV__) { case ContextProvider: var context; - { + if (enableRenderableContext) { context = interruptedWork.type; + } else { + context = interruptedWork.type._context; } popProvider(context, interruptedWork); @@ -29258,18 +29299,27 @@ if (__DEV__) { if (typeof type === "object" && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } // Fall through - case REACT_CONTEXT_TYPE: { - fiberTag = ContextProvider; - break getTag; - } + case REACT_CONTEXT_TYPE: + if (enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } else { + fiberTag = ContextConsumer; + break getTag; + } - case REACT_CONSUMER_TYPE: { - fiberTag = ContextConsumer; - break getTag; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = ContextConsumer; + break getTag; + } // Fall through diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 9907d28e921f4..ca1787d1b8082 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -83,6 +83,7 @@ var ReactSharedInternals = transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -140,10 +141,17 @@ function getComponentNameFromType(type) { } if ("object" === typeof type) switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) break; + else return (type._context.displayName || "Context") + ".Provider"; case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type.displayName || "Context") + ".Consumer"; case REACT_CONSUMER_TYPE: - return (type._context.displayName || "Context") + ".Consumer"; + if (enableRenderableContext) + return (type._context.displayName || "Context") + ".Consumer"; + break; case REACT_FORWARD_REF_TYPE: var innerType = type.render; type = type.displayName; @@ -173,9 +181,13 @@ function getComponentNameFromFiber(fiber) { case 24: return "Cache"; case 9: - return (type._context.displayName || "Context") + ".Consumer"; + return enableRenderableContext + ? (type._context.displayName || "Context") + ".Consumer" + : (type.displayName || "Context") + ".Consumer"; case 10: - return (type.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: @@ -275,36 +287,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { + for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { + for (child$1 = parentB.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -576,18 +588,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$4 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$4; - remainingLanes[index$4] = 0; - expirationTimes[index$4] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$4]; + var index$5 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$5; + remainingLanes[index$5] = 0; + expirationTimes[index$5] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$5]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$4] = null, index$4 = 0; - index$4 < hiddenUpdatesForLane.length; - index$4++ + hiddenUpdates[index$5] = null, index$5 = 0; + index$5 < hiddenUpdatesForLane.length; + index$5++ ) { - var update = hiddenUpdatesForLane[index$4]; + var update = hiddenUpdatesForLane[index$5]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -607,21 +619,21 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$5 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$5; - (lane & entangledLanes) | (root[index$5] & entangledLanes) && - (root[index$5] |= entangledLanes); + var index$6 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$6; + (lane & entangledLanes) | (root[index$6] & entangledLanes) && + (root[index$6] |= entangledLanes); rootEntangledLanes &= ~lane; } } function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { - var index$7 = 31 - clz32(lanes), - lane = 1 << index$7; - index$7 = root.transitionLanes[index$7]; - null !== index$7 && - index$7.forEach(function (transition) { + var index$8 = 31 - clz32(lanes), + lane = 1 << index$8; + index$8 = root.transitionLanes[index$8]; + null !== index$8 && + index$8.forEach(function (transition) { transitionsForLanes.push(transition); }); lanes &= ~lane; @@ -631,10 +643,10 @@ function getTransitionsForLanes(root, lanes) { function clearTransitionsForLanes(root, lanes) { if (enableTransitionTracing) for (; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - null !== root.transitionLanes[index$8] && - (root.transitionLanes[index$8] = null); + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + null !== root.transitionLanes[index$9] && + (root.transitionLanes[index$9] = null); lanes &= ~lane; } } @@ -1055,35 +1067,35 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { if (!onlyLegacy || 0 === root.tag) { - var workInProgressRootRenderLanes$10 = workInProgressRootRenderLanes, + var workInProgressRootRenderLanes$11 = workInProgressRootRenderLanes, nextLanes = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$10 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$11 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$10 = root; + workInProgressRootRenderLanes$11 = root; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$10.tag && + 0 !== workInProgressRootRenderLanes$11.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, originallyAttemptedLanes, errorRetryLanes ))); @@ -1091,34 +1103,34 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$10, 0), + prepareFreshStack(workInProgressRootRenderLanes$11, 0), markRootSuspended( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$10), + ensureRootIsScheduled(workInProgressRootRenderLanes$11), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$10.finishedWork = - workInProgressRootRenderLanes$10.current.alternate), - (workInProgressRootRenderLanes$10.finishedLanes = + : ((workInProgressRootRenderLanes$11.finishedWork = + workInProgressRootRenderLanes$11.current.alternate), + (workInProgressRootRenderLanes$11.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$10); + ensureRootIsScheduled(workInProgressRootRenderLanes$11); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } @@ -1174,12 +1186,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < pendingLanes; ) { - var index$2 = 31 - clz32(pendingLanes), - lane = 1 << index$2, - expirationTime = expirationTimes[index$2]; + var index$3 = 31 - clz32(pendingLanes), + lane = 1 << index$3, + expirationTime = expirationTimes[index$3]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$2] = computeExpirationTime(lane, currentTime); + expirationTimes[index$3] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); pendingLanes &= ~lane; } @@ -1607,16 +1619,16 @@ function describeNativeComponentFrame(fn, construct) { } else { try { Fake.call(); - } catch (x$16) { - control = x$16; + } catch (x$17) { + control = x$17; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x$17) { - control = x$17; + } catch (x$18) { + control = x$18; } (Fake = fn()) && "function" === typeof Fake.catch && @@ -2878,7 +2890,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$31 = !1; + didReadFromEntangledAsyncAction$32 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2899,11 +2911,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$31 = !0); + (didReadFromEntangledAsyncAction$32 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$31 = !0); + (didReadFromEntangledAsyncAction$32 = !0); continue; } else (updateLane = { @@ -2949,7 +2961,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$31 && + didReadFromEntangledAsyncAction$32 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -5528,7 +5540,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -5779,7 +5793,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -6002,7 +6018,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -6064,14 +6083,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$77 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode), + for (var lastTailNode$78 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$78 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$77 + null === lastTailNode$78 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$77.sibling = null); + : (lastTailNode$78.sibling = null); } } function bubbleProperties(completedWork) { @@ -6081,19 +6100,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags & 31457280), - (subtreeFlags |= child$78.flags & 31457280), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (var child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags & 31457280), + (subtreeFlags |= child$79.flags & 31457280), + (child$79.return = completedWork), + (child$79 = child$79.sibling); else - for (child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags), - (subtreeFlags |= child$78.flags), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags), + (subtreeFlags |= child$79.flags), + (child$79.return = completedWork), + (child$79 = child$79.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6267,11 +6286,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$82 = null; + var cache$83 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$82 = newProps.memoizedState.cachePool.pool); - cache$82 !== instance && (newProps.flags |= 2048); + (cache$83 = newProps.memoizedState.cachePool.pool); + cache$83 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6286,7 +6305,13 @@ function completeWork(current, workInProgress, renderLanes) { return popHostContainer(), bubbleProperties(workInProgress), null; case 10: return ( - popProvider(workInProgress.type), bubbleProperties(workInProgress), null + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + bubbleProperties(workInProgress), + null ); case 17: return ( @@ -6299,8 +6324,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$82 = instance.rendering; - if (null === cache$82) + cache$83 = instance.rendering; + if (null === cache$83) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6308,11 +6333,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$82 = findFirstSuspended(current); - if (null !== cache$82) { + cache$83 = findFirstSuspended(current); + if (null !== cache$83) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$82.updateQueue; + current = cache$83.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6337,7 +6362,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$82)), null !== current)) { + if (((current = findFirstSuspended(cache$83)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6347,7 +6372,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$82.alternate) + !cache$83.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6359,13 +6384,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$82.sibling = workInProgress.child), - (workInProgress.child = cache$82)) + ? ((cache$83.sibling = workInProgress.child), + (workInProgress.child = cache$83)) : ((current = instance.last), null !== current - ? (current.sibling = cache$82) - : (workInProgress.child = cache$82), - (instance.last = cache$82)); + ? (current.sibling = cache$83) + : (workInProgress.child = cache$83), + (instance.last = cache$83)); } if (null !== instance.tail) return ( @@ -6498,7 +6523,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -6555,7 +6587,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -6619,8 +6655,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$100) { - captureCommitPhaseError(current, nearestMountedAncestor, error$100); + } catch (error$101) { + captureCommitPhaseError(current, nearestMountedAncestor, error$101); } else ref.current = null; } @@ -6822,11 +6858,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$101) { + } catch (error$102) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$101 + error$102 ); } } @@ -7419,8 +7455,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$109) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$109); + } catch (error$110) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$110); } } break; @@ -7454,8 +7490,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { flags._applyProps(flags, newProps, current); - } catch (error$112) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$112); + } catch (error$113) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$113); } } break; @@ -7491,8 +7527,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$114) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$114); + } catch (error$115) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$115); } flags = finishedWork.updateQueue; null !== flags && @@ -7632,12 +7668,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$104 = JSCompiler_inline_result.stateNode.containerInfo, - before$105 = getHostSibling(finishedWork); + var parent$105 = JSCompiler_inline_result.stateNode.containerInfo, + before$106 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$105, - parent$104 + before$106, + parent$105 ); break; default: @@ -8098,9 +8134,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$120 = finishedWork.stateNode; + var instance$121 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$120._visibility & 4 + ? instance$121._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8113,7 +8149,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$120._visibility |= 4), + : ((instance$121._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8121,7 +8157,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$120._visibility |= 4), + : ((instance$121._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -8134,7 +8170,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$120 + instance$121 ); break; case 24: @@ -8586,11 +8622,11 @@ function scheduleUpdateOnFiber(root, fiber, lane) { enableTransitionTracing) ) { var transitionLanesMap = root.transitionLanes, - index$6 = 31 - clz32(lane), - transitions = transitionLanesMap[index$6]; + index$7 = 31 - clz32(lane), + transitions = transitionLanesMap[index$7]; null === transitions && (transitions = new Set()); transitions.add(transition); - transitionLanesMap[index$6] = transitions; + transitionLanesMap[index$7] = transitions; } } root === workInProgressRoot && @@ -8839,9 +8875,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3; - expirationTimes[index$3] = -1; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4; + expirationTimes[index$4] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -8898,9 +8934,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$1 = 31 - clz32(allEntangledLanes), - lane = 1 << index$1; - lanes |= root[index$1]; + var index$2 = 31 - clz32(allEntangledLanes), + lane = 1 << index$2; + lanes |= root[index$2]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -8996,8 +9032,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$128) { - handleThrow(root, thrownValue$128); + } catch (thrownValue$129) { + handleThrow(root, thrownValue$129); } while (1); lanes && root.shellSuspendCounter++; @@ -9102,8 +9138,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$131) { + handleThrow(root, thrownValue$131); } while (1); resetContextDependencies(); @@ -9838,7 +9874,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; context = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; nextCache = context.value; @@ -9868,7 +9906,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (context = workInProgress.type._context), + (context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (context = readContext(context)), @@ -10222,12 +10262,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 10; + fiberTag = enableRenderableContext ? 10 : 9; break a; case REACT_CONSUMER_TYPE: - fiberTag = 9; - break a; + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -10543,19 +10589,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1139 = { + devToolsConfig$jscomp$inline_1140 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "18.3.0-www-classic-930e803f", + version: "18.3.0-www-classic-36516bcc", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1319 = { - bundleType: devToolsConfig$jscomp$inline_1139.bundleType, - version: devToolsConfig$jscomp$inline_1139.version, - rendererPackageName: devToolsConfig$jscomp$inline_1139.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1139.rendererConfig, +var internals$jscomp$inline_1320 = { + bundleType: devToolsConfig$jscomp$inline_1140.bundleType, + version: devToolsConfig$jscomp$inline_1140.version, + rendererPackageName: devToolsConfig$jscomp$inline_1140.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1140.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10572,26 +10618,26 @@ var internals$jscomp$inline_1319 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1139.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1140.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-930e803f" + reconcilerVersion: "18.3.0-www-classic-36516bcc" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1320 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1321 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1320.isDisabled && - hook$jscomp$inline_1320.supportsFiber + !hook$jscomp$inline_1321.isDisabled && + hook$jscomp$inline_1321.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1320.inject( - internals$jscomp$inline_1319 + (rendererID = hook$jscomp$inline_1321.inject( + internals$jscomp$inline_1320 )), - (injectedHook = hook$jscomp$inline_1320); + (injectedHook = hook$jscomp$inline_1321); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 030a2104010ce..b11e58662f2de 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -83,6 +83,7 @@ var ReactSharedInternals = transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), @@ -160,36 +161,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { + for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { + for (child$1 = parentB.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -461,18 +462,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$4 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$4; - remainingLanes[index$4] = 0; - expirationTimes[index$4] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$4]; + var index$5 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$5; + remainingLanes[index$5] = 0; + expirationTimes[index$5] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$5]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$4] = null, index$4 = 0; - index$4 < hiddenUpdatesForLane.length; - index$4++ + hiddenUpdates[index$5] = null, index$5 = 0; + index$5 < hiddenUpdatesForLane.length; + index$5++ ) { - var update = hiddenUpdatesForLane[index$4]; + var update = hiddenUpdatesForLane[index$5]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -492,21 +493,21 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$5 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$5; - (lane & entangledLanes) | (root[index$5] & entangledLanes) && - (root[index$5] |= entangledLanes); + var index$6 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$6; + (lane & entangledLanes) | (root[index$6] & entangledLanes) && + (root[index$6] |= entangledLanes); rootEntangledLanes &= ~lane; } } function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { - var index$7 = 31 - clz32(lanes), - lane = 1 << index$7; - index$7 = root.transitionLanes[index$7]; - null !== index$7 && - index$7.forEach(function (transition) { + var index$8 = 31 - clz32(lanes), + lane = 1 << index$8; + index$8 = root.transitionLanes[index$8]; + null !== index$8 && + index$8.forEach(function (transition) { transitionsForLanes.push(transition); }); lanes &= ~lane; @@ -516,10 +517,10 @@ function getTransitionsForLanes(root, lanes) { function clearTransitionsForLanes(root, lanes) { if (enableTransitionTracing) for (; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - null !== root.transitionLanes[index$8] && - (root.transitionLanes[index$8] = null); + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + null !== root.transitionLanes[index$9] && + (root.transitionLanes[index$9] = null); lanes &= ~lane; } } @@ -862,35 +863,35 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { var didPerformSomeWork = !1; for (var root = firstScheduledRoot; null !== root; ) { if (!onlyLegacy || 0 === root.tag) { - var workInProgressRootRenderLanes$10 = workInProgressRootRenderLanes, + var workInProgressRootRenderLanes$11 = workInProgressRootRenderLanes, nextLanes = getNextLanes( root, - root === workInProgressRoot ? workInProgressRootRenderLanes$10 : 0 + root === workInProgressRoot ? workInProgressRootRenderLanes$11 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$10 = root; + workInProgressRootRenderLanes$11 = root; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$10.tag && + 0 !== workInProgressRootRenderLanes$11.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, originallyAttemptedLanes, errorRetryLanes ))); @@ -898,34 +899,34 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$10, 0), + prepareFreshStack(workInProgressRootRenderLanes$11, 0), markRootSuspended( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$10), + ensureRootIsScheduled(workInProgressRootRenderLanes$11), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$10.finishedWork = - workInProgressRootRenderLanes$10.current.alternate), - (workInProgressRootRenderLanes$10.finishedLanes = + : ((workInProgressRootRenderLanes$11.finishedWork = + workInProgressRootRenderLanes$11.current.alternate), + (workInProgressRootRenderLanes$11.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$10, + workInProgressRootRenderLanes$11, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$10); + ensureRootIsScheduled(workInProgressRootRenderLanes$11); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } @@ -981,12 +982,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < pendingLanes; ) { - var index$2 = 31 - clz32(pendingLanes), - lane = 1 << index$2, - expirationTime = expirationTimes[index$2]; + var index$3 = 31 - clz32(pendingLanes), + lane = 1 << index$3, + expirationTime = expirationTimes[index$3]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$2] = computeExpirationTime(lane, currentTime); + expirationTimes[index$3] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); pendingLanes &= ~lane; } @@ -1414,16 +1415,16 @@ function describeNativeComponentFrame(fn, construct) { } else { try { Fake.call(); - } catch (x$16) { - control = x$16; + } catch (x$17) { + control = x$17; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x$17) { - control = x$17; + } catch (x$18) { + control = x$18; } (Fake = fn()) && "function" === typeof Fake.catch && @@ -2685,7 +2686,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$31 = !1; + didReadFromEntangledAsyncAction$32 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -2706,11 +2707,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$31 = !0); + (didReadFromEntangledAsyncAction$32 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$31 = !0); + (didReadFromEntangledAsyncAction$32 = !0); continue; } else (updateLane = { @@ -2756,7 +2757,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$31 && + didReadFromEntangledAsyncAction$32 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -5284,7 +5285,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -5535,7 +5538,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -5758,7 +5763,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -5820,14 +5828,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$77 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode), + for (var lastTailNode$78 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$78 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$77 + null === lastTailNode$78 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$77.sibling = null); + : (lastTailNode$78.sibling = null); } } function bubbleProperties(completedWork) { @@ -5837,19 +5845,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags & 31457280), - (subtreeFlags |= child$78.flags & 31457280), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (var child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags & 31457280), + (subtreeFlags |= child$79.flags & 31457280), + (child$79.return = completedWork), + (child$79 = child$79.sibling); else - for (child$78 = completedWork.child; null !== child$78; ) - (newChildLanes |= child$78.lanes | child$78.childLanes), - (subtreeFlags |= child$78.subtreeFlags), - (subtreeFlags |= child$78.flags), - (child$78.return = completedWork), - (child$78 = child$78.sibling); + for (child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags), + (subtreeFlags |= child$79.flags), + (child$79.return = completedWork), + (child$79 = child$79.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6017,11 +6025,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (instance = newProps.alternate.memoizedState.cachePool.pool); - var cache$82 = null; + var cache$83 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$82 = newProps.memoizedState.cachePool.pool); - cache$82 !== instance && (newProps.flags |= 2048); + (cache$83 = newProps.memoizedState.cachePool.pool); + cache$83 !== instance && (newProps.flags |= 2048); } renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), @@ -6036,7 +6044,13 @@ function completeWork(current, workInProgress, renderLanes) { return popHostContainer(), bubbleProperties(workInProgress), null; case 10: return ( - popProvider(workInProgress.type), bubbleProperties(workInProgress), null + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + bubbleProperties(workInProgress), + null ); case 17: return bubbleProperties(workInProgress), null; @@ -6045,8 +6059,8 @@ function completeWork(current, workInProgress, renderLanes) { instance = workInProgress.memoizedState; if (null === instance) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$82 = instance.rendering; - if (null === cache$82) + cache$83 = instance.rendering; + if (null === cache$83) if (newProps) cutOffTailIfNeeded(instance, !1); else { if ( @@ -6054,11 +6068,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$82 = findFirstSuspended(current); - if (null !== cache$82) { + cache$83 = findFirstSuspended(current); + if (null !== cache$83) { workInProgress.flags |= 128; cutOffTailIfNeeded(instance, !1); - current = cache$82.updateQueue; + current = cache$83.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6083,7 +6097,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$82)), null !== current)) { + if (((current = findFirstSuspended(cache$83)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6093,7 +6107,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !0), null === instance.tail && "hidden" === instance.tailMode && - !cache$82.alternate) + !cache$83.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6105,13 +6119,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(instance, !1), (workInProgress.lanes = 4194304)); instance.isBackwards - ? ((cache$82.sibling = workInProgress.child), - (workInProgress.child = cache$82)) + ? ((cache$83.sibling = workInProgress.child), + (workInProgress.child = cache$83)) : ((current = instance.last), null !== current - ? (current.sibling = cache$82) - : (workInProgress.child = cache$82), - (instance.last = cache$82)); + ? (current.sibling = cache$83) + : (workInProgress.child = cache$83), + (instance.last = cache$83)); } if (null !== instance.tail) return ( @@ -6241,7 +6255,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -6292,7 +6313,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -6356,8 +6381,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$99) { - captureCommitPhaseError(current, nearestMountedAncestor, error$99); + } catch (error$100) { + captureCommitPhaseError(current, nearestMountedAncestor, error$100); } else ref.current = null; } @@ -6559,11 +6584,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$100) { + } catch (error$101) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$101 ); } } @@ -7156,8 +7181,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$108) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$108); + } catch (error$109) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$109); } } break; @@ -7191,8 +7216,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { flags._applyProps(flags, newProps, current); - } catch (error$111) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$111); + } catch (error$112) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$112); } } break; @@ -7228,8 +7253,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$113) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$113); + } catch (error$114) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$114); } flags = finishedWork.updateQueue; null !== flags && @@ -7369,12 +7394,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$103 = JSCompiler_inline_result.stateNode.containerInfo, - before$104 = getHostSibling(finishedWork); + var parent$104 = JSCompiler_inline_result.stateNode.containerInfo, + before$105 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$104, - parent$103 + before$105, + parent$104 ); break; default: @@ -7835,9 +7860,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$119 = finishedWork.stateNode; + var instance$120 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$119._visibility & 4 + ? instance$120._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7850,7 +7875,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$119._visibility |= 4), + : ((instance$120._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7858,7 +7883,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$119._visibility |= 4), + : ((instance$120._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -7871,7 +7896,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$119 + instance$120 ); break; case 24: @@ -8323,11 +8348,11 @@ function scheduleUpdateOnFiber(root, fiber, lane) { enableTransitionTracing) ) { var transitionLanesMap = root.transitionLanes, - index$6 = 31 - clz32(lane), - transitions = transitionLanesMap[index$6]; + index$7 = 31 - clz32(lane), + transitions = transitionLanesMap[index$7]; null === transitions && (transitions = new Set()); transitions.add(transition); - transitionLanesMap[index$6] = transitions; + transitionLanesMap[index$7] = transitions; } } root === workInProgressRoot && @@ -8576,9 +8601,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3; - expirationTimes[index$3] = -1; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4; + expirationTimes[index$4] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -8635,9 +8660,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$1 = 31 - clz32(allEntangledLanes), - lane = 1 << index$1; - lanes |= root[index$1]; + var index$2 = 31 - clz32(allEntangledLanes), + lane = 1 << index$2; + lanes |= root[index$2]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -8733,8 +8758,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$127) { - handleThrow(root, thrownValue$127); + } catch (thrownValue$128) { + handleThrow(root, thrownValue$128); } while (1); lanes && root.shellSuspendCounter++; @@ -8839,8 +8864,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$129) { - handleThrow(root, thrownValue$129); + } catch (thrownValue$130) { + handleThrow(root, thrownValue$130); } while (1); resetContextDependencies(); @@ -9558,7 +9583,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; init = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; nextCache = init.value; @@ -9580,7 +9607,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (init = workInProgress.type._context), + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), @@ -9928,12 +9957,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 10; + fiberTag = enableRenderableContext ? 10 : 9; break a; case REACT_CONSUMER_TYPE: - fiberTag = 9; - break a; + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -10209,19 +10244,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1119 = { + devToolsConfig$jscomp$inline_1120 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "18.3.0-www-modern-078ca32a", + version: "18.3.0-www-modern-630a2790", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1299 = { - bundleType: devToolsConfig$jscomp$inline_1119.bundleType, - version: devToolsConfig$jscomp$inline_1119.version, - rendererPackageName: devToolsConfig$jscomp$inline_1119.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1119.rendererConfig, +var internals$jscomp$inline_1300 = { + bundleType: devToolsConfig$jscomp$inline_1120.bundleType, + version: devToolsConfig$jscomp$inline_1120.version, + rendererPackageName: devToolsConfig$jscomp$inline_1120.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1120.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10238,26 +10273,26 @@ var internals$jscomp$inline_1299 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1119.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1120.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-078ca32a" + reconcilerVersion: "18.3.0-www-modern-630a2790" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1300 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1301 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1300.isDisabled && - hook$jscomp$inline_1300.supportsFiber + !hook$jscomp$inline_1301.isDisabled && + hook$jscomp$inline_1301.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1300.inject( - internals$jscomp$inline_1299 + (rendererID = hook$jscomp$inline_1301.inject( + internals$jscomp$inline_1300 )), - (injectedHook = hook$jscomp$inline_1300); + (injectedHook = hook$jscomp$inline_1301); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 95ec88b69d3b3..14d3af0bc5b01 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -152,6 +152,7 @@ if (__DEV__) { dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, useModernStrictMode = dynamicFeatureFlags.useModernStrictMode, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, enableClientRenderFallbackOnTextMismatch = @@ -322,21 +323,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName$1(context) + ".Provider"; + } else { + return getContextName$1(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName$1(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName$1(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName$1(type, type.render, "ForwardRef"); @@ -389,15 +399,23 @@ if (__DEV__) { case CacheComponent: return "Cache"; - case ContextConsumer: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case ContextConsumer: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + var context = type; + return getContextName(context) + ".Consumer"; + } - case ContextProvider: { - var _context = type; - return getContextName(_context) + ".Provider"; - } + case ContextProvider: + if (enableRenderableContext) { + var _context = type; + return getContextName(_context) + ".Provider"; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case DehydratedFragment: return "DehydratedFragment"; @@ -22635,8 +22653,10 @@ if (__DEV__) { function updateContextProvider(current, workInProgress, renderLanes) { var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } var newProps = workInProgress.pendingProps; @@ -22690,9 +22710,17 @@ if (__DEV__) { function updateContextConsumer(current, workInProgress, renderLanes) { var context; - { + if (enableRenderableContext) { var consumerType = workInProgress.type; context = consumerType._context; + } else { + context = workInProgress.type; + + { + if (context._context !== undefined) { + context = context._context; + } + } } var newProps = workInProgress.pendingProps; @@ -22940,8 +22968,10 @@ if (__DEV__) { var newValue = workInProgress.memoizedProps.value; var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } pushProvider(workInProgress, context, newValue); @@ -23932,8 +23962,10 @@ if (__DEV__) { if (oldProps !== null) { var context = void 0; - { + if (enableRenderableContext) { context = parent.type; + } else { + context = parent.type._context; } var newProps = parent.pendingProps; @@ -24472,7 +24504,10 @@ if (__DEV__) { } function collectNearestContextValues(node, context, childContextValues) { - if (node.tag === ContextProvider && node.type === context) { + if ( + node.tag === ContextProvider && + (enableRenderableContext ? node.type : node.type._context) === context + ) { var contextValue = node.memoizedProps.value; childContextValues.push(contextValue); } else { @@ -25521,8 +25556,10 @@ if (__DEV__) { // Pop provider fiber var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } popProvider(context, workInProgress); @@ -26016,8 +26053,10 @@ if (__DEV__) { case ContextProvider: var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } popProvider(context, workInProgress); @@ -26119,8 +26158,10 @@ if (__DEV__) { case ContextProvider: var context; - { + if (enableRenderableContext) { context = interruptedWork.type; + } else { + context = interruptedWork.type._context; } popProvider(context, interruptedWork); @@ -35559,18 +35600,27 @@ if (__DEV__) { if (typeof type === "object" && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } // Fall through - case REACT_CONTEXT_TYPE: { - fiberTag = ContextProvider; - break getTag; - } + case REACT_CONTEXT_TYPE: + if (enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } else { + fiberTag = ContextConsumer; + break getTag; + } - case REACT_CONSUMER_TYPE: { - fiberTag = ContextConsumer; - break getTag; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = ContextConsumer; + break getTag; + } // Fall through @@ -36003,7 +36053,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-www-classic-a1d5cd42"; + var ReactVersion = "18.3.0-www-classic-0bf4f6f1"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index a2cad1ecf5720..1b67c640d8f34 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -138,6 +138,7 @@ if (__DEV__) { dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, useModernStrictMode = dynamicFeatureFlags.useModernStrictMode, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, enableClientRenderFallbackOnTextMismatch = @@ -3439,21 +3440,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName$1(context) + ".Provider"; + } else { + return getContextName$1(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName$1(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName$1(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName$1(type, type.render, "ForwardRef"); @@ -3506,15 +3516,23 @@ if (__DEV__) { case CacheComponent: return "Cache"; - case ContextConsumer: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case ContextConsumer: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + var context = type; + return getContextName(context) + ".Consumer"; + } - case ContextProvider: { - var _context = type; - return getContextName(_context) + ".Provider"; - } + case ContextProvider: + if (enableRenderableContext) { + var _context = type; + return getContextName(_context) + ".Provider"; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case DehydratedFragment: return "DehydratedFragment"; @@ -22515,8 +22533,10 @@ if (__DEV__) { function updateContextProvider(current, workInProgress, renderLanes) { var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } var newProps = workInProgress.pendingProps; @@ -22570,9 +22590,17 @@ if (__DEV__) { function updateContextConsumer(current, workInProgress, renderLanes) { var context; - { + if (enableRenderableContext) { var consumerType = workInProgress.type; context = consumerType._context; + } else { + context = workInProgress.type; + + { + if (context._context !== undefined) { + context = context._context; + } + } } var newProps = workInProgress.pendingProps; @@ -22814,8 +22842,10 @@ if (__DEV__) { var newValue = workInProgress.memoizedProps.value; var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } pushProvider(workInProgress, context, newValue); @@ -23806,8 +23836,10 @@ if (__DEV__) { if (oldProps !== null) { var context = void 0; - { + if (enableRenderableContext) { context = parent.type; + } else { + context = parent.type._context; } var newProps = parent.pendingProps; @@ -24346,7 +24378,10 @@ if (__DEV__) { } function collectNearestContextValues(node, context, childContextValues) { - if (node.tag === ContextProvider && node.type === context) { + if ( + node.tag === ContextProvider && + (enableRenderableContext ? node.type : node.type._context) === context + ) { var contextValue = node.memoizedProps.value; childContextValues.push(contextValue); } else { @@ -25388,8 +25423,10 @@ if (__DEV__) { // Pop provider fiber var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } popProvider(context, workInProgress); @@ -25868,8 +25905,10 @@ if (__DEV__) { case ContextProvider: var context; - { + if (enableRenderableContext) { context = workInProgress.type; + } else { + context = workInProgress.type._context; } popProvider(context, workInProgress); @@ -25964,8 +26003,10 @@ if (__DEV__) { case ContextProvider: var context; - { + if (enableRenderableContext) { context = interruptedWork.type; + } else { + context = interruptedWork.type._context; } popProvider(context, interruptedWork); @@ -35395,18 +35436,27 @@ if (__DEV__) { if (typeof type === "object" && type !== null) { switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } // Fall through - case REACT_CONTEXT_TYPE: { - fiberTag = ContextProvider; - break getTag; - } + case REACT_CONTEXT_TYPE: + if (enableRenderableContext) { + fiberTag = ContextProvider; + break getTag; + } else { + fiberTag = ContextConsumer; + break getTag; + } - case REACT_CONSUMER_TYPE: { - fiberTag = ContextConsumer; - break getTag; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + fiberTag = ContextConsumer; + break getTag; + } // Fall through @@ -35839,7 +35889,7 @@ if (__DEV__) { return root; } - var ReactVersion = "18.3.0-www-modern-9dd8ecfb"; + var ReactVersion = "18.3.0-www-modern-8ea39922"; function createPortal$1( children, diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index df64df938e281..f6bbacc60287e 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -62,6 +62,7 @@ var ReactSharedInternals = transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, enableClientRenderFallbackOnTextMismatch = dynamicFeatureFlags.enableClientRenderFallbackOnTextMismatch, @@ -121,10 +122,17 @@ function getComponentNameFromType(type) { } if ("object" === typeof type) switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) break; + else return (type._context.displayName || "Context") + ".Provider"; case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type.displayName || "Context") + ".Consumer"; case REACT_CONSUMER_TYPE: - return (type._context.displayName || "Context") + ".Consumer"; + if (enableRenderableContext) + return (type._context.displayName || "Context") + ".Consumer"; + break; case REACT_FORWARD_REF_TYPE: var innerType = type.render; type = type.displayName; @@ -154,9 +162,13 @@ function getComponentNameFromFiber(fiber) { case 24: return "Cache"; case 9: - return (type._context.displayName || "Context") + ".Consumer"; + return enableRenderableContext + ? (type._context.displayName || "Context") + ".Consumer" + : (type.displayName || "Context") + ".Consumer"; case 10: - return (type.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: @@ -266,36 +278,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { + for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { + for (child$1 = parentB.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -640,18 +652,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$4 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$4; - remainingLanes[index$4] = 0; - expirationTimes[index$4] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$4]; + var index$5 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$5; + remainingLanes[index$5] = 0; + expirationTimes[index$5] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$5]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$4] = null, index$4 = 0; - index$4 < hiddenUpdatesForLane.length; - index$4++ + hiddenUpdates[index$5] = null, index$5 = 0; + index$5 < hiddenUpdatesForLane.length; + index$5++ ) { - var update = hiddenUpdatesForLane[index$4]; + var update = hiddenUpdatesForLane[index$5]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -671,10 +683,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$5 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$5; - (lane & entangledLanes) | (root[index$5] & entangledLanes) && - (root[index$5] |= entangledLanes); + var index$6 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$6; + (lane & entangledLanes) | (root[index$6] & entangledLanes) && + (root[index$6] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -689,11 +701,11 @@ function upgradePendingLanesToSync(root, lanesToUpgrade) { function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - index$8 = root.transitionLanes[index$8]; - null !== index$8 && - index$8.forEach(function (transition) { + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + index$9 = root.transitionLanes[index$9]; + null !== index$9 && + index$9.forEach(function (transition) { transitionsForLanes.push(transition); }); lanes &= ~lane; @@ -703,10 +715,10 @@ function getTransitionsForLanes(root, lanes) { function clearTransitionsForLanes(root, lanes) { if (enableTransitionTracing) for (; 0 < lanes; ) { - var index$9 = 31 - clz32(lanes), - lane = 1 << index$9; - null !== root.transitionLanes[index$9] && - (root.transitionLanes[index$9] = null); + var index$10 = 31 - clz32(lanes), + lane = 1 << index$10; + null !== root.transitionLanes[index$10] && + (root.transitionLanes[index$10] = null); lanes &= ~lane; } } @@ -777,8 +789,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$10 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$10 && "aria-" !== prefix$10) { + var prefix$11 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$11 && "aria-" !== prefix$11) { node.removeAttribute(name); return; } @@ -860,16 +872,16 @@ function describeNativeComponentFrame(fn, construct) { } else { try { Fake.call(); - } catch (x$11) { - control = x$11; + } catch (x$12) { + control = x$12; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x$12) { - control = x$12; + } catch (x$13) { + control = x$13; } (Fake = fn()) && "function" === typeof Fake.catch && @@ -1337,15 +1349,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$18 in styles) - (styleName = styles[styleName$18]), - styles.hasOwnProperty(styleName$18) && - prevStyles[styleName$18] !== styleName && - setValueForStyle(node, styleName$18, styleName); - } else for (var styleName$19 in styles) - styles.hasOwnProperty(styleName$19) && - setValueForStyle(node, styleName$19, styles[styleName$19]); + (styleName = styles[styleName$19]), + styles.hasOwnProperty(styleName$19) && + prevStyles[styleName$19] !== styleName && + setValueForStyle(node, styleName$19, styleName); + } else + for (var styleName$20 in styles) + styles.hasOwnProperty(styleName$20) && + setValueForStyle(node, styleName$20, styles[styleName$20]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1955,39 +1967,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$25 = firstScheduledRoot; null !== root$25; ) { - if (!onlyLegacy || 0 === root$25.tag) { - var workInProgressRootRenderLanes$27 = workInProgressRootRenderLanes, + for (var root$26 = firstScheduledRoot; null !== root$26; ) { + if (!onlyLegacy || 0 === root$26.tag) { + var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$25, - root$25 === workInProgressRoot - ? workInProgressRootRenderLanes$27 + root$26, + root$26 === workInProgressRoot + ? workInProgressRootRenderLanes$28 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$27 = root$25; + workInProgressRootRenderLanes$28 = root$26; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$27.tag && + 0 !== workInProgressRootRenderLanes$28.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, originallyAttemptedLanes, errorRetryLanes ))); @@ -1995,39 +2007,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$27, 0), + prepareFreshStack(workInProgressRootRenderLanes$28, 0), markRootSuspended( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$27), + ensureRootIsScheduled(workInProgressRootRenderLanes$28), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$27.finishedWork = - workInProgressRootRenderLanes$27.current.alternate), - (workInProgressRootRenderLanes$27.finishedLanes = + : ((workInProgressRootRenderLanes$28.finishedWork = + workInProgressRootRenderLanes$28.current.alternate), + (workInProgressRootRenderLanes$28.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$27); + ensureRootIsScheduled(workInProgressRootRenderLanes$28); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$25 = root$25.next; + root$26 = root$26.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2084,12 +2096,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < pendingLanes; ) { - var index$2 = 31 - clz32(pendingLanes), - lane = 1 << index$2, - expirationTime = expirationTimes[index$2]; + var index$3 = 31 - clz32(pendingLanes), + lane = 1 << index$3, + expirationTime = expirationTimes[index$3]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$2] = computeExpirationTime(lane, currentTime); + expirationTimes[index$3] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); pendingLanes &= ~lane; } @@ -3633,7 +3645,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$52 = !1; + didReadFromEntangledAsyncAction$53 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3654,11 +3666,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$52 = !0); + (didReadFromEntangledAsyncAction$53 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$52 = !0); + (didReadFromEntangledAsyncAction$53 = !0); continue; } else (updateLane = { @@ -3704,7 +3716,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$52 && + didReadFromEntangledAsyncAction$53 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4169,14 +4181,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$62 = enqueueUpdate(provider, fiber, lane); - null !== root$62 && - (scheduleUpdateOnFiber(root$62, provider, lane), - entangleTransitions(root$62, provider, lane)); + var root$63 = enqueueUpdate(provider, fiber, lane); + null !== root$63 && + (scheduleUpdateOnFiber(root$63, provider, lane), + entangleTransitions(root$63, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$62 && + null !== root$63 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4416,15 +4428,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$55 = workInProgressRoot; - if (null === root$55) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$55, workInProgressRootRenderLanes) || + var root$56 = workInProgressRoot; + if (null === root$56) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$56, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$55 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$55; - mountEffect(subscribeToStore.bind(null, fiber, root$55, subscribe), [ + root$56 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$56; + mountEffect(subscribeToStore.bind(null, fiber, root$56, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4433,7 +4445,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$55, + root$56, getServerSnapshot, getSnapshot ), @@ -5237,10 +5249,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$72 = workInProgress.stateNode; + root$73 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$72.incompleteTransitions.has(transition)) { + if (!root$73.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5248,11 +5260,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$72.incompleteTransitions.set(transition, markerInstance); + root$73.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$72.incompleteTransitions.forEach(function (markerInstance) { + root$73.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6520,7 +6532,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -6771,7 +6785,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -6994,7 +7010,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -7083,14 +7102,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$111 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$111 = lastTailNode), + for (var lastTailNode$112 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$112 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$111 + null === lastTailNode$112 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$111.sibling = null); + : (lastTailNode$112.sibling = null); } } function bubbleProperties(completedWork) { @@ -7100,19 +7119,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$112 = completedWork.child; null !== child$112; ) - (newChildLanes |= child$112.lanes | child$112.childLanes), - (subtreeFlags |= child$112.subtreeFlags & 31457280), - (subtreeFlags |= child$112.flags & 31457280), - (child$112.return = completedWork), - (child$112 = child$112.sibling); + for (var child$113 = completedWork.child; null !== child$113; ) + (newChildLanes |= child$113.lanes | child$113.childLanes), + (subtreeFlags |= child$113.subtreeFlags & 31457280), + (subtreeFlags |= child$113.flags & 31457280), + (child$113.return = completedWork), + (child$113 = child$113.sibling); else - for (child$112 = completedWork.child; null !== child$112; ) - (newChildLanes |= child$112.lanes | child$112.childLanes), - (subtreeFlags |= child$112.subtreeFlags), - (subtreeFlags |= child$112.flags), - (child$112.return = completedWork), - (child$112 = child$112.sibling); + for (child$113 = completedWork.child; null !== child$113; ) + (newChildLanes |= child$113.lanes | child$113.childLanes), + (subtreeFlags |= child$113.subtreeFlags), + (subtreeFlags |= child$113.flags), + (child$113.return = completedWork), + (child$113 = child$113.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7391,16 +7410,16 @@ function completeWork(current, workInProgress, renderLanes) { break; case 27: case 5: - var isConcurrentMode$23 = 0 !== (currentResource.mode & 1); + var isConcurrentMode$24 = 0 !== (currentResource.mode & 1); !0 !== currentResource.memoizedProps.suppressHydrationWarning && checkForUnmatchedText( current.nodeValue, renderLanes, - isConcurrentMode$23 + isConcurrentMode$24 ); if ( - isConcurrentMode$23 && + isConcurrentMode$24 && enableClientRenderFallbackOnTextMismatch ) { current = !1; @@ -7474,11 +7493,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$23 = null), + (isConcurrentMode$24 = null), null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$23 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$23 !== currentResource && (newProps.flags |= 2048)); + (isConcurrentMode$24 = newProps.memoizedState.cachePool.pool), + isConcurrentMode$24 !== currentResource && (newProps.flags |= 2048)); renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -7498,7 +7517,13 @@ function completeWork(current, workInProgress, renderLanes) { ); case 10: return ( - popProvider(workInProgress.type), bubbleProperties(workInProgress), null + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + bubbleProperties(workInProgress), + null ); case 17: return ( @@ -7512,8 +7537,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$23 = currentResource.rendering; - if (null === isConcurrentMode$23) + isConcurrentMode$24 = currentResource.rendering; + if (null === isConcurrentMode$24) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7521,11 +7546,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$23 = findFirstSuspended(current); - if (null !== isConcurrentMode$23) { + isConcurrentMode$24 = findFirstSuspended(current); + if (null !== isConcurrentMode$24) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$23.updateQueue; + current = isConcurrentMode$24.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7551,7 +7576,7 @@ function completeWork(current, workInProgress, renderLanes) { else { if (!newProps) if ( - ((current = findFirstSuspended(isConcurrentMode$23)), + ((current = findFirstSuspended(isConcurrentMode$24)), null !== current) ) { if ( @@ -7563,7 +7588,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$23.alternate && + !isConcurrentMode$24.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7576,13 +7601,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$23.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$23)) + ? ((isConcurrentMode$24.sibling = workInProgress.child), + (workInProgress.child = isConcurrentMode$24)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$23) - : (workInProgress.child = isConcurrentMode$23), - (currentResource.last = isConcurrentMode$23)); + ? (current.sibling = isConcurrentMode$24) + : (workInProgress.child = isConcurrentMode$24), + (currentResource.last = isConcurrentMode$24)); } if (null !== currentResource.tail) return ( @@ -7716,7 +7741,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -7774,7 +7806,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -7878,8 +7914,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$142) { - captureCommitPhaseError(current, nearestMountedAncestor, error$142); + } catch (error$143) { + captureCommitPhaseError(current, nearestMountedAncestor, error$143); } else ref.current = null; } @@ -7916,7 +7952,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$192) { + } catch (e$193) { JSCompiler_temp = null; break a; } @@ -8182,11 +8218,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$144) { + } catch (error$145) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$144 + error$145 ); } } @@ -8866,8 +8902,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$158) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$158); } } break; @@ -9039,11 +9075,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$158) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$159 ); } } @@ -9081,8 +9117,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$159) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$159); + } catch (error$160) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$160); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9093,8 +9129,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } } break; @@ -9108,8 +9144,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } } break; @@ -9123,8 +9159,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$164) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$164); + } catch (error$165) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$165); } break; case 4: @@ -9154,8 +9190,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$166) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$166); + } catch (error$167) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$167); } current = finishedWork.updateQueue; null !== current && @@ -9233,11 +9269,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$147) { + } catch (error$148) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$147 + error$148 ); } } else if ( @@ -9312,21 +9348,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$148 = JSCompiler_inline_result.stateNode; + var parent$149 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$148, ""), + (setTextContent(parent$149, ""), (JSCompiler_inline_result.flags &= -33)); - var before$149 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$149, parent$148); + var before$150 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$150, parent$149); break; case 3: case 4: - var parent$150 = JSCompiler_inline_result.stateNode.containerInfo, - before$151 = getHostSibling(finishedWork); + var parent$151 = JSCompiler_inline_result.stateNode.containerInfo, + before$152 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$151, - parent$150 + before$152, + parent$151 ); break; default: @@ -9796,9 +9832,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$173 = finishedWork.stateNode; + var instance$174 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$173._visibility & 4 + ? instance$174._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9811,7 +9847,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$173._visibility |= 4), + : ((instance$174._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9819,7 +9855,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$173._visibility |= 4), + : ((instance$174._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9832,7 +9868,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$173 + instance$174 ); break; case 24: @@ -10307,11 +10343,11 @@ function scheduleUpdateOnFiber(root, fiber, lane) { enableTransitionTracing) ) { var transitionLanesMap = root.transitionLanes, - index$7 = 31 - clz32(lane), - transitions = transitionLanesMap[index$7]; + index$8 = 31 - clz32(lane), + transitions = transitionLanesMap[index$8]; null === transitions && (transitions = new Set()); transitions.add(transition); - transitionLanesMap[index$7] = transitions; + transitionLanesMap[index$8] = transitions; } } root === workInProgressRoot && @@ -10577,9 +10613,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) { 0 < lanes; ) { - var index$3 = 31 - clz32(lanes), - lane = 1 << index$3; - expirationTimes[index$3] = -1; + var index$4 = 31 - clz32(lanes), + lane = 1 << index$4; + expirationTimes[index$4] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -10671,9 +10707,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$1 = 31 - clz32(allEntangledLanes), - lane = 1 << index$1; - lanes |= root[index$1]; + var index$2 = 31 - clz32(allEntangledLanes), + lane = 1 << index$2; + lanes |= root[index$2]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -10776,8 +10812,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$181) { - handleThrow(root, thrownValue$181); + } catch (thrownValue$182) { + handleThrow(root, thrownValue$182); } while (1); lanes && root.shellSuspendCounter++; @@ -10882,8 +10918,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$183) { - handleThrow(root, thrownValue$183); + } catch (thrownValue$184) { + handleThrow(root, thrownValue$184); } while (1); resetContextDependencies(); @@ -11106,12 +11142,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$188 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$187 && + shouldFireAfterActiveInstanceBlur$188 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11192,7 +11228,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$188 = rootWithPendingPassiveEffects, + var root$189 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11208,7 +11244,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$188, remainingLanes); + releaseRootPooledCache(root$189, remainingLanes); } } return !1; @@ -11815,7 +11851,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; context = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = context.value; @@ -11845,7 +11883,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (context = workInProgress.type._context), + (context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (context = readContext(context)), @@ -12208,12 +12248,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 10; + fiberTag = enableRenderableContext ? 10 : 9; break a; case REACT_CONSUMER_TYPE: - fiberTag = 9; - break a; + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -12516,12 +12562,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$190 = fiber.stateNode; - if (root$190.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$190.pendingLanes); + var root$191 = fiber.stateNode; + if (root$191.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$191.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$190, lanes), - ensureRootIsScheduled(root$190), + (upgradePendingLanesToSync(root$191, lanes), + ensureRootIsScheduled(root$191), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13087,19 +13133,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$351; + var JSCompiler_inline_result$jscomp$352; if (canUseDOM) { - var isSupported$jscomp$inline_1550 = "oninput" in document; - if (!isSupported$jscomp$inline_1550) { - var element$jscomp$inline_1551 = document.createElement("div"); - element$jscomp$inline_1551.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1550 = - "function" === typeof element$jscomp$inline_1551.oninput; + var isSupported$jscomp$inline_1551 = "oninput" in document; + if (!isSupported$jscomp$inline_1551) { + var element$jscomp$inline_1552 = document.createElement("div"); + element$jscomp$inline_1552.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1551 = + "function" === typeof element$jscomp$inline_1552.oninput; } - JSCompiler_inline_result$jscomp$351 = isSupported$jscomp$inline_1550; - } else JSCompiler_inline_result$jscomp$351 = !1; + JSCompiler_inline_result$jscomp$352 = isSupported$jscomp$inline_1551; + } else JSCompiler_inline_result$jscomp$352 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$351 && + JSCompiler_inline_result$jscomp$352 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13471,20 +13517,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1591 = 0; - i$jscomp$inline_1591 < simpleEventPluginEvents.length; - i$jscomp$inline_1591++ + var i$jscomp$inline_1592 = 0; + i$jscomp$inline_1592 < simpleEventPluginEvents.length; + i$jscomp$inline_1592++ ) { - var eventName$jscomp$inline_1592 = - simpleEventPluginEvents[i$jscomp$inline_1591], - domEventName$jscomp$inline_1593 = - eventName$jscomp$inline_1592.toLowerCase(), - capitalizedEvent$jscomp$inline_1594 = - eventName$jscomp$inline_1592[0].toUpperCase() + - eventName$jscomp$inline_1592.slice(1); + var eventName$jscomp$inline_1593 = + simpleEventPluginEvents[i$jscomp$inline_1592], + domEventName$jscomp$inline_1594 = + eventName$jscomp$inline_1593.toLowerCase(), + capitalizedEvent$jscomp$inline_1595 = + eventName$jscomp$inline_1593[0].toUpperCase() + + eventName$jscomp$inline_1593.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1593, - "on" + capitalizedEvent$jscomp$inline_1594 + domEventName$jscomp$inline_1594, + "on" + capitalizedEvent$jscomp$inline_1595 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -14959,14 +15005,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$219 in nextProps) { - var propKey = nextProps[propKey$219]; - lastProp = lastProps[propKey$219]; + for (var propKey$220 in nextProps) { + var propKey = nextProps[propKey$220]; + lastProp = lastProps[propKey$220]; if ( - nextProps.hasOwnProperty(propKey$219) && + nextProps.hasOwnProperty(propKey$220) && (null != propKey || null != lastProp) ) - switch (propKey$219) { + switch (propKey$220) { case "type": type = propKey; break; @@ -14995,7 +15041,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$219, + propKey$220, propKey, nextProps, lastProp @@ -15014,7 +15060,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$219 = null; + propKey = value = defaultValue = propKey$220 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15045,7 +15091,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$219 = type; + propKey$220 = type; break; case "defaultValue": defaultValue = type; @@ -15066,15 +15112,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$219 - ? updateOptions(domElement, !!lastProps, propKey$219, !1) + null != propKey$220 + ? updateOptions(domElement, !!lastProps, propKey$220, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$219 = null; + propKey = propKey$220 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15098,7 +15144,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$219 = name; + propKey$220 = name; break; case "defaultValue": propKey = name; @@ -15112,17 +15158,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$219, propKey); + updateTextarea(domElement, propKey$220, propKey); return; case "option": - for (var propKey$235 in lastProps) + for (var propKey$236 in lastProps) if ( - ((propKey$219 = lastProps[propKey$235]), - lastProps.hasOwnProperty(propKey$235) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$235)) + ((propKey$220 = lastProps[propKey$236]), + lastProps.hasOwnProperty(propKey$236) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$236)) ) - switch (propKey$235) { + switch (propKey$236) { case "selected": domElement.selected = !1; break; @@ -15130,33 +15176,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$235, + propKey$236, null, nextProps, - propKey$219 + propKey$220 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$219 = nextProps[lastDefaultValue]), + ((propKey$220 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$219 !== propKey && - (null != propKey$219 || null != propKey)) + propKey$220 !== propKey && + (null != propKey$220 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$219 && - "function" !== typeof propKey$219 && - "symbol" !== typeof propKey$219; + propKey$220 && + "function" !== typeof propKey$220 && + "symbol" !== typeof propKey$220; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$219, + propKey$220, nextProps, propKey ); @@ -15177,24 +15223,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$240 in lastProps) - (propKey$219 = lastProps[propKey$240]), - lastProps.hasOwnProperty(propKey$240) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$240) && - setProp(domElement, tag, propKey$240, null, nextProps, propKey$219); + for (var propKey$241 in lastProps) + (propKey$220 = lastProps[propKey$241]), + lastProps.hasOwnProperty(propKey$241) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$241) && + setProp(domElement, tag, propKey$241, null, nextProps, propKey$220); for (checked in nextProps) if ( - ((propKey$219 = nextProps[checked]), + ((propKey$220 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$219 !== propKey && - (null != propKey$219 || null != propKey)) + propKey$220 !== propKey && + (null != propKey$220 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$219) + if (null != propKey$220) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15202,7 +15248,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$219, + propKey$220, nextProps, propKey ); @@ -15210,49 +15256,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$245 in lastProps) - (propKey$219 = lastProps[propKey$245]), - lastProps.hasOwnProperty(propKey$245) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$245) && + for (var propKey$246 in lastProps) + (propKey$220 = lastProps[propKey$246]), + lastProps.hasOwnProperty(propKey$246) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$246) && setPropOnCustomElement( domElement, tag, - propKey$245, + propKey$246, null, nextProps, - propKey$219 + propKey$220 ); for (defaultChecked in nextProps) - (propKey$219 = nextProps[defaultChecked]), + (propKey$220 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$219 === propKey || - (null == propKey$219 && null == propKey) || + propKey$220 === propKey || + (null == propKey$220 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$219, + propKey$220, nextProps, propKey ); return; } } - for (var propKey$250 in lastProps) - (propKey$219 = lastProps[propKey$250]), - lastProps.hasOwnProperty(propKey$250) && - null != propKey$219 && - !nextProps.hasOwnProperty(propKey$250) && - setProp(domElement, tag, propKey$250, null, nextProps, propKey$219); + for (var propKey$251 in lastProps) + (propKey$220 = lastProps[propKey$251]), + lastProps.hasOwnProperty(propKey$251) && + null != propKey$220 && + !nextProps.hasOwnProperty(propKey$251) && + setProp(domElement, tag, propKey$251, null, nextProps, propKey$220); for (lastProp in nextProps) - (propKey$219 = nextProps[lastProp]), + (propKey$220 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$219 === propKey || - (null == propKey$219 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$219, nextProps, propKey); + propKey$220 === propKey || + (null == propKey$220 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$220, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -15899,17 +15945,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$259 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$260 = styles$259.get(type); + resource$260 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$259 = { + (resource$260 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$258.set(type, resource$259), + styles$259.set(type, resource$260), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -15924,9 +15970,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$259.state + resource$260.state )); - return resource$259; + return resource$260; } return null; case "script": @@ -16009,37 +16055,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$263 = hoistableRoot.querySelector( + var instance$264 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$263) + if (instance$264) return ( (resource.state.loading |= 4), - (resource.instance = instance$263), - markNodeAsHoistable(instance$263), - instance$263 + (resource.instance = instance$264), + markNodeAsHoistable(instance$264), + instance$264 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$263 = ( + instance$264 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$263); - var linkInstance = instance$263; + markNodeAsHoistable(instance$264); + var linkInstance = instance$264; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$263, "link", instance); + setInitialProperties(instance$264, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$263, props.precedence, hoistableRoot); - return (resource.instance = instance$263); + insertStylesheet(instance$264, props.precedence, hoistableRoot); + return (resource.instance = instance$264); case "script": - instance$263 = getScriptKey(props.src); + instance$264 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$263) + getScriptSelectorFromKey(instance$264) )) ) return ( @@ -16048,7 +16094,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$263))) + if ((styleProps = preloadPropsMap.get(instance$264))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17061,11 +17107,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$285); + var instance = getPublicRootInstance(root$286); originalCallback.call(instance); }; } - var root$285 = createHydrationContainer( + var root$286 = createHydrationContainer( initialChildren, callback, container, @@ -17078,23 +17124,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$285; - container[internalContainerInstanceKey] = root$285.current; + container._reactRootContainer = root$286; + container[internalContainerInstanceKey] = root$286.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$285; + return root$286; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$286 = callback; + var originalCallback$287 = callback; callback = function () { - var instance = getPublicRootInstance(root$287); - originalCallback$286.call(instance); + var instance = getPublicRootInstance(root$288); + originalCallback$287.call(instance); }; } - var root$287 = createFiberRoot( + var root$288 = createFiberRoot( container, 0, !1, @@ -17107,15 +17153,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$287; - container[internalContainerInstanceKey] = root$287.current; + container._reactRootContainer = root$288; + container[internalContainerInstanceKey] = root$288.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$287, parentComponent, callback); + updateContainer(initialChildren, root$288, parentComponent, callback); }); - return root$287; + return root$288; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17180,17 +17226,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1818 = { +var devToolsConfig$jscomp$inline_1819 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-da91ba99", + version: "18.3.0-www-classic-ff9af76d", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2178 = { - bundleType: devToolsConfig$jscomp$inline_1818.bundleType, - version: devToolsConfig$jscomp$inline_1818.version, - rendererPackageName: devToolsConfig$jscomp$inline_1818.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1818.rendererConfig, +var internals$jscomp$inline_2179 = { + bundleType: devToolsConfig$jscomp$inline_1819.bundleType, + version: devToolsConfig$jscomp$inline_1819.version, + rendererPackageName: devToolsConfig$jscomp$inline_1819.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1819.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17206,26 +17252,26 @@ var internals$jscomp$inline_2178 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1818.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1819.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-da91ba99" + reconcilerVersion: "18.3.0-www-classic-ff9af76d" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2179 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2180 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2179.isDisabled && - hook$jscomp$inline_2179.supportsFiber + !hook$jscomp$inline_2180.isDisabled && + hook$jscomp$inline_2180.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2179.inject( - internals$jscomp$inline_2178 + (rendererID = hook$jscomp$inline_2180.inject( + internals$jscomp$inline_2179 )), - (injectedHook = hook$jscomp$inline_2179); + (injectedHook = hook$jscomp$inline_2180); } catch (err) {} } assign(Internals, { @@ -17556,4 +17602,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-classic-da91ba99"; +exports.version = "18.3.0-www-classic-ff9af76d"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 6cd6debcd5d5a..569f3f6d37ed8 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -65,6 +65,7 @@ var assign = Object.assign, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, enableClientRenderFallbackOnTextMismatch = dynamicFeatureFlags.enableClientRenderFallbackOnTextMismatch, @@ -1182,15 +1183,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$17 in styles) - (styleName = styles[styleName$17]), - styles.hasOwnProperty(styleName$17) && - prevStyles[styleName$17] !== styleName && - setValueForStyle(node, styleName$17, styleName); - } else for (var styleName$18 in styles) - styles.hasOwnProperty(styleName$18) && - setValueForStyle(node, styleName$18, styles[styleName$18]); + (styleName = styles[styleName$18]), + styles.hasOwnProperty(styleName$18) && + prevStyles[styleName$18] !== styleName && + setValueForStyle(node, styleName$18, styleName); + } else + for (var styleName$19 in styles) + styles.hasOwnProperty(styleName$19) && + setValueForStyle(node, styleName$19, styles[styleName$19]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1445,36 +1446,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$20 = parentA.child; child$20; ) { - if (child$20 === a) { + for (var didFindChild = !1, child$21 = parentA.child; child$21; ) { + if (child$21 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$20 === b) { + if (child$21 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$20 = child$20.sibling; + child$21 = child$21.sibling; } if (!didFindChild) { - for (child$20 = parentB.child; child$20; ) { - if (child$20 === a) { + for (child$21 = parentB.child; child$21; ) { + if (child$21 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$20 === b) { + if (child$21 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$20 = child$20.sibling; + child$21 = child$21.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -1849,39 +1850,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$25 = firstScheduledRoot; null !== root$25; ) { - if (!onlyLegacy || 0 === root$25.tag) { - var workInProgressRootRenderLanes$27 = workInProgressRootRenderLanes, + for (var root$26 = firstScheduledRoot; null !== root$26; ) { + if (!onlyLegacy || 0 === root$26.tag) { + var workInProgressRootRenderLanes$28 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$25, - root$25 === workInProgressRoot - ? workInProgressRootRenderLanes$27 + root$26, + root$26 === workInProgressRoot + ? workInProgressRootRenderLanes$28 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$27 = root$25; + workInProgressRootRenderLanes$28 = root$26; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { var exitStatus = renderRootSync( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$27.tag && + 0 !== workInProgressRootRenderLanes$28.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, originallyAttemptedLanes, errorRetryLanes ))); @@ -1889,39 +1890,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$27, 0), + prepareFreshStack(workInProgressRootRenderLanes$28, 0), markRootSuspended( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$27), + ensureRootIsScheduled(workInProgressRootRenderLanes$28), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$27.finishedWork = - workInProgressRootRenderLanes$27.current.alternate), - (workInProgressRootRenderLanes$27.finishedLanes = + : ((workInProgressRootRenderLanes$28.finishedWork = + workInProgressRootRenderLanes$28.current.alternate), + (workInProgressRootRenderLanes$28.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$27, + workInProgressRootRenderLanes$28, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$27); + ensureRootIsScheduled(workInProgressRootRenderLanes$28); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$25 = root$25.next; + root$26 = root$26.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3527,7 +3528,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$52 = !1; + didReadFromEntangledAsyncAction$53 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3548,11 +3549,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$52 = !0); + (didReadFromEntangledAsyncAction$53 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$52 = !0); + (didReadFromEntangledAsyncAction$53 = !0); continue; } else (updateLane = { @@ -3598,7 +3599,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$52 && + didReadFromEntangledAsyncAction$53 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4063,14 +4064,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$62 = enqueueUpdate(provider, fiber, lane); - null !== root$62 && - (scheduleUpdateOnFiber(root$62, provider, lane), - entangleTransitions(root$62, provider, lane)); + var root$63 = enqueueUpdate(provider, fiber, lane); + null !== root$63 && + (scheduleUpdateOnFiber(root$63, provider, lane), + entangleTransitions(root$63, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$62 && + null !== root$63 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4310,15 +4311,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$55 = workInProgressRoot; - if (null === root$55) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$55, workInProgressRootRenderLanes) || + var root$56 = workInProgressRoot; + if (null === root$56) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$56, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$55 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$55; - mountEffect(subscribeToStore.bind(null, fiber, root$55, subscribe), [ + root$56 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$56; + mountEffect(subscribeToStore.bind(null, fiber, root$56, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4327,7 +4328,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$55, + root$56, getServerSnapshot, getSnapshot ), @@ -5116,10 +5117,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$72 = workInProgress.stateNode; + root$73 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$72.incompleteTransitions.has(transition)) { + if (!root$73.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5127,11 +5128,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$72.incompleteTransitions.set(transition, markerInstance); + root$73.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$72.incompleteTransitions.forEach(function (markerInstance) { + root$73.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6363,7 +6364,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -6614,7 +6617,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -6837,7 +6842,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -6926,14 +6934,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$111 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$111 = lastTailNode), + for (var lastTailNode$112 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$112 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$111 + null === lastTailNode$112 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$111.sibling = null); + : (lastTailNode$112.sibling = null); } } function bubbleProperties(completedWork) { @@ -6943,19 +6951,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$112 = completedWork.child; null !== child$112; ) - (newChildLanes |= child$112.lanes | child$112.childLanes), - (subtreeFlags |= child$112.subtreeFlags & 31457280), - (subtreeFlags |= child$112.flags & 31457280), - (child$112.return = completedWork), - (child$112 = child$112.sibling); + for (var child$113 = completedWork.child; null !== child$113; ) + (newChildLanes |= child$113.lanes | child$113.childLanes), + (subtreeFlags |= child$113.subtreeFlags & 31457280), + (subtreeFlags |= child$113.flags & 31457280), + (child$113.return = completedWork), + (child$113 = child$113.sibling); else - for (child$112 = completedWork.child; null !== child$112; ) - (newChildLanes |= child$112.lanes | child$112.childLanes), - (subtreeFlags |= child$112.subtreeFlags), - (subtreeFlags |= child$112.flags), - (child$112.return = completedWork), - (child$112 = child$112.sibling); + for (child$113 = completedWork.child; null !== child$113; ) + (newChildLanes |= child$113.lanes | child$113.childLanes), + (subtreeFlags |= child$113.subtreeFlags), + (subtreeFlags |= child$113.flags), + (child$113.return = completedWork), + (child$113 = child$113.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7228,16 +7236,16 @@ function completeWork(current, workInProgress, renderLanes) { break; case 27: case 5: - var isConcurrentMode$23 = 0 !== (currentResource.mode & 1); + var isConcurrentMode$24 = 0 !== (currentResource.mode & 1); !0 !== currentResource.memoizedProps.suppressHydrationWarning && checkForUnmatchedText( current.nodeValue, renderLanes, - isConcurrentMode$23 + isConcurrentMode$24 ); if ( - isConcurrentMode$23 && + isConcurrentMode$24 && enableClientRenderFallbackOnTextMismatch ) { current = !1; @@ -7311,11 +7319,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$23 = null), + (isConcurrentMode$24 = null), null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$23 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$23 !== currentResource && (newProps.flags |= 2048)); + (isConcurrentMode$24 = newProps.memoizedState.cachePool.pool), + isConcurrentMode$24 !== currentResource && (newProps.flags |= 2048)); renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -7335,7 +7343,13 @@ function completeWork(current, workInProgress, renderLanes) { ); case 10: return ( - popProvider(workInProgress.type), bubbleProperties(workInProgress), null + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + bubbleProperties(workInProgress), + null ); case 17: return bubbleProperties(workInProgress), null; @@ -7345,8 +7359,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$23 = currentResource.rendering; - if (null === isConcurrentMode$23) + isConcurrentMode$24 = currentResource.rendering; + if (null === isConcurrentMode$24) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7354,11 +7368,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$23 = findFirstSuspended(current); - if (null !== isConcurrentMode$23) { + isConcurrentMode$24 = findFirstSuspended(current); + if (null !== isConcurrentMode$24) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$23.updateQueue; + current = isConcurrentMode$24.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7384,7 +7398,7 @@ function completeWork(current, workInProgress, renderLanes) { else { if (!newProps) if ( - ((current = findFirstSuspended(isConcurrentMode$23)), + ((current = findFirstSuspended(isConcurrentMode$24)), null !== current) ) { if ( @@ -7396,7 +7410,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$23.alternate && + !isConcurrentMode$24.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7409,13 +7423,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$23.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$23)) + ? ((isConcurrentMode$24.sibling = workInProgress.child), + (workInProgress.child = isConcurrentMode$24)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$23) - : (workInProgress.child = isConcurrentMode$23), - (currentResource.last = isConcurrentMode$23)); + ? (current.sibling = isConcurrentMode$24) + : (workInProgress.child = isConcurrentMode$24), + (currentResource.last = isConcurrentMode$24)); } if (null !== currentResource.tail) return ( @@ -7546,7 +7560,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -7598,7 +7619,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -7702,8 +7727,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$141) { - captureCommitPhaseError(current, nearestMountedAncestor, error$141); + } catch (error$142) { + captureCommitPhaseError(current, nearestMountedAncestor, error$142); } else ref.current = null; } @@ -7740,7 +7765,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$198) { + } catch (e$199) { JSCompiler_temp = null; break a; } @@ -8019,11 +8044,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$143) { + } catch (error$144) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$143 + error$144 ); } } @@ -8703,8 +8728,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$156) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$156); + } catch (error$157) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$157); } } break; @@ -8876,11 +8901,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$157) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$158 ); } } @@ -8918,8 +8943,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$158) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$158); + } catch (error$159) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$159); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -8930,8 +8955,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$161) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$161); + } catch (error$162) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$162); } } break; @@ -8945,8 +8970,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$162) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$162); + } catch (error$163) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$163); } } break; @@ -8960,8 +8985,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$163) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$163); + } catch (error$164) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$164); } break; case 4: @@ -8991,8 +9016,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$165) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$165); + } catch (error$166) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$166); } current = finishedWork.updateQueue; null !== current && @@ -9070,11 +9095,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$146) { + } catch (error$147) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$146 + error$147 ); } } else if ( @@ -9149,21 +9174,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$147 = JSCompiler_inline_result.stateNode; + var parent$148 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$147, ""), + (setTextContent(parent$148, ""), (JSCompiler_inline_result.flags &= -33)); - var before$148 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$148, parent$147); + var before$149 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$149, parent$148); break; case 3: case 4: - var parent$149 = JSCompiler_inline_result.stateNode.containerInfo, - before$150 = getHostSibling(finishedWork); + var parent$150 = JSCompiler_inline_result.stateNode.containerInfo, + before$151 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$150, - parent$149 + before$151, + parent$150 ); break; default: @@ -9633,9 +9658,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$172 = finishedWork.stateNode; + var instance$173 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$172._visibility & 4 + ? instance$173._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9648,7 +9673,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$172._visibility |= 4), + : ((instance$173._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9656,7 +9681,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$172._visibility |= 4), + : ((instance$173._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -9669,7 +9694,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$172 + instance$173 ); break; case 24: @@ -10613,8 +10638,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$180) { - handleThrow(root, thrownValue$180); + } catch (thrownValue$181) { + handleThrow(root, thrownValue$181); } while (1); lanes && root.shellSuspendCounter++; @@ -10719,8 +10744,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$182) { - handleThrow(root, thrownValue$182); + } catch (thrownValue$183) { + handleThrow(root, thrownValue$183); } while (1); resetContextDependencies(); @@ -10939,12 +10964,12 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$186 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$187 = commitBeforeMutationEffects( root, finishedWork ); commitMutationEffectsOnFiber(finishedWork, root); - shouldFireAfterActiveInstanceBlur$186 && + shouldFireAfterActiveInstanceBlur$187 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11025,7 +11050,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$187 = rootWithPendingPassiveEffects, + var root$188 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11041,7 +11066,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$187, remainingLanes); + releaseRootPooledCache(root$188, remainingLanes); } } return !1; @@ -11638,7 +11663,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = init.value; @@ -11660,7 +11687,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (init = workInProgress.type._context), + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), @@ -12017,12 +12046,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 10; + fiberTag = enableRenderableContext ? 10 : 9; break a; case REACT_CONSUMER_TYPE: - fiberTag = 9; - break a; + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -12237,12 +12272,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$189 = fiber.stateNode; - if (root$189.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$189.pendingLanes); + var root$190 = fiber.stateNode; + if (root$190.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$190.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$189, lanes), - ensureRootIsScheduled(root$189), + (upgradePendingLanesToSync(root$190, lanes), + ensureRootIsScheduled(root$190), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13454,19 +13489,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$349; + var JSCompiler_inline_result$jscomp$350; if (canUseDOM) { - var isSupported$jscomp$inline_1550 = "oninput" in document; - if (!isSupported$jscomp$inline_1550) { - var element$jscomp$inline_1551 = document.createElement("div"); - element$jscomp$inline_1551.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1550 = - "function" === typeof element$jscomp$inline_1551.oninput; + var isSupported$jscomp$inline_1551 = "oninput" in document; + if (!isSupported$jscomp$inline_1551) { + var element$jscomp$inline_1552 = document.createElement("div"); + element$jscomp$inline_1552.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1551 = + "function" === typeof element$jscomp$inline_1552.oninput; } - JSCompiler_inline_result$jscomp$349 = isSupported$jscomp$inline_1550; - } else JSCompiler_inline_result$jscomp$349 = !1; + JSCompiler_inline_result$jscomp$350 = isSupported$jscomp$inline_1551; + } else JSCompiler_inline_result$jscomp$350 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$349 && + JSCompiler_inline_result$jscomp$350 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13775,20 +13810,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1591 = 0; - i$jscomp$inline_1591 < simpleEventPluginEvents.length; - i$jscomp$inline_1591++ + var i$jscomp$inline_1592 = 0; + i$jscomp$inline_1592 < simpleEventPluginEvents.length; + i$jscomp$inline_1592++ ) { - var eventName$jscomp$inline_1592 = - simpleEventPluginEvents[i$jscomp$inline_1591], - domEventName$jscomp$inline_1593 = - eventName$jscomp$inline_1592.toLowerCase(), - capitalizedEvent$jscomp$inline_1594 = - eventName$jscomp$inline_1592[0].toUpperCase() + - eventName$jscomp$inline_1592.slice(1); + var eventName$jscomp$inline_1593 = + simpleEventPluginEvents[i$jscomp$inline_1592], + domEventName$jscomp$inline_1594 = + eventName$jscomp$inline_1593.toLowerCase(), + capitalizedEvent$jscomp$inline_1595 = + eventName$jscomp$inline_1593[0].toUpperCase() + + eventName$jscomp$inline_1593.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1593, - "on" + capitalizedEvent$jscomp$inline_1594 + domEventName$jscomp$inline_1594, + "on" + capitalizedEvent$jscomp$inline_1595 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15262,14 +15297,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$225 in nextProps) { - var propKey = nextProps[propKey$225]; - lastProp = lastProps[propKey$225]; + for (var propKey$226 in nextProps) { + var propKey = nextProps[propKey$226]; + lastProp = lastProps[propKey$226]; if ( - nextProps.hasOwnProperty(propKey$225) && + nextProps.hasOwnProperty(propKey$226) && (null != propKey || null != lastProp) ) - switch (propKey$225) { + switch (propKey$226) { case "type": type = propKey; break; @@ -15298,7 +15333,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$225, + propKey$226, propKey, nextProps, lastProp @@ -15317,7 +15352,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$225 = null; + propKey = value = defaultValue = propKey$226 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15348,7 +15383,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$225 = type; + propKey$226 = type; break; case "defaultValue": defaultValue = type; @@ -15369,15 +15404,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$225 - ? updateOptions(domElement, !!lastProps, propKey$225, !1) + null != propKey$226 + ? updateOptions(domElement, !!lastProps, propKey$226, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$225 = null; + propKey = propKey$226 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15401,7 +15436,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$225 = name; + propKey$226 = name; break; case "defaultValue": propKey = name; @@ -15415,17 +15450,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$225, propKey); + updateTextarea(domElement, propKey$226, propKey); return; case "option": - for (var propKey$241 in lastProps) + for (var propKey$242 in lastProps) if ( - ((propKey$225 = lastProps[propKey$241]), - lastProps.hasOwnProperty(propKey$241) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$241)) + ((propKey$226 = lastProps[propKey$242]), + lastProps.hasOwnProperty(propKey$242) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$242)) ) - switch (propKey$241) { + switch (propKey$242) { case "selected": domElement.selected = !1; break; @@ -15433,33 +15468,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$241, + propKey$242, null, nextProps, - propKey$225 + propKey$226 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$225 = nextProps[lastDefaultValue]), + ((propKey$226 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$226 !== propKey && + (null != propKey$226 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$225 && - "function" !== typeof propKey$225 && - "symbol" !== typeof propKey$225; + propKey$226 && + "function" !== typeof propKey$226 && + "symbol" !== typeof propKey$226; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$225, + propKey$226, nextProps, propKey ); @@ -15480,24 +15515,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$246 in lastProps) - (propKey$225 = lastProps[propKey$246]), - lastProps.hasOwnProperty(propKey$246) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$246) && - setProp(domElement, tag, propKey$246, null, nextProps, propKey$225); + for (var propKey$247 in lastProps) + (propKey$226 = lastProps[propKey$247]), + lastProps.hasOwnProperty(propKey$247) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$247) && + setProp(domElement, tag, propKey$247, null, nextProps, propKey$226); for (checked in nextProps) if ( - ((propKey$225 = nextProps[checked]), + ((propKey$226 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$225 !== propKey && - (null != propKey$225 || null != propKey)) + propKey$226 !== propKey && + (null != propKey$226 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$225) + if (null != propKey$226) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15505,7 +15540,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$225, + propKey$226, nextProps, propKey ); @@ -15513,49 +15548,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$251 in lastProps) - (propKey$225 = lastProps[propKey$251]), - lastProps.hasOwnProperty(propKey$251) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$251) && + for (var propKey$252 in lastProps) + (propKey$226 = lastProps[propKey$252]), + lastProps.hasOwnProperty(propKey$252) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$252) && setPropOnCustomElement( domElement, tag, - propKey$251, + propKey$252, null, nextProps, - propKey$225 + propKey$226 ); for (defaultChecked in nextProps) - (propKey$225 = nextProps[defaultChecked]), + (propKey$226 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$225 === propKey || - (null == propKey$225 && null == propKey) || + propKey$226 === propKey || + (null == propKey$226 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$225, + propKey$226, nextProps, propKey ); return; } } - for (var propKey$256 in lastProps) - (propKey$225 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - null != propKey$225 && - !nextProps.hasOwnProperty(propKey$256) && - setProp(domElement, tag, propKey$256, null, nextProps, propKey$225); + for (var propKey$257 in lastProps) + (propKey$226 = lastProps[propKey$257]), + lastProps.hasOwnProperty(propKey$257) && + null != propKey$226 && + !nextProps.hasOwnProperty(propKey$257) && + setProp(domElement, tag, propKey$257, null, nextProps, propKey$226); for (lastProp in nextProps) - (propKey$225 = nextProps[lastProp]), + (propKey$226 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$225 === propKey || - (null == propKey$225 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$225, nextProps, propKey); + propKey$226 === propKey || + (null == propKey$226 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$226, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16188,17 +16223,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$264 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$265 = styles$264.get(type); - resource$265 || + var styles$265 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$266 = styles$265.get(type); + resource$266 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$265 = { + (resource$266 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$264.set(type, resource$265), + styles$265.set(type, resource$266), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16213,9 +16248,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$265.state + resource$266.state )); - return resource$265; + return resource$266; } return null; case "script": @@ -16298,37 +16333,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$269 = hoistableRoot.querySelector( + var instance$270 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$269) + if (instance$270) return ( (resource.state.loading |= 4), - (resource.instance = instance$269), - markNodeAsHoistable(instance$269), - instance$269 + (resource.instance = instance$270), + markNodeAsHoistable(instance$270), + instance$270 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$269 = ( + instance$270 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$269); - var linkInstance = instance$269; + markNodeAsHoistable(instance$270); + var linkInstance = instance$270; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$269, "link", instance); + setInitialProperties(instance$270, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$269, props.precedence, hoistableRoot); - return (resource.instance = instance$269); + insertStylesheet(instance$270, props.precedence, hoistableRoot); + return (resource.instance = instance$270); case "script": - instance$269 = getScriptKey(props.src); + instance$270 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$269) + getScriptSelectorFromKey(instance$270) )) ) return ( @@ -16337,7 +16372,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$269))) + if ((styleProps = preloadPropsMap.get(instance$270))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -16707,17 +16742,17 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1777 = { +var devToolsConfig$jscomp$inline_1778 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-134a0b47", + version: "18.3.0-www-modern-7d36ed41", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2142 = { - bundleType: devToolsConfig$jscomp$inline_1777.bundleType, - version: devToolsConfig$jscomp$inline_1777.version, - rendererPackageName: devToolsConfig$jscomp$inline_1777.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1777.rendererConfig, +var internals$jscomp$inline_2143 = { + bundleType: devToolsConfig$jscomp$inline_1778.bundleType, + version: devToolsConfig$jscomp$inline_1778.version, + rendererPackageName: devToolsConfig$jscomp$inline_1778.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1778.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -16734,26 +16769,26 @@ var internals$jscomp$inline_2142 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1777.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1778.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-134a0b47" + reconcilerVersion: "18.3.0-www-modern-7d36ed41" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2143 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2144 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2143.isDisabled && - hook$jscomp$inline_2143.supportsFiber + !hook$jscomp$inline_2144.isDisabled && + hook$jscomp$inline_2144.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2143.inject( - internals$jscomp$inline_2142 + (rendererID = hook$jscomp$inline_2144.inject( + internals$jscomp$inline_2143 )), - (injectedHook = hook$jscomp$inline_2143); + (injectedHook = hook$jscomp$inline_2144); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; @@ -17012,4 +17047,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-modern-134a0b47"; +exports.version = "18.3.0-www-modern-7d36ed41"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index c4a11dfe339ea..3bba88e827528 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -66,6 +66,7 @@ var ReactSharedInternals = transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, enableClientRenderFallbackOnTextMismatch = dynamicFeatureFlags.enableClientRenderFallbackOnTextMismatch, @@ -128,10 +129,17 @@ function getComponentNameFromType(type) { } if ("object" === typeof type) switch (type.$$typeof) { + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) break; + else return (type._context.displayName || "Context") + ".Provider"; case REACT_CONTEXT_TYPE: - return (type.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type.displayName || "Context") + ".Consumer"; case REACT_CONSUMER_TYPE: - return (type._context.displayName || "Context") + ".Consumer"; + if (enableRenderableContext) + return (type._context.displayName || "Context") + ".Consumer"; + break; case REACT_FORWARD_REF_TYPE: var innerType = type.render; type = type.displayName; @@ -161,9 +169,13 @@ function getComponentNameFromFiber(fiber) { case 24: return "Cache"; case 9: - return (type._context.displayName || "Context") + ".Consumer"; + return enableRenderableContext + ? (type._context.displayName || "Context") + ".Consumer" + : (type.displayName || "Context") + ".Consumer"; case 10: - return (type.displayName || "Context") + ".Provider"; + return enableRenderableContext + ? (type.displayName || "Context") + ".Provider" + : (type._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: @@ -273,36 +285,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$0 = parentA.child; child$0; ) { - if (child$0 === a) { + for (var didFindChild = !1, child$1 = parentA.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) { - for (child$0 = parentB.child; child$0; ) { - if (child$0 === a) { + for (child$1 = parentB.child; child$1; ) { + if (child$1 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$0 === b) { + if (child$1 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$0 = child$0.sibling; + child$1 = child$1.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -494,7 +506,7 @@ function injectProfilingHooks(profilingHooks) { } function getLaneLabelMap() { if (enableSchedulingProfiler) { - for (var map = new Map(), lane = 1, index$1 = 0; 31 > index$1; index$1++) { + for (var map = new Map(), lane = 1, index$2 = 0; 31 > index$2; index$2++) { var label = getLabelForLane(lane); map.set(lane, label); lane *= 2; @@ -748,18 +760,18 @@ function markRootFinished(root, remainingLanes, spawnedLane) { 0 < noLongerPendingLanes; ) { - var index$5 = 31 - clz32(noLongerPendingLanes), - lane = 1 << index$5; - remainingLanes[index$5] = 0; - expirationTimes[index$5] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index$5]; + var index$6 = 31 - clz32(noLongerPendingLanes), + lane = 1 << index$6; + remainingLanes[index$6] = 0; + expirationTimes[index$6] = -1; + var hiddenUpdatesForLane = hiddenUpdates[index$6]; if (null !== hiddenUpdatesForLane) for ( - hiddenUpdates[index$5] = null, index$5 = 0; - index$5 < hiddenUpdatesForLane.length; - index$5++ + hiddenUpdates[index$6] = null, index$6 = 0; + index$6 < hiddenUpdatesForLane.length; + index$6++ ) { - var update = hiddenUpdatesForLane[index$5]; + var update = hiddenUpdatesForLane[index$6]; null !== update && (update.lane &= -536870913); } noLongerPendingLanes &= ~lane; @@ -779,10 +791,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { function markRootEntangled(root, entangledLanes) { var rootEntangledLanes = (root.entangledLanes |= entangledLanes); for (root = root.entanglements; rootEntangledLanes; ) { - var index$6 = 31 - clz32(rootEntangledLanes), - lane = 1 << index$6; - (lane & entangledLanes) | (root[index$6] & entangledLanes) && - (root[index$6] |= entangledLanes); + var index$7 = 31 - clz32(rootEntangledLanes), + lane = 1 << index$7; + (lane & entangledLanes) | (root[index$7] & entangledLanes) && + (root[index$7] |= entangledLanes); rootEntangledLanes &= ~lane; } } @@ -797,9 +809,9 @@ function upgradePendingLanesToSync(root, lanesToUpgrade) { function addFiberToLanesMap(root, fiber, lanes) { if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) { - var index$8 = 31 - clz32(lanes), - lane = 1 << index$8; - root[index$8].add(fiber); + var index$9 = 31 - clz32(lanes), + lane = 1 << index$9; + root[index$9].add(fiber); lanes &= ~lane; } } @@ -811,27 +823,27 @@ function movePendingFibersToMemoized(root, lanes) { 0 < lanes; ) { - var index$9 = 31 - clz32(lanes); - root = 1 << index$9; - index$9 = pendingUpdatersLaneMap[index$9]; - 0 < index$9.size && - (index$9.forEach(function (fiber) { + var index$10 = 31 - clz32(lanes); + root = 1 << index$10; + index$10 = pendingUpdatersLaneMap[index$10]; + 0 < index$10.size && + (index$10.forEach(function (fiber) { var alternate = fiber.alternate; (null !== alternate && memoizedUpdaters.has(alternate)) || memoizedUpdaters.add(fiber); }), - index$9.clear()); + index$10.clear()); lanes &= ~root; } } function getTransitionsForLanes(root, lanes) { if (!enableTransitionTracing) return null; for (var transitionsForLanes = []; 0 < lanes; ) { - var index$11 = 31 - clz32(lanes), - lane = 1 << index$11; - index$11 = root.transitionLanes[index$11]; - null !== index$11 && - index$11.forEach(function (transition) { + var index$12 = 31 - clz32(lanes), + lane = 1 << index$12; + index$12 = root.transitionLanes[index$12]; + null !== index$12 && + index$12.forEach(function (transition) { transitionsForLanes.push(transition); }); lanes &= ~lane; @@ -841,10 +853,10 @@ function getTransitionsForLanes(root, lanes) { function clearTransitionsForLanes(root, lanes) { if (enableTransitionTracing) for (; 0 < lanes; ) { - var index$12 = 31 - clz32(lanes), - lane = 1 << index$12; - null !== root.transitionLanes[index$12] && - (root.transitionLanes[index$12] = null); + var index$13 = 31 - clz32(lanes), + lane = 1 << index$13; + null !== root.transitionLanes[index$13] && + (root.transitionLanes[index$13] = null); lanes &= ~lane; } } @@ -915,8 +927,8 @@ function setValueForAttribute(node, name, value) { node.removeAttribute(name); return; case "boolean": - var prefix$13 = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix$13 && "aria-" !== prefix$13) { + var prefix$14 = name.toLowerCase().slice(0, 5); + if ("data-" !== prefix$14 && "aria-" !== prefix$14) { node.removeAttribute(name); return; } @@ -998,16 +1010,16 @@ function describeNativeComponentFrame(fn, construct) { } else { try { Fake.call(); - } catch (x$14) { - control = x$14; + } catch (x$15) { + control = x$15; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x$15) { - control = x$15; + } catch (x$16) { + control = x$16; } (Fake = fn()) && "function" === typeof Fake.catch && @@ -1475,15 +1487,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$21 in styles) - (styleName = styles[styleName$21]), - styles.hasOwnProperty(styleName$21) && - prevStyles[styleName$21] !== styleName && - setValueForStyle(node, styleName$21, styleName); - } else for (var styleName$22 in styles) - styles.hasOwnProperty(styleName$22) && - setValueForStyle(node, styleName$22, styles[styleName$22]); + (styleName = styles[styleName$22]), + styles.hasOwnProperty(styleName$22) && + prevStyles[styleName$22] !== styleName && + setValueForStyle(node, styleName$22, styleName); + } else + for (var styleName$23 in styles) + styles.hasOwnProperty(styleName$23) && + setValueForStyle(node, styleName$23, styles[styleName$23]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -2093,41 +2105,41 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$28 = firstScheduledRoot; null !== root$28; ) { - if (!onlyLegacy || 0 === root$28.tag) { - var workInProgressRootRenderLanes$30 = workInProgressRootRenderLanes, + for (var root$29 = firstScheduledRoot; null !== root$29; ) { + if (!onlyLegacy || 0 === root$29.tag) { + var workInProgressRootRenderLanes$31 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$28, - root$28 === workInProgressRoot - ? workInProgressRootRenderLanes$30 + root$29, + root$29 === workInProgressRoot + ? workInProgressRootRenderLanes$31 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$30 = root$28; + workInProgressRootRenderLanes$31 = root$29; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$30.tag && + 0 !== workInProgressRootRenderLanes$31.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, originallyAttemptedLanes, errorRetryLanes ))); @@ -2135,39 +2147,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$30, 0), + prepareFreshStack(workInProgressRootRenderLanes$31, 0), markRootSuspended( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$30), + ensureRootIsScheduled(workInProgressRootRenderLanes$31), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$30.finishedWork = - workInProgressRootRenderLanes$30.current.alternate), - (workInProgressRootRenderLanes$30.finishedLanes = + : ((workInProgressRootRenderLanes$31.finishedWork = + workInProgressRootRenderLanes$31.current.alternate), + (workInProgressRootRenderLanes$31.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$30); + ensureRootIsScheduled(workInProgressRootRenderLanes$31); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$28 = root$28.next; + root$29 = root$29.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -2224,12 +2236,12 @@ function scheduleTaskForRootDuringMicrotask(root, currentTime) { 0 < pendingLanes; ) { - var index$3 = 31 - clz32(pendingLanes), - lane = 1 << index$3, - expirationTime = expirationTimes[index$3]; + var index$4 = 31 - clz32(pendingLanes), + lane = 1 << index$4, + expirationTime = expirationTimes[index$4]; if (-1 === expirationTime) { if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes)) - expirationTimes[index$3] = computeExpirationTime(lane, currentTime); + expirationTimes[index$4] = computeExpirationTime(lane, currentTime); } else expirationTime <= currentTime && (root.expiredLanes |= lane); pendingLanes &= ~lane; } @@ -3773,7 +3785,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$55 = !1; + didReadFromEntangledAsyncAction$56 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3794,11 +3806,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); continue; } else (updateLane = { @@ -3844,7 +3856,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$55 && + didReadFromEntangledAsyncAction$56 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4309,14 +4321,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$65 = enqueueUpdate(provider, fiber, lane); - null !== root$65 && - (scheduleUpdateOnFiber(root$65, provider, lane), - entangleTransitions(root$65, provider, lane)); + var root$66 = enqueueUpdate(provider, fiber, lane); + null !== root$66 && + (scheduleUpdateOnFiber(root$66, provider, lane), + entangleTransitions(root$66, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$65 && + null !== root$66 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4559,15 +4571,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$58 = workInProgressRoot; - if (null === root$58) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$58, workInProgressRootRenderLanes) || + var root$59 = workInProgressRoot; + if (null === root$59) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$59, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$58 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$58; - mountEffect(subscribeToStore.bind(null, fiber, root$58, subscribe), [ + root$59 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$59; + mountEffect(subscribeToStore.bind(null, fiber, root$59, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4576,7 +4588,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$58, + root$59, getServerSnapshot, getSnapshot ), @@ -5450,10 +5462,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$77 = workInProgress.stateNode; + root$78 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$77.incompleteTransitions.has(transition)) { + if (!root$78.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5461,11 +5473,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$77.incompleteTransitions.set(transition, markerInstance); + root$78.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$77.incompleteTransitions.forEach(function (markerInstance) { + root$78.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6757,7 +6769,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -7015,7 +7029,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -7238,7 +7254,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -7327,14 +7346,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$117 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), + for (var lastTailNode$118 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$118 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$117 + null === lastTailNode$118 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$117.sibling = null); + : (lastTailNode$118.sibling = null); } } function bubbleProperties(completedWork) { @@ -7346,53 +7365,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$119 = completedWork.selfBaseDuration, - child$120 = completedWork.child; - null !== child$120; + var treeBaseDuration$120 = completedWork.selfBaseDuration, + child$121 = completedWork.child; + null !== child$121; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 31457280), - (subtreeFlags |= child$120.flags & 31457280), - (treeBaseDuration$119 += child$120.treeBaseDuration), - (child$120 = child$120.sibling); - completedWork.treeBaseDuration = treeBaseDuration$119; + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags & 31457280), + (subtreeFlags |= child$121.flags & 31457280), + (treeBaseDuration$120 += child$121.treeBaseDuration), + (child$121 = child$121.sibling); + completedWork.treeBaseDuration = treeBaseDuration$120; } else for ( - treeBaseDuration$119 = completedWork.child; - null !== treeBaseDuration$119; + treeBaseDuration$120 = completedWork.child; + null !== treeBaseDuration$120; ) (newChildLanes |= - treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), - (subtreeFlags |= treeBaseDuration$119.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$119.flags & 31457280), - (treeBaseDuration$119.return = completedWork), - (treeBaseDuration$119 = treeBaseDuration$119.sibling); + treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), + (subtreeFlags |= treeBaseDuration$120.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$120.flags & 31457280), + (treeBaseDuration$120.return = completedWork), + (treeBaseDuration$120 = treeBaseDuration$120.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$119 = completedWork.actualDuration; - child$120 = completedWork.selfBaseDuration; + treeBaseDuration$120 = completedWork.actualDuration; + child$121 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$119 += child.actualDuration), - (child$120 += child.treeBaseDuration), + (treeBaseDuration$120 += child.actualDuration), + (child$121 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$119; - completedWork.treeBaseDuration = child$120; + completedWork.actualDuration = treeBaseDuration$120; + completedWork.treeBaseDuration = child$121; } else for ( - treeBaseDuration$119 = completedWork.child; - null !== treeBaseDuration$119; + treeBaseDuration$120 = completedWork.child; + null !== treeBaseDuration$120; ) (newChildLanes |= - treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), - (subtreeFlags |= treeBaseDuration$119.subtreeFlags), - (subtreeFlags |= treeBaseDuration$119.flags), - (treeBaseDuration$119.return = completedWork), - (treeBaseDuration$119 = treeBaseDuration$119.sibling); + treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), + (subtreeFlags |= treeBaseDuration$120.subtreeFlags), + (subtreeFlags |= treeBaseDuration$120.flags), + (treeBaseDuration$120.return = completedWork), + (treeBaseDuration$120 = treeBaseDuration$120.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7671,16 +7690,16 @@ function completeWork(current, workInProgress, renderLanes) { break; case 27: case 5: - var isConcurrentMode$26 = 0 !== (currentResource.mode & 1); + var isConcurrentMode$27 = 0 !== (currentResource.mode & 1); !0 !== currentResource.memoizedProps.suppressHydrationWarning && checkForUnmatchedText( current.nodeValue, renderLanes, - isConcurrentMode$26 + isConcurrentMode$27 ); if ( - isConcurrentMode$26 && + isConcurrentMode$27 && enableClientRenderFallbackOnTextMismatch ) { current = !1; @@ -7772,11 +7791,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$26 = null), + (isConcurrentMode$27 = null), null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$26 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$26 !== currentResource && (newProps.flags |= 2048)); + (isConcurrentMode$27 = newProps.memoizedState.cachePool.pool), + isConcurrentMode$27 !== currentResource && (newProps.flags |= 2048)); renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -7801,7 +7820,13 @@ function completeWork(current, workInProgress, renderLanes) { ); case 10: return ( - popProvider(workInProgress.type), bubbleProperties(workInProgress), null + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + bubbleProperties(workInProgress), + null ); case 17: return ( @@ -7815,8 +7840,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$26 = currentResource.rendering; - if (null === isConcurrentMode$26) + isConcurrentMode$27 = currentResource.rendering; + if (null === isConcurrentMode$27) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7824,11 +7849,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$26 = findFirstSuspended(current); - if (null !== isConcurrentMode$26) { + isConcurrentMode$27 = findFirstSuspended(current); + if (null !== isConcurrentMode$27) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$26.updateQueue; + current = isConcurrentMode$27.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7854,7 +7879,7 @@ function completeWork(current, workInProgress, renderLanes) { else { if (!newProps) if ( - ((current = findFirstSuspended(isConcurrentMode$26)), + ((current = findFirstSuspended(isConcurrentMode$27)), null !== current) ) { if ( @@ -7866,7 +7891,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$26.alternate && + !isConcurrentMode$27.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7879,13 +7904,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$26.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$26)) + ? ((isConcurrentMode$27.sibling = workInProgress.child), + (workInProgress.child = isConcurrentMode$27)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$26) - : (workInProgress.child = isConcurrentMode$26), - (currentResource.last = isConcurrentMode$26)); + ? (current.sibling = isConcurrentMode$27) + : (workInProgress.child = isConcurrentMode$27), + (currentResource.last = isConcurrentMode$27)); } if (null !== currentResource.tail) return ( @@ -8025,7 +8050,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -8086,7 +8118,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -8224,8 +8260,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$153) { - captureCommitPhaseError(current, nearestMountedAncestor, error$153); + } catch (error$154) { + captureCommitPhaseError(current, nearestMountedAncestor, error$154); } else ref.current = null; } @@ -8262,7 +8298,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$213) { + } catch (e$214) { JSCompiler_temp = null; break a; } @@ -8519,11 +8555,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$155 = commitTime, + var commitTime$156 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$155); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$156); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -8550,8 +8586,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$157) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$157); + } catch (error$158) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$158); } } function commitClassCallbacks(finishedWork) { @@ -8650,11 +8686,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$158) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$159 ); } else { @@ -8671,11 +8707,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$159) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$160 ); } recordLayoutEffectDuration(finishedWork); @@ -8686,11 +8722,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$160) { + } catch (error$161) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$160 + error$161 ); } } @@ -9396,22 +9432,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$175) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$176 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$176) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$177 ); } } @@ -9584,11 +9620,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$177) { + } catch (error$178) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$177 + error$178 ); } } @@ -9626,8 +9662,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$178) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$178); + } catch (error$179) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$179); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9638,8 +9674,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$182) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$182); } } break; @@ -9653,8 +9689,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$182) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$182); + } catch (error$183) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$183); } } break; @@ -9668,8 +9704,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$183) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$183); + } catch (error$184) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$184); } break; case 4: @@ -9699,8 +9735,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$185) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$185); + } catch (error$186) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$186); } current = finishedWork.updateQueue; null !== current && @@ -9778,11 +9814,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$165) { + } catch (error$166) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$165 + error$166 ); } } else if ( @@ -9857,21 +9893,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$166 = JSCompiler_inline_result.stateNode; + var parent$167 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$166, ""), + (setTextContent(parent$167, ""), (JSCompiler_inline_result.flags &= -33)); - var before$167 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$167, parent$166); + var before$168 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$168, parent$167); break; case 3: case 4: - var parent$168 = JSCompiler_inline_result.stateNode.containerInfo, - before$169 = getHostSibling(finishedWork); + var parent$169 = JSCompiler_inline_result.stateNode.containerInfo, + before$170 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$169, - parent$168 + before$170, + parent$169 ); break; default: @@ -10063,8 +10099,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$188) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$188); + } catch (error$189) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$189); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10363,9 +10399,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$193 = finishedWork.stateNode; + var instance$194 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$193._visibility & 4 + ? instance$194._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10378,7 +10414,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$193._visibility |= 4), + : ((instance$194._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10386,7 +10422,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$193._visibility |= 4), + : ((instance$194._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10399,7 +10435,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$193 + instance$194 ); break; case 24: @@ -11182,9 +11218,9 @@ function markRootSuspended(root, suspendedLanes, spawnedLane) { 0 < lanes; ) { - var index$4 = 31 - clz32(lanes), - lane = 1 << index$4; - expirationTimes[index$4] = -1; + var index$5 = 31 - clz32(lanes), + lane = 1 << index$5; + expirationTimes[index$5] = -1; lanes &= ~lane; } 0 !== spawnedLane && @@ -11276,9 +11312,9 @@ function prepareFreshStack(root, lanes) { 0 < allEntangledLanes; ) { - var index$2 = 31 - clz32(allEntangledLanes), - lane = 1 << index$2; - lanes |= root[index$2]; + var index$3 = 31 - clz32(allEntangledLanes), + lane = 1 << index$3; + lanes |= root[index$3]; allEntangledLanes &= ~lane; } entangledRenderLanes = lanes; @@ -11419,8 +11455,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$201) { - handleThrow(root, thrownValue$201); + } catch (thrownValue$202) { + handleThrow(root, thrownValue$202); } while (1); lanes && root.shellSuspendCounter++; @@ -11536,8 +11572,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$203) { - handleThrow(root, thrownValue$203); + } catch (thrownValue$204) { + handleThrow(root, thrownValue$204); } while (1); resetContextDependencies(); @@ -11794,7 +11830,7 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$207 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$208 = commitBeforeMutationEffects( root, finishedWork ); @@ -11802,7 +11838,7 @@ function commitRootImpl( enableProfilerNestedUpdateScheduledHook && (rootCommittingMutationOrLayoutEffects = root); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$207 && + shouldFireAfterActiveInstanceBlur$208 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11898,7 +11934,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$208 = rootWithPendingPassiveEffects, + var root$209 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11914,7 +11950,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$208, remainingLanes); + releaseRootPooledCache(root$209, remainingLanes); } } return !1; @@ -12554,7 +12590,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; context = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = context.value; @@ -12584,7 +12622,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (context = workInProgress.type._context), + (context = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (context = readContext(context)), @@ -12967,12 +13007,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 10; + fiberTag = enableRenderableContext ? 10 : 9; break a; case REACT_CONSUMER_TYPE: - fiberTag = 9; - break a; + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -13285,12 +13331,12 @@ function getPublicRootInstance(container) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$211 = fiber.stateNode; - if (root$211.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$211.pendingLanes); + var root$212 = fiber.stateNode; + if (root$212.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$212.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$211, lanes), - ensureRootIsScheduled(root$211), + (upgradePendingLanesToSync(root$212, lanes), + ensureRootIsScheduled(root$212), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now$1() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -13856,19 +13902,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$372; + var JSCompiler_inline_result$jscomp$373; if (canUseDOM) { - var isSupported$jscomp$inline_1635 = "oninput" in document; - if (!isSupported$jscomp$inline_1635) { - var element$jscomp$inline_1636 = document.createElement("div"); - element$jscomp$inline_1636.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1635 = - "function" === typeof element$jscomp$inline_1636.oninput; + var isSupported$jscomp$inline_1636 = "oninput" in document; + if (!isSupported$jscomp$inline_1636) { + var element$jscomp$inline_1637 = document.createElement("div"); + element$jscomp$inline_1637.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1636 = + "function" === typeof element$jscomp$inline_1637.oninput; } - JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1635; - } else JSCompiler_inline_result$jscomp$372 = !1; + JSCompiler_inline_result$jscomp$373 = isSupported$jscomp$inline_1636; + } else JSCompiler_inline_result$jscomp$373 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$372 && + JSCompiler_inline_result$jscomp$373 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14240,20 +14286,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1676 = 0; - i$jscomp$inline_1676 < simpleEventPluginEvents.length; - i$jscomp$inline_1676++ + var i$jscomp$inline_1677 = 0; + i$jscomp$inline_1677 < simpleEventPluginEvents.length; + i$jscomp$inline_1677++ ) { - var eventName$jscomp$inline_1677 = - simpleEventPluginEvents[i$jscomp$inline_1676], - domEventName$jscomp$inline_1678 = - eventName$jscomp$inline_1677.toLowerCase(), - capitalizedEvent$jscomp$inline_1679 = - eventName$jscomp$inline_1677[0].toUpperCase() + - eventName$jscomp$inline_1677.slice(1); + var eventName$jscomp$inline_1678 = + simpleEventPluginEvents[i$jscomp$inline_1677], + domEventName$jscomp$inline_1679 = + eventName$jscomp$inline_1678.toLowerCase(), + capitalizedEvent$jscomp$inline_1680 = + eventName$jscomp$inline_1678[0].toUpperCase() + + eventName$jscomp$inline_1678.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1678, - "on" + capitalizedEvent$jscomp$inline_1679 + domEventName$jscomp$inline_1679, + "on" + capitalizedEvent$jscomp$inline_1680 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -15728,14 +15774,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$240 in nextProps) { - var propKey = nextProps[propKey$240]; - lastProp = lastProps[propKey$240]; + for (var propKey$241 in nextProps) { + var propKey = nextProps[propKey$241]; + lastProp = lastProps[propKey$241]; if ( - nextProps.hasOwnProperty(propKey$240) && + nextProps.hasOwnProperty(propKey$241) && (null != propKey || null != lastProp) ) - switch (propKey$240) { + switch (propKey$241) { case "type": type = propKey; break; @@ -15764,7 +15810,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$240, + propKey$241, propKey, nextProps, lastProp @@ -15783,7 +15829,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$240 = null; + propKey = value = defaultValue = propKey$241 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -15814,7 +15860,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$240 = type; + propKey$241 = type; break; case "defaultValue": defaultValue = type; @@ -15835,15 +15881,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$240 - ? updateOptions(domElement, !!lastProps, propKey$240, !1) + null != propKey$241 + ? updateOptions(domElement, !!lastProps, propKey$241, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$240 = null; + propKey = propKey$241 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -15867,7 +15913,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$240 = name; + propKey$241 = name; break; case "defaultValue": propKey = name; @@ -15881,17 +15927,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$240, propKey); + updateTextarea(domElement, propKey$241, propKey); return; case "option": - for (var propKey$256 in lastProps) + for (var propKey$257 in lastProps) if ( - ((propKey$240 = lastProps[propKey$256]), - lastProps.hasOwnProperty(propKey$256) && - null != propKey$240 && - !nextProps.hasOwnProperty(propKey$256)) + ((propKey$241 = lastProps[propKey$257]), + lastProps.hasOwnProperty(propKey$257) && + null != propKey$241 && + !nextProps.hasOwnProperty(propKey$257)) ) - switch (propKey$256) { + switch (propKey$257) { case "selected": domElement.selected = !1; break; @@ -15899,33 +15945,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$256, + propKey$257, null, nextProps, - propKey$240 + propKey$241 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$240 = nextProps[lastDefaultValue]), + ((propKey$241 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$240 !== propKey && - (null != propKey$240 || null != propKey)) + propKey$241 !== propKey && + (null != propKey$241 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$240 && - "function" !== typeof propKey$240 && - "symbol" !== typeof propKey$240; + propKey$241 && + "function" !== typeof propKey$241 && + "symbol" !== typeof propKey$241; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$240, + propKey$241, nextProps, propKey ); @@ -15946,24 +15992,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$261 in lastProps) - (propKey$240 = lastProps[propKey$261]), - lastProps.hasOwnProperty(propKey$261) && - null != propKey$240 && - !nextProps.hasOwnProperty(propKey$261) && - setProp(domElement, tag, propKey$261, null, nextProps, propKey$240); + for (var propKey$262 in lastProps) + (propKey$241 = lastProps[propKey$262]), + lastProps.hasOwnProperty(propKey$262) && + null != propKey$241 && + !nextProps.hasOwnProperty(propKey$262) && + setProp(domElement, tag, propKey$262, null, nextProps, propKey$241); for (checked in nextProps) if ( - ((propKey$240 = nextProps[checked]), + ((propKey$241 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$240 !== propKey && - (null != propKey$240 || null != propKey)) + propKey$241 !== propKey && + (null != propKey$241 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$240) + if (null != propKey$241) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -15971,7 +16017,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$240, + propKey$241, nextProps, propKey ); @@ -15979,49 +16025,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$266 in lastProps) - (propKey$240 = lastProps[propKey$266]), - lastProps.hasOwnProperty(propKey$266) && - null != propKey$240 && - !nextProps.hasOwnProperty(propKey$266) && + for (var propKey$267 in lastProps) + (propKey$241 = lastProps[propKey$267]), + lastProps.hasOwnProperty(propKey$267) && + null != propKey$241 && + !nextProps.hasOwnProperty(propKey$267) && setPropOnCustomElement( domElement, tag, - propKey$266, + propKey$267, null, nextProps, - propKey$240 + propKey$241 ); for (defaultChecked in nextProps) - (propKey$240 = nextProps[defaultChecked]), + (propKey$241 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$240 === propKey || - (null == propKey$240 && null == propKey) || + propKey$241 === propKey || + (null == propKey$241 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$240, + propKey$241, nextProps, propKey ); return; } } - for (var propKey$271 in lastProps) - (propKey$240 = lastProps[propKey$271]), - lastProps.hasOwnProperty(propKey$271) && - null != propKey$240 && - !nextProps.hasOwnProperty(propKey$271) && - setProp(domElement, tag, propKey$271, null, nextProps, propKey$240); + for (var propKey$272 in lastProps) + (propKey$241 = lastProps[propKey$272]), + lastProps.hasOwnProperty(propKey$272) && + null != propKey$241 && + !nextProps.hasOwnProperty(propKey$272) && + setProp(domElement, tag, propKey$272, null, nextProps, propKey$241); for (lastProp in nextProps) - (propKey$240 = nextProps[lastProp]), + (propKey$241 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$240 === propKey || - (null == propKey$240 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$240, nextProps, propKey); + propKey$241 === propKey || + (null == propKey$241 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$241, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16668,17 +16714,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$279 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$280 = styles$279.get(type); - resource$280 || + var styles$280 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$281 = styles$280.get(type); + resource$281 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$280 = { + (resource$281 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$279.set(type, resource$280), + styles$280.set(type, resource$281), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16693,9 +16739,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$280.state + resource$281.state )); - return resource$280; + return resource$281; } return null; case "script": @@ -16778,37 +16824,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$284 = hoistableRoot.querySelector( + var instance$285 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$284) + if (instance$285) return ( (resource.state.loading |= 4), - (resource.instance = instance$284), - markNodeAsHoistable(instance$284), - instance$284 + (resource.instance = instance$285), + markNodeAsHoistable(instance$285), + instance$285 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$284 = ( + instance$285 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$284); - var linkInstance = instance$284; + markNodeAsHoistable(instance$285); + var linkInstance = instance$285; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$284, "link", instance); + setInitialProperties(instance$285, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$284, props.precedence, hoistableRoot); - return (resource.instance = instance$284); + insertStylesheet(instance$285, props.precedence, hoistableRoot); + return (resource.instance = instance$285); case "script": - instance$284 = getScriptKey(props.src); + instance$285 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$284) + getScriptSelectorFromKey(instance$285) )) ) return ( @@ -16817,7 +16863,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$284))) + if ((styleProps = preloadPropsMap.get(instance$285))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17830,11 +17876,11 @@ function legacyCreateRootFromDOMContainer( if ("function" === typeof callback) { var originalCallback = callback; callback = function () { - var instance = getPublicRootInstance(root$306); + var instance = getPublicRootInstance(root$307); originalCallback.call(instance); }; } - var root$306 = createHydrationContainer( + var root$307 = createHydrationContainer( initialChildren, callback, container, @@ -17847,23 +17893,23 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$306; - container[internalContainerInstanceKey] = root$306.current; + container._reactRootContainer = root$307; + container[internalContainerInstanceKey] = root$307.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(); - return root$306; + return root$307; } clearContainer(container); if ("function" === typeof callback) { - var originalCallback$307 = callback; + var originalCallback$308 = callback; callback = function () { - var instance = getPublicRootInstance(root$308); - originalCallback$307.call(instance); + var instance = getPublicRootInstance(root$309); + originalCallback$308.call(instance); }; } - var root$308 = createFiberRoot( + var root$309 = createFiberRoot( container, 0, !1, @@ -17876,15 +17922,15 @@ function legacyCreateRootFromDOMContainer( null, null ); - container._reactRootContainer = root$308; - container[internalContainerInstanceKey] = root$308.current; + container._reactRootContainer = root$309; + container[internalContainerInstanceKey] = root$309.current; listenToAllSupportedEvents( 8 === container.nodeType ? container.parentNode : container ); flushSync$1(function () { - updateContainer(initialChildren, root$308, parentComponent, callback); + updateContainer(initialChildren, root$309, parentComponent, callback); }); - return root$308; + return root$309; } function legacyRenderSubtreeIntoContainer( parentComponent, @@ -17949,10 +17995,10 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1903 = { +var devToolsConfig$jscomp$inline_1904 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-classic-56d34b21", + version: "18.3.0-www-classic-316d7d0d", rendererPackageName: "react-dom" }; (function (internals) { @@ -17970,10 +18016,10 @@ var devToolsConfig$jscomp$inline_1903 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1903.bundleType, - version: devToolsConfig$jscomp$inline_1903.version, - rendererPackageName: devToolsConfig$jscomp$inline_1903.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1903.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1904.bundleType, + version: devToolsConfig$jscomp$inline_1904.version, + rendererPackageName: devToolsConfig$jscomp$inline_1904.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1904.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17989,14 +18035,14 @@ var devToolsConfig$jscomp$inline_1903 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1903.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1904.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-classic-56d34b21" + reconcilerVersion: "18.3.0-www-classic-316d7d0d" }); assign(Internals, { ReactBrowserEventEmitter: { @@ -18326,7 +18372,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-classic-56d34b21"; +exports.version = "18.3.0-www-classic-316d7d0d"; "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 9720e313cf39f..40a636419a928 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -69,6 +69,7 @@ var assign = Object.assign, transitionLaneExpirationMs = dynamicFeatureFlags.transitionLaneExpirationMs, enableInfiniteRenderLoopDetection = dynamicFeatureFlags.enableInfiniteRenderLoopDetection, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, enableClientRenderFallbackOnTextMismatch = dynamicFeatureFlags.enableClientRenderFallbackOnTextMismatch, @@ -1320,15 +1321,15 @@ function setValueForStyles(node, styles, prevStyles) { : "float" === styleName ? (node.cssFloat = "") : (node[styleName] = "")); - for (var styleName$20 in styles) - (styleName = styles[styleName$20]), - styles.hasOwnProperty(styleName$20) && - prevStyles[styleName$20] !== styleName && - setValueForStyle(node, styleName$20, styleName); - } else for (var styleName$21 in styles) - styles.hasOwnProperty(styleName$21) && - setValueForStyle(node, styleName$21, styles[styleName$21]); + (styleName = styles[styleName$21]), + styles.hasOwnProperty(styleName$21) && + prevStyles[styleName$21] !== styleName && + setValueForStyle(node, styleName$21, styleName); + } else + for (var styleName$22 in styles) + styles.hasOwnProperty(styleName$22) && + setValueForStyle(node, styleName$22, styles[styleName$22]); } function isCustomElement(tagName) { if (-1 === tagName.indexOf("-")) return !1; @@ -1583,36 +1584,36 @@ function findCurrentFiberUsingSlowPath(fiber) { } if (a.return !== b.return) (a = parentA), (b = parentB); else { - for (var didFindChild = !1, child$23 = parentA.child; child$23; ) { - if (child$23 === a) { + for (var didFindChild = !1, child$24 = parentA.child; child$24; ) { + if (child$24 === a) { didFindChild = !0; a = parentA; b = parentB; break; } - if (child$23 === b) { + if (child$24 === b) { didFindChild = !0; b = parentA; a = parentB; break; } - child$23 = child$23.sibling; + child$24 = child$24.sibling; } if (!didFindChild) { - for (child$23 = parentB.child; child$23; ) { - if (child$23 === a) { + for (child$24 = parentB.child; child$24; ) { + if (child$24 === a) { didFindChild = !0; a = parentB; b = parentA; break; } - if (child$23 === b) { + if (child$24 === b) { didFindChild = !0; b = parentB; a = parentA; break; } - child$23 = child$23.sibling; + child$24 = child$24.sibling; } if (!didFindChild) throw Error(formatProdErrorMessage(189)); } @@ -1987,41 +1988,41 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { isFlushingWork = !0; do { var didPerformSomeWork = !1; - for (var root$28 = firstScheduledRoot; null !== root$28; ) { - if (!onlyLegacy || 0 === root$28.tag) { - var workInProgressRootRenderLanes$30 = workInProgressRootRenderLanes, + for (var root$29 = firstScheduledRoot; null !== root$29; ) { + if (!onlyLegacy || 0 === root$29.tag) { + var workInProgressRootRenderLanes$31 = workInProgressRootRenderLanes, nextLanes = getNextLanes( - root$28, - root$28 === workInProgressRoot - ? workInProgressRootRenderLanes$30 + root$29, + root$29 === workInProgressRoot + ? workInProgressRootRenderLanes$31 : 0 ); if (0 !== (nextLanes & 3)) try { didPerformSomeWork = !0; - workInProgressRootRenderLanes$30 = root$28; + workInProgressRootRenderLanes$31 = root$29; if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327)); if (!flushPassiveEffects()) { currentUpdateIsNested = nestedUpdateScheduled; nestedUpdateScheduled = !1; var exitStatus = renderRootSync( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes ); if ( - 0 !== workInProgressRootRenderLanes$30.tag && + 0 !== workInProgressRootRenderLanes$31.tag && 2 === exitStatus ) { var originallyAttemptedLanes = nextLanes, errorRetryLanes = getLanesToRetrySynchronouslyOnError( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, originallyAttemptedLanes ); 0 !== errorRetryLanes && ((nextLanes = errorRetryLanes), (exitStatus = recoverFromConcurrentError( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, originallyAttemptedLanes, errorRetryLanes ))); @@ -2029,39 +2030,39 @@ function flushSyncWorkAcrossRoots_impl(onlyLegacy) { if (1 === exitStatus) throw ( ((originallyAttemptedLanes = workInProgressRootFatalError), - prepareFreshStack(workInProgressRootRenderLanes$30, 0), + prepareFreshStack(workInProgressRootRenderLanes$31, 0), markRootSuspended( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes, 0 ), - ensureRootIsScheduled(workInProgressRootRenderLanes$30), + ensureRootIsScheduled(workInProgressRootRenderLanes$31), originallyAttemptedLanes) ); 6 === exitStatus ? markRootSuspended( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, nextLanes, workInProgressDeferredLane ) - : ((workInProgressRootRenderLanes$30.finishedWork = - workInProgressRootRenderLanes$30.current.alternate), - (workInProgressRootRenderLanes$30.finishedLanes = + : ((workInProgressRootRenderLanes$31.finishedWork = + workInProgressRootRenderLanes$31.current.alternate), + (workInProgressRootRenderLanes$31.finishedLanes = nextLanes), commitRoot( - workInProgressRootRenderLanes$30, + workInProgressRootRenderLanes$31, workInProgressRootRecoverableErrors, workInProgressTransitions, workInProgressRootDidIncludeRecursiveRenderUpdate, workInProgressDeferredLane )); } - ensureRootIsScheduled(workInProgressRootRenderLanes$30); + ensureRootIsScheduled(workInProgressRootRenderLanes$31); } catch (error) { null === errors ? (errors = [error]) : errors.push(error); } } - root$28 = root$28.next; + root$29 = root$29.next; } } while (didPerformSomeWork); isFlushingWork = !1; @@ -3667,7 +3668,7 @@ function updateReducerImpl(hook, current, reducer) { var newBaseQueueFirst = (baseFirst = null), newBaseQueueLast = null, update = current, - didReadFromEntangledAsyncAction$55 = !1; + didReadFromEntangledAsyncAction$56 = !1; do { var updateLane = update.lane & -536870913; if ( @@ -3688,11 +3689,11 @@ function updateReducerImpl(hook, current, reducer) { next: null }), updateLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); else if ((renderLanes & revertLane) === revertLane) { update = update.next; revertLane === currentEntangledLane && - (didReadFromEntangledAsyncAction$55 = !0); + (didReadFromEntangledAsyncAction$56 = !0); continue; } else (updateLane = { @@ -3738,7 +3739,7 @@ function updateReducerImpl(hook, current, reducer) { if ( !objectIs(pendingQueue, hook.memoizedState) && ((didReceiveUpdate = !0), - didReadFromEntangledAsyncAction$55 && + didReadFromEntangledAsyncAction$56 && ((reducer = currentEntangledActionThenable), null !== reducer)) ) throw reducer; @@ -4203,14 +4204,14 @@ function refreshCache(fiber, seedKey, seedValue) { case 3: var lane = requestUpdateLane(provider); fiber = createUpdate(lane); - var root$65 = enqueueUpdate(provider, fiber, lane); - null !== root$65 && - (scheduleUpdateOnFiber(root$65, provider, lane), - entangleTransitions(root$65, provider, lane)); + var root$66 = enqueueUpdate(provider, fiber, lane); + null !== root$66 && + (scheduleUpdateOnFiber(root$66, provider, lane), + entangleTransitions(root$66, provider, lane)); provider = createCache(); null !== seedKey && void 0 !== seedKey && - null !== root$65 && + null !== root$66 && provider.data.set(seedKey, seedValue); fiber.payload = { cache: provider }; return; @@ -4453,15 +4454,15 @@ var HooksDispatcherOnMount = { getServerSnapshot = getServerSnapshot(); } else { getServerSnapshot = getSnapshot(); - var root$58 = workInProgressRoot; - if (null === root$58) throw Error(formatProdErrorMessage(349)); - includesBlockingLane(root$58, workInProgressRootRenderLanes) || + var root$59 = workInProgressRoot; + if (null === root$59) throw Error(formatProdErrorMessage(349)); + includesBlockingLane(root$59, workInProgressRootRenderLanes) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot); } hook.memoizedState = getServerSnapshot; - root$58 = { value: getServerSnapshot, getSnapshot: getSnapshot }; - hook.queue = root$58; - mountEffect(subscribeToStore.bind(null, fiber, root$58, subscribe), [ + root$59 = { value: getServerSnapshot, getSnapshot: getSnapshot }; + hook.queue = root$59; + mountEffect(subscribeToStore.bind(null, fiber, root$59, subscribe), [ subscribe ]); fiber.flags |= 2048; @@ -4470,7 +4471,7 @@ var HooksDispatcherOnMount = { updateStoreInstance.bind( null, fiber, - root$58, + root$59, getServerSnapshot, getSnapshot ), @@ -5329,10 +5330,10 @@ var markerInstanceStack = createCursor(null); function pushRootMarkerInstance(workInProgress) { if (enableTransitionTracing) { var transitions = workInProgressTransitions, - root$77 = workInProgress.stateNode; + root$78 = workInProgress.stateNode; null !== transitions && transitions.forEach(function (transition) { - if (!root$77.incompleteTransitions.has(transition)) { + if (!root$78.incompleteTransitions.has(transition)) { var markerInstance = { tag: 0, transitions: new Set([transition]), @@ -5340,11 +5341,11 @@ function pushRootMarkerInstance(workInProgress) { aborts: null, name: null }; - root$77.incompleteTransitions.set(transition, markerInstance); + root$78.incompleteTransitions.set(transition, markerInstance); } }); var markerInstances = []; - root$77.incompleteTransitions.forEach(function (markerInstance) { + root$78.incompleteTransitions.forEach(function (markerInstance) { markerInstances.push(markerInstance); }); push(markerInstanceStack, markerInstances); @@ -6594,7 +6595,9 @@ function attemptEarlyBailoutIfNoScheduledUpdate( case 10: pushProvider( workInProgress, - workInProgress.type, + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context, workInProgress.memoizedProps.value ); break; @@ -6852,7 +6855,9 @@ function propagateParentContextChanges( if (null === currentParent) throw Error(formatProdErrorMessage(387)); currentParent = currentParent.memoizedProps; if (null !== currentParent) { - var context = parent.type; + var context = enableRenderableContext + ? parent.type + : parent.type._context; objectIs(parent.pendingProps.value, currentParent.value) || (null !== current ? current.push(context) : (current = [context])); } @@ -7075,7 +7080,10 @@ function collectNearestChildContextValues( var node = startingChild, context = context$jscomp$0, childContextValues = childContextValues$jscomp$0; - if (10 === node.tag && node.type === context) + if ( + 10 === node.tag && + (enableRenderableContext ? node.type : node.type._context) === context + ) childContextValues.push(node.memoizedProps.value); else { var child = node.child; @@ -7164,14 +7172,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$117 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$117 = lastTailNode), + for (var lastTailNode$118 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$118 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$117 + null === lastTailNode$118 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$117.sibling = null); + : (lastTailNode$118.sibling = null); } } function bubbleProperties(completedWork) { @@ -7183,53 +7191,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$119 = completedWork.selfBaseDuration, - child$120 = completedWork.child; - null !== child$120; + var treeBaseDuration$120 = completedWork.selfBaseDuration, + child$121 = completedWork.child; + null !== child$121; ) - (newChildLanes |= child$120.lanes | child$120.childLanes), - (subtreeFlags |= child$120.subtreeFlags & 31457280), - (subtreeFlags |= child$120.flags & 31457280), - (treeBaseDuration$119 += child$120.treeBaseDuration), - (child$120 = child$120.sibling); - completedWork.treeBaseDuration = treeBaseDuration$119; + (newChildLanes |= child$121.lanes | child$121.childLanes), + (subtreeFlags |= child$121.subtreeFlags & 31457280), + (subtreeFlags |= child$121.flags & 31457280), + (treeBaseDuration$120 += child$121.treeBaseDuration), + (child$121 = child$121.sibling); + completedWork.treeBaseDuration = treeBaseDuration$120; } else for ( - treeBaseDuration$119 = completedWork.child; - null !== treeBaseDuration$119; + treeBaseDuration$120 = completedWork.child; + null !== treeBaseDuration$120; ) (newChildLanes |= - treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), - (subtreeFlags |= treeBaseDuration$119.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$119.flags & 31457280), - (treeBaseDuration$119.return = completedWork), - (treeBaseDuration$119 = treeBaseDuration$119.sibling); + treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), + (subtreeFlags |= treeBaseDuration$120.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$120.flags & 31457280), + (treeBaseDuration$120.return = completedWork), + (treeBaseDuration$120 = treeBaseDuration$120.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$119 = completedWork.actualDuration; - child$120 = completedWork.selfBaseDuration; + treeBaseDuration$120 = completedWork.actualDuration; + child$121 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$119 += child.actualDuration), - (child$120 += child.treeBaseDuration), + (treeBaseDuration$120 += child.actualDuration), + (child$121 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$119; - completedWork.treeBaseDuration = child$120; + completedWork.actualDuration = treeBaseDuration$120; + completedWork.treeBaseDuration = child$121; } else for ( - treeBaseDuration$119 = completedWork.child; - null !== treeBaseDuration$119; + treeBaseDuration$120 = completedWork.child; + null !== treeBaseDuration$120; ) (newChildLanes |= - treeBaseDuration$119.lanes | treeBaseDuration$119.childLanes), - (subtreeFlags |= treeBaseDuration$119.subtreeFlags), - (subtreeFlags |= treeBaseDuration$119.flags), - (treeBaseDuration$119.return = completedWork), - (treeBaseDuration$119 = treeBaseDuration$119.sibling); + treeBaseDuration$120.lanes | treeBaseDuration$120.childLanes), + (subtreeFlags |= treeBaseDuration$120.subtreeFlags), + (subtreeFlags |= treeBaseDuration$120.flags), + (treeBaseDuration$120.return = completedWork), + (treeBaseDuration$120 = treeBaseDuration$120.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7502,16 +7510,16 @@ function completeWork(current, workInProgress, renderLanes) { break; case 27: case 5: - var isConcurrentMode$26 = 0 !== (currentResource.mode & 1); + var isConcurrentMode$27 = 0 !== (currentResource.mode & 1); !0 !== currentResource.memoizedProps.suppressHydrationWarning && checkForUnmatchedText( current.nodeValue, renderLanes, - isConcurrentMode$26 + isConcurrentMode$27 ); if ( - isConcurrentMode$26 && + isConcurrentMode$27 && enableClientRenderFallbackOnTextMismatch ) { current = !1; @@ -7603,11 +7611,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (currentResource = newProps.alternate.memoizedState.cachePool.pool), - (isConcurrentMode$26 = null), + (isConcurrentMode$27 = null), null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (isConcurrentMode$26 = newProps.memoizedState.cachePool.pool), - isConcurrentMode$26 !== currentResource && (newProps.flags |= 2048)); + (isConcurrentMode$27 = newProps.memoizedState.cachePool.pool), + isConcurrentMode$27 !== currentResource && (newProps.flags |= 2048)); renderLanes !== current && (enableTransitionTracing && (workInProgress.child.flags |= 2048), renderLanes && (workInProgress.child.flags |= 8192)); @@ -7632,7 +7640,13 @@ function completeWork(current, workInProgress, renderLanes) { ); case 10: return ( - popProvider(workInProgress.type), bubbleProperties(workInProgress), null + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + bubbleProperties(workInProgress), + null ); case 17: return bubbleProperties(workInProgress), null; @@ -7642,8 +7656,8 @@ function completeWork(current, workInProgress, renderLanes) { if (null === currentResource) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - isConcurrentMode$26 = currentResource.rendering; - if (null === isConcurrentMode$26) + isConcurrentMode$27 = currentResource.rendering; + if (null === isConcurrentMode$27) if (newProps) cutOffTailIfNeeded(currentResource, !1); else { if ( @@ -7651,11 +7665,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - isConcurrentMode$26 = findFirstSuspended(current); - if (null !== isConcurrentMode$26) { + isConcurrentMode$27 = findFirstSuspended(current); + if (null !== isConcurrentMode$27) { workInProgress.flags |= 128; cutOffTailIfNeeded(currentResource, !1); - current = isConcurrentMode$26.updateQueue; + current = isConcurrentMode$27.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -7681,7 +7695,7 @@ function completeWork(current, workInProgress, renderLanes) { else { if (!newProps) if ( - ((current = findFirstSuspended(isConcurrentMode$26)), + ((current = findFirstSuspended(isConcurrentMode$27)), null !== current) ) { if ( @@ -7693,7 +7707,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !0), null === currentResource.tail && "hidden" === currentResource.tailMode && - !isConcurrentMode$26.alternate && + !isConcurrentMode$27.alternate && !isHydrating) ) return bubbleProperties(workInProgress), null; @@ -7706,13 +7720,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(currentResource, !1), (workInProgress.lanes = 4194304)); currentResource.isBackwards - ? ((isConcurrentMode$26.sibling = workInProgress.child), - (workInProgress.child = isConcurrentMode$26)) + ? ((isConcurrentMode$27.sibling = workInProgress.child), + (workInProgress.child = isConcurrentMode$27)) : ((current = currentResource.last), null !== current - ? (current.sibling = isConcurrentMode$26) - : (workInProgress.child = isConcurrentMode$26), - (currentResource.last = isConcurrentMode$26)); + ? (current.sibling = isConcurrentMode$27) + : (workInProgress.child = isConcurrentMode$27), + (currentResource.last = isConcurrentMode$27)); } if (null !== currentResource.tail) return ( @@ -7849,7 +7863,14 @@ function unwindWork(current, workInProgress) { case 4: return popHostContainer(), null; case 10: - return popProvider(workInProgress.type), null; + return ( + popProvider( + enableRenderableContext + ? workInProgress.type + : workInProgress.type._context + ), + null + ); case 22: case 23: return ( @@ -7904,7 +7925,11 @@ function unwindInterruptedWork(current, interruptedWork) { pop(suspenseStackCursor); break; case 10: - popProvider(interruptedWork.type); + popProvider( + enableRenderableContext + ? interruptedWork.type + : interruptedWork.type._context + ); break; case 22: case 23: @@ -8042,8 +8067,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$152) { - captureCommitPhaseError(current, nearestMountedAncestor, error$152); + } catch (error$153) { + captureCommitPhaseError(current, nearestMountedAncestor, error$153); } else ref.current = null; } @@ -8080,7 +8105,7 @@ function commitBeforeMutationEffects(root, firstChild) { selection = selection.focusOffset; try { JSCompiler_temp.nodeType, focusNode.nodeType; - } catch (e$219) { + } catch (e$220) { JSCompiler_temp = null; break a; } @@ -8350,11 +8375,11 @@ function commitPassiveEffectDurations(finishedRoot, finishedWork) { var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id; _finishedWork$memoize = _finishedWork$memoize.onPostCommit; - var commitTime$154 = commitTime, + var commitTime$155 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof _finishedWork$memoize && - _finishedWork$memoize(id, phase, finishedRoot, commitTime$154); + _finishedWork$memoize(id, phase, finishedRoot, commitTime$155); finishedWork = finishedWork.return; a: for (; null !== finishedWork; ) { switch (finishedWork.tag) { @@ -8381,8 +8406,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$156) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$156); + } catch (error$157) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$157); } } function commitClassCallbacks(finishedWork) { @@ -8481,11 +8506,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$157) { + } catch (error$158) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$157 + error$158 ); } else { @@ -8502,11 +8527,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$158) { + } catch (error$159) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$158 + error$159 ); } recordLayoutEffectDuration(finishedWork); @@ -8517,11 +8542,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$159) { + } catch (error$160) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$159 + error$160 ); } } @@ -9227,22 +9252,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$174) { + } catch (error$175) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$174 + error$175 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$175) { + } catch (error$176) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$175 + error$176 ); } } @@ -9415,11 +9440,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { newProps ); domElement[internalPropsKey] = newProps; - } catch (error$176) { + } catch (error$177) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$176 + error$177 ); } } @@ -9457,8 +9482,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { root = finishedWork.stateNode; try { setTextContent(root, ""); - } catch (error$177) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$177); + } catch (error$178) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$178); } } if (flags & 4 && ((flags = finishedWork.stateNode), null != flags)) { @@ -9469,8 +9494,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { updateProperties(flags, hoistableRoot, current, root), (flags[internalPropsKey] = root); - } catch (error$180) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$180); + } catch (error$181) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$181); } } break; @@ -9484,8 +9509,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { flags = finishedWork.memoizedProps; try { current.nodeValue = flags; - } catch (error$181) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$181); + } catch (error$182) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$182); } } break; @@ -9499,8 +9524,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (flags & 4 && null !== current && current.memoizedState.isDehydrated) try { retryIfBlockedOn(root.containerInfo); - } catch (error$182) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$182); + } catch (error$183) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$183); } break; case 4: @@ -9530,8 +9555,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { null !== retryQueue && suspenseCallback(new Set(retryQueue)); } } - } catch (error$184) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$184); + } catch (error$185) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$185); } current = finishedWork.updateQueue; null !== current && @@ -9609,11 +9634,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { root.stateNode.nodeValue = domElement ? "" : root.memoizedProps; - } catch (error$164) { + } catch (error$165) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$164 + error$165 ); } } else if ( @@ -9688,21 +9713,21 @@ function commitReconciliationEffects(finishedWork) { insertOrAppendPlacementNode(finishedWork, before, parent$jscomp$0); break; case 5: - var parent$165 = JSCompiler_inline_result.stateNode; + var parent$166 = JSCompiler_inline_result.stateNode; JSCompiler_inline_result.flags & 32 && - (setTextContent(parent$165, ""), + (setTextContent(parent$166, ""), (JSCompiler_inline_result.flags &= -33)); - var before$166 = getHostSibling(finishedWork); - insertOrAppendPlacementNode(finishedWork, before$166, parent$165); + var before$167 = getHostSibling(finishedWork); + insertOrAppendPlacementNode(finishedWork, before$167, parent$166); break; case 3: case 4: - var parent$167 = JSCompiler_inline_result.stateNode.containerInfo, - before$168 = getHostSibling(finishedWork); + var parent$168 = JSCompiler_inline_result.stateNode.containerInfo, + before$169 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$168, - parent$167 + before$169, + parent$168 ); break; default: @@ -9894,8 +9919,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$187) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$187); + } catch (error$188) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$188); } } function commitOffscreenPassiveMountEffects(current, finishedWork, instance) { @@ -10194,9 +10219,9 @@ function recursivelyTraverseReconnectPassiveEffects( ); break; case 22: - var instance$192 = finishedWork.stateNode; + var instance$193 = finishedWork.stateNode; null !== finishedWork.memoizedState - ? instance$192._visibility & 4 + ? instance$193._visibility & 4 ? recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10209,7 +10234,7 @@ function recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork ) - : ((instance$192._visibility |= 4), + : ((instance$193._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10217,7 +10242,7 @@ function recursivelyTraverseReconnectPassiveEffects( committedTransitions, includeWorkInProgressEffects )) - : ((instance$192._visibility |= 4), + : ((instance$193._visibility |= 4), recursivelyTraverseReconnectPassiveEffects( finishedRoot, finishedWork, @@ -10230,7 +10255,7 @@ function recursivelyTraverseReconnectPassiveEffects( commitOffscreenPassiveMountEffects( finishedWork.alternate, finishedWork, - instance$192 + instance$193 ); break; case 24: @@ -11250,8 +11275,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$200) { - handleThrow(root, thrownValue$200); + } catch (thrownValue$201) { + handleThrow(root, thrownValue$201); } while (1); lanes && root.shellSuspendCounter++; @@ -11367,8 +11392,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$202) { - handleThrow(root, thrownValue$202); + } catch (thrownValue$203) { + handleThrow(root, thrownValue$203); } while (1); resetContextDependencies(); @@ -11621,7 +11646,7 @@ function commitRootImpl( var prevExecutionContext = executionContext; executionContext |= 4; ReactCurrentOwner.current = null; - var shouldFireAfterActiveInstanceBlur$206 = commitBeforeMutationEffects( + var shouldFireAfterActiveInstanceBlur$207 = commitBeforeMutationEffects( root, finishedWork ); @@ -11629,7 +11654,7 @@ function commitRootImpl( enableProfilerNestedUpdateScheduledHook && (rootCommittingMutationOrLayoutEffects = root); commitMutationEffects(root, finishedWork, lanes); - shouldFireAfterActiveInstanceBlur$206 && + shouldFireAfterActiveInstanceBlur$207 && ((_enabled = !0), dispatchAfterDetachedBlur(selectionInformation.focusedElem), (_enabled = !1)); @@ -11725,7 +11750,7 @@ function releaseRootPooledCache(root, remainingLanes) { } function flushPassiveEffects() { if (null !== rootWithPendingPassiveEffects) { - var root$207 = rootWithPendingPassiveEffects, + var root$208 = rootWithPendingPassiveEffects, remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); @@ -11741,7 +11766,7 @@ function flushPassiveEffects() { } finally { (currentUpdatePriority = previousPriority), (ReactCurrentBatchConfig$1.transition = prevTransition), - releaseRootPooledCache(root$207, remainingLanes); + releaseRootPooledCache(root$208, remainingLanes); } } return !1; @@ -12371,7 +12396,9 @@ beginWork = function (current, workInProgress, renderLanes) { ); case 10: a: { - Component = workInProgress.type; + Component = enableRenderableContext + ? workInProgress.type + : workInProgress.type._context; init = workInProgress.pendingProps; prevState = workInProgress.memoizedProps; nextState = init.value; @@ -12393,7 +12420,9 @@ beginWork = function (current, workInProgress, renderLanes) { return workInProgress; case 9: return ( - (init = workInProgress.type._context), + (init = enableRenderableContext + ? workInProgress.type._context + : workInProgress.type), (Component = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), (init = readContext(init)), @@ -12770,12 +12799,18 @@ function createFiberFromTypeAndProps( if ("object" === typeof type && null !== type) switch (type.$$typeof) { case REACT_PROVIDER_TYPE: + if (!enableRenderableContext) { + fiberTag = 10; + break a; + } case REACT_CONTEXT_TYPE: - fiberTag = 10; + fiberTag = enableRenderableContext ? 10 : 9; break a; case REACT_CONSUMER_TYPE: - fiberTag = 9; - break a; + if (enableRenderableContext) { + fiberTag = 9; + break a; + } case REACT_FORWARD_REF_TYPE: fiberTag = 11; break a; @@ -13000,12 +13035,12 @@ function updateContainer(element, container, parentComponent, callback) { function attemptSynchronousHydration(fiber) { switch (fiber.tag) { case 3: - var root$210 = fiber.stateNode; - if (root$210.current.memoizedState.isDehydrated) { - var lanes = getHighestPriorityLanes(root$210.pendingLanes); + var root$211 = fiber.stateNode; + if (root$211.current.memoizedState.isDehydrated) { + var lanes = getHighestPriorityLanes(root$211.pendingLanes); 0 !== lanes && - (upgradePendingLanesToSync(root$210, lanes), - ensureRootIsScheduled(root$210), + (upgradePendingLanesToSync(root$211, lanes), + ensureRootIsScheduled(root$211), 0 === (executionContext & 6) && ((workInProgressRootRenderTargetTime = now$1() + 500), flushSyncWorkAcrossRoots_impl(!1))); @@ -14217,19 +14252,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$370; + var JSCompiler_inline_result$jscomp$371; if (canUseDOM) { - var isSupported$jscomp$inline_1635 = "oninput" in document; - if (!isSupported$jscomp$inline_1635) { - var element$jscomp$inline_1636 = document.createElement("div"); - element$jscomp$inline_1636.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1635 = - "function" === typeof element$jscomp$inline_1636.oninput; + var isSupported$jscomp$inline_1636 = "oninput" in document; + if (!isSupported$jscomp$inline_1636) { + var element$jscomp$inline_1637 = document.createElement("div"); + element$jscomp$inline_1637.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1636 = + "function" === typeof element$jscomp$inline_1637.oninput; } - JSCompiler_inline_result$jscomp$370 = isSupported$jscomp$inline_1635; - } else JSCompiler_inline_result$jscomp$370 = !1; + JSCompiler_inline_result$jscomp$371 = isSupported$jscomp$inline_1636; + } else JSCompiler_inline_result$jscomp$371 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$370 && + JSCompiler_inline_result$jscomp$371 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14538,20 +14573,20 @@ function registerSimpleEvent(domEventName, reactName) { registerTwoPhaseEvent(reactName, [domEventName]); } for ( - var i$jscomp$inline_1676 = 0; - i$jscomp$inline_1676 < simpleEventPluginEvents.length; - i$jscomp$inline_1676++ + var i$jscomp$inline_1677 = 0; + i$jscomp$inline_1677 < simpleEventPluginEvents.length; + i$jscomp$inline_1677++ ) { - var eventName$jscomp$inline_1677 = - simpleEventPluginEvents[i$jscomp$inline_1676], - domEventName$jscomp$inline_1678 = - eventName$jscomp$inline_1677.toLowerCase(), - capitalizedEvent$jscomp$inline_1679 = - eventName$jscomp$inline_1677[0].toUpperCase() + - eventName$jscomp$inline_1677.slice(1); + var eventName$jscomp$inline_1678 = + simpleEventPluginEvents[i$jscomp$inline_1677], + domEventName$jscomp$inline_1679 = + eventName$jscomp$inline_1678.toLowerCase(), + capitalizedEvent$jscomp$inline_1680 = + eventName$jscomp$inline_1678[0].toUpperCase() + + eventName$jscomp$inline_1678.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1678, - "on" + capitalizedEvent$jscomp$inline_1679 + domEventName$jscomp$inline_1679, + "on" + capitalizedEvent$jscomp$inline_1680 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -16025,14 +16060,14 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp(domElement, tag, propKey, null, nextProps, lastProp); } } - for (var propKey$246 in nextProps) { - var propKey = nextProps[propKey$246]; - lastProp = lastProps[propKey$246]; + for (var propKey$247 in nextProps) { + var propKey = nextProps[propKey$247]; + lastProp = lastProps[propKey$247]; if ( - nextProps.hasOwnProperty(propKey$246) && + nextProps.hasOwnProperty(propKey$247) && (null != propKey || null != lastProp) ) - switch (propKey$246) { + switch (propKey$247) { case "type": type = propKey; break; @@ -16061,7 +16096,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$246, + propKey$247, propKey, nextProps, lastProp @@ -16080,7 +16115,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ); return; case "select": - propKey = value = defaultValue = propKey$246 = null; + propKey = value = defaultValue = propKey$247 = null; for (type in lastProps) if ( ((lastDefaultValue = lastProps[type]), @@ -16111,7 +16146,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (name) { case "value": - propKey$246 = type; + propKey$247 = type; break; case "defaultValue": defaultValue = type; @@ -16132,15 +16167,15 @@ function updateProperties(domElement, tag, lastProps, nextProps) { tag = defaultValue; lastProps = value; nextProps = propKey; - null != propKey$246 - ? updateOptions(domElement, !!lastProps, propKey$246, !1) + null != propKey$247 + ? updateOptions(domElement, !!lastProps, propKey$247, !1) : !!nextProps !== !!lastProps && (null != tag ? updateOptions(domElement, !!lastProps, tag, !0) : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1)); return; case "textarea": - propKey = propKey$246 = null; + propKey = propKey$247 = null; for (defaultValue in lastProps) if ( ((name = lastProps[defaultValue]), @@ -16164,7 +16199,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { ) switch (value) { case "value": - propKey$246 = name; + propKey$247 = name; break; case "defaultValue": propKey = name; @@ -16178,17 +16213,17 @@ function updateProperties(domElement, tag, lastProps, nextProps) { name !== type && setProp(domElement, tag, value, name, nextProps, type); } - updateTextarea(domElement, propKey$246, propKey); + updateTextarea(domElement, propKey$247, propKey); return; case "option": - for (var propKey$262 in lastProps) + for (var propKey$263 in lastProps) if ( - ((propKey$246 = lastProps[propKey$262]), - lastProps.hasOwnProperty(propKey$262) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$262)) + ((propKey$247 = lastProps[propKey$263]), + lastProps.hasOwnProperty(propKey$263) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$263)) ) - switch (propKey$262) { + switch (propKey$263) { case "selected": domElement.selected = !1; break; @@ -16196,33 +16231,33 @@ function updateProperties(domElement, tag, lastProps, nextProps) { setProp( domElement, tag, - propKey$262, + propKey$263, null, nextProps, - propKey$246 + propKey$247 ); } for (lastDefaultValue in nextProps) if ( - ((propKey$246 = nextProps[lastDefaultValue]), + ((propKey$247 = nextProps[lastDefaultValue]), (propKey = lastProps[lastDefaultValue]), nextProps.hasOwnProperty(lastDefaultValue) && - propKey$246 !== propKey && - (null != propKey$246 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (lastDefaultValue) { case "selected": domElement.selected = - propKey$246 && - "function" !== typeof propKey$246 && - "symbol" !== typeof propKey$246; + propKey$247 && + "function" !== typeof propKey$247 && + "symbol" !== typeof propKey$247; break; default: setProp( domElement, tag, lastDefaultValue, - propKey$246, + propKey$247, nextProps, propKey ); @@ -16243,24 +16278,24 @@ function updateProperties(domElement, tag, lastProps, nextProps) { case "track": case "wbr": case "menuitem": - for (var propKey$267 in lastProps) - (propKey$246 = lastProps[propKey$267]), - lastProps.hasOwnProperty(propKey$267) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$267) && - setProp(domElement, tag, propKey$267, null, nextProps, propKey$246); + for (var propKey$268 in lastProps) + (propKey$247 = lastProps[propKey$268]), + lastProps.hasOwnProperty(propKey$268) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$268) && + setProp(domElement, tag, propKey$268, null, nextProps, propKey$247); for (checked in nextProps) if ( - ((propKey$246 = nextProps[checked]), + ((propKey$247 = nextProps[checked]), (propKey = lastProps[checked]), nextProps.hasOwnProperty(checked) && - propKey$246 !== propKey && - (null != propKey$246 || null != propKey)) + propKey$247 !== propKey && + (null != propKey$247 || null != propKey)) ) switch (checked) { case "children": case "dangerouslySetInnerHTML": - if (null != propKey$246) + if (null != propKey$247) throw Error(formatProdErrorMessage(137, tag)); break; default: @@ -16268,7 +16303,7 @@ function updateProperties(domElement, tag, lastProps, nextProps) { domElement, tag, checked, - propKey$246, + propKey$247, nextProps, propKey ); @@ -16276,49 +16311,49 @@ function updateProperties(domElement, tag, lastProps, nextProps) { return; default: if (isCustomElement(tag)) { - for (var propKey$272 in lastProps) - (propKey$246 = lastProps[propKey$272]), - lastProps.hasOwnProperty(propKey$272) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$272) && + for (var propKey$273 in lastProps) + (propKey$247 = lastProps[propKey$273]), + lastProps.hasOwnProperty(propKey$273) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$273) && setPropOnCustomElement( domElement, tag, - propKey$272, + propKey$273, null, nextProps, - propKey$246 + propKey$247 ); for (defaultChecked in nextProps) - (propKey$246 = nextProps[defaultChecked]), + (propKey$247 = nextProps[defaultChecked]), (propKey = lastProps[defaultChecked]), !nextProps.hasOwnProperty(defaultChecked) || - propKey$246 === propKey || - (null == propKey$246 && null == propKey) || + propKey$247 === propKey || + (null == propKey$247 && null == propKey) || setPropOnCustomElement( domElement, tag, defaultChecked, - propKey$246, + propKey$247, nextProps, propKey ); return; } } - for (var propKey$277 in lastProps) - (propKey$246 = lastProps[propKey$277]), - lastProps.hasOwnProperty(propKey$277) && - null != propKey$246 && - !nextProps.hasOwnProperty(propKey$277) && - setProp(domElement, tag, propKey$277, null, nextProps, propKey$246); + for (var propKey$278 in lastProps) + (propKey$247 = lastProps[propKey$278]), + lastProps.hasOwnProperty(propKey$278) && + null != propKey$247 && + !nextProps.hasOwnProperty(propKey$278) && + setProp(domElement, tag, propKey$278, null, nextProps, propKey$247); for (lastProp in nextProps) - (propKey$246 = nextProps[lastProp]), + (propKey$247 = nextProps[lastProp]), (propKey = lastProps[lastProp]), !nextProps.hasOwnProperty(lastProp) || - propKey$246 === propKey || - (null == propKey$246 && null == propKey) || - setProp(domElement, tag, lastProp, propKey$246, nextProps, propKey); + propKey$247 === propKey || + (null == propKey$247 && null == propKey) || + setProp(domElement, tag, lastProp, propKey$247, nextProps, propKey); } var eventsEnabled = null, selectionInformation = null; @@ -16951,17 +16986,17 @@ function getResource(type, currentProps, pendingProps) { "string" === typeof pendingProps.precedence ) { type = getStyleKey(pendingProps.href); - var styles$285 = getResourcesFromRoot(currentProps).hoistableStyles, - resource$286 = styles$285.get(type); - resource$286 || + var styles$286 = getResourcesFromRoot(currentProps).hoistableStyles, + resource$287 = styles$286.get(type); + resource$287 || ((currentProps = currentProps.ownerDocument || currentProps), - (resource$286 = { + (resource$287 = { type: "stylesheet", instance: null, count: 0, state: { loading: 0, preload: null } }), - styles$285.set(type, resource$286), + styles$286.set(type, resource$287), preloadPropsMap.has(type) || preloadStylesheet( currentProps, @@ -16976,9 +17011,9 @@ function getResource(type, currentProps, pendingProps) { hrefLang: pendingProps.hrefLang, referrerPolicy: pendingProps.referrerPolicy }, - resource$286.state + resource$287.state )); - return resource$286; + return resource$287; } return null; case "script": @@ -17061,37 +17096,37 @@ function acquireResource(hoistableRoot, resource, props) { return (resource.instance = instance); case "stylesheet": styleProps = getStyleKey(props.href); - var instance$290 = hoistableRoot.querySelector( + var instance$291 = hoistableRoot.querySelector( getStylesheetSelectorFromKey(styleProps) ); - if (instance$290) + if (instance$291) return ( (resource.state.loading |= 4), - (resource.instance = instance$290), - markNodeAsHoistable(instance$290), - instance$290 + (resource.instance = instance$291), + markNodeAsHoistable(instance$291), + instance$291 ); instance = stylesheetPropsFromRawProps(props); (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps); - instance$290 = ( + instance$291 = ( hoistableRoot.ownerDocument || hoistableRoot ).createElement("link"); - markNodeAsHoistable(instance$290); - var linkInstance = instance$290; + markNodeAsHoistable(instance$291); + var linkInstance = instance$291; linkInstance._p = new Promise(function (resolve, reject) { linkInstance.onload = resolve; linkInstance.onerror = reject; }); - setInitialProperties(instance$290, "link", instance); + setInitialProperties(instance$291, "link", instance); resource.state.loading |= 4; - insertStylesheet(instance$290, props.precedence, hoistableRoot); - return (resource.instance = instance$290); + insertStylesheet(instance$291, props.precedence, hoistableRoot); + return (resource.instance = instance$291); case "script": - instance$290 = getScriptKey(props.src); + instance$291 = getScriptKey(props.src); if ( (styleProps = hoistableRoot.querySelector( - getScriptSelectorFromKey(instance$290) + getScriptSelectorFromKey(instance$291) )) ) return ( @@ -17100,7 +17135,7 @@ function acquireResource(hoistableRoot, resource, props) { styleProps ); instance = props; - if ((styleProps = preloadPropsMap.get(instance$290))) + if ((styleProps = preloadPropsMap.get(instance$291))) (instance = assign({}, props)), adoptPreloadPropsForScript(instance, styleProps); hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot; @@ -17470,10 +17505,10 @@ Internals.Events = [ restoreStateIfNeeded, batchedUpdates$1 ]; -var devToolsConfig$jscomp$inline_1862 = { +var devToolsConfig$jscomp$inline_1863 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "18.3.0-www-modern-bbc162b8", + version: "18.3.0-www-modern-78796c31", rendererPackageName: "react-dom" }; (function (internals) { @@ -17491,10 +17526,10 @@ var devToolsConfig$jscomp$inline_1862 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1862.bundleType, - version: devToolsConfig$jscomp$inline_1862.version, - rendererPackageName: devToolsConfig$jscomp$inline_1862.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1862.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1863.bundleType, + version: devToolsConfig$jscomp$inline_1863.version, + rendererPackageName: devToolsConfig$jscomp$inline_1863.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1863.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17511,14 +17546,14 @@ var devToolsConfig$jscomp$inline_1862 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1862.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1863.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-bbc162b8" + reconcilerVersion: "18.3.0-www-modern-78796c31" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; exports.createPortal = function (children, container) { @@ -17776,7 +17811,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); }; -exports.version = "18.3.0-www-modern-bbc162b8"; +exports.version = "18.3.0-www-modern-78796c31"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 58c5c2d0755ba..e683d9a1faf36 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "18.3.0-www-classic-aafe6508"; + var ReactVersion = "18.3.0-www-classic-5ea8bd06"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -681,6 +681,7 @@ if (__DEV__) { var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, enableUseDeferredValueInitialArg = dynamicFeatureFlags.enableUseDeferredValueInitialArg, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp; // On WWW, false is used for a new modern build. var enableFloat = true; @@ -8573,21 +8574,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -12387,18 +12397,35 @@ if (__DEV__) { return; } - case REACT_PROVIDER_TYPE: + case REACT_PROVIDER_TYPE: { + if (!enableRenderableContext) { + var context = type._context; + renderContextProvider(request, task, keyPath, context, props); + return; + } // Fall through + } case REACT_CONTEXT_TYPE: { - { + if (enableRenderableContext) { var _context = type; renderContextProvider(request, task, keyPath, _context, props); return; + } else { + var _context2 = type; + + { + if (_context2._context !== undefined) { + _context2 = _context2._context; + } + } + + renderContextConsumer(request, task, keyPath, _context2, props); + return; } } case REACT_CONSUMER_TYPE: { - { + if (enableRenderableContext) { var _context3 = type._context; renderContextConsumer(request, task, keyPath, _context3, props); return; diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 40bff5f5fbf80..3ccb2e8a1f627 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "18.3.0-www-modern-cc760041"; + var ReactVersion = "18.3.0-www-modern-9062d3d5"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -681,6 +681,7 @@ if (__DEV__) { var enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, enableUseDeferredValueInitialArg = dynamicFeatureFlags.enableUseDeferredValueInitialArg, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp; // On WWW, true is used for a new modern build. var enableFloat = true; @@ -8573,21 +8574,30 @@ if (__DEV__) { } switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: { - return null; - } + case REACT_PROVIDER_TYPE: + if (enableRenderableContext) { + return null; + } else { + var provider = type; + return getContextName(provider._context) + ".Provider"; + } case REACT_CONTEXT_TYPE: var context = type; - { + if (enableRenderableContext) { return getContextName(context) + ".Provider"; + } else { + return getContextName(context) + ".Consumer"; } - case REACT_CONSUMER_TYPE: { - var consumer = type; - return getContextName(consumer._context) + ".Consumer"; - } + case REACT_CONSUMER_TYPE: + if (enableRenderableContext) { + var consumer = type; + return getContextName(consumer._context) + ".Consumer"; + } else { + return null; + } case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); @@ -12297,18 +12307,35 @@ if (__DEV__) { return; } - case REACT_PROVIDER_TYPE: + case REACT_PROVIDER_TYPE: { + if (!enableRenderableContext) { + var context = type._context; + renderContextProvider(request, task, keyPath, context, props); + return; + } // Fall through + } case REACT_CONTEXT_TYPE: { - { + if (enableRenderableContext) { var _context = type; renderContextProvider(request, task, keyPath, _context, props); return; + } else { + var _context2 = type; + + { + if (_context2._context !== undefined) { + _context2 = _context2._context; + } + } + + renderContextConsumer(request, task, keyPath, _context2, props); + return; } } case REACT_CONSUMER_TYPE: { - { + if (enableRenderableContext) { var _context3 = type._context; renderContextConsumer(request, task, keyPath, _context3, props); return; diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index c45cdbcd1fe63..04604e92a7617 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -132,6 +132,7 @@ var assign = Object.assign, enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing, enableUseDeferredValueInitialArg = dynamicFeatureFlags.enableUseDeferredValueInitialArg, + enableRenderableContext = dynamicFeatureFlags.enableRenderableContext, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, hasOwnProperty = Object.prototype.hasOwnProperty, VALID_ATTRIBUTE_NAME_REGEX = RegExp( @@ -2592,16 +2593,16 @@ function createRenderState(resumableState, generateStaticMarkup) { "\x3c/script>" ); bootstrapScriptContent = idPrefix + "P:"; - var JSCompiler_object_inline_segmentPrefix_1611 = idPrefix + "S:"; + var JSCompiler_object_inline_segmentPrefix_1596 = idPrefix + "S:"; idPrefix += "B:"; - var JSCompiler_object_inline_preconnects_1625 = new Set(), - JSCompiler_object_inline_fontPreloads_1626 = new Set(), - JSCompiler_object_inline_highImagePreloads_1627 = new Set(), - JSCompiler_object_inline_styles_1628 = new Map(), - JSCompiler_object_inline_bootstrapScripts_1629 = new Set(), - JSCompiler_object_inline_scripts_1630 = new Set(), - JSCompiler_object_inline_bulkPreloads_1631 = new Set(), - JSCompiler_object_inline_preloads_1632 = { + var JSCompiler_object_inline_preconnects_1610 = new Set(), + JSCompiler_object_inline_fontPreloads_1611 = new Set(), + JSCompiler_object_inline_highImagePreloads_1612 = new Set(), + JSCompiler_object_inline_styles_1613 = new Map(), + JSCompiler_object_inline_bootstrapScripts_1614 = new Set(), + JSCompiler_object_inline_scripts_1615 = new Set(), + JSCompiler_object_inline_bulkPreloads_1616 = new Set(), + JSCompiler_object_inline_preloads_1617 = { images: new Map(), stylesheets: new Map(), scripts: new Map(), @@ -2638,7 +2639,7 @@ function createRenderState(resumableState, generateStaticMarkup) { scriptConfig.moduleScriptResources[href] = null; scriptConfig = []; pushLinkImpl(scriptConfig, props); - JSCompiler_object_inline_bootstrapScripts_1629.add(scriptConfig); + JSCompiler_object_inline_bootstrapScripts_1614.add(scriptConfig); bootstrapChunks.push('