You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
2.4 MiB

{"ast":null,"code":"/** @license React v16.13.1\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n var React = require('react');\n\n var _assign = require('object-assign');\n\n var Scheduler = require('scheduler');\n\n var checkPropTypes = require('prop-types/checkPropTypes');\n\n var tracing = require('scheduler/tracing');\n\n var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.\n // Current owner and dispatcher used to share the same ref,\n // but PR #14548 split them out to better support the react-debug-tools package.\n\n if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {\n ReactSharedInternals.ReactCurrentDispatcher = {\n current: null\n };\n }\n\n if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {\n ReactSharedInternals.ReactCurrentBatchConfig = {\n suspense: null\n };\n } // by calls to these methods by a Babel plugin.\n //\n // In PROD (or in packages without access to React internals),\n // they are left as they are instead.\n\n\n function warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n\n function error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n\n function printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\\n in') === 0;\n\n if (!hasExistingStack) {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(message);\n } catch (x) {}\n }\n }\n\n if (!React) {\n {\n throw Error(\"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.\");\n }\n }\n\n var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n };\n\n {\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n\n var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {\n // If document doesn't exist we know for sure we will crash in this method\n // when we call document.createEvent(). However this can cause confusing\n // errors: https://github.com/facebookincubator/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (!(typeof document !== 'undefined')) {\n {\n throw Error(\"The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.\");\n }\n }\n\n var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n function callCallback() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n\n func.apply(context, funcArgs);\n didError = false;\n } // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n } // Create a fake event type.\n\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n\n if (didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n } else if (isCrossOriginError) {\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');\n }\n\n this.onError(error);\n } // Remove our event listeners\n\n\n window.removeEventListener('error', handleWindowError);\n };\n\n invokeGuardedCallbackImpl = invokeGuardedCallbackDev;\n }\n }\n var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n var hasError = false;\n var caughtError = null; // Used by event system to capture/rethrow the first error.\n\n var hasRethrowError = false;\n var rethrowError = null;\n var reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n };\n /**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\n function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n }\n /**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\n\n function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n\n if (hasError) {\n var error = clearCaughtError();\n\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n }\n /**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\n\n function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }\n\n function hasCaughtError() {\n return hasError;\n }\n\n function clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n {\n {\n throw Error(\"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n }\n\n var getFiberCurrentPropsFromNode = null;\n var getInstanceFromNode = null;\n var getNodeFromInstance = null;\n\n function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {\n getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;\n getInstanceFromNode = getInstanceFromNodeImpl;\n getNodeFromInstance = getNodeFromInstanceImpl;\n {\n if (!getNodeFromInstance || !getInstanceFromNode) {\n error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');\n }\n }\n }\n\n var validateEventDispatches;\n {\n validateEventDispatches = function (event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n var listenersIsArr = Array.isArray(dispatchListeners);\n var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;\n var instancesIsArr = Array.isArray(dispatchInstances);\n var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;\n\n if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {\n error('EventPluginUtils: Invalid `event`.');\n }\n };\n }\n /**\n * Dispatch the event to the listener.\n * @param {SyntheticEvent} event SyntheticEvent to handle\n * @param {function} listener Application-level callback\n * @param {*} inst Internal component instance\n */\n\n function executeDispatch(event, listener, inst) {\n var type = event.type || 'unknown-event';\n event.currentTarget = getNodeFromInstance(inst);\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n }\n /**\n * Standard/simple iteration through an event's collected dispatches.\n */\n\n\n function executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n }\n\n var FunctionComponent = 0;\n var ClassComponent = 1;\n var IndeterminateComponent = 2; // Before we know whether it is function or class\n\n var HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\n var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\n var HostComponent = 5;\n var HostText = 6;\n var Fragment = 7;\n var Mode = 8;\n var ContextConsumer = 9;\n var ContextProvider = 10;\n var ForwardRef = 11;\n var Profiler = 12;\n var SuspenseComponent = 13;\n var MemoComponent = 14;\n var SimpleMemoComponent = 15;\n var LazyComponent = 16;\n var IncompleteClassComponent = 17;\n var DehydratedFragment = 18;\n var SuspenseListComponent = 19;\n var FundamentalComponent = 20;\n var ScopeComponent = 21;\n var Block = 22;\n /**\n * Injectable ordering of event plugins.\n */\n\n var eventPluginOrder = null;\n /**\n * Injectable mapping from names to event plugin modules.\n */\n\n var namesToPlugins = {};\n /**\n * Recomputes the plugin list using the injected plugins and plugin ordering.\n *\n * @private\n */\n\n function recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\");\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error(\"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\");\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error(\"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\");\n }\n }\n }\n }\n }\n /**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\n\n\n function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {\n {\n throw Error(\"EventPluginRegistry: More than one plugin attempted to publish the same event name, `\" + eventName + \"`.\");\n }\n }\n\n eventNameDispatchConfigs[eventName] = dispatchConfig;\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n\n if (phasedRegistrationNames) {\n for (var phaseName in phasedRegistrationNames) {\n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n var phasedRegistrationName = phasedRegistrationNames[phaseName];\n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n }\n }\n\n return true;\n } else if (dispatchConfig.registrationName) {\n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n return true;\n }\n\n return false;\n }\n /**\n * Publishes a registration name that is used to identify dispatched events.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\n\n\n function publishRegistrationName(registrationName, pluginModule, eventName) {\n if (!!registrationNameModules[registrationName]) {\n {\n throw Error(\"EventPluginRegistry: More than one plugin attempted to publish the same registration name, `\" + registrationName + \"`.\");\n }\n }\n\n registrationNameModules[registrationName] = pluginModule;\n registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n }\n /**\n * Registers plugins so that they can extract and dispatch events.\n */\n\n /**\n * Ordered list of injected plugins.\n */\n\n\n var plugins = [];\n /**\n * Mapping from event name to dispatch config\n */\n\n var eventNameDispatchConfigs = {};\n /**\n * Mapping from registration name to plugin module\n */\n\n var registrationNameModules = {};\n /**\n * Mapping from registration name to event name\n */\n\n var registrationNameDependencies = {};\n /**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\n var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true\n\n /**\n * Injects an ordering of plugins (by plugin name). This allows the ordering\n * to be decoupled from injection of the actual plugins so that ordering is\n * always deterministic regardless of packaging, on-the-fly injection, etc.\n *\n * @param {array} InjectedEventPluginOrder\n * @internal\n */\n\n function injectEventPluginOrder(injectedEventPluginOrder) {\n if (!!eventPluginOrder) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.\");\n }\n } // Clone the ordering so it cannot be dynamically mutated.\n\n\n eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n recomputePluginOrdering();\n }\n /**\n * Injects plugins to be used by plugin event system. The plugin names must be\n * in the ordering injected by `injectEventPluginOrder`.\n *\n * Plugins can be injected as part of page initialization or on-the-fly.\n *\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n * @internal\n */\n\n\n function injectEventPluginsByName(injectedNamesToPlugins) {\n var isOrderingDirty = false;\n\n for (var pluginName in injectedNamesToPlugins) {\n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n continue;\n }\n\n var pluginModule = injectedNamesToPlugins[pluginName];\n\n if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n if (!!namesToPlugins[pluginName]) {\n {\n throw Error(\"EventPluginRegistry: Cannot inject two different event plugins using the same name, `\" + pluginName + \"`.\");\n }\n }\n\n namesToPlugins[pluginName] = pluginModule;\n isOrderingDirty = true;\n }\n }\n\n if (isOrderingDirty) {\n recomputePluginOrdering();\n }\n }\n\n var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n var PLUGIN_EVENT_SYSTEM = 1;\n var IS_REPLAYED = 1 << 5;\n var IS_FIRST_ANCESTOR = 1 << 6;\n var restoreImpl = null;\n var restoreTarget = null;\n var restoreQueue = null;\n\n function restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n if (!(typeof restoreImpl === 'function')) {\n {\n throw Error(\"setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var _props = getFiberCurrentPropsFromNode(stateNode);\n\n restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n }\n }\n\n function setRestoreImplementation(impl) {\n restoreImpl = impl;\n }\n\n function enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n }\n\n function needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n }\n\n function restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n }\n\n var enableProfilerTimer = true; // Trace which interactions trigger each commit.\n\n var enableDeprecatedFlareAPI = false; // Experimental Host Component support.\n\n var enableFundamentalAPI = false; // Experimental Scope support.\n\n var warnAboutStringRefs = false; // the renderer. Such as when we're dispatching events or if third party\n // libraries need to call batchedUpdates. Eventually, this API will go away when\n // everything is batched by default. We'll then have a similar API to opt-out of\n // scheduled work and instead do synchronous work.\n // Defaults\n\n var batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n };\n\n var discreteUpdatesImpl = function (fn, a, b, c, d) {\n return fn(a, b, c, d);\n };\n\n var flushDiscreteUpdatesImpl = function () {};\n\n var batchedEventUpdatesImpl = batchedUpdatesImpl;\n var isInsideEventHandler = false;\n var isBatchingEventUpdates = false;\n\n function finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n flushDiscreteUpdatesImpl();\n restoreStateIfNeeded();\n }\n }\n\n function batchedUpdates(fn, bookkeeping) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(bookkeeping);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n }\n\n function batchedEventUpdates(fn, a, b) {\n if (isBatchingEventUpdates) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isBatchingEventUpdates = true;\n\n try {\n return batchedEventUpdatesImpl(fn, a, b);\n } finally {\n isBatchingEventUpdates = false;\n finishEventHandler();\n }\n } // This is for the React Flare event system\n\n\n function discreteUpdates(fn, a, b, c, d) {\n var prevIsInsideEventHandler = isInsideEventHandler;\n isInsideEventHandler = true;\n\n try {\n return discreteUpdatesImpl(fn, a, b, c, d);\n } finally {\n isInsideEventHandler = prevIsInsideEventHandler;\n\n if (!isInsideEventHandler) {\n finishEventHandler();\n }\n }\n }\n\n function flushDiscreteUpdatesIfNeeded(timeStamp) {\n // event.timeStamp isn't overly reliable due to inconsistencies in\n // how different browsers have historically provided the time stamp.\n // Some browsers provide high-resolution time stamps for all events,\n // some provide low-resolution time stamps for all events. FF < 52\n // even mixes both time stamps together. Some browsers even report\n // negative time stamps or time stamps that are 0 (iOS9) in some cases.\n // Given we are only comparing two time stamps with equality (!==),\n // we are safe from the resolution differences. If the time stamp is 0\n // we bail-out of preventing the flush, which can affect semantics,\n // such as if an earlier flush removes or adds event listeners that\n // are fired in the subsequent flush. However, this is the same\n // behaviour as we had before this change, so the risks are low.\n if (!isInsideEventHandler && !enableDeprecatedFlareAPI) {\n flushDiscreteUpdatesImpl();\n }\n }\n\n function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n discreteUpdatesImpl = _discreteUpdatesImpl;\n flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;\n batchedEventUpdatesImpl = _batchedEventUpdatesImpl;\n }\n\n var DiscreteEvent = 0;\n var UserBlockingEvent = 1;\n var ContinuousEvent = 2; // A reserved attribute.\n // It is handled by React separately and shouldn't be written to the DOM.\n\n var RESERVED = 0; // A simple string attribute.\n // Attributes that aren't in the whitelist are presumed to have this type.\n\n var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n // \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n // When true, it should be set to a \"true\" string.\n // When false, it should be set to a \"false\" string.\n\n var BOOLEANISH_STRING = 2; // A real boolean attribute.\n // When true, it should be present (set either to an empty string or its name).\n // When false, it should be omitted.\n\n var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n // When true, it should be present (set either to an empty string or its name).\n // When false, it should be omitted.\n // For any other value, should be present with that value.\n\n var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n // When falsy, it should be removed.\n\n var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n // When falsy, it should be removed.\n\n var POSITIVE_NUMERIC = 6;\n /* eslint-disable max-len */\n\n var ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n /* eslint-enable max-len */\n\n var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n var ROOT_ATTRIBUTE_NAME = 'data-reactroot';\n var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var illegalAttributeNameCache = {};\n var validatedAttributeNameCache = {};\n\n function isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n return false;\n }\n\n function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n\n return false;\n }\n\n function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n }\n\n function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n\n case OVERLOADED_BOOLEAN:\n return value === false;\n\n case NUMERIC:\n return isNaN(value);\n\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n\n return false;\n }\n\n function getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n }\n\n function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n } // When adding attributes to this list, be sure to also add them to\n // the `possibleStandardNames` module to ensure casing and incorrect\n // name warnings.\n\n\n var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\n var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n // elements (not just inputs). Now that ReactDOMInput assigns to the\n // defaultValue property -- do we need this?\n 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n reservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n }); // A few React string attributes have a different name.\n // This is a mapping from React prop names to the attribute names.\n\n [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false);\n }); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n // In React, we let users pass `true` and `false` even though technically\n // these aren't boolean attributes (they are coerced to strings).\n\n ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n }); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n // In React, we let users pass `true` and `false` even though technically\n // these aren't boolean attributes (they are coerced to strings).\n // Since these are SVG attributes, their attribute names are case-sensitive.\n\n ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n }); // These are HTML boolean attributes.\n\n ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n // on the client side because the browsers are inconsistent. Instead we call focus().\n 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n 'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n }); // These are the few React props that we set as DOM properties\n // rather than attributes. These are all booleans.\n\n ['checked', // Note: `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`. We have special logic for handling this.\n 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n }); // These are HTML attributes that are \"overloaded booleans\": they behave like\n // booleans, but can also accept a string value.\n\n ['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n }); // These are HTML attributes that must be positive numbers.\n\n ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n }); // These are HTML attributes that must be numbers.\n\n ['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n });\n var CAMELIZE = /[\\-\\:]([a-z])/g;\n\n var capitalize = function (token) {\n return token[1].toUpperCase();\n }; // This is a list of all SVG attributes that need special casing, namespacing,\n // or boolean value assignment. Regular attributes that just accept strings\n // and have the same names are omitted, just like in the HTML whitelist.\n // Some of these attributes can be hard to find. This list was created by\n // scraping the MDN documentation.\n\n\n ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false);\n }); // String SVG attributes with the xlink namespace.\n\n ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false);\n }); // String SVG attributes with the xml namespace.\n\n ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false);\n }); // These attribute exists both in HTML and SVG.\n // The attribute name is case-sensitive in SVG so we can't just use\n // the React name like we do for attributes that exist only in HTML.\n\n ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n }); // These attributes accept URLs. These must not allow javascript: URLS.\n // These will also need to accept Trusted Types object in the future.\n\n var xlinkHref = 'xlinkHref';\n properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n 'xlink:href', 'http://www.w3.org/1999/xlink', true);\n ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true);\n });\n var ReactDebugCurrentFrame = null;\n {\n ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n } // A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n // and any newline or tab are filtered out as if they're not part of the URL.\n // https://url.spec.whatwg.org/#url-parsing\n // Tab or newline are defined as \\r\\n\\t:\n // https://infra.spec.whatwg.org/#ascii-tab-or-newline\n // A C0 control is a code point in the range \\u0000 NULL to \\u001F\n // INFORMATION SEPARATOR ONE, inclusive:\n // https://infra.spec.whatwg.org/#c0-control-or-space\n\n /* eslint-disable max-len */\n\n var isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\n var didWarn = false;\n\n function sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n }\n }\n }\n /**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\n\n\n function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n /**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\n\n function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }\n /**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\n\n function setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n } // If the prop isn't in the special list, treat it as a simple attribute.\n\n\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n node.setAttribute(_attributeName, '' + value);\n }\n }\n\n return;\n }\n\n var mustUseProperty = propertyInfo.mustUseProperty;\n\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n if (value === null) {\n var type = propertyInfo.type;\n node[propertyName] = type === BOOLEAN ? false : '';\n } else {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyName] = value;\n }\n\n return;\n } // The rest are treated as attributes with special cases.\n\n\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n var attributeValue;\n\n if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n // If attribute type is boolean, we know for sure it won't be an execution sink\n // and we won't require Trusted Type here.\n attributeValue = '';\n } else {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n {\n attributeValue = '' + value;\n }\n\n if (propertyInfo.sanitizeURL) {\n sanitizeURL(attributeValue.toString());\n }\n }\n\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n }\n\n var BEFORE_SLASH_RE = /^(.*)[\\\\\\/]/;\n\n function describeComponentFrame(name, source, ownerName) {\n var sourceInfo = '';\n\n if (source) {\n var path = source.fileName;\n var fileName = path.replace(BEFORE_SLASH_RE, '');\n {\n // In DEV, include code for a common special case:\n // prefer \"folder/index.js\" instead of just \"index.js\".\n if (/^index\\./.test(fileName)) {\n var match = path.match(BEFORE_SLASH_RE);\n\n if (match) {\n var pathBeforeSlash = match[1];\n\n if (pathBeforeSlash) {\n var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');\n fileName = folderName + '/' + fileName;\n }\n }\n }\n }\n sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';\n } else if (ownerName) {\n sourceInfo = ' (created by ' + ownerName + ')';\n }\n\n return '\\n in ' + (name || 'Unknown') + sourceInfo;\n } // The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n // nor polyfill, then a plain number is used for performance.\n\n\n var hasSymbol = typeof Symbol === 'function' && Symbol.for;\n var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\n var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\n var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\n var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\n var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\n var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\n var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n\n var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\n var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\n var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\n var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\n var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\n var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\n var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\n var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n function getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n }\n\n var Uninitialized = -1;\n var Pending = 0;\n var Resolved = 1;\n var Rejected = 2;\n\n function refineResolvedLazyComponent(lazyComponent) {\n return lazyComponent._status === Resolved ? lazyComponent._result : null;\n }\n\n function initializeLazyComponentType(lazyComponent) {\n if (lazyComponent._status === Uninitialized) {\n lazyComponent._status = Pending;\n var ctor = lazyComponent._ctor;\n var thenable = ctor();\n lazyComponent._result = thenable;\n thenable.then(function (moduleObject) {\n if (lazyComponent._status === Pending) {\n var defaultExport = moduleObject.default;\n {\n if (defaultExport === undefined) {\n error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + \"const MyComponent = lazy(() => import('./MyComponent'))\", moduleObject);\n }\n }\n lazyComponent._status = Resolved;\n lazyComponent._result = defaultExport;\n }\n }, function (error) {\n if (lazyComponent._status === Pending) {\n lazyComponent._status = Rejected;\n lazyComponent._result = error;\n }\n });\n }\n }\n\n function getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n }\n\n function getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n return 'Context.Consumer';\n\n case REACT_PROVIDER_TYPE:\n return 'Context.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type.render);\n\n case REACT_LAZY_TYPE:\n {\n var thenable = type;\n var resolvedThenable = refineResolvedLazyComponent(thenable);\n\n if (resolvedThenable) {\n return getComponentName(resolvedThenable);\n }\n\n break;\n }\n }\n }\n\n return null;\n }\n\n var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\n function describeFiber(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n case HostPortal:\n case HostText:\n case Fragment:\n case ContextProvider:\n case ContextConsumer:\n return '';\n\n default:\n var owner = fiber._debugOwner;\n var source = fiber._debugSource;\n var name = getComponentName(fiber.type);\n var ownerName = null;\n\n if (owner) {\n ownerName = getComponentName(owner.type);\n }\n\n return describeComponentFrame(name, source, ownerName);\n }\n }\n\n function getStackByFiberInDevAndProd(workInProgress) {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n\n return info;\n }\n\n var current = null;\n var isRendering = false;\n\n function getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentName(owner.type);\n }\n }\n return null;\n }\n\n function getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n }\n\n function resetCurrentFiber() {\n {\n ReactDebugCurrentFrame$1.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n }\n\n function setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n }\n\n function setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n } // Flow does not allow string concatenation of most non-string types. To work\n // around this limitation, we use an opaque type that can only be obtained by\n // passing the value through getToStringValue first.\n\n\n function toString(value) {\n return '' + value;\n }\n\n function getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'object':\n case 'string':\n case 'undefined':\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n }\n\n var ReactDebugCurrentFrame$2 = null;\n var ReactControlledValuePropTypes = {\n checkPropTypes: null\n };\n {\n ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;\n var hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n };\n var propTypes = {\n value: function (props, propName, componentName) {\n if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI) {\n return null;\n }\n\n return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n checked: function (props, propName, componentName) {\n if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI) {\n return null;\n }\n\n return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n };\n /**\n * Provide a linked `value` attribute for controlled forms. You should not use\n * this outside of the ReactDOM controlled form components.\n */\n\n ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {\n checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);\n };\n }\n\n function isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n }\n\n function getTracker(node) {\n return node._valueTracker;\n }\n\n function detachTracker(node) {\n node._valueTracker = null;\n }\n\n function getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n }\n\n function trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n }\n\n function track(node) {\n if (getTracker(node)) {\n return;\n } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n node._valueTracker = trackValueOnNode(node);\n }\n\n function updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n }\n\n var didWarnValueDefaultValue = false;\n var didWarnCheckedDefaultChecked = false;\n var didWarnControlledToUncontrolled = false;\n var didWarnUncontrolledToControlled = false;\n\n function isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n }\n /**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\n function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }\n\n function initWrapperState(element, props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n didWarnValueDefaultValue = true;\n }\n }\n var node = element;\n var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n controlled: isControlled(props)\n };\n }\n\n function updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n }\n\n function updateWrapper(element, props) {\n var node = element;\n {\n var controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n error('A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);\n didWarnUncontrolledToControlled = true;\n }\n\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n error('A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);\n didWarnControlledToUncontrolled = true;\n }\n }\n updateChecked(element, props);\n var value = getToStringValue(props.value);\n var type = props.type;\n\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(value);\n }\n } else if (node.value !== toString(value)) {\n node.value = toString(value);\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n return;\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (props.hasOwnProperty('value')) {\n setDefaultValue(node, props.type, value);\n } else if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n }\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n }\n\n function postMountWrapper(element, props, isHydrating) {\n var node = element; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n var type = props.type;\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (props.value === undefined || props.value === null)) {\n return;\n }\n\n var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var name = node.name;\n\n if (name !== '') {\n node.name = '';\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!node._wrapperState.initialChecked;\n }\n\n if (name !== '') {\n node.name = name;\n }\n }\n\n function restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n }\n\n function updateNamedCousins(rootNode, props) {\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode$1(otherNode);\n\n if (!otherProps) {\n {\n throw Error(\"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.\");\n }\n } // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n\n\n updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n updateWrapper(otherNode, otherProps);\n }\n }\n } // In Chrome, assigning defaultValue to certain input types triggers input validation.\n // For number inputs, the display value loses trailing decimal points. For email inputs,\n // Chrome raises \"The specified value <x> is not a valid email address\".\n //\n // Here we check to see if the defaultValue has actually changed, avoiding these problems\n // when the user is inputting text\n //\n // https://github.com/facebook/react/issues/7253\n\n\n function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }\n\n var didWarnSelectedSetOnOption = false;\n var didWarnInvalidChild = false;\n\n function flattenChildren(children) {\n var content = ''; // Flatten children. We'll warn if they are invalid\n // during validateProps() which runs for hydration too.\n // Note that this would throw on non-element objects.\n // Elements are stringified (which is normally irrelevant\n // but matters for <fbt>).\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child; // Note: we don't warn about invalid children here.\n // Instead, this is done separately below so that\n // it happens during the hydration codepath too.\n });\n return content;\n }\n /**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\n\n function validateProps(element, props) {\n {\n // This mirrors the codepath above, but runs for hydration too.\n // Warn about invalid children here so that client and hydration are consistent.\n // TODO: this seems like it could cause a DEV-only throw for hydration\n // if children contains a non-element object. We should try to avoid that.\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n\n if (typeof child.type !== 'string') {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n error('Only strings and numbers are supported as <option> children.');\n }\n });\n } // TODO: Remove support for `selected` in <option>.\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n }\n\n function postMountWrapper$1(element, props) {\n // value=\"\" should make a value attribute (#6219)\n if (props.value != null) {\n element.setAttribute('value', toString(getToStringValue(props.value)));\n }\n }\n\n function getHostProps$1(element, props) {\n var hostProps = _assign({\n children: undefined\n }, props);\n\n var content = flattenChildren(props.children);\n\n if (content) {\n hostProps.children = content;\n }\n\n return hostProps;\n }\n\n var didWarnValueDefaultValue$1;\n {\n didWarnValueDefaultValue$1 = false;\n }\n\n function getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n }\n\n var valuePropNames = ['value', 'defaultValue'];\n /**\n * Validation function for `value` and `defaultValue`.\n */\n\n function checkSelectPropTypes(props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }\n\n function updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n }\n /**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\n function getHostProps$2(element, props) {\n return _assign({}, props, {\n value: undefined\n });\n }\n\n function initWrapperState$1(element, props) {\n var node = element;\n {\n checkSelectPropTypes(props);\n }\n node._wrapperState = {\n wasMultiple: !!props.multiple\n };\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');\n didWarnValueDefaultValue$1 = true;\n }\n }\n }\n\n function postMountWrapper$2(element, props) {\n var node = element;\n node.multiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n }\n }\n\n function postUpdateWrapper(element, props) {\n var node = element;\n var wasMultiple = node._wrapperState.wasMultiple;\n node._wrapperState.wasMultiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (wasMultiple !== !!props.multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n }\n }\n }\n\n function restoreControlledState$1(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n }\n\n var didWarnValDefaultVal = false;\n /**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\n\n function getHostProps$3(element, props) {\n var node = element;\n\n if (!(props.dangerouslySetInnerHTML == null)) {\n {\n throw Error(\"`dangerouslySetInnerHTML` does not make sense on <textarea>.\");\n }\n } // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n\n\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n\n return hostProps;\n }\n\n function initWrapperState$2(element, props) {\n var node = element;\n {\n ReactControlledValuePropTypes.checkPropTypes('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n didWarnValDefaultVal = true;\n }\n }\n var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n var children = props.children,\n defaultValue = props.defaultValue;\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n {\n if (!(defaultValue == null)) {\n {\n throw Error(\"If you supply `defaultValue` on a <textarea>, do not pass children.\");\n }\n }\n\n if (Array.isArray(children)) {\n if (!(children.length <= 1)) {\n {\n throw Error(\"<textarea> can only have at most one child.\");\n }\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n node._wrapperState = {\n initialValue: getToStringValue(initialValue)\n };\n }\n\n function updateWrapper$1(element, props) {\n var node = element;\n var value = getToStringValue(props.value);\n var defaultValue = getToStringValue(props.defaultValue);\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n }\n\n if (props.defaultValue == null && node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\n }\n }\n\n function postMountWrapper$3(element, props) {\n var node = element; // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === node._wrapperState.initialValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n }\n\n function restoreControlledState$2(element, props) {\n // DOM component is still mounted; update\n updateWrapper$1(element, props);\n }\n\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var Namespaces = {\n html: HTML_NAMESPACE,\n mathml: MATH_NAMESPACE,\n svg: SVG_NAMESPACE\n }; // Assumes there is no parent namespace.\n\n function getIntrinsicNamespace(type) {\n switch (type) {\n case 'svg':\n return SVG_NAMESPACE;\n\n case 'math':\n return MATH_NAMESPACE;\n\n default:\n return HTML_NAMESPACE;\n }\n }\n\n function getChildNamespace(parentNamespace, type) {\n if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n // No (or default) parent namespace: potential entry point.\n return getIntrinsicNamespace(type);\n }\n\n if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n // We're leaving SVG.\n return HTML_NAMESPACE;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n }\n /* globals MSApp */\n\n /**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\n\n\n var createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n };\n\n var reusableSVGContainer;\n /**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\n var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n if (node.namespaceURI === Namespaces.svg) {\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n });\n /**\n * HTML nodeType values that represent the type of the node\n */\n\n var ELEMENT_NODE = 1;\n var TEXT_NODE = 3;\n var COMMENT_NODE = 8;\n var DOCUMENT_NODE = 9;\n var DOCUMENT_FRAGMENT_NODE = 11;\n /**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\n var setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n }; // Do not use the below two methods directly!\n // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.\n // (It is the only module that is allowed to access these methods.)\n\n\n function unsafeCastStringToDOMTopLevelType(topLevelType) {\n return topLevelType;\n }\n\n function unsafeCastDOMTopLevelTypeToString(topLevelType) {\n return topLevelType;\n }\n /**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\n\n function makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n }\n /**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\n var vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n /**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\n var prefixedEventNames = {};\n /**\n * Element to check for prefixes on.\n */\n\n var style = {};\n /**\n * Bootstrap if a DOM exists.\n */\n\n if (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n }\n /**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\n function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n }\n /**\n * To identify top level events in ReactDOM, we use constants defined by this\n * module. This is the only module that uses the unsafe* methods to express\n * that the constants actually correspond to the browser event names. This lets\n * us save some bundle size by avoiding a top level type -> event name map.\n * The rest of ReactDOM code should import top level types from this file.\n */\n\n\n var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');\n var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));\n var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));\n var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));\n var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');\n var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');\n var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');\n var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');\n var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');\n var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');\n var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');\n var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');\n var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');\n var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');\n var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');\n var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');\n var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');\n var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');\n var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');\n var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');\n var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');\n var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');\n var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');\n var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');\n var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');\n var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');\n var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');\n var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');\n var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');\n var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');\n var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');\n var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');\n var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');\n var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');\n var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');\n var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');\n var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');\n var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');\n var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');\n var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');\n var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');\n var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');\n var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');\n var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');\n var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');\n var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');\n var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');\n var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');\n var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');\n var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');\n var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');\n var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');\n var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');\n var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');\n var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');\n var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');\n var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');\n var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');\n var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');\n var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');\n var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');\n var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');\n var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');\n var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');\n var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');\n var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');\n var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');\n var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');\n var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');\n var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');\n var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');\n var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');\n var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');\n var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');\n var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');\n var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');\n var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));\n var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');\n var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');\n var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.\n // Note that events in this list will *not* be listened to at the top level\n // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.\n\n var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];\n\n function getRawEventName(topLevelType) {\n return unsafeCastDOMTopLevelTypeToString(topLevelType);\n }\n\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // prettier-ignore\n\n var elementListenerMap = new PossiblyWeakMap();\n\n function getListenerMapForElement(element) {\n var listenerMap = elementListenerMap.get(element);\n\n if (listenerMap === undefined) {\n listenerMap = new Map();\n elementListenerMap.set(element, listenerMap);\n }\n\n return listenerMap;\n }\n /**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\n\n\n function get(key) {\n return key._reactInternalFiber;\n }\n\n function has(key) {\n return key._reactInternalFiber !== undefined;\n }\n\n function set(key, value) {\n key._reactInternalFiber = value;\n } // Don't change these two values. They're used by React Dev Tools.\n\n\n var NoEffect =\n /* */\n 0;\n var PerformedWork =\n /* */\n 1; // You can change the rest (and add more).\n\n var Placement =\n /* */\n 2;\n var Update =\n /* */\n 4;\n var PlacementAndUpdate =\n /* */\n 6;\n var Deletion =\n /* */\n 8;\n var ContentReset =\n /* */\n 16;\n var Callback =\n /* */\n 32;\n var DidCapture =\n /* */\n 64;\n var Ref =\n /* */\n 128;\n var Snapshot =\n /* */\n 256;\n var Passive =\n /* */\n 512;\n var Hydrating =\n /* */\n 1024;\n var HydratingAndUpdate =\n /* */\n 1028; // Passive & Update & Callback & Ref & Snapshot\n\n var LifecycleEffectMask =\n /* */\n 932; // Union of all host effects\n\n var HostEffectMask =\n /* */\n 2047;\n var Incomplete =\n /* */\n 2048;\n var ShouldCapture =\n /* */\n 4096;\n var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\n\n function getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n }\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n }\n\n function getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n }\n\n function getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n }\n\n function isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n }\n\n function isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n }\n\n function assertIsMounted(fiber) {\n if (!(getNearestMountedFiber(fiber) === fiber)) {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n }\n\n function findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (!(nearestMounted !== null)) {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n {\n throw Error(\"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\");\n }\n }\n }\n }\n\n if (!(a.alternate === b)) {\n {\n throw Error(\"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (!(a.tag === HostRoot)) {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n }\n\n function findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n }\n\n function findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI) {\n return node;\n } else if (node.child && node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n }\n /**\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\n\n function accumulateInto(current, next) {\n if (!(next != null)) {\n {\n throw Error(\"accumulateInto(...): Accumulated items must not be null or undefined.\");\n }\n }\n\n if (current == null) {\n return next;\n } // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n\n\n if (Array.isArray(current)) {\n if (Array.isArray(next)) {\n current.push.apply(current, next);\n return current;\n }\n\n current.push(next);\n return current;\n }\n\n if (Array.isArray(next)) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n }\n /**\n * @param {array} arr an \"accumulation\" of items which is either an Array or\n * a single item. Useful when paired with the `accumulate` module. This is a\n * simple utility that allows us to reason about a collection of items, but\n * handling the case when there is exactly one item (and we do not need to\n * allocate an array).\n * @param {function} cb Callback invoked with each element or a collection.\n * @param {?} [scope] Scope used as `this` in a callback.\n */\n\n\n function forEachAccumulated(arr, cb, scope) {\n if (Array.isArray(arr)) {\n arr.forEach(cb, scope);\n } else if (arr) {\n cb.call(scope, arr);\n }\n }\n /**\n * Internal queue of events that have accumulated their dispatches and are\n * waiting to have their dispatches executed.\n */\n\n\n var eventQueue = null;\n /**\n * Dispatches an event and releases it back into the pool, unless persistent.\n *\n * @param {?object} event Synthetic event to be dispatched.\n * @private\n */\n\n var executeDispatchesAndRelease = function (event) {\n if (event) {\n executeDispatchesInOrder(event);\n\n if (!event.isPersistent()) {\n event.constructor.release(event);\n }\n }\n };\n\n var executeDispatchesAndReleaseTopLevel = function (e) {\n return executeDispatchesAndRelease(e);\n };\n\n function runEventsInBatch(events) {\n if (events !== null) {\n eventQueue = accumulateInto(eventQueue, events);\n } // Set `eventQueue` to null before processing it so that we can tell if more\n // events get enqueued while processing.\n\n\n var processingEventQueue = eventQueue;\n eventQueue = null;\n\n if (!processingEventQueue) {\n return;\n }\n\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n\n if (!!eventQueue) {\n {\n throw Error(\"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.\");\n }\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n }\n /**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\n\n function getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n }\n /**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\n\n function isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = (eventName in document);\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n }\n /**\n * Summary of `DOMEventPluginSystem` event handling:\n *\n * - Top-level delegation is used to trap most native browser events. This\n * may only occur in the main thread and is the responsibility of\n * ReactDOMEventListener, which is injected and can therefore support\n * pluggable event sources. This is the only work that occurs in the main\n * thread.\n *\n * - We normalize and de-duplicate events to account for browser quirks. This\n * may be done in the worker thread.\n *\n * - Forward these native events (with the associated top-level type used to\n * trap it) to `EventPluginRegistry`, which in turn will ask plugins if they want\n * to extract any synthetic events.\n *\n * - The `EventPluginRegistry` will then process each event by annotating them with\n * \"dispatches\", a sequence of listeners and IDs that care about that event.\n *\n * - The `EventPluginRegistry` then dispatches the events.\n *\n * Overview of React and the event system:\n *\n * +------------+ .\n * | DOM | .\n * +------------+ .\n * | .\n * v .\n * +------------+ .\n * | ReactEvent | .\n * | Listener | .\n * +------------+ . +-----------+\n * | . +--------+|SimpleEvent|\n * | . | |Plugin |\n * +-----|------+ . v +-----------+\n * | | | . +--------------+ +------------+\n * | +-----------.--->|PluginRegistry| | Event |\n * | | . | | +-----------+ | Propagators|\n * | ReactEvent | . | | |TapEvent | |------------|\n * | Emitter | . | |<---+|Plugin | |other plugin|\n * | | . | | +-----------+ | utilities |\n * | +-----------.--->| | +------------+\n * | | | . +--------------+\n * +-----|------+ . ^ +-----------+\n * | . | |Enter/Leave|\n * + . +-------+|Plugin |\n * +-------------+ . +-----------+\n * | application | .\n * |-------------| .\n * | | .\n * | | .\n * +-------------+ .\n * .\n * React Core . General Purpose Event Plugin System\n */\n\n\n var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;\n var callbackBookkeepingPool = [];\n\n function releaseTopLevelCallbackBookKeeping(instance) {\n instance.topLevelType = null;\n instance.nativeEvent = null;\n instance.targetInst = null;\n instance.ancestors.length = 0;\n\n if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {\n callbackBookkeepingPool.push(instance);\n }\n } // Used to store ancestor hierarchy in top level callback\n\n\n function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) {\n if (callbackBookkeepingPool.length) {\n var instance = callbackBookkeepingPool.pop();\n instance.topLevelType = topLevelType;\n instance.eventSystemFlags = eventSystemFlags;\n instance.nativeEvent = nativeEvent;\n instance.targetInst = targetInst;\n return instance;\n }\n\n return {\n topLevelType: topLevelType,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetInst: targetInst,\n ancestors: []\n };\n }\n /**\n * Find the deepest React component completely containing the root of the\n * passed-in instance (for use when entire React trees are nested within each\n * other). If React trees are not nested, returns null.\n */\n\n\n function findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n }\n /**\n * Allows registered plugins an opportunity to extract events from top-level\n * native browser events.\n *\n * @return {*} An accumulation of synthetic events.\n * @internal\n */\n\n\n function extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var events = null;\n\n for (var i = 0; i < plugins.length; i++) {\n // Not every plugin in the ordering may be loaded at runtime.\n var possiblePlugin = plugins[i];\n\n if (possiblePlugin) {\n var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n\n if (extractedEvents) {\n events = accumulateInto(events, extractedEvents);\n }\n }\n }\n\n return events;\n }\n\n function runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n runEventsInBatch(events);\n }\n\n function handleTopLevel(bookKeeping) {\n var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components.\n // It's important that we build the array of ancestors before calling any\n // event handlers, because event handlers can modify the DOM, leading to\n // inconsistencies with ReactMount's node cache. See #1105.\n\n var ancestor = targetInst;\n\n do {\n if (!ancestor) {\n var ancestors = bookKeeping.ancestors;\n ancestors.push(ancestor);\n break;\n }\n\n var root = findRootContainerNode(ancestor);\n\n if (!root) {\n break;\n }\n\n var tag = ancestor.tag;\n\n if (tag === HostComponent || tag === HostText) {\n bookKeeping.ancestors.push(ancestor);\n }\n\n ancestor = getClosestInstanceFromNode(root);\n } while (ancestor);\n\n for (var i = 0; i < bookKeeping.ancestors.length; i++) {\n targetInst = bookKeeping.ancestors[i];\n var eventTarget = getEventTarget(bookKeeping.nativeEvent);\n var topLevelType = bookKeeping.topLevelType;\n var nativeEvent = bookKeeping.nativeEvent;\n var eventSystemFlags = bookKeeping.eventSystemFlags; // If this is the first ancestor, we mark it on the system flags\n\n if (i === 0) {\n eventSystemFlags |= IS_FIRST_ANCESTOR;\n }\n\n runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, eventTarget, eventSystemFlags);\n }\n }\n\n function dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {\n var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags);\n\n try {\n // Event queue being processed in the same cycle allows\n // `preventDefault`.\n batchedEventUpdates(handleTopLevel, bookKeeping);\n } finally {\n releaseTopLevelCallbackBookKeeping(bookKeeping);\n }\n }\n /**\n * We listen for bubbled touch events on the document object.\n *\n * Firefox v8.01 (and possibly others) exhibited strange behavior when\n * mounting `onmousemove` events at some node that was not the document\n * element. The symptoms were that if your mouse is not moving over something\n * contained within that mount point (for example on the background) the\n * top-level listeners for `onmousemove` won't be called. However, if you\n * register the `mousemove` on the document object, then it will of course\n * catch all `mousemove`s. This along with iOS quirks, justifies restricting\n * top-level listeners to the document object only, at least for these\n * movement types of events and possibly all events.\n *\n * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n *\n * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but\n * they bubble to document.\n *\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {object} mountAt Container where to mount the listener\n */\n\n\n function legacyListenToEvent(registrationName, mountAt) {\n var listenerMap = getListenerMapForElement(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n legacyListenToTopLevelEvent(dependency, mountAt, listenerMap);\n }\n }\n\n function legacyListenToTopLevelEvent(topLevelType, mountAt, listenerMap) {\n if (!listenerMap.has(topLevelType)) {\n switch (topLevelType) {\n case TOP_SCROLL:\n trapCapturedEvent(TOP_SCROLL, mountAt);\n break;\n\n case TOP_FOCUS:\n case TOP_BLUR:\n trapCapturedEvent(TOP_FOCUS, mountAt);\n trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function,\n // but this ensures we mark both as attached rather than just one.\n\n listenerMap.set(TOP_BLUR, null);\n listenerMap.set(TOP_FOCUS, null);\n break;\n\n case TOP_CANCEL:\n case TOP_CLOSE:\n if (isEventSupported(getRawEventName(topLevelType))) {\n trapCapturedEvent(topLevelType, mountAt);\n }\n\n break;\n\n case TOP_INVALID:\n case TOP_SUBMIT:\n case TOP_RESET:\n // We listen to them on the target DOM elements.\n // Some of them bubble so we don't want them to fire twice.\n break;\n\n default:\n // By default, listen on the top level to all non-media events.\n // Media events don't bubble so adding the listener wouldn't do anything.\n var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1;\n\n if (!isMediaEvent) {\n trapBubbledEvent(topLevelType, mountAt);\n }\n\n break;\n }\n\n listenerMap.set(topLevelType, null);\n }\n }\n\n function isListeningToAllDependencies(registrationName, mountAt) {\n var listenerMap = getListenerMapForElement(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n\n if (!listenerMap.has(dependency)) {\n return false;\n }\n }\n\n return true;\n }\n\n var attemptUserBlockingHydration;\n\n function setAttemptUserBlockingHydration(fn) {\n attemptUserBlockingHydration = fn;\n }\n\n var attemptContinuousHydration;\n\n function setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n }\n\n var attemptHydrationAtCurrentPriority;\n\n function setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n } // TODO: Upgrade this definition once we're on a newer version of Flow that\n\n\n var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\n var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n // if the last target was dehydrated.\n\n var queuedFocus = null;\n var queuedDrag = null;\n var queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\n var queuedPointers = new Map();\n var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\n var queuedExplicitHydrationTargets = [];\n\n function hasQueuedDiscreteEvents() {\n return queuedDiscreteEvents.length > 0;\n }\n\n var discreteReplayableEvents = [TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_TOUCH_START, TOP_AUX_CLICK, TOP_DOUBLE_CLICK, TOP_POINTER_CANCEL, TOP_POINTER_DOWN, TOP_POINTER_UP, TOP_DRAG_END, TOP_DRAG_START, TOP_DROP, TOP_COMPOSITION_END, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_INPUT, TOP_TEXT_INPUT, TOP_CLOSE, TOP_CANCEL, TOP_COPY, TOP_CUT, TOP_PASTE, TOP_CLICK, TOP_CHANGE, TOP_CONTEXT_MENU, TOP_RESET, TOP_SUBMIT];\n var continuousReplayableEvents = [TOP_FOCUS, TOP_BLUR, TOP_DRAG_ENTER, TOP_DRAG_LEAVE, TOP_MOUSE_OVER, TOP_MOUSE_OUT, TOP_POINTER_OVER, TOP_POINTER_OUT, TOP_GOT_POINTER_CAPTURE, TOP_LOST_POINTER_CAPTURE];\n\n function isReplayableDiscreteEvent(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n }\n\n function trapReplayableEventForDocument(topLevelType, document, listenerMap) {\n legacyListenToTopLevelEvent(topLevelType, document, listenerMap);\n }\n\n function eagerlyTrapReplayableEvents(container, document) {\n var listenerMapForDoc = getListenerMapForElement(document); // Discrete\n\n discreteReplayableEvents.forEach(function (topLevelType) {\n trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);\n }); // Continuous\n\n continuousReplayableEvents.forEach(function (topLevelType) {\n trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);\n });\n }\n\n function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n return {\n blockedOn: blockedOn,\n topLevelType: topLevelType,\n eventSystemFlags: eventSystemFlags | IS_REPLAYED,\n nativeEvent: nativeEvent,\n container: container\n };\n }\n\n function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n queuedDiscreteEvents.push(queuedEvent);\n } // Resets the replaying for this type of continuous event to no event.\n\n\n function clearIfContinuousEvent(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_FOCUS:\n case TOP_BLUR:\n queuedFocus = null;\n break;\n\n case TOP_DRAG_ENTER:\n case TOP_DRAG_LEAVE:\n queuedDrag = null;\n break;\n\n case TOP_MOUSE_OVER:\n case TOP_MOUSE_OUT:\n queuedMouse = null;\n break;\n\n case TOP_POINTER_OVER:\n case TOP_POINTER_OUT:\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case TOP_GOT_POINTER_CAPTURE:\n case TOP_LOST_POINTER_CAPTURE:\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n }\n\n function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode$1(blockedOn);\n\n if (_fiber2 !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(_fiber2);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags and store a single event to be\n // replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n return existingQueuedEvent;\n }\n\n function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (topLevelType) {\n case TOP_FOCUS:\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, topLevelType, eventSystemFlags, container, focusEvent);\n return true;\n }\n\n case TOP_DRAG_ENTER:\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, topLevelType, eventSystemFlags, container, dragEvent);\n return true;\n }\n\n case TOP_MOUSE_OVER:\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, topLevelType, eventSystemFlags, container, mouseEvent);\n return true;\n }\n\n case TOP_POINTER_OVER:\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, topLevelType, eventSystemFlags, container, pointerEvent));\n return true;\n }\n\n case TOP_GOT_POINTER_CAPTURE:\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, topLevelType, eventSystemFlags, container, _pointerEvent));\n return true;\n }\n }\n\n return false;\n } // Check if this target is unblocked. Returns true if it's unblocked.\n\n\n function attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with attemptToDispatchEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n }\n\n function attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var nextBlockedOn = attemptToDispatchEvent(queuedEvent.topLevelType, queuedEvent.eventSystemFlags, queuedEvent.container, queuedEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode$1(nextBlockedOn);\n\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n }\n\n return true;\n }\n\n function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n }\n\n function replayUnblockedEvents() {\n hasScheduledReplayAttempt = false; // First replay discrete events.\n\n while (queuedDiscreteEvents.length > 0) {\n var nextDiscreteEvent = queuedDiscreteEvents[0];\n\n if (nextDiscreteEvent.blockedOn !== null) {\n // We're still blocked.\n // Increase the priority of this boundary to unblock\n // the next discrete event.\n var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);\n\n if (_fiber4 !== null) {\n attemptUserBlockingHydration(_fiber4);\n }\n\n break;\n }\n\n var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n nextDiscreteEvent.blockedOn = nextBlockedOn;\n } else {\n // We've successfully replayed the first event. Let's try the next one.\n queuedDiscreteEvents.shift();\n }\n } // Next replay any continuous events.\n\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n }\n\n function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n }\n\n function retryIfBlockedOn(unblocked) {\n // Mark anything that was blocked on this as no longer blocked\n // and eligible for a replay.\n if (queuedDiscreteEvents.length > 0) {\n scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n // worth it because we expect very few discrete events to queue up and once\n // we are actually fully unblocked it will be fast to replay them.\n\n for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n var queuedEvent = queuedDiscreteEvents[i];\n\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n }\n }\n }\n\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n }\n\n function addEventBubbleListener(element, eventType, listener) {\n element.addEventListener(eventType, listener, false);\n }\n\n function addEventCaptureListener(element, eventType, listener) {\n element.addEventListener(eventType, listener, true);\n } // do it in two places, which duplicates logic\n // and increases the bundle size, we do it all\n // here once. If we remove or refactor the\n // SimpleEventPlugin, we should also remove or\n // update the below line.\n\n\n var simpleEventPluginEventTypes = {};\n var topLevelEventsToDispatchConfig = new Map();\n var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use\n // the code required to apply the same logic for event prioritization and that of the\n // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code\n // duplication (for which there would be quite a bit). For the events that are not needed\n // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an\n // array of top level events.\n // Lastly, we ignore prettier so we can keep the formatting sane.\n // prettier-ignore\n\n var discreteEventPairsForSimpleEventPlugin = [TOP_BLUR, 'blur', TOP_CANCEL, 'cancel', TOP_CLICK, 'click', TOP_CLOSE, 'close', TOP_CONTEXT_MENU, 'contextMenu', TOP_COPY, 'copy', TOP_CUT, 'cut', TOP_AUX_CLICK, 'auxClick', TOP_DOUBLE_CLICK, 'doubleClick', TOP_DRAG_END, 'dragEnd', TOP_DRAG_START, 'dragStart', TOP_DROP, 'drop', TOP_FOCUS, 'focus', TOP_INPUT, 'input', TOP_INVALID, 'invalid', TOP_KEY_DOWN, 'keyDown', TOP_KEY_PRESS, 'keyPress', TOP_KEY_UP, 'keyUp', TOP_MOUSE_DOWN, 'mouseDown', TOP_MOUSE_UP, 'mouseUp', TOP_PASTE, 'paste', TOP_PAUSE, 'pause', TOP_PLAY, 'play', TOP_POINTER_CANCEL, 'pointerCancel', TOP_POINTER_DOWN, 'pointerDown', TOP_POINTER_UP, 'pointerUp', TOP_RATE_CHANGE, 'rateChange', TOP_RESET, 'reset', TOP_SEEKED, 'seeked', TOP_SUBMIT, 'submit', TOP_TOUCH_CANCEL, 'touchCancel', TOP_TOUCH_END, 'touchEnd', TOP_TOUCH_START, 'touchStart', TOP_VOLUME_CHANGE, 'volumeChange'];\n var otherDiscreteEvents = [TOP_CHANGE, TOP_SELECTION_CHANGE, TOP_TEXT_INPUT, TOP_COMPOSITION_START, TOP_COMPOSITION_END, TOP_COMPOSITION_UPDATE]; // prettier-ignore\n\n var userBlockingPairsForSimpleEventPlugin = [TOP_DRAG, 'drag', TOP_DRAG_ENTER, 'dragEnter', TOP_DRAG_EXIT, 'dragExit', TOP_DRAG_LEAVE, 'dragLeave', TOP_DRAG_OVER, 'dragOver', TOP_MOUSE_MOVE, 'mouseMove', TOP_MOUSE_OUT, 'mouseOut', TOP_MOUSE_OVER, 'mouseOver', TOP_POINTER_MOVE, 'pointerMove', TOP_POINTER_OUT, 'pointerOut', TOP_POINTER_OVER, 'pointerOver', TOP_SCROLL, 'scroll', TOP_TOGGLE, 'toggle', TOP_TOUCH_MOVE, 'touchMove', TOP_WHEEL, 'wheel']; // prettier-ignore\n\n var continuousPairsForSimpleEventPlugin = [TOP_ABORT, 'abort', TOP_ANIMATION_END, 'animationEnd', TOP_ANIMATION_ITERATION, 'animationIteration', TOP_ANIMATION_START, 'animationStart', TOP_CAN_PLAY, 'canPlay', TOP_CAN_PLAY_THROUGH, 'canPlayThrough', TOP_DURATION_CHANGE, 'durationChange', TOP_EMPTIED, 'emptied', TOP_ENCRYPTED, 'encrypted', TOP_ENDED, 'ended', TOP_ERROR, 'error', TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', TOP_LOAD, 'load', TOP_LOADED_DATA, 'loadedData', TOP_LOADED_METADATA, 'loadedMetadata', TOP_LOAD_START, 'loadStart', TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', TOP_PLAYING, 'playing', TOP_PROGRESS, 'progress', TOP_SEEKING, 'seeking', TOP_STALLED, 'stalled', TOP_SUSPEND, 'suspend', TOP_TIME_UPDATE, 'timeUpdate', TOP_TRANSITION_END, 'transitionEnd', TOP_WAITING, 'waiting'];\n /**\n * Turns\n * ['abort', ...]\n * into\n * eventTypes = {\n * 'abort': {\n * phasedRegistrationNames: {\n * bubbled: 'onAbort',\n * captured: 'onAbortCapture',\n * },\n * dependencies: [TOP_ABORT],\n * },\n * ...\n * };\n * topLevelEventsToDispatchConfig = new Map([\n * [TOP_ABORT, { sameConfig }],\n * ]);\n */\n\n function processSimpleEventPluginPairsByPriority(eventTypes, priority) {\n // As the event types are in pairs of two, we need to iterate\n // through in twos. The events are in pairs of two to save code\n // and improve init perf of processing this array, as it will\n // result in far fewer object allocations and property accesses\n // if we only use three arrays to process all the categories of\n // instead of tuples.\n for (var i = 0; i < eventTypes.length; i += 2) {\n var topEvent = eventTypes[i];\n var event = eventTypes[i + 1];\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var onEvent = 'on' + capitalizedEvent;\n var config = {\n phasedRegistrationNames: {\n bubbled: onEvent,\n captured: onEvent + 'Capture'\n },\n dependencies: [topEvent],\n eventPriority: priority\n };\n eventPriorities.set(topEvent, priority);\n topLevelEventsToDispatchConfig.set(topEvent, config);\n simpleEventPluginEventTypes[event] = config;\n }\n }\n\n function processTopEventPairsByPriority(eventTypes, priority) {\n for (var i = 0; i < eventTypes.length; i++) {\n eventPriorities.set(eventTypes[i], priority);\n }\n } // SimpleEventPlugin\n\n\n processSimpleEventPluginPairsByPriority(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);\n processSimpleEventPluginPairsByPriority(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);\n processSimpleEventPluginPairsByPriority(continuousPairsForSimpleEventPlugin, ContinuousEvent); // Not used by SimpleEventPlugin\n\n processTopEventPairsByPriority(otherDiscreteEvents, DiscreteEvent);\n\n function getEventPriorityForPluginSystem(topLevelType) {\n var priority = eventPriorities.get(topLevelType); // Default to a ContinuousEvent. Note: we might\n // want to warn if we can't detect the priority\n // for the event.\n\n return priority === undefined ? ContinuousEvent : priority;\n } // Intentionally not named imports because Rollup would use dynamic dispatch for\n\n\n var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?\n\n var _enabled = true;\n\n function setEnabled(enabled) {\n _enabled = !!enabled;\n }\n\n function isEnabled() {\n return _enabled;\n }\n\n function trapBubbledEvent(topLevelType, element) {\n trapEventForPluginEventSystem(element, topLevelType, false);\n }\n\n function trapCapturedEvent(topLevelType, element) {\n trapEventForPluginEventSystem(element, topLevelType, true);\n }\n\n function trapEventForPluginEventSystem(container, topLevelType, capture) {\n var listener;\n\n switch (getEventPriorityForPluginSystem(topLevelType)) {\n case DiscreteEvent:\n listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n\n case UserBlockingEvent:\n listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n\n case ContinuousEvent:\n default:\n listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n }\n\n var rawEventName = getRawEventName(topLevelType);\n\n if (capture) {\n addEventCaptureListener(container, rawEventName, listener);\n } else {\n addEventBubbleListener(container, rawEventName, listener);\n }\n }\n\n function dispatchDiscreteEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);\n discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, container, nativeEvent);\n }\n\n function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, container, nativeEvent) {\n runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, container, nativeEvent));\n }\n\n function dispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) {\n // If we already have a queue of discrete events, and this is another discrete\n // event, then we can't dispatch it regardless of its target, since they\n // need to dispatch in order.\n queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.\n topLevelType, eventSystemFlags, container, nativeEvent);\n return;\n }\n\n var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent);\n\n if (blockedOn === null) {\n // We successfully dispatched this event.\n clearIfContinuousEvent(topLevelType, nativeEvent);\n return;\n }\n\n if (isReplayableDiscreteEvent(topLevelType)) {\n // This this to be replayed later once the target is available.\n queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent)) {\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accummulative.\n\n\n clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n {\n dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null);\n }\n } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.\n\n\n function attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n // TODO: Warn if _enabled is false.\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n {\n dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);\n } // We're not blocked on anything.\n\n return null;\n } // List derived from Gecko source code:\n // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\n\n\n var shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n };\n /**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\n\n var isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n };\n /**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\n function prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n }\n /**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\n var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n // infinite loop, because it iterates over the newly added props too.\n\n Object.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n });\n /**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\n function dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return ('' + value).trim();\n }\n\n var uppercasePattern = /([A-Z])/g;\n var msPattern = /^ms-/;\n /**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\n function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n }\n\n var warnValidStyle = function () {};\n\n {\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern$1 = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n }\n var warnValidStyle$1 = warnValidStyle;\n /**\n * Operations for dealing with CSS properties.\n */\n\n /**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\n function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }\n /**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\n\n function setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n {\n if (!isCustomProperty) {\n warnValidStyle$1(styleName, styles[styleName]);\n }\n }\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n }\n\n function isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n }\n /**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\n function expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n }\n /**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\n function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n {\n if (!nextStyles) {\n return;\n }\n\n var expandedUpdates = expandShorthandMap(styleUpdates);\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var key in expandedUpdates) {\n var originalKey = expandedUpdates[key];\n var correctOriginalKey = expandedStyles[key];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n } // For HTML, certain tags should omit their close tag. We keep a whitelist for\n // those special-case tags.\n\n\n var omittedCloseTags = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n }; // `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\n var voidElementTags = _assign({\n menuitem: true\n }, omittedCloseTags);\n\n var HTML = '__html';\n var ReactDebugCurrentFrame$3 = null;\n {\n ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;\n }\n\n function assertValidProps(tag, props) {\n if (!props) {\n return;\n } // Note the use of `==` which checks for null or undefined.\n\n\n if (voidElementTags[tag]) {\n if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {\n {\n throw Error(tag + \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\" + ReactDebugCurrentFrame$3.getStackAddendum());\n }\n }\n }\n\n if (props.dangerouslySetInnerHTML != null) {\n if (!(props.children == null)) {\n {\n throw Error(\"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\");\n }\n }\n\n if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {\n {\n throw Error(\"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.\");\n }\n }\n }\n\n {\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n\n if (!(props.style == null || typeof props.style === 'object')) {\n {\n throw Error(\"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\" + ReactDebugCurrentFrame$3.getStackAddendum());\n }\n }\n }\n\n function isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this whitelist too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n } // When adding attributes to the HTML or SVG whitelist, be sure to\n // also add them to this module to ensure casing and incorrect name\n // warnings.\n\n\n var possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n };\n var ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n };\n var warnedProperties = {};\n var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n var hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n function validateProperty(tagName, name) {\n {\n if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n return true;\n }\n\n function warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);\n }\n }\n }\n\n function validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n }\n\n var didWarnValueNull = false;\n\n function validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n }\n\n var validateProperty$1 = function () {};\n\n {\n var warnedProperties$1 = {};\n var _hasOwnProperty = Object.prototype.hasOwnProperty;\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, canUseEventSystem) {\n if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (canUseEventSystem) {\n if (registrationNameModules.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n }\n\n var warnUnknownProperties = function (type, props, canUseEventSystem) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);\n }\n }\n };\n\n function validateProperties$2(type, props, canUseEventSystem) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, canUseEventSystem);\n }\n\n var didWarnInvalidHydration = false;\n var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\n var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\n var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\n var AUTOFOCUS = 'autoFocus';\n var CHILDREN = 'children';\n var STYLE = 'style';\n var HTML$1 = '__html';\n var HTML_NAMESPACE$1 = Namespaces.html;\n var warnedUnknownTags;\n var suppressHydrationWarning;\n var validatePropertiesInDevelopment;\n var warnForTextDifference;\n var warnForPropDifference;\n var warnForExtraAttributes;\n var warnForInvalidEventListener;\n var canDiffStyleForHydrationWarning;\n var normalizeMarkupForTextOrAttribute;\n var normalizeHTML;\n {\n warnedUnknownTags = {\n // Chrome is the only major browser not shipping <time>. But as of July\n // 2017 it intends to ship it due to widespread usage. We intentionally\n // *don't* warn for <time> even if it's unrecognized by Chrome because\n // it soon will be, and many apps have been using it anyway.\n time: true,\n // There are working polyfills for <dialog>. Let people use it.\n dialog: true,\n // Electron ships a custom <webview> tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n };\n\n validatePropertiesInDevelopment = function (type, props) {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props,\n /* canUseEventSystem */\n true);\n }; // IE 11 parses & normalizes the style attribute as opposed to other\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n\n\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.\n // It also can turn \\u0000 into \\uFFFD inside attributes.\n // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n // If we have a mismatch, it might be caused by that.\n // We will still patch up in this case but not fire the warning.\n\n var NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\n var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\n normalizeMarkupForTextOrAttribute = function (markup) {\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n };\n\n warnForTextDifference = function (serverText, clientText) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n };\n\n warnForPropDifference = function (propName, serverValue, clientValue) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n };\n\n warnForExtraAttributes = function (attributeNames) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n error('Extra attributes from the server: %s', names);\n };\n\n warnForInvalidEventListener = function (registrationName, listener) {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }; // Parse the HTML and read it back to normalize the HTML string so that it\n // can be used for comparison.\n\n\n normalizeHTML = function (parent, html) {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how <noscript> is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n }\n\n function ensureListeningTo(rootContainerElement, registrationName) {\n var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;\n var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;\n legacyListenToEvent(registrationName, doc);\n }\n\n function getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n }\n\n function noop() {}\n\n function trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop;\n }\n\n function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n for (var propKey in nextProps) {\n if (!nextProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = nextProps[propKey];\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n setValueForStyles(domElement, nextProp);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n setInnerHTML(domElement, nextHtml);\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string') {\n // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a <textarea> will cause the placeholder to not\n // show within the <textarea> until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n if (canSetTextContent) {\n setTextContent(domElement, nextProp);\n }\n } else if (typeof nextProp === 'number') {\n setTextContent(domElement, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ;else if (propKey === AUTOFOCUS) ;else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n ensureListeningTo(rootContainerElement, propKey);\n }\n } else if (nextProp != null) {\n setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n }\n }\n }\n\n function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n // TODO: Handle wasCustomComponentTag\n for (var i = 0; i < updatePayload.length; i += 2) {\n var propKey = updatePayload[i];\n var propValue = updatePayload[i + 1];\n\n if (propKey === STYLE) {\n setValueForStyles(domElement, propValue);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n setInnerHTML(domElement, propValue);\n } else if (propKey === CHILDREN) {\n setTextContent(domElement, propValue);\n } else {\n setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n }\n }\n }\n\n function createElement(type, props, rootContainerElement, parentNamespace) {\n var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n var domElement;\n var namespaceURI = parentNamespace;\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n {\n isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n // allow <SVG> or <mATH>.\n\n if (!isCustomComponentTag && type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n\n if (type === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n // This is guaranteed to yield a script element.\n\n var firstChild = div.firstChild;\n domElement = div.removeChild(firstChild);\n } else if (typeof props.is === 'string') {\n // $FlowIssue `createElement` should be updated for Web Components\n domElement = ownerDocument.createElement(type, {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`\n // attributes on `select`s needs to be added before `option`s are inserted.\n // This prevents:\n // - a bug where the `select` does not scroll to the correct option because singular\n // `select` elements automatically pick the first item #13222\n // - a bug where the `select` set the first item as selected despite the `size` attribute #14239\n // See https://github.com/facebook/react/issues/13222\n // and https://github.com/facebook/react/issues/14239\n\n if (type === 'select') {\n var node = domElement;\n\n if (props.multiple) {\n node.multiple = true;\n } else if (props.size) {\n // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n // it is possible that no option is selected.\n //\n // This is only necessary when a select in \"single selection mode\".\n node.size = props.size;\n }\n }\n }\n } else {\n domElement = ownerDocument.createElementNS(namespaceURI, type);\n }\n\n {\n if (namespaceURI === HTML_NAMESPACE$1) {\n if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {\n warnedUnknownTags[type] = true;\n error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n }\n }\n }\n return domElement;\n }\n\n function createTextNode(text, rootContainerElement) {\n return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\n }\n\n function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {\n var isCustomComponentTag = isCustomComponent(tag, rawProps);\n {\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n var props;\n\n switch (tag) {\n case 'iframe':\n case 'object':\n case 'embed':\n trapBubbledEvent(TOP_LOAD, domElement);\n props = rawProps;\n break;\n\n case 'video':\n case 'audio':\n // Create listener for each media event\n for (var i = 0; i < mediaEventTypes.length; i++) {\n trapBubbledEvent(mediaEventTypes[i], domElement);\n }\n\n props = rawProps;\n break;\n\n case 'source':\n trapBubbledEvent(TOP_ERROR, domElement);\n props = rawProps;\n break;\n\n case 'img':\n case 'image':\n case 'link':\n trapBubbledEvent(TOP_ERROR, domElement);\n trapBubbledEvent(TOP_LOAD, domElement);\n props = rawProps;\n break;\n\n case 'form':\n trapBubbledEvent(TOP_RESET, domElement);\n trapBubbledEvent(TOP_SUBMIT, domElement);\n props = rawProps;\n break;\n\n case 'details':\n trapBubbledEvent(TOP_TOGGLE, domElement);\n props = rawProps;\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n props = getHostProps(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n props = getHostProps$1(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n props = getHostProps$2(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n props = getHostProps$3(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n default:\n props = rawProps;\n }\n\n assertValidProps(tag, props);\n setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, false);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'option':\n postMountWrapper$1(domElement, rawProps);\n break;\n\n case 'select':\n postMountWrapper$2(domElement, rawProps);\n break;\n\n default:\n if (typeof props.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n } // Calculate the diff between the two objects.\n\n\n function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n var updatePayload = null;\n var lastProps;\n var nextProps;\n\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n assertValidProps(tag, nextProps);\n var propKey;\n var styleName;\n var styleUpdates = null;\n\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ;else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ;else if (propKey === AUTOFOCUS) ;else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n } // Update styles that changed since `lastProp`.\n\n\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n\n updatePayload.push(propKey, styleUpdates);\n }\n\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n var lastHtml = lastProp ? lastProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, nextHtml);\n }\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ;else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n ensureListeningTo(rootContainerElement, propKey);\n }\n\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n }\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n\n return updatePayload;\n } // Apply the diff.\n\n\n function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {\n // Update checked *before* name.\n // In the middle of an update, it is possible to have multiple checked.\n // When a checked radio tries to change name, browser makes another radio's checked false.\n if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {\n updateChecked(domElement, nextRawProps);\n }\n\n var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);\n var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.\n\n updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props\n // changed.\n\n switch (tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n updateWrapper(domElement, nextRawProps);\n break;\n\n case 'textarea':\n updateWrapper$1(domElement, nextRawProps);\n break;\n\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n postUpdateWrapper(domElement, nextRawProps);\n break;\n }\n }\n\n function getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n\n return possibleStandardNames[lowerCasedName] || null;\n }\n }\n\n function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {\n var isCustomComponentTag;\n var extraAttributeNames;\n {\n suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;\n isCustomComponentTag = isCustomComponent(tag, rawProps);\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n switch (tag) {\n case 'iframe':\n case 'object':\n case 'embed':\n trapBubbledEvent(TOP_LOAD, domElement);\n break;\n\n case 'video':\n case 'audio':\n // Create listener for each media event\n for (var i = 0; i < mediaEventTypes.length; i++) {\n trapBubbledEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n trapBubbledEvent(TOP_ERROR, domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n trapBubbledEvent(TOP_ERROR, domElement);\n trapBubbledEvent(TOP_LOAD, domElement);\n break;\n\n case 'form':\n trapBubbledEvent(TOP_RESET, domElement);\n trapBubbledEvent(TOP_SUBMIT, domElement);\n break;\n\n case 'details':\n trapBubbledEvent(TOP_TOGGLE, domElement);\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n }\n\n assertValidProps(tag, rawProps);\n {\n extraAttributeNames = new Set();\n var attributes = domElement.attributes;\n\n for (var _i = 0; _i < attributes.length; _i++) {\n var name = attributes[_i].name.toLowerCase();\n\n switch (name) {\n // Built-in SSR attribute is whitelisted\n case 'data-reactroot':\n break;\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n\n case 'value':\n break;\n\n case 'checked':\n break;\n\n case 'selected':\n break;\n\n default:\n // Intentionally use the original name.\n // See discussion in https://github.com/facebook/react/pull/10676.\n extraAttributeNames.add(attributes[_i].name);\n }\n }\n }\n var updatePayload = null;\n\n for (var propKey in rawProps) {\n if (!rawProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = rawProps[propKey];\n\n if (propKey === CHILDREN) {\n // For text content children we compare against textContent. This\n // might match additional HTML that is hidden when we read it using\n // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n // satisfies our requirement. Our requirement is not to produce perfect\n // HTML and attributes. Ideally we should preserve structure but it's\n // ok not to if the visible content is still enough to indicate what\n // even listeners these nodes might be wired up to.\n // TODO: Warn if there is more than a single textNode as a child.\n // TODO: Should we use domElement.firstChild.nodeValue to compare?\n if (typeof nextProp === 'string') {\n if (domElement.textContent !== nextProp) {\n if (!suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, nextProp];\n }\n } else if (typeof nextProp === 'number') {\n if (domElement.textContent !== '' + nextProp) {\n if (!suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, '' + nextProp];\n }\n }\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n ensureListeningTo(rootContainerElement, propKey);\n }\n } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)\n typeof isCustomComponentTag === 'boolean') {\n // Validate that the properties correspond to their expected values.\n var serverValue = void 0;\n var propertyInfo = getPropertyInfo(propKey);\n if (suppressHydrationWarning) ;else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n propKey === 'value' || propKey === 'checked' || propKey === 'selected') ;else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var serverHTML = domElement.innerHTML;\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');\n\n if (expectedHTML !== serverHTML) {\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n } else if (propKey === STYLE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey);\n\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(nextProp);\n serverValue = domElement.getAttribute('style');\n\n if (expectedStyle !== serverValue) {\n warnForPropDifference(propKey, serverValue, expectedStyle);\n }\n }\n } else if (isCustomComponentTag) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n\n if (nextProp !== serverValue) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {\n var isMismatchDueToBadCasing = false;\n\n if (propertyInfo !== null) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propertyInfo.attributeName);\n serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);\n } else {\n var ownNamespace = parentNamespace;\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n ownNamespace = getIntrinsicNamespace(tag);\n }\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\n\n if (standardName !== null && standardName !== propKey) {\n // If an SVG prop is supplied with bad casing, it will\n // be successfully parsed from HTML, but will produce a mismatch\n // (and would be incorrectly rendered on the client).\n // However, we already warn about bad casing elsewhere.\n // So we'll skip the misleading extra mismatch warning in this case.\n isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.\n\n extraAttributeNames.delete(standardName);\n } // $FlowFixMe - Should be inferred as not undefined.\n\n\n extraAttributeNames.delete(propKey);\n }\n\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n }\n\n if (nextProp !== serverValue && !isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n }\n }\n }\n\n {\n // $FlowFixMe - Should be inferred as not undefined.\n if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {\n // $FlowFixMe - Should be inferred as not undefined.\n warnForExtraAttributes(extraAttributeNames);\n }\n }\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, true);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'select':\n case 'option':\n // For input and textarea we current always set the value property at\n // post mount to force it to diverge from attributes. However, for\n // option and select we don't quite do the same thing and select\n // is not resilient to the DOM state changing so we don't do that here.\n // TODO: Consider not doing this for input and textarea.\n break;\n\n default:\n if (typeof rawProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n return updatePayload;\n }\n\n function diffHydratedText(textNode, text) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n }\n\n function warnForUnmatchedText(textNode, text) {\n {\n warnForTextDifference(textNode.nodeValue, text);\n }\n }\n\n function warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n }\n }\n\n function warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n }\n }\n\n function warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n }\n }\n\n function warnForInsertedHydratedText(parentNode, text) {\n {\n if (text === '') {\n // We expect to insert empty text nodes since they're not represented in\n // the HTML.\n // TODO: Remove this special case if we can just avoid inserting empty\n // text nodes.\n return;\n }\n\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n }\n }\n\n function restoreControlledState$3(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledState(domElement, props);\n return;\n\n case 'textarea':\n restoreControlledState$2(domElement, props);\n return;\n\n case 'select':\n restoreControlledState$1(domElement, props);\n return;\n }\n }\n\n function getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n }\n /**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\n\n function getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n\n return node;\n }\n /**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\n function getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n\n node = node.parentNode;\n }\n }\n /**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\n function getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n }\n /**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\n\n function getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n }\n /**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\n\n function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n\n if ((next = node.nextSibling) !== null) {\n break;\n }\n\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n }\n /**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\n\n function setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n }\n\n function isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n }\n\n function containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n }\n\n function isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n }\n\n function isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n }\n\n function getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n\n element = getActiveElement(win.document);\n }\n\n return element;\n }\n /**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n /**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\n function hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n }\n\n function getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n // Used by Flare\n activeElementDetached: null,\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null\n };\n }\n /**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\n\n function restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n } // Focusing a node can change the scroll position, which is undesirable\n\n\n var ancestors = [];\n var ancestor = priorFocusedElem;\n\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n }\n /**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\n\n function getSelection(input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || {\n start: 0,\n end: 0\n };\n }\n /**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n\n\n function setSelection(input, offsets) {\n var start = offsets.start,\n end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n }\n\n var validateDOMNesting = function () {};\n\n var updatedAncestorInfo = function () {};\n\n {\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example, <b><div></div></b> is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n // <p> tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for <title>, including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\n var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n var emptyAncestorInfo = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n\n updatedAncestorInfo = function (oldInfo, tag) {\n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);\n\n var info = {\n tag: tag\n };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n } // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n return ancestorInfo;\n };\n /**\n * Returns whether\n */\n\n\n var isTagValidWithParent = function (tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n case 'html':\n return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n case 'frameset':\n return tag === 'frame';\n\n case '#document':\n return tag === 'html';\n } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frameset':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n };\n /**\n * Returns whether\n */\n\n\n var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n };\n\n var didWarn$1 = {};\n\n validateDOMNesting = function (childTag, childText, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n\n if (childText != null) {\n if (childTag != null) {\n error('validateDOMNesting: when childText is passed, childTag should be null');\n }\n\n childTag = '#text';\n }\n\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n if (!invalidParentOrAncestor) {\n return;\n }\n\n var ancestorTag = invalidParentOrAncestor.tag;\n var addendum = getCurrentFiberStackInDev();\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;\n\n if (didWarn$1[warnKey]) {\n return;\n }\n\n didWarn$1[warnKey] = true;\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n\n if (invalidParent) {\n var info = '';\n\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n\n error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);\n } else {\n error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n }\n };\n }\n var SUPPRESS_HYDRATION_WARNING$1;\n {\n SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';\n }\n var SUSPENSE_START_DATA = '$';\n var SUSPENSE_END_DATA = '/$';\n var SUSPENSE_PENDING_START_DATA = '$?';\n var SUSPENSE_FALLBACK_START_DATA = '$!';\n var STYLE$1 = 'style';\n var eventsEnabled = null;\n var selectionInformation = null;\n\n function shouldAutoFocusHostComponent(type, props) {\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n }\n\n return false;\n }\n\n function getRootHostContext(rootContainerInstance) {\n var type;\n var namespace;\n var nodeType = rootContainerInstance.nodeType;\n\n switch (nodeType) {\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n {\n type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n var root = rootContainerInstance.documentElement;\n namespace = root ? root.namespaceURI : getChildNamespace(null, '');\n break;\n }\n\n default:\n {\n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n var ownNamespace = container.namespaceURI || null;\n type = container.tagName;\n namespace = getChildNamespace(ownNamespace, type);\n break;\n }\n }\n\n {\n var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n }\n\n function getChildHostContext(parentHostContext, type, rootContainerInstance) {\n {\n var parentHostContextDev = parentHostContext;\n var namespace = getChildNamespace(parentHostContextDev.namespace, type);\n var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n }\n\n function getPublicInstance(instance) {\n return instance;\n }\n\n function prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n setEnabled(false);\n }\n\n function resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n selectionInformation = null;\n }\n\n function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n var parentNamespace;\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n validateDOMNesting(type, null, hostContextDev.ancestorInfo);\n\n if (typeof props.children === 'string' || typeof props.children === 'number') {\n var string = '' + props.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n\n parentNamespace = hostContextDev.namespace;\n }\n var domElement = createElement(type, props, rootContainerInstance, parentNamespace);\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n return domElement;\n }\n\n function appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n }\n\n function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n setInitialProperties(domElement, type, props, rootContainerInstance);\n return shouldAutoFocusHostComponent(type, props);\n }\n\n function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n {\n var hostContextDev = hostContext;\n\n if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {\n var string = '' + newProps.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n }\n return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);\n }\n\n function shouldSetTextContent(type, props) {\n return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\n }\n\n function shouldDeprioritizeSubtree(type, props) {\n return !!props.hidden;\n }\n\n function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n {\n var hostContextDev = hostContext;\n validateDOMNesting(null, text, hostContextDev.ancestorInfo);\n }\n var textNode = createTextNode(text, rootContainerInstance);\n precacheFiberNode(internalInstanceHandle, textNode);\n return textNode;\n } // if a component just imports ReactDOM (e.g. for findDOMNode).\n // Some environments might not have setTimeout or clearTimeout.\n\n\n var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\n var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\n var noTimeout = -1; // -------------------\n\n function commitMount(domElement, type, newProps, internalInstanceHandle) {\n // Despite the naming that might imply otherwise, this method only\n // fires if there is an `Update` effect scheduled during mounting.\n // This happens if `finalizeInitialChildren` returns `true` (which it\n // does to implement the `autoFocus` attribute on the client). But\n // there are also other cases when this might happen (such as patching\n // up text content during hydration mismatch). So we'll check this again.\n if (shouldAutoFocusHostComponent(type, newProps)) {\n domElement.focus();\n }\n }\n\n function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.\n\n updateProperties(domElement, updatePayload, type, oldProps, newProps);\n }\n\n function resetTextContent(domElement) {\n setTextContent(domElement, '');\n }\n\n function commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n }\n\n function appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n }\n\n function appendChildToContainer(container, child) {\n var parentNode;\n\n if (container.nodeType === COMMENT_NODE) {\n parentNode = container.parentNode;\n parentNode.insertBefore(child, container);\n } else {\n parentNode = container;\n parentNode.appendChild(child);\n } // This container might be used for a portal.\n // If something inside a portal is clicked, that click should bubble\n // through the React tree. However, on Mobile Safari the click would\n // never bubble through the *DOM* tree unless an ancestor with onclick\n // event exists. So we wouldn't see it and dispatch it.\n // This is why we ensure that non React root containers have inline onclick\n // defined.\n // https://github.com/facebook/react/issues/11918\n\n\n var reactRootContainer = container._reactRootContainer;\n\n if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(parentNode);\n }\n }\n\n function insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\n }\n\n function insertInContainerBefore(container, child, beforeChild) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.insertBefore(child, beforeChild);\n } else {\n container.insertBefore(child, beforeChild);\n }\n }\n\n function removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n }\n\n function removeChildFromContainer(container, child) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.removeChild(child);\n } else {\n container.removeChild(child);\n }\n }\n\n function hideInstance(instance) {\n // pass host context to this method?\n instance = instance;\n var style = instance.style;\n\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n }\n\n function hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\n }\n\n function unhideInstance(instance, props) {\n instance = instance;\n var styleProp = props[STYLE$1];\n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n instance.style.display = dangerousStyleValue('display', display);\n }\n\n function unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n } // -------------------\n\n\n function canHydrateInstance(instance, type, props) {\n if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {\n return null;\n } // This has now been refined to an element node.\n\n\n return instance;\n }\n\n function canHydrateTextInstance(instance, text) {\n if (text === '' || instance.nodeType !== TEXT_NODE) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n return null;\n } // This has now been refined to a text node.\n\n\n return instance;\n }\n\n function isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n }\n\n function isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n }\n\n function getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n }\n\n return node;\n }\n\n function getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n }\n\n function getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n }\n\n function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n // get attached.\n\n updateFiberProps(instance, props);\n var parentNamespace;\n {\n var hostContextDev = hostContext;\n parentNamespace = hostContextDev.namespace;\n }\n return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);\n }\n\n function hydrateTextInstance(textInstance, text, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, textInstance);\n return diffHydratedText(textInstance, text);\n }\n\n function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n return getNextHydratableSibling(node);\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n depth++;\n }\n }\n\n node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\n\n\n return null;\n } // Returns the SuspenseInstance if this node is a direct child of a\n // SuspenseInstance. I.e. if its previous sibling is a Comment with\n // SUSPENSE_x_START_DATA. Otherwise, null.\n\n\n function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }\n\n function commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n }\n\n function commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n }\n\n function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {\n {\n warnForUnmatchedText(textInstance, text);\n }\n }\n\n function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForUnmatchedText(textInstance, text);\n }\n }\n\n function didNotHydrateContainerInstance(parentContainer, instance) {\n {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentContainer, instance);\n } else if (instance.nodeType === COMMENT_NODE) ;else {\n warnForDeletedHydratableText(parentContainer, instance);\n }\n }\n }\n\n function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentInstance, instance);\n } else if (instance.nodeType === COMMENT_NODE) ;else {\n warnForDeletedHydratableText(parentInstance, instance);\n }\n }\n }\n\n function didNotFindHydratableContainerInstance(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n }\n\n function didNotFindHydratableContainerTextInstance(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n }\n\n function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n }\n\n function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n }\n\n function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;\n }\n\n var randomKey = Math.random().toString(36).slice(2);\n var internalInstanceKey = '__reactInternalInstance$' + randomKey;\n var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;\n var internalContainerInstanceKey = '__reactContainere$' + randomKey;\n\n function precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n }\n\n function markContainerAsRoot(hostRoot, node) {\n node[internalContainerInstanceKey] = hostRoot;\n }\n\n function unmarkContainerAsRoot(node) {\n node[internalContainerInstanceKey] = null;\n }\n\n function isContainerMarkedAsRoot(node) {\n return !!node[internalContainerInstanceKey];\n } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n // If the target node is part of a hydrated or not yet rendered subtree, then\n // this may also return a SuspenseComponent or HostRoot to indicate that.\n // Conceptually the HostRoot fiber is a child of the Container node. So if you\n // pass the Container node as the targetNode, you will not actually get the\n // HostRoot back. To get to the HostRoot, you need to pass a child of it.\n // The same thing applies to Suspense boundaries.\n\n\n function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }\n /**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\n\n function getInstanceFromNode$1(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n }\n /**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\n\n function getNodeFromInstance$1(inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n } // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n\n\n {\n {\n throw Error(\"getNodeFromInstance: Invalid argument.\");\n }\n }\n }\n\n function getFiberCurrentPropsFromNode$1(node) {\n return node[internalEventHandlersKey] || null;\n }\n\n function updateFiberProps(node, props) {\n node[internalEventHandlersKey] = props;\n }\n\n function getParent(inst) {\n do {\n inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent);\n\n if (inst) {\n return inst;\n }\n\n return null;\n }\n /**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\n function getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n }\n /**\n * Simulates the traversal of a two-phase, capture/bubble event dispatch.\n */\n\n\n function traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n }\n /**\n * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that\n * should would receive a `mouseEnter` or `mouseLeave` event.\n *\n * Does not invoke the callback on the nearest common ancestor because nothing\n * \"entered\" or \"left\" that element.\n */\n\n\n function traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n\n while (true) {\n if (!from) {\n break;\n }\n\n if (from === common) {\n break;\n }\n\n var alternate = from.alternate;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n pathFrom.push(from);\n from = getParent(from);\n }\n\n var pathTo = [];\n\n while (true) {\n if (!to) {\n break;\n }\n\n if (to === common) {\n break;\n }\n\n var _alternate = to.alternate;\n\n if (_alternate !== null && _alternate === common) {\n break;\n }\n\n pathTo.push(to);\n to = getParent(to);\n }\n\n for (var i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n\n for (var _i = pathTo.length; _i-- > 0;) {\n fn(pathTo[_i], 'captured', argTo);\n }\n }\n\n function isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n }\n\n function shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n case 'onMouseEnter':\n return !!(props.disabled && isInteractive(type));\n\n default:\n return false;\n }\n }\n /**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\n function getListener(inst, registrationName) {\n var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not\n // live here; needs to be moved to a better place soon\n\n var stateNode = inst.stateNode;\n\n if (!stateNode) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (!props) {\n // Work in progress.\n return null;\n }\n\n listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (!(!listener || typeof listener === 'function')) {\n {\n throw Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n }\n }\n\n return listener;\n }\n /**\n * Some event types have a notion of different registration names for different\n * \"phases\" of propagation. This finds listeners by a given phase.\n */\n\n\n function listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n }\n /**\n * A small set of propagation patterns, each of which will accept a small amount\n * of information, and generate a set of \"dispatch ready event objects\" - which\n * are sets of events that have already been annotated with a set of dispatched\n * listener functions/ids. The API is designed this way to discourage these\n * propagation strategies from actually executing the dispatches, since we\n * always want to collect the entire set of dispatches before executing even a\n * single one.\n */\n\n /**\n * Tags a `SyntheticEvent` with dispatched listeners. Creating this function\n * here, allows us to not have to bind or create functions for each event.\n * Mutating the event's members allows us to not have to create a wrapping\n * \"dispatch\" object that pairs the event with the listener.\n */\n\n\n function accumulateDirectionalDispatches(inst, phase, event) {\n {\n if (!inst) {\n error('Dispatching inst must not be null');\n }\n }\n var listener = listenerAtPhase(inst, event, phase);\n\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n }\n /**\n * Collect dispatches (must be entirely collected before dispatching - see unit\n * tests). Lazily allocate the array to conserve memory. We must loop through\n * each event and perform the traversal for each one. We cannot perform a\n * single traversal for the entire collection of events because each event may\n * have a different target.\n */\n\n\n function accumulateTwoPhaseDispatchesSingle(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);\n }\n }\n /**\n * Accumulates without regard to direction, does not look for phased\n * registration names. Same as `accumulateDirectDispatchesSingle` but without\n * requiring that the `dispatchMarker` be the same as the dispatched ID.\n */\n\n\n function accumulateDispatches(inst, ignoredDirection, event) {\n if (inst && event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n }\n }\n /**\n * Accumulates dispatches on an `SyntheticEvent`, but only for the\n * `dispatchMarker`.\n * @param {SyntheticEvent} event\n */\n\n\n function accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n accumulateDispatches(event._targetInst, null, event);\n }\n }\n\n function accumulateTwoPhaseDispatches(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);\n }\n\n function accumulateEnterLeaveDispatches(leave, enter, from, to) {\n traverseEnterLeave(from, to, accumulateDispatches, leave, enter);\n }\n\n function accumulateDirectDispatches(events) {\n forEachAccumulated(events, accumulateDirectDispatchesSingle);\n }\n /**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\n\n\n var root = null;\n var startText = null;\n var fallbackText = null;\n\n function initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n }\n\n function reset() {\n root = null;\n startText = null;\n fallbackText = null;\n }\n\n function getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start;\n var startValue = startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n }\n\n function getText() {\n if ('value' in root) {\n return root.value;\n }\n\n return root.textContent;\n }\n\n var EVENT_POOL_SIZE = 10;\n /**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var EventInterface = {\n type: null,\n target: null,\n // currentTarget is set when dispatching; no use in copying it here\n currentTarget: function () {\n return null;\n },\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n };\n\n function functionThatReturnsTrue() {\n return true;\n }\n\n function functionThatReturnsFalse() {\n return false;\n }\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n *\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {*} targetInst Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @param {DOMEventTarget} nativeEventTarget Target node.\n */\n\n\n function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {\n {\n // these have a getter/setter for warnings\n delete this.nativeEvent;\n delete this.preventDefault;\n delete this.stopPropagation;\n delete this.isDefaultPrevented;\n delete this.isPropagationStopped;\n }\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n var Interface = this.constructor.Interface;\n\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n\n {\n delete this[propName]; // this has a getter/setter for warnings\n }\n var normalize = Interface[propName];\n\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n if (propName === 'target') {\n this.target = nativeEventTarget;\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n\n _assign(SyntheticEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault();\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation();\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {\n this.isPersistent = functionThatReturnsTrue;\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsFalse,\n\n /**\n * `PooledClass` looks for `destructor` on each instance it releases.\n */\n destructor: function () {\n var Interface = this.constructor.Interface;\n\n for (var propName in Interface) {\n {\n Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));\n }\n }\n\n this.dispatchConfig = null;\n this._targetInst = null;\n this.nativeEvent = null;\n this.isDefaultPrevented = functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n this._dispatchListeners = null;\n this._dispatchInstances = null;\n {\n Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));\n Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));\n Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));\n Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));\n Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));\n }\n }\n });\n\n SyntheticEvent.Interface = EventInterface;\n /**\n * Helper to reduce boilerplate when creating subclasses.\n */\n\n SyntheticEvent.extend = function (Interface) {\n var Super = this;\n\n var E = function () {};\n\n E.prototype = Super.prototype;\n var prototype = new E();\n\n function Class() {\n return Super.apply(this, arguments);\n }\n\n _assign(prototype, Class.prototype);\n\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n Class.Interface = _assign({}, Super.Interface, Interface);\n Class.extend = Super.extend;\n addEventPoolingTo(Class);\n return Class;\n };\n\n addEventPoolingTo(SyntheticEvent);\n /**\n * Helper to nullify syntheticEvent instance properties when destructing\n *\n * @param {String} propName\n * @param {?object} getVal\n * @return {object} defineProperty object\n */\n\n function getPooledWarningPropertyDefinition(propName, getVal) {\n var isFunction = typeof getVal === 'function';\n return {\n configurable: true,\n set: set,\n get: get\n };\n\n function set(val) {\n var action = isFunction ? 'setting the method' : 'setting the property';\n warn(action, 'This is effectively a no-op');\n return val;\n }\n\n function get() {\n var action = isFunction ? 'accessing the method' : 'accessing the property';\n var result = isFunction ? 'This is a no-op function' : 'This is set to null';\n warn(action, result);\n return getVal;\n }\n\n function warn(action, result) {\n {\n error(\"This synthetic event is reused for performance reasons. If you're seeing this, \" + \"you're %s `%s` on a released/nullified synthetic event. %s. \" + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);\n }\n }\n }\n\n function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {\n var EventConstructor = this;\n\n if (EventConstructor.eventPool.length) {\n var instance = EventConstructor.eventPool.pop();\n EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);\n return instance;\n }\n\n return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);\n }\n\n function releasePooledEvent(event) {\n var EventConstructor = this;\n\n if (!(event instanceof EventConstructor)) {\n {\n throw Error(\"Trying to release an event instance into a pool of a different type.\");\n }\n }\n\n event.destructor();\n\n if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {\n EventConstructor.eventPool.push(event);\n }\n }\n\n function addEventPoolingTo(EventConstructor) {\n EventConstructor.eventPool = [];\n EventConstructor.getPooled = getPooledEvent;\n EventConstructor.release = releasePooledEvent;\n }\n /**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\n\n var SyntheticCompositionEvent = SyntheticEvent.extend({\n data: null\n });\n /**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n\n var SyntheticInputEvent = SyntheticEvent.extend({\n data: null\n });\n var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\n var START_KEYCODE = 229;\n var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\n var documentMode = null;\n\n if (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n } // Webkit offers a very useful `textInput` event that can be used to\n // directly represent `beforeInput`. The IE `textinput` event is not as\n // useful, so we don't use it.\n\n\n var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n // by the native compositionend event may be incorrect. Japanese ideographic\n // spaces, for instance (\\u3000) are not recorded correctly.\n\n var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\n var SPACEBAR_CODE = 32;\n var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names.\n\n var eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionEnd',\n captured: 'onCompositionEndCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionStart',\n captured: 'onCompositionStartCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionUpdate',\n captured: 'onCompositionUpdateCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n }\n }; // Track whether we've ever handled a keypress on the space key.\n\n var hasSpaceKeypress = false;\n /**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\n function isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n }\n /**\n * Translate native top level events into event types.\n *\n * @param {string} topLevelType\n * @return {object}\n */\n\n\n function getCompositionEventType(topLevelType) {\n switch (topLevelType) {\n case TOP_COMPOSITION_START:\n return eventTypes.compositionStart;\n\n case TOP_COMPOSITION_END:\n return eventTypes.compositionEnd;\n\n case TOP_COMPOSITION_UPDATE:\n return eventTypes.compositionUpdate;\n }\n }\n /**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\n function isFallbackCompositionStart(topLevelType, nativeEvent) {\n return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;\n }\n /**\n * Does our fallback mode think that this event is the end of composition?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\n function isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_KEY_UP:\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case TOP_KEY_DOWN:\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n\n case TOP_KEY_PRESS:\n case TOP_MOUSE_DOWN:\n case TOP_BLUR:\n // Events are not possible without cancelling IME.\n return true;\n\n default:\n return false;\n }\n }\n /**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\n function getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n\n return null;\n }\n /**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\n function isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n } // Track the current IME composition status, if any.\n\n\n var isComposing = false;\n /**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\n function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(topLevelType);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionStart;\n }\n } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionEnd;\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === eventTypes.compositionStart) {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === eventTypes.compositionEnd) {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n\n if (customData !== null) {\n event.data = customData;\n }\n }\n\n accumulateTwoPhaseDispatches(event);\n return event;\n }\n /**\n * @param {TopLevelType} topLevelType Number from `TopLevelType`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The string corresponding to this `beforeInput` event.\n */\n\n\n function getNativeBeforeInputChars(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_COMPOSITION_END:\n return getDataFromCustomEvent(nativeEvent);\n\n case TOP_KEY_PRESS:\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case TOP_TEXT_INPUT:\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n }\n /**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n * @param {number} topLevelType Number from `TopLevelEventTypes`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The fallback string for this `beforeInput` event.\n */\n\n\n function getFallbackBeforeInputChars(topLevelType, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (topLevelType) {\n case TOP_PASTE:\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case TOP_KEY_PRESS:\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case TOP_COMPOSITION_END:\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n }\n /**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\n function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n\n if (!chars) {\n return null;\n }\n\n var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);\n event.data = chars;\n accumulateTwoPhaseDispatches(event);\n return event;\n }\n /**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\n var BeforeInputEventPlugin = {\n eventTypes: eventTypes,\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n\n if (composition === null) {\n return beforeInput;\n }\n\n if (beforeInput === null) {\n return composition;\n }\n\n return [composition, beforeInput];\n }\n };\n /**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\n\n var supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n };\n\n function isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n }\n\n var eventTypes$1 = {\n change: {\n phasedRegistrationNames: {\n bubbled: 'onChange',\n captured: 'onChangeCapture'\n },\n dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]\n }\n };\n\n function createAndAccumulateChangeEvent(inst, nativeEvent, target) {\n var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);\n event.type = 'change'; // Flag this event loop as needing state restore.\n\n enqueueStateRestore(target);\n accumulateTwoPhaseDispatches(event);\n return event;\n }\n /**\n * For IE shims\n */\n\n\n var activeElement = null;\n var activeElementInst = null;\n /**\n * SECTION: handle `change` event\n */\n\n function shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n }\n\n function manualDispatchChangeEvent(nativeEvent) {\n var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n\n batchedUpdates(runEventInBatch, event);\n }\n\n function runEventInBatch(event) {\n runEventsInBatch(event);\n }\n\n function getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance$1(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n }\n\n function getTargetInstForChangeEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_CHANGE) {\n return targetInst;\n }\n }\n /**\n * SECTION: handle `input` event\n */\n\n\n var isInputEventSupported = false;\n\n if (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n }\n /**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\n function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }\n /**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\n function stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n }\n /**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n\n\n function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }\n\n function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {\n if (topLevelType === TOP_FOCUS) {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (topLevelType === TOP_BLUR) {\n stopWatchingForValueChange();\n }\n } // For IE8 and IE9.\n\n\n function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {\n if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst);\n }\n }\n /**\n * SECTION: handle `click` event\n */\n\n\n function shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n }\n\n function getTargetInstForClickEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_CLICK) {\n return getInstIfValueChanged(targetInst);\n }\n }\n\n function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {\n return getInstIfValueChanged(targetInst);\n }\n }\n\n function handleControlledInputBlur(node) {\n var state = node._wrapperState;\n\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n }\n /**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\n var ChangeEventPlugin = {\n eventTypes: eventTypes$1,\n _isInputEventSupported: isInputEventSupported,\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(topLevelType, targetInst);\n\n if (inst) {\n var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);\n return event;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(topLevelType, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (topLevelType === TOP_BLUR) {\n handleControlledInputBlur(targetNode);\n }\n }\n };\n var SyntheticUIEvent = SyntheticEvent.extend({\n view: null,\n detail: null\n });\n /**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n var modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n // getModifierState. If getModifierState is not supported, we map it to a set of\n // modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\n function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n }\n\n function getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n }\n\n var previousScreenX = 0;\n var previousScreenY = 0; // Use flags to signal movementX/Y has already been set\n\n var isMovementXSet = false;\n var isMovementYSet = false;\n /**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var SyntheticMouseEvent = SyntheticUIEvent.extend({\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n pageX: null,\n pageY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: getEventModifierState,\n button: null,\n buttons: null,\n relatedTarget: function (event) {\n return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n var screenX = previousScreenX;\n previousScreenX = event.screenX;\n\n if (!isMovementXSet) {\n isMovementXSet = true;\n return 0;\n }\n\n return event.type === 'mousemove' ? event.screenX - screenX : 0;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n }\n\n var screenY = previousScreenY;\n previousScreenY = event.screenY;\n\n if (!isMovementYSet) {\n isMovementYSet = true;\n return 0;\n }\n\n return event.type === 'mousemove' ? event.screenY - screenY : 0;\n }\n });\n /**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\n var SyntheticPointerEvent = SyntheticMouseEvent.extend({\n pointerId: null,\n width: null,\n height: null,\n pressure: null,\n tangentialPressure: null,\n tiltX: null,\n tiltY: null,\n twist: null,\n pointerType: null,\n isPrimary: null\n });\n var eventTypes$2 = {\n mouseEnter: {\n registrationName: 'onMouseEnter',\n dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]\n },\n mouseLeave: {\n registrationName: 'onMouseLeave',\n dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]\n },\n pointerEnter: {\n registrationName: 'onPointerEnter',\n dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]\n },\n pointerLeave: {\n registrationName: 'onPointerLeave',\n dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]\n }\n };\n var EnterLeaveEventPlugin = {\n eventTypes: eventTypes$2,\n\n /**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;\n var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;\n\n if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0 && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {\n // If this is an over event with a target, then we've already dispatched\n // the event in the out event of the other target. If this is replayed,\n // then it's because we couldn't dispatch against this target previously\n // so we have to do it now instead.\n return null;\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return null;\n }\n\n var win;\n\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n\n if (isOutEvent) {\n from = targetInst;\n var related = nativeEvent.relatedTarget || nativeEvent.toElement;\n to = related ? getClosestInstanceFromNode(related) : null;\n\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\n\n if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {\n to = null;\n }\n }\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return null;\n }\n\n var eventInterface, leaveEventType, enterEventType, eventTypePrefix;\n\n if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {\n eventInterface = SyntheticMouseEvent;\n leaveEventType = eventTypes$2.mouseLeave;\n enterEventType = eventTypes$2.mouseEnter;\n eventTypePrefix = 'mouse';\n } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {\n eventInterface = SyntheticPointerEvent;\n leaveEventType = eventTypes$2.pointerLeave;\n enterEventType = eventTypes$2.pointerEnter;\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance$1(from);\n var toNode = to == null ? win : getNodeFromInstance$1(to);\n var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);\n leave.type = eventTypePrefix + 'leave';\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);\n enter.type = eventTypePrefix + 'enter';\n enter.target = toNode;\n enter.relatedTarget = fromNode;\n accumulateEnterLeaveDispatches(leave, enter, from, to); // If we are not processing the first ancestor, then we\n // should not process the same nativeEvent again, as we\n // will have already processed it in the first ancestor.\n\n if ((eventSystemFlags & IS_FIRST_ANCESTOR) === 0) {\n return [leave];\n }\n\n return [leave, enter];\n }\n };\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n\n function is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n }\n\n var objectIs = typeof Object.is === 'function' ? Object.is : is;\n var hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n /**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\n function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }\n\n var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n var eventTypes$3 = {\n select: {\n phasedRegistrationNames: {\n bubbled: 'onSelect',\n captured: 'onSelectCapture'\n },\n dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]\n }\n };\n var activeElement$1 = null;\n var activeElementInst$1 = null;\n var lastSelection = null;\n var mouseDown = false;\n /**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n *\n * @param {DOMElement} node\n * @return {object}\n */\n\n function getSelection$1(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n }\n /**\n * Get document associated with the event target.\n *\n * @param {object} nativeEventTarget\n * @return {Document}\n */\n\n\n function getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n }\n /**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\n function constructSelectEvent(nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n return null;\n } // Only fire when selection has actually changed.\n\n\n var currentSelection = getSelection$1(activeElement$1);\n\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);\n syntheticEvent.type = 'select';\n syntheticEvent.target = activeElement$1;\n accumulateTwoPhaseDispatches(syntheticEvent);\n return syntheticEvent;\n }\n\n return null;\n }\n /**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\n var SelectEventPlugin = {\n eventTypes: eventTypes$3,\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, container) {\n var containerOrDoc = container || getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do\n // not extract events. See #3639.\n\n if (!containerOrDoc || !isListeningToAllDependencies('onSelect', containerOrDoc)) {\n return null;\n }\n\n var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;\n\n switch (topLevelType) {\n // Track the input node that has focus.\n case TOP_FOCUS:\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n\n break;\n\n case TOP_BLUR:\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n\n case TOP_MOUSE_DOWN:\n mouseDown = true;\n break;\n\n case TOP_CONTEXT_MENU:\n case TOP_MOUSE_UP:\n case TOP_DRAG_END:\n mouseDown = false;\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n\n case TOP_SELECTION_CHANGE:\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case TOP_KEY_DOWN:\n case TOP_KEY_UP:\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n }\n\n return null;\n }\n };\n /**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\n var SyntheticAnimationEvent = SyntheticEvent.extend({\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n });\n /**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\n var SyntheticClipboardEvent = SyntheticEvent.extend({\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n });\n /**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var SyntheticFocusEvent = SyntheticUIEvent.extend({\n relatedTarget: null\n });\n /**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\n\n function getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n }\n /**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\n\n var normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n };\n /**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\n var translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n };\n /**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\n function getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n\n return '';\n }\n /**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\n var SyntheticKeyboardEvent = SyntheticUIEvent.extend({\n key: getEventKey,\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n }\n });\n /**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var SyntheticDragEvent = SyntheticMouseEvent.extend({\n dataTransfer: null\n });\n /**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\n var SyntheticTouchEvent = SyntheticUIEvent.extend({\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: getEventModifierState\n });\n /**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\n var SyntheticTransitionEvent = SyntheticEvent.extend({\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n });\n /**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var SyntheticWheelEvent = SyntheticMouseEvent.extend({\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: null,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: null\n });\n var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];\n var SimpleEventPlugin = {\n // simpleEventPluginEventTypes gets populated from\n // the DOMEventProperties module.\n eventTypes: simpleEventPluginEventTypes,\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var dispatchConfig = topLevelEventsToDispatchConfig.get(topLevelType);\n\n if (!dispatchConfig) {\n return null;\n }\n\n var EventConstructor;\n\n switch (topLevelType) {\n case TOP_KEY_PRESS:\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return null;\n }\n\n /* falls through */\n\n case TOP_KEY_DOWN:\n case TOP_KEY_UP:\n EventConstructor = SyntheticKeyboardEvent;\n break;\n\n case TOP_BLUR:\n case TOP_FOCUS:\n EventConstructor = SyntheticFocusEvent;\n break;\n\n case TOP_CLICK:\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return null;\n }\n\n /* falls through */\n\n case TOP_AUX_CLICK:\n case TOP_DOUBLE_CLICK:\n case TOP_MOUSE_DOWN:\n case TOP_MOUSE_MOVE:\n case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case TOP_MOUSE_OUT:\n case TOP_MOUSE_OVER:\n case TOP_CONTEXT_MENU:\n EventConstructor = SyntheticMouseEvent;\n break;\n\n case TOP_DRAG:\n case TOP_DRAG_END:\n case TOP_DRAG_ENTER:\n case TOP_DRAG_EXIT:\n case TOP_DRAG_LEAVE:\n case TOP_DRAG_OVER:\n case TOP_DRAG_START:\n case TOP_DROP:\n EventConstructor = SyntheticDragEvent;\n break;\n\n case TOP_TOUCH_CANCEL:\n case TOP_TOUCH_END:\n case TOP_TOUCH_MOVE:\n case TOP_TOUCH_START:\n EventConstructor = SyntheticTouchEvent;\n break;\n\n case TOP_ANIMATION_END:\n case TOP_ANIMATION_ITERATION:\n case TOP_ANIMATION_START:\n EventConstructor = SyntheticAnimationEvent;\n break;\n\n case TOP_TRANSITION_END:\n EventConstructor = SyntheticTransitionEvent;\n break;\n\n case TOP_SCROLL:\n EventConstructor = SyntheticUIEvent;\n break;\n\n case TOP_WHEEL:\n EventConstructor = SyntheticWheelEvent;\n break;\n\n case TOP_COPY:\n case TOP_CUT:\n case TOP_PASTE:\n EventConstructor = SyntheticClipboardEvent;\n break;\n\n case TOP_GOT_POINTER_CAPTURE:\n case TOP_LOST_POINTER_CAPTURE:\n case TOP_POINTER_CANCEL:\n case TOP_POINTER_DOWN:\n case TOP_POINTER_MOVE:\n case TOP_POINTER_OUT:\n case TOP_POINTER_OVER:\n case TOP_POINTER_UP:\n EventConstructor = SyntheticPointerEvent;\n break;\n\n default:\n {\n if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {\n error('SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);\n }\n } // HTML Events\n // @see http://www.w3.org/TR/html5/index.html#events-0\n\n EventConstructor = SyntheticEvent;\n break;\n }\n\n var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);\n accumulateTwoPhaseDispatches(event);\n return event;\n }\n };\n /**\n * Specifies a deterministic ordering of `EventPlugin`s. A convenient way to\n * reason about plugins, without having to package every one of them. This\n * is better than having plugins be ordered in the same order that they\n * are injected because that ordering would be influenced by the packaging order.\n * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that\n * preventing default on events is convenient in `SimpleEventPlugin` handlers.\n */\n\n var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];\n /**\n * Inject modules for resolving DOM hierarchy and plugin ordering.\n */\n\n injectEventPluginOrder(DOMEventPluginOrder);\n setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);\n /**\n * Some important event plugins included by default (without having to require\n * them).\n */\n\n injectEventPluginsByName({\n SimpleEventPlugin: SimpleEventPlugin,\n EnterLeaveEventPlugin: EnterLeaveEventPlugin,\n ChangeEventPlugin: ChangeEventPlugin,\n SelectEventPlugin: SelectEventPlugin,\n BeforeInputEventPlugin: BeforeInputEventPlugin\n }); // Prefix measurements so that it's possible to filter them.\n // Longer prefixes are hard to read in DevTools.\n\n var reactEmoji = \"\\u269B\";\n var warningEmoji = \"\\u26D4\";\n var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause.\n // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?\n\n var currentFiber = null; // If we're in the middle of user code, which fiber and method is it?\n // Reusing `currentFiber` would be confusing for this because user code fiber\n // can change during commit phase too, but we don't need to unwind it (since\n // lifecycles in the commit phase don't resemble a tree).\n\n var currentPhase = null;\n var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem,\n // so we will keep track of it, and include it in the report.\n // Track commits caused by cascading updates.\n\n var isCommitting = false;\n var hasScheduledUpdateInCurrentCommit = false;\n var hasScheduledUpdateInCurrentPhase = false;\n var commitCountInCurrentWorkLoop = 0;\n var effectCountInCurrentCommit = 0; // to avoid stretch the commit phase with measurement overhead.\n\n var labelsInCurrentCommit = new Set();\n\n var formatMarkName = function (markName) {\n return reactEmoji + \" \" + markName;\n };\n\n var formatLabel = function (label, warning) {\n var prefix = warning ? warningEmoji + \" \" : reactEmoji + \" \";\n var suffix = warning ? \" Warning: \" + warning : '';\n return \"\" + prefix + label + suffix;\n };\n\n var beginMark = function (markName) {\n performance.mark(formatMarkName(markName));\n };\n\n var clearMark = function (markName) {\n performance.clearMarks(formatMarkName(markName));\n };\n\n var endMark = function (label, markName, warning) {\n var formattedMarkName = formatMarkName(markName);\n var formattedLabel = formatLabel(label, warning);\n\n try {\n performance.measure(formattedLabel, formattedMarkName);\n } catch (err) {} // If previous mark was missing for some reason, this will throw.\n // This could only happen if React crashed in an unexpected place earlier.\n // Don't pile on with more errors.\n // Clear marks immediately to avoid growing buffer.\n\n\n performance.clearMarks(formattedMarkName);\n performance.clearMeasures(formattedLabel);\n };\n\n var getFiberMarkName = function (label, debugID) {\n return label + \" (#\" + debugID + \")\";\n };\n\n var getFiberLabel = function (componentName, isMounted, phase) {\n if (phase === null) {\n // These are composite component total time measurements.\n return componentName + \" [\" + (isMounted ? 'update' : 'mount') + \"]\";\n } else {\n // Composite component methods.\n return componentName + \".\" + phase;\n }\n };\n\n var beginFiberMark = function (fiber, phase) {\n var componentName = getComponentName(fiber.type) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n\n if (isCommitting && labelsInCurrentCommit.has(label)) {\n // During the commit phase, we don't show duplicate labels because\n // there is a fixed overhead for every measurement, and we don't\n // want to stretch the commit phase beyond necessary.\n return false;\n }\n\n labelsInCurrentCommit.add(label);\n var markName = getFiberMarkName(label, debugID);\n beginMark(markName);\n return true;\n };\n\n var clearFiberMark = function (fiber, phase) {\n var componentName = getComponentName(fiber.type) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n var markName = getFiberMarkName(label, debugID);\n clearMark(markName);\n };\n\n var endFiberMark = function (fiber, phase, warning) {\n var componentName = getComponentName(fiber.type) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n var markName = getFiberMarkName(label, debugID);\n endMark(label, markName, warning);\n };\n\n var shouldIgnoreFiber = function (fiber) {\n // Host components should be skipped in the timeline.\n // We could check typeof fiber.type, but does this work with RN?\n switch (fiber.tag) {\n case HostRoot:\n case HostComponent:\n case HostText:\n case HostPortal:\n case Fragment:\n case ContextProvider:\n case ContextConsumer:\n case Mode:\n return true;\n\n default:\n return false;\n }\n };\n\n var clearPendingPhaseMeasurement = function () {\n if (currentPhase !== null && currentPhaseFiber !== null) {\n clearFiberMark(currentPhaseFiber, currentPhase);\n }\n\n currentPhaseFiber = null;\n currentPhase = null;\n hasScheduledUpdateInCurrentPhase = false;\n };\n\n var pauseTimers = function () {\n // Stops all currently active measurements so that they can be resumed\n // if we continue in a later deferred loop from the same unit of work.\n var fiber = currentFiber;\n\n while (fiber) {\n if (fiber._debugIsCurrentlyTiming) {\n endFiberMark(fiber, null, null);\n }\n\n fiber = fiber.return;\n }\n };\n\n var resumeTimersRecursively = function (fiber) {\n if (fiber.return !== null) {\n resumeTimersRecursively(fiber.return);\n }\n\n if (fiber._debugIsCurrentlyTiming) {\n beginFiberMark(fiber, null);\n }\n };\n\n var resumeTimers = function () {\n // Resumes all measurements that were active during the last deferred loop.\n if (currentFiber !== null) {\n resumeTimersRecursively(currentFiber);\n }\n };\n\n function recordEffect() {\n {\n effectCountInCurrentCommit++;\n }\n }\n\n function recordScheduleUpdate() {\n {\n if (isCommitting) {\n hasScheduledUpdateInCurrentCommit = true;\n }\n\n if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {\n hasScheduledUpdateInCurrentPhase = true;\n }\n }\n }\n\n function startWorkTimer(fiber) {\n {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n } // If we pause, this is the fiber to unwind from.\n\n\n currentFiber = fiber;\n\n if (!beginFiberMark(fiber, null)) {\n return;\n }\n\n fiber._debugIsCurrentlyTiming = true;\n }\n }\n\n function cancelWorkTimer(fiber) {\n {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n } // Remember we shouldn't complete measurement for this fiber.\n // Otherwise flamechart will be deep even for small updates.\n\n\n fiber._debugIsCurrentlyTiming = false;\n clearFiberMark(fiber, null);\n }\n }\n\n function stopWorkTimer(fiber) {\n {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n } // If we pause, its parent is the fiber to unwind from.\n\n\n currentFiber = fiber.return;\n\n if (!fiber._debugIsCurrentlyTiming) {\n return;\n }\n\n fiber._debugIsCurrentlyTiming = false;\n endFiberMark(fiber, null, null);\n }\n }\n\n function stopFailedWorkTimer(fiber) {\n {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n } // If we pause, its parent is the fiber to unwind from.\n\n\n currentFiber = fiber.return;\n\n if (!fiber._debugIsCurrentlyTiming) {\n return;\n }\n\n fiber._debugIsCurrentlyTiming = false;\n var warning = fiber.tag === SuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';\n endFiberMark(fiber, null, warning);\n }\n }\n\n function startPhaseTimer(fiber, phase) {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n clearPendingPhaseMeasurement();\n\n if (!beginFiberMark(fiber, phase)) {\n return;\n }\n\n currentPhaseFiber = fiber;\n currentPhase = phase;\n }\n }\n\n function stopPhaseTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n if (currentPhase !== null && currentPhaseFiber !== null) {\n var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;\n endFiberMark(currentPhaseFiber, currentPhase, warning);\n }\n\n currentPhase = null;\n currentPhaseFiber = null;\n }\n }\n\n function startWorkLoopTimer(nextUnitOfWork) {\n {\n currentFiber = nextUnitOfWork;\n\n if (!supportsUserTiming) {\n return;\n }\n\n commitCountInCurrentWorkLoop = 0; // This is top level call.\n // Any other measurements are performed within.\n\n beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop.\n\n resumeTimers();\n }\n }\n\n function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var warning = null;\n\n if (interruptedBy !== null) {\n if (interruptedBy.tag === HostRoot) {\n warning = 'A top-level update interrupted the previous render';\n } else {\n var componentName = getComponentName(interruptedBy.type) || 'Unknown';\n warning = \"An update to \" + componentName + \" interrupted the previous render\";\n }\n } else if (commitCountInCurrentWorkLoop > 1) {\n warning = 'There were cascading updates';\n }\n\n commitCountInCurrentWorkLoop = 0;\n var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop.\n\n pauseTimers();\n endMark(label, '(React Tree Reconciliation)', warning);\n }\n }\n\n function startCommitTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n isCommitting = true;\n hasScheduledUpdateInCurrentCommit = false;\n labelsInCurrentCommit.clear();\n beginMark('(Committing Changes)');\n }\n }\n\n function stopCommitTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var warning = null;\n\n if (hasScheduledUpdateInCurrentCommit) {\n warning = 'Lifecycle hook scheduled a cascading update';\n } else if (commitCountInCurrentWorkLoop > 0) {\n warning = 'Caused by a cascading update in earlier commit';\n }\n\n hasScheduledUpdateInCurrentCommit = false;\n commitCountInCurrentWorkLoop++;\n isCommitting = false;\n labelsInCurrentCommit.clear();\n endMark('(Committing Changes)', '(Committing Changes)', warning);\n }\n }\n\n function startCommitSnapshotEffectsTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n effectCountInCurrentCommit = 0;\n beginMark('(Committing Snapshot Effects)');\n }\n }\n\n function stopCommitSnapshotEffectsTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var count = effectCountInCurrentCommit;\n effectCountInCurrentCommit = 0;\n endMark(\"(Committing Snapshot Effects: \" + count + \" Total)\", '(Committing Snapshot Effects)', null);\n }\n }\n\n function startCommitHostEffectsTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n effectCountInCurrentCommit = 0;\n beginMark('(Committing Host Effects)');\n }\n }\n\n function stopCommitHostEffectsTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var count = effectCountInCurrentCommit;\n effectCountInCurrentCommit = 0;\n endMark(\"(Committing Host Effects: \" + count + \" Total)\", '(Committing Host Effects)', null);\n }\n }\n\n function startCommitLifeCyclesTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n effectCountInCurrentCommit = 0;\n beginMark('(Calling Lifecycle Methods)');\n }\n }\n\n function stopCommitLifeCyclesTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var count = effectCountInCurrentCommit;\n effectCountInCurrentCommit = 0;\n endMark(\"(Calling Lifecycle Methods: \" + count + \" Total)\", '(Calling Lifecycle Methods)', null);\n }\n }\n\n var valueStack = [];\n var fiberStack;\n {\n fiberStack = [];\n }\n var index = -1;\n\n function createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n }\n\n function pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n error('Unexpected Fiber popped.');\n }\n }\n cursor.current = valueStack[index];\n valueStack[index] = null;\n {\n fiberStack[index] = null;\n }\n index--;\n }\n\n function push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n {\n fiberStack[index] = fiber;\n }\n cursor.current = value;\n }\n\n var warnedAboutMissingGetChildContext;\n {\n warnedAboutMissingGetChildContext = {};\n }\n var emptyContextObject = {};\n {\n Object.freeze(emptyContextObject);\n } // A cursor to the current merged context object on the stack.\n\n var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\n var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n // We use this to get access to the parent context after we have already\n // pushed the next context provider, and now need to merge their contexts.\n\n var previousContext = emptyContextObject;\n\n function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n {\n if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n // If the fiber is a context provider itself, when we read its context\n // we may have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n\n return contextStackCursor.current;\n }\n }\n\n function cacheContext(workInProgress, unmaskedContext, maskedContext) {\n {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n }\n }\n\n function getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n } // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n var instance = workInProgress.stateNode;\n\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n }\n }\n\n function hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n }\n\n function isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n }\n\n function popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n }\n\n function popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n }\n\n function pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (!(contextStackCursor.current === emptyContextObject)) {\n {\n throw Error(\"Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n }\n }\n\n function processChildContext(fiber, type, parentContext) {\n {\n var instance = fiber.stateNode;\n var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentName(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n return parentContext;\n }\n\n var childContext;\n startPhaseTimer(fiber, 'getChildContext');\n childContext = instance.getChildContext();\n stopPhaseTimer();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n {\n throw Error((getComponentName(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name, // In practice, there is one case in which we won't get a stack. It's when\n // somebody calls unstable_renderSubtreeIntoContainer() and we process\n // context from the parent component instance. The stack will be missing\n // because it's outside of the reconciliation, and so the pointer has not\n // been set. This is rare and doesn't matter. We'll also remove that API.\n getCurrentFiberStackInDev);\n }\n return _assign({}, parentContext, {}, childContext);\n }\n }\n\n function pushContextProvider(workInProgress) {\n {\n var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n return true;\n }\n }\n\n function invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n\n if (!instance) {\n {\n throw Error(\"Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, type, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n }\n }\n\n function findCurrentUnmaskedContext(fiber) {\n {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {\n {\n throw Error(\"Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var node = fiber;\n\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n\n case ClassComponent:\n {\n var Component = node.type;\n\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n\n break;\n }\n }\n\n node = node.return;\n } while (node !== null);\n\n {\n {\n throw Error(\"Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n }\n\n var LegacyRoot = 0;\n var BlockingRoot = 1;\n var ConcurrentRoot = 2;\n var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,\n Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,\n Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,\n Scheduler_shouldYield = Scheduler.unstable_shouldYield,\n Scheduler_requestPaint = Scheduler.unstable_requestPaint,\n Scheduler_now = Scheduler.unstable_now,\n Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,\n Scheduler_LowPriority = Scheduler.unstable_LowPriority,\n Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;\n {\n // Provide explicit error message when production+profiling bundle of e.g.\n // react-dom is used with production (non-profiling) bundle of\n // scheduler/tracing\n if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {\n {\n throw Error(\"It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling\");\n }\n }\n }\n var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use\n // ascending numbers so we can compare them like numbers. They start at 90 to\n // avoid clashing with Scheduler's priorities.\n\n var ImmediatePriority = 99;\n var UserBlockingPriority$1 = 98;\n var NormalPriority = 97;\n var LowPriority = 96;\n var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.\n\n var NoPriority = 90;\n var shouldYield = Scheduler_shouldYield;\n var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.\n Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};\n var syncQueue = null;\n var immediateQueueCallbackNode = null;\n var isFlushingSyncQueue = false;\n var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.\n // This will be the case for modern browsers that support `performance.now`. In\n // older browsers, Scheduler falls back to `Date.now`, which returns a Unix\n // timestamp. In that case, subtract the module initialization time to simulate\n // the behavior of performance.now and keep our times small enough to fit\n // within 32 bits.\n // TODO: Consider lifting this into Scheduler.\n\n var now = initialTimeMs < 10000 ? Scheduler_now : function () {\n return Scheduler_now() - initialTimeMs;\n };\n\n function getCurrentPriorityLevel() {\n switch (Scheduler_getCurrentPriorityLevel()) {\n case Scheduler_ImmediatePriority:\n return ImmediatePriority;\n\n case Scheduler_UserBlockingPriority:\n return UserBlockingPriority$1;\n\n case Scheduler_NormalPriority:\n return NormalPriority;\n\n case Scheduler_LowPriority:\n return LowPriority;\n\n case Scheduler_IdlePriority:\n return IdlePriority;\n\n default:\n {\n {\n throw Error(\"Unknown priority level.\");\n }\n }\n }\n }\n\n function reactPriorityToSchedulerPriority(reactPriorityLevel) {\n switch (reactPriorityLevel) {\n case ImmediatePriority:\n return Scheduler_ImmediatePriority;\n\n case UserBlockingPriority$1:\n return Scheduler_UserBlockingPriority;\n\n case NormalPriority:\n return Scheduler_NormalPriority;\n\n case LowPriority:\n return Scheduler_LowPriority;\n\n case IdlePriority:\n return Scheduler_IdlePriority;\n\n default:\n {\n {\n throw Error(\"Unknown priority level.\");\n }\n }\n }\n }\n\n function runWithPriority$1(reactPriorityLevel, fn) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_runWithPriority(priorityLevel, fn);\n }\n\n function scheduleCallback(reactPriorityLevel, callback, options) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_scheduleCallback(priorityLevel, callback, options);\n }\n\n function scheduleSyncCallback(callback) {\n // Push this callback into an internal queue. We'll flush these either in\n // the next tick, or earlier if something calls `flushSyncCallbackQueue`.\n if (syncQueue === null) {\n syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.\n\n immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);\n } else {\n // Push onto existing queue. Don't need to schedule a callback because\n // we already scheduled one when we created the queue.\n syncQueue.push(callback);\n }\n\n return fakeCallbackNode;\n }\n\n function cancelCallback(callbackNode) {\n if (callbackNode !== fakeCallbackNode) {\n Scheduler_cancelCallback(callbackNode);\n }\n }\n\n function flushSyncCallbackQueue() {\n if (immediateQueueCallbackNode !== null) {\n var node = immediateQueueCallbackNode;\n immediateQueueCallbackNode = null;\n Scheduler_cancelCallback(node);\n }\n\n flushSyncCallbackQueueImpl();\n }\n\n function flushSyncCallbackQueueImpl() {\n if (!isFlushingSyncQueue && syncQueue !== null) {\n // Prevent re-entrancy.\n isFlushingSyncQueue = true;\n var i = 0;\n\n try {\n var _isSync = true;\n var queue = syncQueue;\n runWithPriority$1(ImmediatePriority, function () {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(_isSync);\n } while (callback !== null);\n }\n });\n syncQueue = null;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n if (syncQueue !== null) {\n syncQueue = syncQueue.slice(i + 1);\n } // Resume flushing in the next tick\n\n\n Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);\n throw error;\n } finally {\n isFlushingSyncQueue = false;\n }\n }\n }\n\n var NoMode = 0;\n var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root\n // tag instead\n\n var BlockingMode = 2;\n var ConcurrentMode = 4;\n var ProfileMode = 8; // Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n // Math.pow(2, 30) - 1\n // 0b111111111111111111111111111111\n\n var MAX_SIGNED_31_BIT_INT = 1073741823;\n var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that\n // Never work can be committed in an inconsistent state without tearing the UI.\n // The main example is offscreen content, like a hidden subtree. So one possible\n // name is Offscreen. However, it also includes dehydrated Suspense boundaries,\n // which are inconsistent in the sense that they haven't finished yet, but\n // aren't visibly inconsistent because the server rendered HTML matches what the\n // hydrated tree would look like.\n\n var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in\n // order to be consistent.\n\n var Idle = 2; // Continuous Hydration is slightly higher than Idle and is used to increase\n // priority of hover targets.\n\n var ContinuousHydration = 3;\n var Sync = MAX_SIGNED_31_BIT_INT;\n var Batched = Sync - 1;\n var UNIT_SIZE = 10;\n var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms.\n\n function msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n }\n\n function expirationTimeToMs(expirationTime) {\n return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;\n }\n\n function ceiling(num, precision) {\n return ((num / precision | 0) + 1) * precision;\n }\n\n function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {\n return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);\n } // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update\n // the names to reflect.\n\n\n var LOW_PRIORITY_EXPIRATION = 5000;\n var LOW_PRIORITY_BATCH_SIZE = 250;\n\n function computeAsyncExpiration(currentTime) {\n return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);\n }\n\n function computeSuspenseExpiration(currentTime, timeoutMs) {\n // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time?\n return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE);\n } // We intentionally set a higher expiration time for interactive updates in\n // dev than in production.\n //\n // If the main thread is being blocked so long that you hit the expiration,\n // it's a problem that could be solved with better scheduling.\n //\n // People will be more likely to notice this and fix it with the long\n // expiration time in development.\n //\n // In production we opt for better UX at the risk of masking scheduling\n // problems, by expiring fast.\n\n\n var HIGH_PRIORITY_EXPIRATION = 500;\n var HIGH_PRIORITY_BATCH_SIZE = 100;\n\n function computeInteractiveExpiration(currentTime) {\n return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);\n }\n\n function inferPriorityFromExpirationTime(currentTime, expirationTime) {\n if (expirationTime === Sync) {\n return ImmediatePriority;\n }\n\n if (expirationTime === Never || expirationTime === Idle) {\n return IdlePriority;\n }\n\n var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);\n\n if (msUntil <= 0) {\n return ImmediatePriority;\n }\n\n if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {\n return UserBlockingPriority$1;\n }\n\n if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {\n return NormalPriority;\n } // TODO: Handle LowPriority\n // Assume anything lower has idle priority\n\n\n return IdlePriority;\n }\n\n var ReactStrictModeWarnings = {\n recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n flushPendingUnsafeLifecycleWarnings: function () {},\n recordLegacyContextWarning: function (fiber, instance) {},\n flushLegacyContextWarning: function () {},\n discardPendingWarnings: function () {}\n };\n {\n var findStrictRoot = function (fiber) {\n var maybeStrictRoot = null;\n var node = fiber;\n\n while (node !== null) {\n if (node.mode & StrictMode) {\n maybeStrictRoot = node;\n }\n\n node = node.return;\n }\n\n return maybeStrictRoot;\n };\n\n var setToSortedString = function (set) {\n var array = [];\n set.forEach(function (value) {\n array.push(value);\n });\n return array.sort().join(', ');\n };\n\n var pendingComponentWillMountWarnings = [];\n var pendingUNSAFE_ComponentWillMountWarnings = [];\n var pendingComponentWillReceivePropsWarnings = [];\n var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n var pendingComponentWillUpdateWarnings = [];\n var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n var didWarnAboutUnsafeLifecycles = new Set();\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedup strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n\n if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n\n var UNSAFE_componentWillMountUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n\n var componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n\n var componentWillUpdateUniqueNames = new Set();\n\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n } // Finally, we flush all the warnings\n // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '\\nPlease update the following components: %s', sortedNames);\n }\n\n if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, \" + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n }\n\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '\\nPlease update the following components: %s', _sortedNames2);\n }\n\n if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames3);\n }\n\n if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, refactor your \" + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames4);\n }\n\n if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames5);\n }\n };\n\n var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\n\n if (strictRoot === null) {\n error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n return;\n } // Dedup strategy: Warn once per component.\n\n\n if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n if (warningsForRoot === undefined) {\n warningsForRoot = [];\n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n }\n\n warningsForRoot.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n var firstComponentStack = getStackByFiberInDevAndProd(firstFiber);\n error('Legacy context API has been detected within a strict-mode tree.' + '\\n\\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\\n\\nPlease update the following components: %s' + '\\n\\nLearn more about this warning here: https://fb.me/react-legacy-context' + '%s', sortedNames, firstComponentStack);\n });\n };\n\n ReactStrictModeWarnings.discardPendingWarnings = function () {\n pendingComponentWillMountWarnings = [];\n pendingUNSAFE_ComponentWillMountWarnings = [];\n pendingComponentWillReceivePropsWarnings = [];\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n pendingComponentWillUpdateWarnings = [];\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n pendingLegacyContextWarning = new Map();\n };\n }\n var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\n var failedBoundaries = null;\n\n var setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n };\n\n function resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n }\n\n function resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n }\n\n function resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n // Check if we're dealing with a real forwardRef. Don't want to crash early.\n if (type !== null && type !== undefined && typeof type.render === 'function') {\n // ForwardRef is special because its resolved .type is an object,\n // but it's possible that we only have its inner render function in the map.\n // If that inner render function is different, we'll build a new forwardRef type.\n var currentRender = resolveFunctionForHotReloading(type.render);\n\n if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n\n return syntheticType;\n }\n }\n\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n }\n\n function isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\n }\n\n var prevType = fiber.elementType;\n var nextType = element.type; // If we got here, we know types aren't === equal.\n\n var needsCompareFamilies = false;\n var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case FunctionComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n // We don't know the inner type yet.\n // We're going to assume that the lazy inner type is stable,\n // and so it is sufficient to avoid reconciling it away.\n // We're not going to unwrap or actually use the new lazy type.\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case ForwardRef:\n {\n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ($$typeofNextType === REACT_MEMO_TYPE) {\n // TODO: if it was but can no longer be simple,\n // we shouldn't set this.\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n default:\n return false;\n } // Check if both types have a family and it's the same one.\n\n\n if (needsCompareFamilies) {\n // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n // This means both of them need to be registered to preserve state.\n // If we unwrapped and compared the inner types for wrappers instead,\n // then we would risk falsely saying two separate memo(Foo)\n // calls are equivalent because they wrap the same Foo function.\n var prevFamily = resolveFamily(prevType);\n\n if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n\n return false;\n }\n }\n\n function markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n if (typeof WeakSet !== 'function') {\n return;\n }\n\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n\n failedBoundaries.add(fiber);\n }\n }\n\n var scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n var staleFamilies = update.staleFamilies,\n updatedFamilies = update.updatedFamilies;\n flushPassiveEffects();\n flushSync(function () {\n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n });\n }\n };\n\n var scheduleRoot = function (root, element) {\n {\n if (root.context !== emptyContextObject) {\n // Super edge case: root has a legacy _renderSubtree context\n // but we don't know the parentComponent so we can't pass it.\n // Just ignore. We'll delete this with _renderSubtree code path later.\n return;\n }\n\n flushPassiveEffects();\n syncUpdates(function () {\n updateContainer(element, root, null, null);\n });\n }\n };\n\n function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n {\n var alternate = fiber.alternate,\n child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n\n var needsRender = false;\n var needsRemount = false;\n\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\n\n if (family !== undefined) {\n if (staleFamilies.has(family)) {\n needsRemount = true;\n } else if (updatedFamilies.has(family)) {\n if (tag === ClassComponent) {\n needsRemount = true;\n } else {\n needsRender = true;\n }\n }\n }\n }\n\n if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n\n if (needsRemount || needsRender) {\n scheduleWork(fiber, Sync);\n }\n\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n }\n }\n }\n\n var findHostInstancesForRefresh = function (root, families) {\n {\n var hostInstances = new Set();\n var types = new Set(families.map(function (family) {\n return family.current;\n }));\n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n return hostInstances;\n }\n };\n\n function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n {\n var child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n var didMatch = false;\n\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\n }\n }\n\n if (didMatch) {\n // We have a match. This only drills down to the closest host components.\n // There's no need to search deeper because for the purpose of giving\n // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n findHostInstancesForFiberShallowly(fiber, hostInstances);\n } else {\n // If there's no match, maybe there will be one further down in the child tree.\n if (child !== null) {\n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n }\n }\n\n if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n }\n\n function findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n\n var node = fiber;\n\n while (true) {\n switch (node.tag) {\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n\n node = node.return;\n }\n }\n }\n\n function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\n\n while (true) {\n if (node.tag === HostComponent) {\n // We got a match.\n foundHostInstances = true;\n hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === fiber) {\n return foundHostInstances;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n return false;\n }\n\n function resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = _assign({}, baseProps);\n\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n }\n\n function readLazyComponentType(lazyComponent) {\n initializeLazyComponentType(lazyComponent);\n\n if (lazyComponent._status !== Resolved) {\n throw lazyComponent._result;\n }\n\n return lazyComponent._result;\n }\n\n var valueCursor = createCursor(null);\n var rendererSigil;\n {\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n }\n var currentlyRenderingFiber = null;\n var lastContextDependency = null;\n var lastContextWithAllBitsObserved = null;\n var isDisallowedContextReadInDEV = false;\n\n function resetContextDependencies() {\n // This is called right before React yields execution, to ensure `readContext`\n // cannot be called outside the render phase.\n currentlyRenderingFiber = null;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n {\n isDisallowedContextReadInDEV = false;\n }\n }\n\n function enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n }\n\n function exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n }\n\n function pushProvider(providerFiber, nextValue) {\n var context = providerFiber.type._context;\n {\n push(valueCursor, context._currentValue, providerFiber);\n context._currentValue = nextValue;\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n }\n\n function popProvider(providerFiber) {\n var currentValue = valueCursor.current;\n pop(valueCursor, providerFiber);\n var context = providerFiber.type._context;\n {\n context._currentValue = currentValue;\n }\n }\n\n function calculateChangedBits(context, newValue, oldValue) {\n if (objectIs(oldValue, newValue)) {\n // No change\n return 0;\n } else {\n var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n {\n if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {\n error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);\n }\n }\n return changedBits | 0;\n }\n }\n\n function scheduleWorkOnParentPath(parent, renderExpirationTime) {\n // Update the child expiration time of all the ancestors, including\n // the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (node.childExpirationTime < renderExpirationTime) {\n node.childExpirationTime = renderExpirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {\n alternate.childExpirationTime = renderExpirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {\n alternate.childExpirationTime = renderExpirationTime;\n } else {\n // Neither alternate was updated, which means the rest of the\n // ancestor path already has sufficient priority.\n break;\n }\n\n node = node.return;\n }\n }\n\n function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {\n var fiber = workInProgress.child;\n\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {\n // Match! Schedule an update on this fiber.\n if (fiber.tag === ClassComponent) {\n // Schedule a force update on the work-in-progress.\n var update = createUpdate(renderExpirationTime, null);\n update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n // update to the current fiber, too, which means it will persist even if\n // this render is thrown away. Since it's a race condition, not sure it's\n // worth fixing.\n\n enqueueUpdate(fiber, update);\n }\n\n if (fiber.expirationTime < renderExpirationTime) {\n fiber.expirationTime = renderExpirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < renderExpirationTime) {\n alternate.expirationTime = renderExpirationTime;\n }\n\n scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too.\n\n if (list.expirationTime < renderExpirationTime) {\n list.expirationTime = renderExpirationTime;\n } // Since we already found a match, we can stop traversing the\n // dependency list.\n\n\n break;\n }\n\n dependency = dependency.next;\n }\n } else if (fiber.tag === ContextProvider) {\n // Don't scan deeper if this is a matching provider\n nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\n }\n\n if (nextFiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n nextFiber.return = fiber;\n } else {\n // No child. Traverse to next sibling.\n nextFiber = fiber;\n\n while (nextFiber !== null) {\n if (nextFiber === workInProgress) {\n // We're back to the root of this subtree. Exit.\n nextFiber = null;\n break;\n }\n\n var sibling = nextFiber.sibling;\n\n if (sibling !== null) {\n // Set the return pointer of the sibling to the work-in-progress fiber.\n sibling.return = nextFiber.return;\n nextFiber = sibling;\n break;\n } // No more siblings. Traverse up.\n\n\n nextFiber = nextFiber.return;\n }\n }\n\n fiber = nextFiber;\n }\n }\n\n function prepareToReadContext(workInProgress, renderExpirationTime) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (dependencies.expirationTime >= renderExpirationTime) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n\n dependencies.firstContext = null;\n }\n }\n }\n\n function readContext(context, observedBits) {\n {\n // This warning would fire if you read context inside a Hook like useMemo.\n // Unlike the class check below, it's not enforced in production for perf.\n if (isDisallowedContextReadInDEV) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n if (lastContextWithAllBitsObserved === context) ;else if (observedBits === false || observedBits === 0) ;else {\n var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.\n\n if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {\n // Observe all updates.\n lastContextWithAllBitsObserved = context;\n resolvedObservedBits = MAX_SIGNED_31_BIT_INT;\n } else {\n resolvedObservedBits = observedBits;\n }\n\n var contextItem = {\n context: context,\n observedBits: resolvedObservedBits,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (!(currentlyRenderingFiber !== null)) {\n {\n throw Error(\"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\");\n }\n } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n currentlyRenderingFiber.dependencies = {\n expirationTime: NoWork,\n firstContext: contextItem,\n responders: null\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n return context._currentValue;\n }\n\n var UpdateState = 0;\n var ReplaceState = 1;\n var ForceUpdate = 2;\n var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n // It should only be read right after calling `processUpdateQueue`, via\n // `checkHasForceUpdateAfterProcessing`.\n\n var hasForceUpdate = false;\n var didWarnUpdateInsideUpdate;\n var currentlyProcessingQueue;\n {\n didWarnUpdateInsideUpdate = false;\n currentlyProcessingQueue = null;\n }\n\n function initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n baseQueue: null,\n shared: {\n pending: null\n },\n effects: null\n };\n fiber.updateQueue = queue;\n }\n\n function cloneUpdateQueue(current, workInProgress) {\n // Clone the update queue from current. Unless it's already a clone.\n var queue = workInProgress.updateQueue;\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n baseQueue: currentQueue.baseQueue,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = clone;\n }\n }\n\n function createUpdate(expirationTime, suspenseConfig) {\n var update = {\n expirationTime: expirationTime,\n suspenseConfig: suspenseConfig,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n update.next = update;\n {\n update.priority = getCurrentPriorityLevel();\n }\n return update;\n }\n\n function enqueueUpdate(fiber, update) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update;\n {\n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n didWarnUpdateInsideUpdate = true;\n }\n }\n }\n\n function enqueueCapturedUpdate(workInProgress, update) {\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // Ensure the work-in-progress queue is a clone\n cloneUpdateQueue(current, workInProgress);\n } // Captured updates go only on the work-in-progress queue.\n\n\n var queue = workInProgress.updateQueue; // Append the update to the end of the list.\n\n var last = queue.baseQueue;\n\n if (last === null) {\n queue.baseQueue = update.next = update;\n update.next = update;\n } else {\n update.next = last.next;\n last.next = update;\n }\n }\n\n function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n\n if (workInProgress.mode & StrictMode) {\n payload.call(instance, prevState, nextProps);\n }\n }\n var nextState = payload.call(instance, prevState, nextProps);\n {\n exitDisallowedContextReadInDEV();\n }\n return nextState;\n } // State object\n\n\n return payload;\n }\n\n case CaptureUpdate:\n {\n workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n\n if (workInProgress.mode & StrictMode) {\n _payload.call(instance, prevState, nextProps);\n }\n }\n partialState = _payload.call(instance, prevState, nextProps);\n {\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\n }\n\n if (partialState === null || partialState === undefined) {\n // Null and undefined are treated as no-ops.\n return prevState;\n } // Merge the partial state and the previous state.\n\n\n return _assign({}, prevState, partialState);\n }\n\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n\n return prevState;\n }\n\n function processUpdateQueue(workInProgress, props, instance, renderExpirationTime) {\n // This is always non-null on a ClassComponent or HostRoot\n var queue = workInProgress.updateQueue;\n hasForceUpdate = false;\n {\n currentlyProcessingQueue = queue.shared;\n } // The last rebase update that is NOT part of the base state.\n\n var baseQueue = queue.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n baseQueue = pendingQueue;\n queue.shared.pending = null; // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (currentQueue !== null) {\n currentQueue.baseQueue = pendingQueue;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (baseQueue !== null) {\n var first = baseQueue.next; // Iterate through the list of updates to compute the result.\n\n var newState = queue.baseState;\n var newExpirationTime = NoWork;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n\n if (first !== null) {\n var update = first;\n\n do {\n var updateExpirationTime = update.expirationTime;\n\n if (updateExpirationTime < renderExpirationTime) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n expirationTime: update.expirationTime,\n suspenseConfig: update.suspenseConfig,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n\n\n if (updateExpirationTime > newExpirationTime) {\n newExpirationTime = updateExpirationTime;\n }\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n expirationTime: Sync,\n // This update is going to be committed so we never want uncommit it.\n suspenseConfig: update.suspenseConfig,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Mark the event time of this update as relevant to this render pass.\n // TODO: This should ideally use the true event time of this update rather than\n // its priority which is a derived and not reverseable value.\n // TODO: We should skip this update if it was already committed but currently\n // we have no way of detecting the difference between a committed and suspended\n // update here.\n\n\n markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null) {\n workInProgress.effectTag |= Callback;\n var effects = queue.effects;\n\n if (effects === null) {\n queue.effects = [update];\n } else {\n effects.push(update);\n }\n }\n }\n\n update = update.next;\n\n if (update === null || update === first) {\n pendingQueue = queue.shared.pending;\n\n if (pendingQueue === null) {\n break;\n } else {\n // An update was scheduled from inside a reducer. Add the new\n // pending updates to the end of the list and keep processing.\n update = baseQueue.next = pendingQueue.next;\n pendingQueue.next = first;\n queue.baseQueue = baseQueue = pendingQueue;\n queue.shared.pending = null;\n }\n }\n } while (true);\n }\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n }\n\n queue.baseState = newBaseState;\n queue.baseQueue = newBaseQueueLast; // Set the remaining expiration time to be whatever is remaining in the queue.\n // This should be fine because the only two other things that contribute to\n // expiration time are props and context. We're already in the middle of the\n // begin phase by the time we start processing the queue, so we've already\n // dealt with the props. Context in components that specify\n // shouldComponentUpdate is tricky; but we'll have to account for\n // that regardless.\n\n markUnprocessedUpdateTime(newExpirationTime);\n workInProgress.expirationTime = newExpirationTime;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n }\n\n function callCallback(callback, context) {\n if (!(typeof callback === 'function')) {\n {\n throw Error(\"Invalid argument passed as callback. Expected a function. Instead received: \" + callback);\n }\n }\n\n callback.call(context);\n }\n\n function resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n }\n\n function checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n }\n\n function commitUpdateQueue(finishedWork, finishedQueue, instance) {\n // Commit the effects\n var effects = finishedQueue.effects;\n finishedQueue.effects = null;\n\n if (effects !== null) {\n for (var i = 0; i < effects.length; i++) {\n var effect = effects[i];\n var callback = effect.callback;\n\n if (callback !== null) {\n effect.callback = null;\n callCallback(callback, instance);\n }\n }\n }\n }\n\n var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;\n\n function requestCurrentSuspenseConfig() {\n return ReactCurrentBatchConfig.suspense;\n }\n\n var fakeInternalInstance = {};\n var isArray = Array.isArray; // React.Component uses a shared frozen object by default.\n // We'll use it to determine whether we need to initialize legacy refs.\n\n var emptyRefsObject = new React.Component().refs;\n var didWarnAboutStateAssignmentForComponent;\n var didWarnAboutUninitializedState;\n var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\n var didWarnAboutLegacyLifecyclesAndDerivedState;\n var didWarnAboutUndefinedDerivedState;\n var warnOnUndefinedDerivedState;\n var warnOnInvalidCallback;\n var didWarnAboutDirectlyAssigningPropsToState;\n var didWarnAboutContextTypeAndContextTypes;\n var didWarnAboutInvalidateContextType;\n {\n didWarnAboutStateAssignmentForComponent = new Set();\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n var didWarnOnInvalidCallback = new Set();\n\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + \"_\" + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n };\n\n warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentName(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }; // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n\n\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n {\n {\n throw Error(\"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).\");\n }\n }\n }\n });\n Object.freeze(fakeInternalInstance);\n }\n\n function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n {\n if (workInProgress.mode & StrictMode) {\n // Invoke the function an extra time to help detect side-effects.\n getDerivedStateFromProps(nextProps, prevState);\n }\n }\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);\n workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n // base state.\n\n if (workInProgress.expirationTime === NoWork) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n }\n\n var classComponentUpdater = {\n isMounted: isMounted,\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var currentTime = requestCurrentTimeForUpdate();\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);\n var update = createUpdate(expirationTime, suspenseConfig);\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'setState');\n }\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleWork(fiber, expirationTime);\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var currentTime = requestCurrentTimeForUpdate();\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);\n var update = createUpdate(expirationTime, suspenseConfig);\n update.tag = ReplaceState;\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'replaceState');\n }\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleWork(fiber, expirationTime);\n },\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var currentTime = requestCurrentTimeForUpdate();\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);\n var update = createUpdate(expirationTime, suspenseConfig);\n update.tag = ForceUpdate;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'forceUpdate');\n }\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleWork(fiber, expirationTime);\n }\n };\n\n function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n\n if (typeof instance.shouldComponentUpdate === 'function') {\n {\n if (workInProgress.mode & StrictMode) {\n // Invoke the function an extra time to help detect side-effects.\n instance.shouldComponentUpdate(newProps, newState, nextContext);\n }\n }\n startPhaseTimer(workInProgress, 'shouldComponentUpdate');\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n stopPhaseTimer();\n {\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');\n }\n }\n return shouldUpdate;\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n }\n\n function checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n {\n var name = getComponentName(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var _state = instance.state;\n\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n }\n\n function adoptClassInstance(workInProgress, instance) {\n instance.updater = classComponentUpdater;\n workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n set(instance, workInProgress);\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n }\n\n function constructClassInstance(workInProgress, ctor, props) {\n var isLegacyContextConsumer = false;\n var unmaskedContext = emptyContextObject;\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n var contextTypes = ctor.contextTypes;\n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n } // Instantiate twice to help detect side-effects.\n\n\n {\n if (workInProgress.mode & StrictMode) {\n new ctor(props, context); // eslint-disable-line no-new\n }\n }\n var instance = new ctor(props, context);\n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n adoptClassInstance(workInProgress, instance);\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentName(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://fb.me/react-unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n if (isLegacyContextConsumer) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n }\n\n function callComponentWillMount(workInProgress, instance) {\n startPhaseTimer(workInProgress, 'componentWillMount');\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n stopPhaseTimer();\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');\n }\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n }\n\n function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n startPhaseTimer(workInProgress, 'componentWillReceiveProps');\n\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n\n stopPhaseTimer();\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentName(workInProgress.type) || 'Component';\n\n if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n didWarnAboutStateAssignmentForComponent.add(componentName);\n error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n }\n }\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n } // Invokes the mount life-cycles on a previously never rendered instance.\n\n\n function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = emptyRefsObject;\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n {\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n }\n processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n instance.state = workInProgress.memoizedState;\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n }\n }\n\n function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {\n var instance = workInProgress.stateNode;\n var oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n startPhaseTimer(workInProgress, 'componentWillMount');\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n stopPhaseTimer();\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n } // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\n function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var oldProps = workInProgress.memoizedProps;\n instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Snapshot;\n }\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n startPhaseTimer(workInProgress, 'componentWillUpdate');\n\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n\n stopPhaseTimer();\n }\n\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.effectTag |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.effectTag |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Snapshot;\n }\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n }\n\n var didWarnAboutMaps;\n var didWarnAboutGenerators;\n var didWarnAboutStringRefs;\n var ownerHasKeyUseWarning;\n var ownerHasFunctionTypeWarning;\n\n var warnForMissingKey = function (child) {};\n\n {\n didWarnAboutMaps = false;\n didWarnAboutGenerators = false;\n didWarnAboutStringRefs = {};\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n ownerHasKeyUseWarning = {};\n ownerHasFunctionTypeWarning = {};\n\n warnForMissingKey = function (child) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n\n if (!(typeof child._store === 'object')) {\n {\n throw Error(\"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n child._store.validated = true;\n var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '\"key\" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true;\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://fb.me/react-warning-keys for ' + 'more information.');\n };\n }\n var isArray$1 = Array.isArray;\n\n function coerceRef(returnFiber, current, element) {\n var mixedRef = element.ref;\n\n if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n {\n // TODO: Clean this up once we turn on the string ref warning for\n // everyone, because the strict mode case will no longer be relevant\n if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs\n // because these cannot be automatically converted to an arrow function\n // using a codemod. Therefore, we don't have to warn about string refs again.\n !(element._owner && element._self && element._owner.stateNode !== element._self)) {\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n {\n error('A string ref, \"%s\", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref%s', mixedRef, getStackByFiberInDevAndProd(returnFiber));\n }\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n\n if (element._owner) {\n var owner = element._owner;\n var inst;\n\n if (owner) {\n var ownerFiber = owner;\n\n if (!(ownerFiber.tag === ClassComponent)) {\n {\n throw Error(\"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref\");\n }\n }\n\n inst = ownerFiber.stateNode;\n }\n\n if (!inst) {\n {\n throw Error(\"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n return current.ref;\n }\n\n var ref = function (value) {\n var refs = inst.refs;\n\n if (refs === emptyRefsObject) {\n // This is a lazy pooled frozen object, so we need to initialize.\n refs = inst.refs = {};\n }\n\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n\n ref._stringRef = stringRef;\n return ref;\n } else {\n if (!(typeof mixedRef === 'string')) {\n {\n throw Error(\"Expected ref to be a function, a string, an object returned by React.createRef(), or null.\");\n }\n }\n\n if (!element._owner) {\n {\n throw Error(\"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of the following reasons:\\n1. You may be adding a ref to a function component\\n2. You may be adding a ref to a component that was not created inside a component's render method\\n3. You have multiple copies of React loaded\\nSee https://fb.me/react-refs-must-have-owner for more information.\");\n }\n }\n }\n }\n\n return mixedRef;\n }\n\n function throwOnInvalidObjectType(returnFiber, newChild) {\n if (returnFiber.type !== 'textarea') {\n var addendum = '';\n {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();\n }\n {\n {\n throw Error(\"Objects are not valid as a React child (found: \" + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + \").\" + addendum);\n }\n }\n }\n }\n\n function warnOnFunctionType() {\n {\n var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();\n\n if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;\n error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n }\n } // This wrapper function exists because I expect to clone the code in each path\n // to be able to optimize each path individually by branching early. This needs\n // a compiler or we can do it manually. Helpers that don't need this branching\n // live outside of this function.\n\n\n function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n {\n {\n throw Error((Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }\n\n var reconcileChildFibers = ChildReconciler(true);\n var mountChildFibers = ChildReconciler(false);\n\n function cloneChildFibers(current, workInProgress) {\n if (!(current === null || workInProgress.child === current.child)) {\n {\n throw Error(\"Resuming work not yet implemented.\");\n }\n }\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n\n newChild.sibling = null;\n } // Reset a workInProgress child set to prepare it for a second pass.\n\n\n function resetChildFibers(workInProgress, renderExpirationTime) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, renderExpirationTime);\n child = child.sibling;\n }\n }\n\n var NO_CONTEXT = {};\n var contextStackCursor$1 = createCursor(NO_CONTEXT);\n var contextFiberStackCursor = createCursor(NO_CONTEXT);\n var rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\n function requiredContext(c) {\n if (!(c !== NO_CONTEXT)) {\n {\n throw Error(\"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n return c;\n }\n\n function getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n }\n\n function pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n // However, we can't just call getRootHostContext() and push it because\n // we'd have a different number of entries on the stack depending on\n // whether getRootHostContext() throws somewhere in renderer code or not.\n // So we push an empty value first. This lets us safely unwind on errors.\n\n push(contextStackCursor$1, NO_CONTEXT, fiber);\n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n pop(contextStackCursor$1, fiber);\n push(contextStackCursor$1, nextRootContext, fiber);\n }\n\n function popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n }\n\n function getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\n }\n\n function pushHostContext(fiber) {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n var context = requiredContext(contextStackCursor$1.current);\n var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n if (context === nextContext) {\n return;\n } // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\n }\n\n function popHostContext(fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n if (contextFiberStackCursor.current !== fiber) {\n return;\n }\n\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n }\n\n var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is\n // inherited deeply down the subtree. The upper bits only affect\n // this immediate suspense boundary and gets reset each new\n // boundary or suspense list.\n\n var SubtreeSuspenseContextMask = 1; // Subtree Flags:\n // InvisibleParentSuspenseContext indicates that one of our parent Suspense\n // boundaries is not currently showing visible main content.\n // Either because it is already showing a fallback or is not mounted at all.\n // We can use this to determine if it is desirable to trigger a fallback at\n // the parent. If not, then we might need to trigger undesirable boundaries\n // and/or suspend the commit to avoid hiding the parent content.\n\n var InvisibleParentSuspenseContext = 1; // Shallow Flags:\n // ForceSuspenseFallback can be used by SuspenseList to force newly added\n // items into their fallback state during one of the render passes.\n\n var ForceSuspenseFallback = 2;\n var suspenseStackCursor = createCursor(DefaultSuspenseContext);\n\n function hasSuspenseContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n }\n\n function setDefaultShallowSuspenseContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n }\n\n function setShallowSuspenseContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n }\n\n function addSubtreeSuspenseContext(parentContext, subtreeContext) {\n return parentContext | subtreeContext;\n }\n\n function pushSuspenseContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n }\n\n function popSuspenseContext(fiber) {\n pop(suspenseStackCursor, fiber);\n }\n\n function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {\n // If it was the primary children that just suspended, capture and render the\n // fallback. Otherwise, don't capture and bubble to the next boundary.\n var nextState = workInProgress.memoizedState;\n\n if (nextState !== null) {\n if (nextState.dehydrated !== null) {\n // A dehydrated boundary always captures.\n return true;\n }\n\n return false;\n }\n\n var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.\n\n if (props.fallback === undefined) {\n return false;\n } // Regular boundaries always capture.\n\n\n if (props.unstable_avoidThisFallback !== true) {\n return true;\n } // If it's a boundary we should avoid, then we prefer to bubble up to the\n // parent boundary if it is currently invisible.\n\n\n if (hasInvisibleParent) {\n return false;\n } // If the parent is not able to handle it, we must handle it.\n\n\n return true;\n }\n\n function findFirstSuspended(row) {\n var node = row;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n var dehydrated = state.dehydrated;\n\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n // keep track of whether it suspended or not.\n node.memoizedProps.revealOrder !== undefined) {\n var didSuspend = (node.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspend) {\n return node;\n }\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === row) {\n return null;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n\n return null;\n }\n\n function createDeprecatedResponderListener(responder, props) {\n var eventResponderListener = {\n responder: responder,\n props: props\n };\n {\n Object.freeze(eventResponderListener);\n }\n return eventResponderListener;\n }\n\n var HasEffect =\n /* */\n 1; // Represents the phase in which the effect (not the clean-up) fires.\n\n var Layout =\n /* */\n 2;\n var Passive$1 =\n /* */\n 4;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\n var didWarnAboutMismatchedHooksForComponent;\n {\n didWarnAboutMismatchedHooksForComponent = new Set();\n } // These are set right before calling the component.\n\n var renderExpirationTime = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from\n // the work-in-progress hook.\n\n var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n // current hook list is the list that belongs to the current fiber. The\n // work-in-progress hook list is a new list that will be added to the\n // work-in-progress fiber.\n\n var currentHook = null;\n var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n // does not get reset if we do another render pass; only when we're completely\n // finished evaluating this component. This is an optimization so we know\n // whether we need to clear render phase updates after a throw.\n\n var didScheduleRenderPhaseUpdate = false;\n var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\n var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n // The list stores the order of hooks used during the initial render (mount).\n // Subsequent renders (updates) reference this list.\n\n var hookTypesDev = null;\n var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n // the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n // When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\n var ignorePreviousDependencies = false;\n\n function mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n }\n\n function updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n }\n\n function checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !Array.isArray(deps)) {\n // Verify deps, but only on mount to avoid extra checks.\n // It's unlikely their type would change as usually you define them inline.\n error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n }\n }\n }\n\n function warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentName(currentlyRenderingFiber$1.type);\n\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\n\n for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n var oldHookName = hookTypesDev[i];\n var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n // lol @ IE not supporting String#repeat\n\n while (row.length < secondColumnStart) {\n row += ' ';\n }\n\n row += newHookName + '\\n';\n table += row;\n }\n\n error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\\n\\n' + ' Previous render Next render\\n' + ' ------------------------------------------------------\\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n }\n }\n }\n }\n\n function throwInvalidHookError() {\n {\n {\n throw Error(\"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.\");\n }\n }\n }\n\n function areHookInputsEqual(nextDeps, prevDeps) {\n {\n if (ignorePreviousDependencies) {\n // Only true when this component is being hot reloaded.\n return false;\n }\n }\n\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n }\n }\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n }\n\n function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderExpirationTime) {\n renderExpirationTime = nextRenderExpirationTime;\n currentlyRenderingFiber$1 = workInProgress;\n {\n hookTypesDev = current !== null ? current._debugHookTypes : null;\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.expirationTime = NoWork; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // TODO Warn if no hooks are used at all during mount, then some are used during update.\n // Currently we will identify the update render as a mount because memoizedState === null.\n // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n // so memoizedState would be null during updates and mounts.\n\n {\n if (current !== null && current.memoizedState !== null) {\n ReactCurrentDispatcher.current = HooksDispatcherOnUpdateInDEV;\n } else if (hookTypesDev !== null) {\n // This dispatcher handles an edge case where a component is updating,\n // but no stateful hooks have been used.\n // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n // This dispatcher does that.\n ReactCurrentDispatcher.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher.current = HooksDispatcherOnMountInDEV;\n }\n }\n var children = Component(props, secondArg); // Check if there was a render phase update\n\n if (workInProgress.expirationTime === renderExpirationTime) {\n // Keep rendering in a loop for as long as render phase updates continue to\n // be scheduled. Use a counter to prevent infinite loops.\n var numberOfReRenders = 0;\n\n do {\n workInProgress.expirationTime = NoWork;\n\n if (!(numberOfReRenders < RE_RENDER_LIMIT)) {\n {\n throw Error(\"Too many re-renders. React limits the number of renders to prevent an infinite loop.\");\n }\n }\n\n numberOfReRenders += 1;\n {\n // Even when hot reloading, allow dependencies to stabilize\n // after first render to prevent infinite render phase updates.\n ignorePreviousDependencies = false;\n } // Start over from the beginning of the list\n\n currentHook = null;\n workInProgressHook = null;\n workInProgress.updateQueue = null;\n {\n // Also validate hook order for cascading updates.\n hookTypesUpdateIndexDev = -1;\n }\n ReactCurrentDispatcher.current = HooksDispatcherOnRerenderInDEV;\n children = Component(props, secondArg);\n } while (workInProgress.expirationTime === renderExpirationTime);\n } // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n\n\n ReactCurrentDispatcher.current = ContextOnlyDispatcher;\n {\n workInProgress._debugHookTypes = hookTypesDev;\n } // This check uses currentHook so that it works the same in DEV and prod bundles.\n // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n renderExpirationTime = NoWork;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n }\n didScheduleRenderPhaseUpdate = false;\n\n if (!!didRenderTooFewHooks) {\n {\n throw Error(\"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\");\n }\n }\n\n return children;\n }\n\n function bailoutHooks(current, workInProgress, expirationTime) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.effectTag &= ~(Passive | Update);\n\n if (current.expirationTime <= expirationTime) {\n current.expirationTime = NoWork;\n }\n }\n\n function resetHooksAfterThrow() {\n // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n ReactCurrentDispatcher.current = ContextOnlyDispatcher;\n\n if (didScheduleRenderPhaseUpdate) {\n // There were render phase updates. These are only valid for this render\n // phase, which we are now aborting. Remove the updates from the queues so\n // they do not persist to the next render. Do not remove updates from hooks\n // that weren't processed.\n //\n // Only reset the updates from the queue if it has a clone. If it does\n // not have a clone, that means it wasn't processed, and the updates were\n // scheduled before we entered the render phase.\n var hook = currentlyRenderingFiber$1.memoizedState;\n\n while (hook !== null) {\n var queue = hook.queue;\n\n if (queue !== null) {\n queue.pending = null;\n }\n\n hook = hook.next;\n }\n }\n\n renderExpirationTime = NoWork;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n }\n didScheduleRenderPhaseUpdate = false;\n }\n\n function mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n } else {\n // Append to the end of the list\n workInProgressHook = workInProgressHook.next = hook;\n }\n\n return workInProgressHook;\n }\n\n function updateWorkInProgressHook() {\n // This function is used both for updates and for re-renders triggered by a\n // render phase update. It assumes there is either a current hook we can\n // clone, or a work-in-progress hook from a previous render pass that we can\n // use as a base. When we reach the end of the base list, we must switch to\n // the dispatcher used for mounts.\n var nextCurrentHook;\n\n if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n\n var nextWorkInProgressHook;\n\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\n }\n\n if (nextWorkInProgressHook !== null) {\n // There's already a work-in-progress. Reuse it.\n workInProgressHook = nextWorkInProgressHook;\n nextWorkInProgressHook = workInProgressHook.next;\n currentHook = nextCurrentHook;\n } else {\n // Clone from the current hook.\n if (!(nextCurrentHook !== null)) {\n {\n throw Error(\"Rendered more hooks than during the previous render.\");\n }\n }\n\n currentHook = nextCurrentHook;\n var newHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list.\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n } else {\n // Append to the end of the list.\n workInProgressHook = workInProgressHook.next = newHook;\n }\n }\n\n return workInProgressHook;\n }\n\n function createFunctionComponentUpdateQueue() {\n return {\n lastEffect: null\n };\n }\n\n function basicStateReducer(state, action) {\n // $FlowFixMe: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n }\n\n function mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n\n if (init !== undefined) {\n initialState = init(initialArg);\n } else {\n initialState = initialArg;\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n }\n\n function updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error(\"Should have a queue. This is likely a bug in React. Please file an issue.\");\n }\n }\n\n queue.lastRenderedReducer = reducer;\n var current = currentHook; // The last rebase update that is NOT part of the base state.\n\n var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n\n if (baseQueue !== null) {\n // We have a queue to process.\n var first = baseQueue.next;\n var newState = current.baseState;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n var update = first;\n\n do {\n var updateExpirationTime = update.expirationTime;\n\n if (updateExpirationTime < renderExpirationTime) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n expirationTime: update.expirationTime,\n suspenseConfig: update.suspenseConfig,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n\n\n if (updateExpirationTime > currentlyRenderingFiber$1.expirationTime) {\n currentlyRenderingFiber$1.expirationTime = updateExpirationTime;\n markUnprocessedUpdateTime(updateExpirationTime);\n }\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n expirationTime: Sync,\n // This update is going to be committed so we never want uncommit it.\n suspenseConfig: update.suspenseConfig,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Mark the event time of this update as relevant to this render pass.\n // TODO: This should ideally use the true event time of this update rather than\n // its priority which is a derived and not reverseable value.\n // TODO: We should skip this update if it was already committed but currently\n // we have no way of detecting the difference between a committed and suspended\n // update here.\n\n\n markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.\n\n if (update.eagerReducer === reducer) {\n // If this update was processed eagerly, and its reducer matches the\n // current reducer, we can use the eagerly computed state.\n newState = update.eagerState;\n } else {\n var action = update.action;\n newState = reducer(newState, action);\n }\n }\n\n update = update.next;\n } while (update !== null && update !== first);\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n } // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n }\n\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n }\n\n function rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error(\"Should have a queue. This is likely a bug in React. Please file an issue.\");\n }\n }\n\n queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n // work-in-progress hook.\n\n var dispatch = queue.dispatch;\n var lastRenderPhaseUpdate = queue.pending;\n var newState = hook.memoizedState;\n\n if (lastRenderPhaseUpdate !== null) {\n // The queue doesn't persist past this render pass.\n queue.pending = null;\n var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n newState = reducer(newState, action);\n update = update.next;\n } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n // the base state unless the queue is empty.\n // TODO: Not sure if this is the desired semantics, but it's what we\n // do for gDSFP. I can't remember why.\n\n if (hook.baseQueue === null) {\n hook.baseState = newState;\n }\n\n queue.lastRenderedState = newState;\n }\n\n return [newState, dispatch];\n }\n\n function mountState(initialState) {\n var hook = mountWorkInProgressHook();\n\n if (typeof initialState === 'function') {\n // $FlowFixMe: Flow doesn't like mixed types\n initialState = initialState();\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n }\n\n function updateState(initialState) {\n return updateReducer(basicStateReducer);\n }\n\n function rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\n }\n\n function pushEffect(tag, create, destroy, deps) {\n var effect = {\n tag: tag,\n create: create,\n destroy: destroy,\n deps: deps,\n // Circular\n next: null\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var lastEffect = componentUpdateQueue.lastEffect;\n\n if (lastEffect === null) {\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var firstEffect = lastEffect.next;\n lastEffect.next = effect;\n effect.next = firstEffect;\n componentUpdateQueue.lastEffect = effect;\n }\n }\n\n return effect;\n }\n\n function mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n var ref = {\n current: initialValue\n };\n {\n Object.seal(ref);\n }\n hook.memoizedState = ref;\n return ref;\n }\n\n function updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n }\n\n function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.effectTag |= fiberEffectTag;\n hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, undefined, nextDeps);\n }\n\n function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var destroy = undefined;\n\n if (currentHook !== null) {\n var prevEffect = currentHook.memoizedState;\n destroy = prevEffect.destroy;\n\n if (nextDeps !== null) {\n var prevDeps = prevEffect.deps;\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n pushEffect(hookEffectTag, create, destroy, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.effectTag |= fiberEffectTag;\n hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, destroy, nextDeps);\n }\n\n function mountEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n return mountEffectImpl(Update | Passive, Passive$1, create, deps);\n }\n\n function updateEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n return updateEffectImpl(Update | Passive, Passive$1, create, deps);\n }\n\n function mountLayoutEffect(create, deps) {\n return mountEffectImpl(Update, Layout, create, deps);\n }\n\n function updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n }\n\n function imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n\n var _inst = create();\n\n refCallback(_inst);\n return function () {\n refCallback(null);\n };\n } else if (ref !== null && ref !== undefined) {\n var refObject = ref;\n {\n if (!refObject.hasOwnProperty('current')) {\n error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n }\n }\n\n var _inst2 = create();\n\n refObject.current = _inst2;\n return function () {\n refObject.current = null;\n };\n }\n }\n\n function mountImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n }\n\n function updateImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n }\n\n function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n // The react-debug-hooks package injects its own implementation\n // so that e.g. DevTools can display custom hook values.\n }\n\n var updateDebugValue = mountDebugValue;\n\n function mountCallback(callback, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n hook.memoizedState = [callback, nextDeps];\n return callback;\n }\n\n function updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n hook.memoizedState = [callback, nextDeps];\n return callback;\n }\n\n function mountMemo(nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n }\n\n function updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n // Assume these are defined. If they're not, areHookInputsEqual will warn.\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n }\n\n function mountDeferredValue(value, config) {\n var _mountState = mountState(value),\n prevValue = _mountState[0],\n setValue = _mountState[1];\n\n mountEffect(function () {\n var previousConfig = ReactCurrentBatchConfig$1.suspense;\n ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.suspense = previousConfig;\n }\n }, [value, config]);\n return prevValue;\n }\n\n function updateDeferredValue(value, config) {\n var _updateState = updateState(),\n prevValue = _updateState[0],\n setValue = _updateState[1];\n\n updateEffect(function () {\n var previousConfig = ReactCurrentBatchConfig$1.suspense;\n ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.suspense = previousConfig;\n }\n }, [value, config]);\n return prevValue;\n }\n\n function rerenderDeferredValue(value, config) {\n var _rerenderState = rerenderState(),\n prevValue = _rerenderState[0],\n setValue = _rerenderState[1];\n\n updateEffect(function () {\n var previousConfig = ReactCurrentBatchConfig$1.suspense;\n ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.suspense = previousConfig;\n }\n }, [value, config]);\n return prevValue;\n }\n\n function startTransition(setPending, config, callback) {\n var priorityLevel = getCurrentPriorityLevel();\n runWithPriority$1(priorityLevel < UserBlockingPriority$1 ? UserBlockingPriority$1 : priorityLevel, function () {\n setPending(true);\n });\n runWithPriority$1(priorityLevel > NormalPriority ? NormalPriority : priorityLevel, function () {\n var previousConfig = ReactCurrentBatchConfig$1.suspense;\n ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;\n\n try {\n setPending(false);\n callback();\n } finally {\n ReactCurrentBatchConfig$1.suspense = previousConfig;\n }\n });\n }\n\n function mountTransition(config) {\n var _mountState2 = mountState(false),\n isPending = _mountState2[0],\n setPending = _mountState2[1];\n\n var start = mountCallback(startTransition.bind(null, setPending, config), [setPending, config]);\n return [start, isPending];\n }\n\n function updateTransition(config) {\n var _updateState2 = updateState(),\n isPending = _updateState2[0],\n setPending = _updateState2[1];\n\n var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);\n return [start, isPending];\n }\n\n function rerenderTransition(config) {\n var _rerenderState2 = rerenderState(),\n isPending = _rerenderState2[0],\n setPending = _rerenderState2[1];\n\n var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);\n return [start, isPending];\n }\n\n function dispatchAction(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n var currentTime = requestCurrentTimeForUpdate();\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);\n var update = {\n expirationTime: expirationTime,\n suspenseConfig: suspenseConfig,\n action: action,\n eagerReducer: null,\n eagerState: null,\n next: null\n };\n {\n update.priority = getCurrentPriorityLevel();\n } // Append the update to the end of the list.\n\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n var alternate = fiber.alternate;\n\n if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdate = true;\n update.expirationTime = renderExpirationTime;\n currentlyRenderingFiber$1.expirationTime = renderExpirationTime;\n } else {\n if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {\n // The queue is currently empty, which means we can eagerly compute the\n // next state before entering the render phase. If the new state is the\n // same as the current state, we may be able to bail out entirely.\n var lastRenderedReducer = queue.lastRenderedReducer;\n\n if (lastRenderedReducer !== null) {\n var prevDispatcher;\n {\n prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n }\n\n try {\n var currentState = queue.lastRenderedState;\n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n // it, on the update object. If the reducer hasn't changed by the\n // time we enter the render phase, then the eager state can be used\n // without calling the reducer again.\n\n update.eagerReducer = lastRenderedReducer;\n update.eagerState = eagerState;\n\n if (objectIs(eagerState, currentState)) {\n // Fast path. We can bail out without scheduling React to re-render.\n // It's still possible that we'll need to rebase this update later,\n // if the component re-renders for a different reason and by that\n // time the reducer has changed.\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n }\n }\n }\n\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotScopedWithMatchingAct(fiber);\n warnIfNotCurrentlyActingUpdatesInDev(fiber);\n }\n }\n scheduleWork(fiber, expirationTime);\n }\n }\n\n var ContextOnlyDispatcher = {\n readContext: readContext,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useResponder: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError\n };\n var HooksDispatcherOnMountInDEV = null;\n var HooksDispatcherOnMountWithHookTypesInDEV = null;\n var HooksDispatcherOnUpdateInDEV = null;\n var HooksDispatcherOnRerenderInDEV = null;\n var InvalidNestedHooksDispatcherOnMountInDEV = null;\n var InvalidNestedHooksDispatcherOnUpdateInDEV = null;\n var InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n {\n var warnInvalidContextAccess = function () {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n };\n\n var warnInvalidHookAccess = function () {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n mountHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition(config);\n }\n };\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition(config);\n }\n };\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition(config);\n }\n };\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition(config);\n }\n };\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition(config);\n }\n };\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition(config);\n }\n };\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition(config);\n }\n };\n }\n var now$1 = Scheduler.unstable_now;\n var commitTime = 0;\n var profilerStartTime = -1;\n\n function getCommitTime() {\n return commitTime;\n }\n\n function recordCommitTime() {\n commitTime = now$1();\n }\n\n function startProfilerTimer(fiber) {\n profilerStartTime = now$1();\n\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now$1();\n }\n }\n\n function stopProfilerTimerIfRunning(fiber) {\n profilerStartTime = -1;\n }\n\n function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n if (profilerStartTime >= 0) {\n var elapsedTime = now$1() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n\n profilerStartTime = -1;\n }\n } // This may have been an insertion or a hydration.\n\n\n var hydrationParentFiber = null;\n var nextHydratableInstance = null;\n var isHydrating = false;\n\n function enterHydrationState(fiber) {\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChild(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n return true;\n }\n\n function deleteHydratableInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);\n break;\n\n case HostComponent:\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);\n break;\n }\n }\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,\n // these children are not part of the reconciliation list of children.\n // Even if we abort and rereconcile the children, that will try to hydrate\n // again and the nodes are still in the host tree so these will be\n // recreated.\n\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n }\n\n function insertNonHydratedInstance(returnFiber, fiber) {\n fiber.effectTag = fiber.effectTag & ~Hydrating | Placement;\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n\n switch (fiber.tag) {\n case HostComponent:\n var type = fiber.type;\n var props = fiber.pendingProps;\n didNotFindHydratableContainerInstance(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableContainerTextInstance(parentContainer, text);\n break;\n }\n\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n switch (fiber.tag) {\n case HostComponent:\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);\n break;\n\n case HostText:\n var _text = fiber.pendingProps;\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);\n break;\n\n case SuspenseComponent:\n didNotFindHydratableSuspenseInstance(parentType, parentProps);\n break;\n }\n\n break;\n }\n\n default:\n return;\n }\n }\n }\n\n function tryHydrate(fiber, nextInstance) {\n switch (fiber.tag) {\n case HostComponent:\n {\n var type = fiber.type;\n var props = fiber.pendingProps;\n var instance = canHydrateInstance(nextInstance, type);\n\n if (instance !== null) {\n fiber.stateNode = instance;\n return true;\n }\n\n return false;\n }\n\n case HostText:\n {\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text);\n\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n return true;\n }\n\n return false;\n }\n\n case SuspenseComponent:\n {\n return false;\n }\n\n default:\n return false;\n }\n }\n\n function tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrate(fiber, nextInstance)) {\n // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n\n if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);\n }\n\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(nextInstance);\n }\n\n function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n var instance = fiber.stateNode;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.\n\n fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update.\n\n if (updatePayload !== null) {\n return true;\n }\n\n return false;\n }\n\n function prepareToHydrateHostTextInstance(fiber) {\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n {\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);\n break;\n }\n }\n }\n }\n }\n return shouldUpdate;\n }\n\n function skipPastDehydratedSuspenseInstance(fiber) {\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n {\n throw Error(\"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n }\n\n function popToNextHostParent(fiber) {\n var parent = fiber.return;\n\n while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n parent = parent.return;\n }\n\n hydrationParentFiber = parent;\n }\n\n function popHydrationState(fiber) {\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n }\n\n var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.\n // We only do this deeper than head and body since they tend to have random\n // other nodes in them. We also ignore components with pure text content in\n // side of them.\n // TODO: Better heuristic.\n\n if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n\n popToNextHostParent(fiber);\n\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n\n return true;\n }\n\n function resetHydrationState() {\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n }\n\n var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\n var didReceiveUpdate = false;\n var didWarnAboutBadClass;\n var didWarnAboutModulePatternComponent;\n var didWarnAboutContextTypeOnFunctionComponent;\n var didWarnAboutGetDerivedStateOnFunctionComponent;\n var didWarnAboutFunctionRefs;\n var didWarnAboutReassigningProps;\n var didWarnAboutRevealOrder;\n var didWarnAboutTailOptions;\n {\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n }\n\n function reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);\n }\n }\n\n function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime) {\n // This function is fork of reconcileChildren. It's used in cases where we\n // want to reconcile without matching against the existing set. This has the\n // effect of all current children being unmounted; even if the type and key\n // are the same, the old child is unmounted and a new child is created.\n //\n // To do this, we're going to go through the reconcile algorithm twice. In\n // the first pass, we schedule a deletion for all the current children by\n // passing null.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderExpirationTime); // In the second pass, we mount the new children. The trick here is that we\n // pass null in place of where we usually pass the current child set. This has\n // the effect of remounting all children regardless of whether their\n // identities match.\n\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n }\n\n function updateForwardRef(current, workInProgress, Component, nextProps, renderExpirationTime) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens after the first render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component), getCurrentFiberStackInDev);\n }\n }\n }\n var render = Component.render;\n var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n var nextChildren;\n prepareToReadContext(workInProgress, renderExpirationTime);\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);\n\n if (workInProgress.mode & StrictMode) {\n // Only double-render components with Hooks\n if (workInProgress.memoizedState !== null) {\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderExpirationTime);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n function updateMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {\n if (current === null) {\n var type = Component.type;\n\n if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n Component.defaultProps === undefined) {\n var resolvedType = type;\n {\n resolvedType = resolveFunctionForHotReloading(type);\n } // If this is a plain function component without default props,\n // and with only the default shallow comparison, we upgrade it\n // to a SimpleMemoComponent to allow fast path updates.\n\n workInProgress.tag = SimpleMemoComponent;\n workInProgress.type = resolvedType;\n {\n validateFunctionComponentInDev(workInProgress, type);\n }\n return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateExpirationTime, renderExpirationTime);\n }\n\n {\n var innerPropTypes = type.propTypes;\n\n if (innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(type), getCurrentFiberStackInDev);\n }\n }\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n\n {\n var _type = Component.type;\n var _innerPropTypes = _type.propTypes;\n\n if (_innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(_type), getCurrentFiberStackInDev);\n }\n }\n var currentChild = current.child; // This is always exactly one child\n\n if (updateExpirationTime < renderExpirationTime) {\n // This will be the props with resolved defaultProps,\n // unlike current.memoizedProps which will be the unresolved ones.\n var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n var compare = Component.compare;\n compare = compare !== null ? compare : shallowEqual;\n\n if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n var newChild = createWorkInProgress(currentChild, nextProps);\n newChild.ref = workInProgress.ref;\n newChild.return = workInProgress;\n workInProgress.child = newChild;\n return newChild;\n }\n\n function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens when the inner render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var outerMemoType = workInProgress.elementType;\n\n if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n // We warn when you define propTypes on lazy()\n // so let's just skip over it to find memo() outer wrapper.\n // Inner props for memo are validated later.\n outerMemoType = refineResolvedLazyComponent(outerMemoType);\n }\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);\n } // Inner propTypes will be validated in the function component path.\n\n }\n }\n\n if (current !== null) {\n var prevProps = current.memoizedProps;\n\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type) {\n didReceiveUpdate = false;\n\n if (updateExpirationTime < renderExpirationTime) {\n // The pending update priority was cleared at the beginning of\n // beginWork. We're about to bail out, but there might be additional\n // updates at a lower priority. Usually, the priority level of the\n // remaining updates is accumlated during the evaluation of the\n // component (i.e. when processing the update queue). But since since\n // we're bailing out early *without* evaluating the component, we need\n // to account for it here, too. Reset to the value of the current fiber.\n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n // because a MemoComponent fiber does not have hooks or an update queue;\n // rather, it wraps around an inner component, which may or may not\n // contains hooks.\n // TODO: Move the reset at in beginWork out of the common path so that\n // this is no longer necessary.\n workInProgress.expirationTime = current.expirationTime;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime);\n }\n\n function updateFragment(current, workInProgress, renderExpirationTime) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n function updateMode(current, workInProgress, renderExpirationTime) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n function updateProfiler(current, workInProgress, renderExpirationTime) {\n {\n workInProgress.effectTag |= Update;\n }\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n function markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n\n if (current === null && ref !== null || current !== null && current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.effectTag |= Ref;\n }\n }\n\n function updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component), getCurrentFiberStackInDev);\n }\n }\n }\n var context;\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n var nextChildren;\n prepareToReadContext(workInProgress, renderExpirationTime);\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);\n\n if (workInProgress.mode & StrictMode) {\n // Only double-render components with Hooks\n if (workInProgress.memoizedState !== null) {\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderExpirationTime);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n function updateClassComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component), getCurrentFiberStackInDev);\n }\n }\n } // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderExpirationTime);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n if (current !== null) {\n // A class component without an instance only mounts if it suspended\n // inside a non-concurrent tree, in an inconsistent state. We want to\n // treat it like a new mount, even though an empty version of it already\n // committed. Disconnect the alternate pointers.\n current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.effectTag |= Placement;\n } // In the initial pass we might need to construct the instance.\n\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);\n shouldUpdate = true;\n } else if (current === null) {\n // In a resume, we'll already have an instance we can reuse.\n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderExpirationTime);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);\n {\n var inst = workInProgress.stateNode;\n\n if (inst.props !== nextProps) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n return nextUnitOfWork;\n }\n\n function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;\n\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$1.current = workInProgress;\n var nextChildren;\n\n if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n // If we captured an error, but getDerivedStateFromError is not defined,\n // unmount all the children. componentDidCatch will schedule an update to\n // re-render a fallback. This is temporary until we migrate everyone to\n // the new API.\n // TODO: Warn in a future release.\n nextChildren = null;\n {\n stopProfilerTimerIfRunning();\n }\n } else {\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if (workInProgress.mode & StrictMode) {\n instance.render();\n }\n\n setIsRendering(false);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n\n if (current !== null && didCaptureError) {\n // If we're recovering from an error, reconcile without reusing any of\n // the existing children. Conceptually, the normal children and the children\n // that are shown on error are two different sets, so we shouldn't reuse\n // normal children even if their identities match.\n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n\n\n workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, true);\n }\n\n return workInProgress.child;\n }\n\n function pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n\n pushHostContainer(workInProgress, root.containerInfo);\n }\n\n function updateHostRoot(current, workInProgress, renderExpirationTime) {\n pushHostRootContext(workInProgress);\n var updateQueue = workInProgress.updateQueue;\n\n if (!(current !== null && updateQueue !== null)) {\n {\n throw Error(\"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState !== null ? prevState.element : null;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderExpirationTime);\n var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n var nextChildren = nextState.element;\n\n if (nextChildren === prevChildren) {\n // If the state is the same as before, that's a bailout because we had\n // no work that expires at this time.\n resetHydrationState();\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n\n var root = workInProgress.stateNode;\n\n if (root.hydrate && enterHydrationState(workInProgress)) {\n // If we don't have any current children this might be the first pass.\n // We always try to hydrate. If this isn't a hydration pass there won't\n // be any children to hydrate which is effectively the same thing as\n // not hydrating.\n var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n workInProgress.child = child;\n var node = child;\n\n while (node) {\n // Mark each child as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n node.effectTag = node.effectTag & ~Placement | Hydrating;\n node = node.sibling;\n }\n } else {\n // Otherwise reset hydration state in case we aborted and resumed another\n // root.\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n resetHydrationState();\n }\n\n return workInProgress.child;\n }\n\n function updateHostComponent(current, workInProgress, renderExpirationTime) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n var type = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n var prevProps = current !== null ? current.memoizedProps : null;\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also has access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.effectTag |= ContentReset;\n }\n\n markRef(current, workInProgress); // Check the host config to see if the children are offscreen/hidden.\n\n if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(type, nextProps)) {\n {\n markSpawnedWork(Never);\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n workInProgress.expirationTime = workInProgress.childExpirationTime = Never;\n return null;\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n function updateHostText(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n } // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n\n\n return null;\n }\n\n function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {\n if (_current !== null) {\n // A lazy component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.effectTag |= Placement;\n }\n\n var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet.\n // Cancel and resume right after we know the tag.\n\n cancelWorkTimer(workInProgress);\n var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n startWorkTimer(workInProgress);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\n\n switch (resolvedTag) {\n case FunctionComponent:\n {\n {\n validateFunctionComponentInDev(workInProgress, Component);\n workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n }\n child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);\n return child;\n }\n\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);\n return child;\n }\n\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);\n return child;\n }\n\n case MemoComponent:\n {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = Component.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n 'prop', getComponentName(Component), getCurrentFiberStackInDev);\n }\n }\n }\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n updateExpirationTime, renderExpirationTime);\n return child;\n }\n }\n\n var hint = '';\n {\n if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n hint = ' Did you wrap a component in React.lazy() more than once?';\n }\n } // This message intentionally doesn't mention ForwardRef or MemoComponent\n // because the fact that it's a separate type of work is an\n // implementation detail.\n\n {\n {\n throw Error(\"Element type is invalid. Received a promise that resolves to: \" + Component + \". Lazy element type must resolve to a class or function.\" + hint);\n }\n }\n }\n\n function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {\n if (_current !== null) {\n // An incomplete component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.effectTag |= Placement;\n } // Promote the fiber to a class and try rendering again.\n\n\n workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderExpirationTime);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);\n }\n\n function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {\n if (_current !== null) {\n // An indeterminate component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.effectTag |= Placement;\n }\n\n var props = workInProgress.pendingProps;\n var context;\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n prepareToReadContext(workInProgress, renderExpirationTime);\n var value;\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n didWarnAboutBadClass[componentName] = true;\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$1.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n workInProgress.effectTag |= PerformedWork;\n\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n } // Proceed under the assumption that this is a class instance\n\n workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext = false;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);\n }\n\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderExpirationTime);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n {\n if (workInProgress.mode & StrictMode) {\n // Only double-render components with Hooks\n if (workInProgress.memoizedState !== null) {\n value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);\n }\n }\n }\n reconcileChildren(null, workInProgress, value, renderExpirationTime);\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n return workInProgress.child;\n }\n }\n\n function validateFunctionComponentInDev(workInProgress, Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = ownerName || workInProgress._debugID || '';\n var debugSource = workInProgress._debugSource;\n\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n }\n\n if (!didWarnAboutFunctionRefs[warningKey]) {\n didWarnAboutFunctionRefs[warningKey] = true;\n error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName2 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName2);\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName3 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support contextType.', _componentName3);\n didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;\n }\n }\n }\n }\n\n var SUSPENDED_MARKER = {\n dehydrated: null,\n retryTime: NoWork\n };\n\n function shouldRemainOnFallback(suspenseContext, current, workInProgress) {\n // If the context is telling us that we should show a fallback, and we're not\n // already showing content, then we should show the fallback instead.\n return hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && (current === null || current.memoizedState !== null);\n }\n\n function updateSuspenseComponent(current, workInProgress, renderExpirationTime) {\n var mode = workInProgress.mode;\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.effectTag |= DidCapture;\n }\n }\n var suspenseContext = suspenseStackCursor.current;\n var nextDidTimeout = false;\n var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n nextDidTimeout = true;\n workInProgress.effectTag &= ~DidCapture;\n } else {\n // Attempting the main content\n if (current === null || current.memoizedState !== null) {\n // This is a new mount or this boundary is already showing a fallback state.\n // Mark this subtree context as having at least one invisible parent that could\n // handle the fallback state.\n // Boundaries without fallbacks or should be avoided are not considered since\n // they cannot handle preferred fallback states.\n if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {\n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n }\n }\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n pushSuspenseContext(workInProgress, suspenseContext); // This next part is a bit confusing. If the children timeout, we switch to\n // showing the fallback children in place of the \"primary\" children.\n // However, we don't want to delete the primary children because then their\n // state will be lost (both the React state and the host state, e.g.\n // uncontrolled form inputs). Instead we keep them mounted and hide them.\n // Both the fallback children AND the primary children are rendered at the\n // same time. Once the primary children are un-suspended, we can delete\n // the fallback children — don't need to preserve their state.\n //\n // The two sets of children are siblings in the host environment, but\n // semantically, for purposes of reconciliation, they are two separate sets.\n // So we store them using two fragment fibers.\n //\n // However, we want to avoid allocating extra fibers for every placeholder.\n // They're only necessary when the children time out, because that's the\n // only time when both sets are mounted.\n //\n // So, the extra fragment fibers are only used if the children time out.\n // Otherwise, we render the primary children directly. This requires some\n // custom reconciliation logic to preserve the state of the primary\n // children. It's essentially a very basic form of re-parenting.\n\n if (current === null) {\n // If we're currently hydrating, try to hydrate this boundary.\n // But only if this has a fallback.\n if (nextProps.fallback !== undefined) {\n tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n } // This is the initial mount. This branch is pretty simple because there's\n // no previous state that needs to be preserved.\n\n\n if (nextDidTimeout) {\n // Mount separate fragments for primary and fallback children.\n var nextFallbackChildren = nextProps.fallback;\n var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);\n primaryChildFragment.return = workInProgress;\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, we commit the effects from the\n // partially completed, timed-out tree, too.\n var progressedState = workInProgress.memoizedState;\n var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;\n primaryChildFragment.child = progressedPrimaryChild;\n var progressedChild = progressedPrimaryChild;\n\n while (progressedChild !== null) {\n progressedChild.return = primaryChildFragment;\n progressedChild = progressedChild.sibling;\n }\n }\n\n var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n } else {\n // Mount the primary children without an intermediate fragment fiber.\n var nextPrimaryChildren = nextProps.children;\n workInProgress.memoizedState = null;\n return workInProgress.child = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);\n }\n } else {\n // This is an update. This branch is more complicated because we need to\n // ensure the state of the primary children is preserved.\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n // wrapped in a fragment fiber.\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n\n if (nextDidTimeout) {\n // Still timed out. Reuse the current primary children by cloning\n // its fragment. We're going to skip over these entirely.\n var _nextFallbackChildren2 = nextProps.fallback;\n\n var _primaryChildFragment2 = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps);\n\n _primaryChildFragment2.return = workInProgress;\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, we commit the effects from the\n // partially completed, timed-out tree, too.\n var _progressedState = workInProgress.memoizedState;\n\n var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;\n\n if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {\n _primaryChildFragment2.child = _progressedPrimaryChild;\n var _progressedChild2 = _progressedPrimaryChild;\n\n while (_progressedChild2 !== null) {\n _progressedChild2.return = _primaryChildFragment2;\n _progressedChild2 = _progressedChild2.sibling;\n }\n }\n } // Because primaryChildFragment is a new fiber that we're inserting as the\n // parent of a new tree, we need to set its treeBaseDuration.\n\n\n if (workInProgress.mode & ProfileMode) {\n // treeBaseDuration is the sum of all the child tree base durations.\n var _treeBaseDuration = 0;\n var _hiddenChild = _primaryChildFragment2.child;\n\n while (_hiddenChild !== null) {\n _treeBaseDuration += _hiddenChild.treeBaseDuration;\n _hiddenChild = _hiddenChild.sibling;\n }\n\n _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;\n } // Clone the fallback child fragment, too. These we'll continue\n // working on.\n\n\n var _fallbackChildFragment2 = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren2);\n\n _fallbackChildFragment2.return = workInProgress;\n _primaryChildFragment2.sibling = _fallbackChildFragment2;\n _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n workInProgress.child = _primaryChildFragment2;\n return _fallbackChildFragment2;\n } else {\n // No longer suspended. Switch back to showing the primary children,\n // and remove the intermediate fragment fiber.\n var _nextPrimaryChildren = nextProps.children;\n var currentPrimaryChild = currentPrimaryChildFragment.child;\n var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime); // If this render doesn't suspend, we need to delete the fallback\n // children. Wait until the complete phase, after we've confirmed the\n // fallback is no longer needed.\n // TODO: Would it be better to store the fallback fragment on\n // the stateNode?\n // Continue rendering the children, like we normally do.\n\n workInProgress.memoizedState = null;\n return workInProgress.child = primaryChild;\n }\n } else {\n // The current tree has not already timed out. That means the primary\n // children are not wrapped in a fragment fiber.\n var _currentPrimaryChild = current.child;\n\n if (nextDidTimeout) {\n // Timed out. Wrap the children in a fragment fiber to keep them\n // separate from the fallback children.\n var _nextFallbackChildren3 = nextProps.fallback;\n\n var _primaryChildFragment3 = createFiberFromFragment( // It shouldn't matter what the pending props are because we aren't\n // going to render this fragment.\n null, mode, NoWork, null);\n\n _primaryChildFragment3.return = workInProgress;\n _primaryChildFragment3.child = _currentPrimaryChild;\n\n if (_currentPrimaryChild !== null) {\n _currentPrimaryChild.return = _primaryChildFragment3;\n } // Even though we're creating a new fiber, there are no new children,\n // because we're reusing an already mounted tree. So we don't need to\n // schedule a placement.\n // primaryChildFragment.effectTag |= Placement;\n\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, we commit the effects from the\n // partially completed, timed-out tree, too.\n var _progressedState2 = workInProgress.memoizedState;\n\n var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;\n\n _primaryChildFragment3.child = _progressedPrimaryChild2;\n var _progressedChild3 = _progressedPrimaryChild2;\n\n while (_progressedChild3 !== null) {\n _progressedChild3.return = _primaryChildFragment3;\n _progressedChild3 = _progressedChild3.sibling;\n }\n } // Because primaryChildFragment is a new fiber that we're inserting as the\n // parent of a new tree, we need to set its treeBaseDuration.\n\n\n if (workInProgress.mode & ProfileMode) {\n // treeBaseDuration is the sum of all the child tree base durations.\n var _treeBaseDuration2 = 0;\n var _hiddenChild2 = _primaryChildFragment3.child;\n\n while (_hiddenChild2 !== null) {\n _treeBaseDuration2 += _hiddenChild2.treeBaseDuration;\n _hiddenChild2 = _hiddenChild2.sibling;\n }\n\n _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2;\n } // Create a fragment from the fallback children, too.\n\n\n var _fallbackChildFragment3 = createFiberFromFragment(_nextFallbackChildren3, mode, renderExpirationTime, null);\n\n _fallbackChildFragment3.return = workInProgress;\n _primaryChildFragment3.sibling = _fallbackChildFragment3;\n _fallbackChildFragment3.effectTag |= Placement;\n _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n workInProgress.child = _primaryChildFragment3;\n return _fallbackChildFragment3;\n } else {\n // Still haven't timed out. Continue rendering the children, like we\n // normally do.\n workInProgress.memoizedState = null;\n var _nextPrimaryChildren2 = nextProps.children;\n return workInProgress.child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);\n }\n }\n }\n }\n\n function scheduleWorkOnFiber(fiber, renderExpirationTime) {\n if (fiber.expirationTime < renderExpirationTime) {\n fiber.expirationTime = renderExpirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < renderExpirationTime) {\n alternate.expirationTime = renderExpirationTime;\n }\n\n scheduleWorkOnParentPath(fiber.return, renderExpirationTime);\n }\n\n function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) {\n // Mark any Suspense boundaries with fallbacks as having work to do.\n // If they were previously forced into fallbacks, they may now be able\n // to unblock.\n var node = firstChild;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n scheduleWorkOnFiber(node, renderExpirationTime);\n }\n } else if (node.tag === SuspenseListComponent) {\n // If the tail is hidden there might not be an Suspense boundaries\n // to schedule work on. In this case we have to schedule it on the\n // list itself.\n // We don't have to traverse to the children of the list since\n // the list will propagate the change when it rerenders.\n scheduleWorkOnFiber(node, renderExpirationTime);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n function findLastContentRow(firstChild) {\n // This is going to find the last row among these children that is already\n // showing content on the screen, as opposed to being in fallback state or\n // new. If a row has multiple Suspense boundaries, any of them being in the\n // fallback state, counts as the whole row being in a fallback state.\n // Note that the \"rows\" will be workInProgress, but any nested children\n // will still be current since we haven't rendered them yet. The mounted\n // order may not be the same as the new order. We use the new order.\n var row = firstChild;\n var lastContentRow = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n lastContentRow = row;\n }\n\n row = row.sibling;\n }\n\n return lastContentRow;\n }\n\n function validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\n\n if (typeof revealOrder === 'string') {\n switch (revealOrder.toLowerCase()) {\n case 'together':\n case 'forwards':\n case 'backwards':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n break;\n }\n\n case 'forward':\n case 'backward':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n break;\n }\n\n default:\n error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n break;\n }\n } else {\n error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n }\n }\n }\n }\n\n function validateTailOptions(tailMode, revealOrder) {\n {\n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n didWarnAboutTailOptions[tailMode] = true;\n error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n didWarnAboutTailOptions[tailMode] = true;\n error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n }\n }\n }\n }\n\n function validateSuspenseListNestedChild(childSlot, index) {\n {\n var isArray = Array.isArray(childSlot);\n var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isArray || isIterable) {\n var type = isArray ? 'array' : 'iterable';\n error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n return false;\n }\n }\n return true;\n }\n\n function validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n if (!validateSuspenseListNestedChild(children[i], i)) {\n return;\n }\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\n }\n\n _i++;\n }\n }\n } else {\n error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n }\n }\n }\n }\n }\n\n function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailExpiration: 0,\n tailMode: tailMode,\n lastEffect: lastEffectBeforeRendering\n };\n } else {\n // We can reuse the existing object from previous renders.\n renderState.isBackwards = isBackwards;\n renderState.rendering = null;\n renderState.renderingStartTime = 0;\n renderState.last = lastContentRow;\n renderState.tail = tail;\n renderState.tailExpiration = 0;\n renderState.tailMode = tailMode;\n renderState.lastEffect = lastEffectBeforeRendering;\n }\n } // This can end up rendering this component multiple passes.\n // The first pass splits the children fibers into two sets. A head and tail.\n // We first render the head. If anything is in fallback state, we do another\n // pass through beginWork to rerender all children (including the tail) with\n // the force suspend context. If the first render didn't have anything in\n // in fallback state. Then we render each row in the tail one-by-one.\n // That happens in the completeWork phase without going back to beginWork.\n\n\n function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }\n\n function updatePortalComponent(current, workInProgress, renderExpirationTime) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n }\n\n return workInProgress.child;\n }\n\n function updateContextProvider(current, workInProgress, renderExpirationTime) {\n var providerType = workInProgress.type;\n var context = providerType._context;\n var newProps = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps;\n var newValue = newProps.value;\n {\n var providerPropTypes = workInProgress.type.propTypes;\n\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);\n }\n }\n pushProvider(workInProgress, newValue);\n\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n var changedBits = calculateChangedBits(context, newValue, oldValue);\n\n if (changedBits === 0) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n var hasWarnedAboutUsingContextAsConsumer = false;\n\n function updateContextConsumer(current, workInProgress, renderExpirationTime) {\n var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n var newProps = workInProgress.pendingProps;\n var render = newProps.children;\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n prepareToReadContext(workInProgress, renderExpirationTime);\n var newValue = readContext(context, newProps.unstable_observedBits);\n var newChildren;\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n workInProgress.effectTag |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n function markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n }\n\n function bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime) {\n cancelWorkTimer(workInProgress);\n\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n var updateExpirationTime = workInProgress.expirationTime;\n\n if (updateExpirationTime !== NoWork) {\n markUnprocessedUpdateTime(updateExpirationTime);\n } // Check if the children have any pending work.\n\n\n var childExpirationTime = workInProgress.childExpirationTime;\n\n if (childExpirationTime < renderExpirationTime) {\n // The children don't have any work either. We can skip them.\n // TODO: Once we add back resuming, we should check if the children are\n // a work-in-progress set. If so, we need to transfer their effects.\n return null;\n } else {\n // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n }\n }\n\n function remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\n\n\n current.alternate = null;\n oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n newWorkInProgress.index = oldWorkInProgress.index;\n newWorkInProgress.sibling = oldWorkInProgress.sibling;\n newWorkInProgress.return = oldWorkInProgress.return;\n newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n if (oldWorkInProgress === returnFiber.child) {\n returnFiber.child = newWorkInProgress;\n } else {\n var prevSibling = returnFiber.child;\n\n if (prevSibling === null) {\n throw new Error('Expected parent to have a child.');\n }\n\n while (prevSibling.sibling !== oldWorkInProgress) {\n prevSibling = prevSibling.sibling;\n\n if (prevSibling === null) {\n throw new Error('Expected to find the previous sibling.');\n }\n }\n\n prevSibling.sibling = newWorkInProgress;\n } // Delete the old fiber and place the new one.\n // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = current;\n returnFiber.lastEffect = current;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = current;\n }\n\n current.nextEffect = null;\n current.effectTag = Deletion;\n newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n }\n\n function beginWork(current, workInProgress, renderExpirationTime) {\n var updateExpirationTime = workInProgress.expirationTime;\n {\n if (workInProgress._debugNeedsRemount && current !== null) {\n // This will restart the begin phase with a new fiber.\n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.expirationTime));\n }\n }\n\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n\n if (oldProps !== newProps || hasContextChanged() || // Force a re-render if the implementation changed due to hot reload:\n workInProgress.type !== current.type) {\n // If props or context changed, mark the fiber as having performed work.\n // This may be unset if the props are determined to be equal later (memo).\n didReceiveUpdate = true;\n } else if (updateExpirationTime < renderExpirationTime) {\n didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering\n // the begin phase. There's still some bookkeeping we that needs to be done\n // in this optimized path, mostly pushing stuff onto the stack.\n\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n resetHydrationState();\n break;\n\n case HostComponent:\n pushHostContext(workInProgress);\n\n if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(workInProgress.type, newProps)) {\n {\n markSpawnedWork(Never);\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n workInProgress.expirationTime = workInProgress.childExpirationTime = Never;\n return null;\n }\n\n break;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n\n break;\n }\n\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n pushProvider(workInProgress, newValue);\n break;\n }\n\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;\n\n if (hasChildWork) {\n workInProgress.effectTag |= Update;\n }\n }\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n // whether to retry the primary children, or to skip over it and\n // go straight to the fallback. Check the priority of the primary\n // child fragment.\n var primaryChildFragment = workInProgress.child;\n var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;\n\n if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {\n // The primary children have pending work. Use the normal path\n // to attempt to render the primary children again.\n return updateSuspenseComponent(current, workInProgress, renderExpirationTime);\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient\n // priority. Bailout.\n\n var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n\n if (child !== null) {\n // The fallback children have pending work. Skip over the\n // primary children and work on the fallback.\n return child.sibling;\n } else {\n return null;\n }\n }\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n }\n\n break;\n }\n\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.effectTag & DidCapture) !== NoEffect;\n\n var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;\n\n if (didSuspendBefore) {\n if (_hasChildWork) {\n // If something was in fallback state last time, and we have all the\n // same children then we're still in progressive loading state.\n // Something might get unblocked by state updates or retries in the\n // tree which will affect the tail. So we need to use the normal\n // path to compute the correct tail.\n return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);\n } // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n\n\n workInProgress.effectTag |= DidCapture;\n } // If nothing suspended before and we're rendering the same children,\n // then the tail doesn't matter. Anything new that suspends will work\n // in the \"together\" mode, so we can continue from the state we had.\n\n\n var renderState = workInProgress.memoizedState;\n\n if (renderState !== null) {\n // Reset to the \"together\" mode in case we've started a different\n // update in the past but didn't complete it.\n renderState.rendering = null;\n renderState.tail = null;\n }\n\n pushSuspenseContext(workInProgress, suspenseStackCursor.current);\n\n if (_hasChildWork) {\n break;\n } else {\n // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n return null;\n }\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n } else {\n // An update was scheduled on this fiber, but there are no new props\n // nor legacy context. Set this to false. If an update queue or context\n // consumer produces a changed value, it will set this to true. Otherwise,\n // the component will assume the children have not changed and bail out.\n didReceiveUpdate = false;\n }\n } else {\n didReceiveUpdate = false;\n } // Before entering the begin phase, clear pending update priority.\n // TODO: This assumes that we're about to evaluate the component and process\n // the update queue. However, there's an exception: SimpleMemoComponent\n // sometimes bails out later in the begin phase. This indicates that we should\n // move this assignment out of the common path and into each branch.\n\n\n workInProgress.expirationTime = NoWork;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderExpirationTime);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, updateExpirationTime, renderExpirationTime);\n }\n\n case FunctionComponent:\n {\n var _Component = workInProgress.type;\n var unresolvedProps = workInProgress.pendingProps;\n var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);\n return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderExpirationTime);\n }\n\n case ClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderExpirationTime);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderExpirationTime);\n\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderExpirationTime);\n\n case HostText:\n return updateHostText(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderExpirationTime);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderExpirationTime);\n\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderExpirationTime);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderExpirationTime);\n\n case Mode:\n return updateMode(current, workInProgress, renderExpirationTime);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderExpirationTime);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderExpirationTime);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderExpirationTime);\n\n case MemoComponent:\n {\n var _type2 = workInProgress.type;\n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = _type2.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n 'prop', getComponentName(_type2), getCurrentFiberStackInDev);\n }\n }\n }\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);\n }\n\n case IncompleteClassComponent:\n {\n var _Component3 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);\n }\n }\n\n {\n {\n throw Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.effectTag |= Update;\n }\n\n function markRef$1(workInProgress) {\n workInProgress.effectTag |= Ref;\n }\n\n var appendAllChildren;\n var updateHostContainer;\n var updateHostComponent$1;\n var updateHostText$1;\n {\n // Mutation mode\n appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal) ;else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n };\n\n updateHostContainer = function (workInProgress) {// Noop\n };\n\n updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n\n if (oldProps === newProps) {\n // In mutation mode, this is sufficient for a bailout because\n // we won't touch this node even if children changed.\n return;\n } // If we get updated because one of our children updated, we don't\n // have newProps so we'll have to reuse them.\n // TODO: Split the update API as separate for the props vs. children.\n // Even better would be if children weren't special cased at all tho.\n\n\n var instance = workInProgress.stateNode;\n var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host\n // component is hitting the resume path. Figure out why. Possibly\n // related to `hidden`.\n\n var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.\n\n workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update. All the work is done in commitWork.\n\n if (updatePayload) {\n markUpdate(workInProgress);\n }\n };\n\n updateHostText$1 = function (current, workInProgress, oldText, newText) {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n };\n }\n\n function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n switch (renderState.tailMode) {\n case 'hidden':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var tailNode = renderState.tail;\n var lastTailNode = null;\n\n while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (lastTailNode === null) {\n // All remaining items in the tail are insertions.\n renderState.tail = null;\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n lastTailNode.sibling = null;\n }\n\n break;\n }\n\n case 'collapsed':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var _tailNode = renderState.tail;\n var _lastTailNode = null;\n\n while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (_lastTailNode === null) {\n // All remaining items in the tail are insertions.\n if (!hasRenderedATailFallback && renderState.tail !== null) {\n // We suspended during the head. We want to show at least one\n // row at the tail. So we'll keep on and cut off the rest.\n renderState.tail.sibling = null;\n } else {\n renderState.tail = null;\n }\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n _lastTailNode.sibling = null;\n }\n\n break;\n }\n }\n }\n\n function completeWork(current, workInProgress, renderExpirationTime) {\n var newProps = workInProgress.pendingProps;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case LazyComponent:\n case SimpleMemoComponent:\n case FunctionComponent:\n case ForwardRef:\n case Fragment:\n case Mode:\n case Profiler:\n case ContextConsumer:\n case MemoComponent:\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n var fiberRoot = workInProgress.stateNode;\n\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n var wasHydrated = popHydrationState(workInProgress);\n\n if (wasHydrated) {\n // If we hydrated, then we'll need to schedule an update for\n // the commit side-effects on the root.\n markUpdate(workInProgress);\n }\n }\n\n updateHostContainer(workInProgress);\n return null;\n }\n\n case HostComponent:\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var type = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);\n\n if (current.ref !== workInProgress.ref) {\n markRef$1(workInProgress);\n }\n } else {\n if (!newProps) {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error(\"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\");\n }\n } // This can happen when we abort work.\n\n\n return null;\n }\n\n var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on whether we want to add them top->down or\n // bottom->up. Top->down is faster in IE11.\n\n var _wasHydrated = popHydrationState(workInProgress);\n\n if (_wasHydrated) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {\n // If changes to the hydrated node need to be applied at the\n // commit-phase we mark this as such.\n markUpdate(workInProgress);\n }\n } else {\n var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);\n appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners\n\n workInProgress.stateNode = instance; // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n\n if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {\n markUpdate(workInProgress);\n }\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef$1(workInProgress);\n }\n }\n\n return null;\n }\n\n case HostText:\n {\n var newText = newProps;\n\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n\n updateHostText$1(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error(\"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\");\n }\n } // This can happen when we abort work.\n\n }\n\n var _rootContainerInstance = getRootHostContainer();\n\n var _currentHostContext = getHostContext();\n\n var _wasHydrated2 = popHydrationState(workInProgress);\n\n if (_wasHydrated2) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n }\n }\n\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var nextState = workInProgress.memoizedState;\n\n if ((workInProgress.effectTag & DidCapture) !== NoEffect) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list.\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = false;\n\n if (current === null) {\n if (workInProgress.memoizedProps.fallback !== undefined) {\n popHydrationState(workInProgress);\n }\n } else {\n var prevState = current.memoizedState;\n prevDidTimeout = prevState !== null;\n\n if (!nextDidTimeout && prevState !== null) {\n // We just switched from the fallback to the normal children.\n // Delete the fallback.\n // TODO: Would it be better to store the fallback fragment on\n // the stateNode during the begin phase?\n var currentFallbackChild = current.child.sibling;\n\n if (currentFallbackChild !== null) {\n // Deletions go at the beginning of the return fiber's effect list\n var first = workInProgress.firstEffect;\n\n if (first !== null) {\n workInProgress.firstEffect = currentFallbackChild;\n currentFallbackChild.nextEffect = first;\n } else {\n workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;\n currentFallbackChild.nextEffect = null;\n }\n\n currentFallbackChild.effectTag = Deletion;\n }\n }\n }\n\n if (nextDidTimeout && !prevDidTimeout) {\n // If this subtreee is running in blocking mode we can suspend,\n // otherwise we won't suspend.\n // TODO: This will still suspend a synchronous tree if anything\n // in the concurrent tree already suspended during this render.\n // This is a known bug.\n if ((workInProgress.mode & BlockingMode) !== NoMode) {\n // TODO: Move this back to throwException because this is too late\n // if this is a large tree which is common for initial loads. We\n // don't know if we should restart a render or not until we get\n // this marker, and this is too late.\n // If this render already had a ping or lower pri updates,\n // and this is the first time we know we're going to suspend we\n // should be able to immediately restart from within throwException.\n var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;\n\n if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {\n // If this was in an invisible tree or a new render, then showing\n // this boundary is ok.\n renderDidSuspend();\n } else {\n // Otherwise, we're going to have to hide content so we should\n // suspend for longer if possible.\n renderDidSuspendDelayIfPossible();\n }\n }\n }\n\n {\n // TODO: Only schedule updates if these values are non equal, i.e. it changed.\n if (nextDidTimeout || prevDidTimeout) {\n // If this boundary just timed out, schedule an effect to attach a\n // retry listener to the promise. This flag is also used to hide the\n // primary children. In mutation mode, we also need the flag to\n // *unhide* children that were previously hidden, so check if this\n // is currently timed out, too.\n workInProgress.effectTag |= Update;\n }\n }\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n popProvider(workInProgress);\n return null;\n\n case IncompleteClassComponent:\n {\n // Same as class component case. I put it down here so that the tags are\n // sequential to ensure this switch is compiled to a jump table.\n var _Component = workInProgress.type;\n\n if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n return null;\n }\n\n var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;\n var renderedTail = renderState.rendering;\n\n if (renderedTail === null) {\n // We just rendered the head.\n if (!didSuspendAlready) {\n // This is the first pass. We need to figure out if anything is still\n // suspended in the rendered set.\n // If new content unsuspended, but there's still some content that\n // didn't. Then we need to do a second pass that forces everything\n // to keep showing their fallbacks.\n // We might be suspended if something in this render pass suspended, or\n // something in the previous committed pass suspended. Otherwise,\n // there's no chance so we can skip the expensive call to\n // findFirstSuspended.\n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);\n\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.effectTag |= DidCapture;\n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n // part of the second pass. In that case nothing will subscribe to\n // its thennables. Instead, we'll transfer its thennables to the\n // SuspenseList so that it can retry if they resolve.\n // There might be multiple of these in the list but since we're\n // going to wait for all of them anyway, it doesn't really matter\n // which ones gets to ping. In theory we could get clever and keep\n // track of how many dependencies remain but it gets tricky because\n // in the meantime, we can add/remove/change items and dependencies.\n // We might bail out of the loop before finding any but that\n // doesn't matter since that means that the other boundaries that\n // we did find already has their listeners attached.\n\n var newThennables = suspended.updateQueue;\n\n if (newThennables !== null) {\n workInProgress.updateQueue = newThennables;\n workInProgress.effectTag |= Update;\n } // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect list before doing the second pass since that's now invalid.\n\n\n if (renderState.lastEffect === null) {\n workInProgress.firstEffect = null;\n }\n\n workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.\n\n resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately\n // rerender the children.\n\n pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n\n if (_suspended !== null) {\n workInProgress.effectTag |= DidCapture;\n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n // get lost if this row ends up dropped during a second pass.\n\n var _newThennables = _suspended.updateQueue;\n\n if (_newThennables !== null) {\n workInProgress.updateQueue = _newThennables;\n workInProgress.effectTag |= Update;\n }\n\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {\n // We need to delete the row we just rendered.\n // Reset the effect list to what it was before we rendered this\n // child. The nested children have already appended themselves.\n var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.\n\n if (lastEffect !== null) {\n lastEffect.nextEffect = null;\n } // We're done.\n\n\n return null;\n }\n } else if ( // The time it took to render last row is greater than time until\n // the expiration.\n now() * 2 - renderState.renderingStartTime > renderState.tailExpiration && renderExpirationTime > Never) {\n // We have now passed our CPU deadline and we'll just give up further\n // attempts to render the main content and only render fallbacks.\n // The assumption is that this is usually faster.\n workInProgress.effectTag |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. If we can show\n // them, then they really have the same priority as this render.\n // So we'll pick it back up the very next render pass once we've had\n // an opportunity to yield for paint.\n\n var nextPriority = renderExpirationTime - 1;\n workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;\n {\n markSpawnedWork(nextPriority);\n }\n }\n }\n\n if (renderState.isBackwards) {\n // The effect list of the backwards tail will have been added\n // to the end. This breaks the guarantee that life-cycles fire in\n // sibling order but that isn't a strong guarantee promised by React.\n // Especially since these might also just pop in during future commits.\n // Append to the beginning of the list.\n renderedTail.sibling = workInProgress.child;\n workInProgress.child = renderedTail;\n } else {\n var previousSibling = renderState.last;\n\n if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n\n renderState.last = renderedTail;\n }\n }\n\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n if (renderState.tailExpiration === 0) {\n // Heuristic for how long we're willing to spend rendering rows\n // until we just give up and show what we have so far.\n var TAIL_EXPIRATION_TIMEOUT_MS = 500;\n renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; // TODO: This is meant to mimic the train model or JND but this\n // is a per component value. It should really be since the start\n // of the total render or last commit. Consider using something like\n // globalMostRecentFallbackTime. That doesn't account for being\n // suspended for part of the time or when it's a new render.\n // It should probably use a global start time value instead.\n } // Pop a row.\n\n\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\n renderState.lastEffect = workInProgress.lastEffect;\n renderState.renderingStartTime = now();\n next.sibling = null; // Restore the context.\n // TODO: We can probably just avoid popping it instead and only\n // setting it the first time we go from not suspended to suspended.\n\n var suspenseContext = suspenseStackCursor.current;\n\n if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n\n return next;\n }\n\n return null;\n }\n }\n\n {\n {\n throw Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function unwindWork(workInProgress, renderExpirationTime) {\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n var effectTag = workInProgress.effectTag;\n\n if (effectTag & ShouldCapture) {\n workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n var _effectTag = workInProgress.effectTag;\n\n if (!((_effectTag & DidCapture) === NoEffect)) {\n {\n throw Error(\"The root failed to unmount after an error. This is likely a bug in React. Please file an issue.\");\n }\n }\n\n workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;\n return workInProgress;\n }\n\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var _effectTag2 = workInProgress.effectTag;\n\n if (_effectTag2 & ShouldCapture) {\n workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n return workInProgress;\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n // caught by a nested boundary. If not, it should bubble through.\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n popProvider(workInProgress);\n return null;\n\n default:\n return null;\n }\n }\n\n function unwindInterruptedWork(interruptedWork) {\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n\n break;\n }\n\n case HostRoot:\n {\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n break;\n }\n\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n\n case SuspenseComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case SuspenseListComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case ContextProvider:\n popProvider(interruptedWork);\n break;\n }\n }\n\n function createCapturedValue(value, source) {\n // If the value is an error, call this function immediately after it is thrown\n // so the stack is accurate.\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n }\n\n function logCapturedError(capturedError) {\n var error = capturedError.error;\n {\n var componentName = capturedError.componentName,\n componentStack = capturedError.componentStack,\n errorBoundaryName = capturedError.errorBoundaryName,\n errorBoundaryFound = capturedError.errorBoundaryFound,\n willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling\n // `preventDefault()` in window `error` handler.\n // We record this information as an expando on the error.\n\n if (error != null && error._suppressLogging) {\n if (errorBoundaryFound && willRetry) {\n // The error is recoverable and was silenced.\n // Ignore it and don't print the stack addendum.\n // This is handy for testing error boundaries without noise.\n return;\n } // The error is fatal. Since the silencing might have\n // been accidental, we'll surface it anyway.\n // However, the browser would have silenced the original error\n // so we'll print it first, and then print the stack addendum.\n\n\n console['error'](error); // Don't transform to our wrapper\n // For a more detailed description of this block, see:\n // https://github.com/facebook/react/pull/13384\n }\n\n var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.\n\n if (errorBoundaryFound && errorBoundaryName) {\n if (willRetry) {\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n } else {\n errorBoundaryMessage = \"This error was initially handled by the error boundary \" + errorBoundaryName + \".\\n\" + \"Recreating the tree from scratch failed so React will unmount the tree.\";\n }\n } else {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';\n }\n\n var combinedMessage = \"\" + componentNameMessage + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n // We don't include the original error message and JS stack because the browser\n // has already printed it. Even if the application swallows the error, it is still\n // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n console['error'](combinedMessage); // Don't transform to our wrapper\n }\n }\n\n var didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n {\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n }\n var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\n\n function logError(boundary, errorInfo) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n\n if (stack === null && source !== null) {\n stack = getStackByFiberInDevAndProd(source);\n }\n\n var capturedError = {\n componentName: source !== null ? getComponentName(source.type) : null,\n componentStack: stack !== null ? stack : '',\n error: errorInfo.value,\n errorBoundary: null,\n errorBoundaryName: null,\n errorBoundaryFound: false,\n willRetry: false\n };\n\n if (boundary !== null && boundary.tag === ClassComponent) {\n capturedError.errorBoundary = boundary.stateNode;\n capturedError.errorBoundaryName = getComponentName(boundary.type);\n capturedError.errorBoundaryFound = true;\n capturedError.willRetry = true;\n }\n\n try {\n logCapturedError(capturedError);\n } catch (e) {\n // This method must not throw, or React internal state will get messed up.\n // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n // we want to report this error outside of the normal stack as a last resort.\n // https://github.com/facebook/react/issues/13188\n setTimeout(function () {\n throw e;\n });\n }\n }\n\n var callComponentWillUnmountWithTimer = function (current, instance) {\n startPhaseTimer(current, 'componentWillUnmount');\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n instance.componentWillUnmount();\n stopPhaseTimer();\n }; // Capture errors so they don't interrupt unmounting.\n\n\n function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current, unmountError);\n }\n }\n }\n\n function safelyDetachRef(current) {\n var ref = current.ref;\n\n if (ref !== null) {\n if (typeof ref === 'function') {\n {\n invokeGuardedCallback(null, ref, null, null);\n\n if (hasCaughtError()) {\n var refError = clearCaughtError();\n captureCommitPhaseError(current, refError);\n }\n }\n } else {\n ref.current = null;\n }\n }\n }\n\n function safelyCallDestroy(current, destroy) {\n {\n invokeGuardedCallback(null, destroy, null);\n\n if (hasCaughtError()) {\n var error = clearCaughtError();\n captureCommitPhaseError(current, error);\n }\n }\n }\n\n function commitBeforeMutationLifeCycles(current, finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n return;\n }\n\n case ClassComponent:\n {\n if (finishedWork.effectTag & Snapshot) {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');\n var instance = finishedWork.stateNode; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n {\n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n didWarnSet.add(finishedWork.type);\n error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));\n }\n }\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n stopPhaseTimer();\n }\n }\n\n return;\n }\n\n case HostRoot:\n case HostComponent:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n return;\n }\n\n {\n {\n throw Error(\"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function commitHookEffectListUnmount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Unmount\n var destroy = effect.destroy;\n effect.destroy = undefined;\n\n if (destroy !== undefined) {\n destroy();\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n\n function commitHookEffectListMount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Mount\n var create = effect.create;\n effect.destroy = create();\n {\n var destroy = effect.destroy;\n\n if (destroy !== undefined && typeof destroy !== 'function') {\n var addendum = void 0;\n\n if (destroy === null) {\n addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n } else if (typeof destroy.then === 'function') {\n addendum = '\\n\\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + 'useEffect(() => {\\n' + ' async function fetchData() {\\n' + ' // You can await here\\n' + ' const response = await MyAPI.getData(someId);\\n' + ' // ...\\n' + ' }\\n' + ' fetchData();\\n' + \"}, [someId]); // Or [] if effect doesn't need props or state\\n\\n\" + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n\n function commitPassiveHookEffects(finishedWork) {\n if ((finishedWork.effectTag & Passive) !== NoEffect) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n // TODO (#17945) We should call all passive destroy functions (for all fibers)\n // before calling any create functions. The current approach only serializes\n // these for a single fiber.\n commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork);\n commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n break;\n }\n }\n }\n }\n\n function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirationTime) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n // At this point layout effects have already been destroyed (during mutation phase).\n // This is done to prevent sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n return;\n }\n\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (finishedWork.effectTag & Update) {\n if (current === null) {\n startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n instance.componentDidMount();\n stopPhaseTimer();\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState;\n startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n stopPhaseTimer();\n }\n }\n\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n } // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n commitUpdateQueue(finishedWork, updateQueue, instance);\n }\n\n return;\n }\n\n case HostRoot:\n {\n var _updateQueue = finishedWork.updateQueue;\n\n if (_updateQueue !== null) {\n var _instance = null;\n\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostComponent:\n _instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n\n case ClassComponent:\n _instance = finishedWork.child.stateNode;\n break;\n }\n }\n\n commitUpdateQueue(finishedWork, _updateQueue, _instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (current === null && finishedWork.effectTag & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props);\n }\n\n return;\n }\n\n case HostText:\n {\n // We have no life-cycles associated with text.\n return;\n }\n\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n return;\n }\n\n case Profiler:\n {\n {\n var onRender = finishedWork.memoizedProps.onRender;\n\n if (typeof onRender === 'function') {\n {\n onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);\n }\n }\n }\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n case IncompleteClassComponent:\n case FundamentalComponent:\n case ScopeComponent:\n return;\n }\n\n {\n {\n throw Error(\"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function hideOrUnhideAllChildren(finishedWork, isHidden) {\n {\n // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n\n while (true) {\n if (node.tag === HostComponent) {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } else if (node.tag === HostText) {\n var _instance3 = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance3);\n } else {\n unhideTextInstance(_instance3, node.memoizedProps);\n }\n } else if (node.tag === SuspenseComponent && node.memoizedState !== null && node.memoizedState.dehydrated === null) {\n // Found a nested Suspense component that timed out. Skip over the\n // primary child fragment, which should remain hidden.\n var fallbackChildFragment = node.child.sibling;\n fallbackChildFragment.return = node;\n node = fallbackChildFragment;\n continue;\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === finishedWork) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n }\n\n function commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n\n switch (finishedWork.tag) {\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n\n if (typeof ref === 'function') {\n ref(instanceToUse);\n } else {\n {\n if (!ref.hasOwnProperty('current')) {\n error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));\n }\n }\n ref.current = instanceToUse;\n }\n }\n }\n\n function commitDetachRef(current) {\n var currentRef = current.ref;\n\n if (currentRef !== null) {\n if (typeof currentRef === 'function') {\n currentRef(null);\n } else {\n currentRef.current = null;\n }\n }\n } // User-originating errors (lifecycles and refs) should not interrupt\n // deletion, so don't let them throw. Host-originating errors should\n // interrupt deletion, so it's okay\n\n\n function commitUnmount(finishedRoot, current, renderPriorityLevel) {\n onCommitUnmount(current);\n\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n var updateQueue = current.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n {\n // When the owner fiber is deleted, the destroy function of a passive\n // effect hook is called during the synchronous commit phase. This is\n // a concession to implementation complexity. Calling it in the\n // passive effect phase (like they usually are, when dependencies\n // change during an update) would require either traversing the\n // children of the deleted fiber again, or including unmount effects\n // as part of the fiber effect list.\n //\n // Because this is during the sync commit phase, we need to change\n // the priority.\n //\n // TODO: Reconsider this implementation trade off.\n var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;\n runWithPriority$1(priorityLevel, function () {\n var effect = firstEffect;\n\n do {\n var _destroy = effect.destroy;\n\n if (_destroy !== undefined) {\n safelyCallDestroy(current, _destroy);\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n });\n }\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n safelyDetachRef(current);\n var instance = current.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(current, instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n safelyDetachRef(current);\n return;\n }\n\n case HostPortal:\n {\n // TODO: this is recursive.\n // We are also not using this parent because\n // the portal will get pushed immediately.\n {\n unmountHostComponents(finishedRoot, current, renderPriorityLevel);\n }\n return;\n }\n\n case FundamentalComponent:\n {\n return;\n }\n\n case DehydratedFragment:\n {\n return;\n }\n\n case ScopeComponent:\n {\n return;\n }\n }\n }\n\n function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {\n // While we're inside a removed host node we don't want to call\n // removeChild on the inner nodes because they're removed by the top\n // call anyway. We also want to call componentWillUnmount on all\n // composites before this host node is removed from the tree. Therefore\n // we do an inner loop while we're still inside the host node.\n var node = root;\n\n while (true) {\n commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes.\n // Skip portals because commitUnmount() currently visits them recursively.\n\n if (node.child !== null && // If we use mutation we drill down into portals using commitUnmount above.\n // If we don't use mutation we drill down into portals here instead.\n node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === root) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === root) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n function detachFiber(current) {\n var alternate = current.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we\n // should clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child. This child\n // itself will be GC:ed when the parent updates the next time.\n\n current.return = null;\n current.child = null;\n current.memoizedState = null;\n current.updateQueue = null;\n current.dependencies = null;\n current.alternate = null;\n current.firstEffect = null;\n current.lastEffect = null;\n current.pendingProps = null;\n current.memoizedProps = null;\n current.stateNode = null;\n\n if (alternate !== null) {\n detachFiber(alternate);\n }\n }\n\n function getHostParentFiber(fiber) {\n var parent = fiber.return;\n\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n\n parent = parent.return;\n }\n\n {\n {\n throw Error(\"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n }\n\n function getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n // TODO: Find a more efficient way to do this.\n var node = fiber;\n\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node.return === null || isHostParent(node.return)) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n\n while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.effectTag & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n } // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n\n\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child.return = node;\n node = node.child;\n }\n } // Check if this host node is stable or about to be placed.\n\n\n if (!(node.effectTag & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n }\n\n function commitPlacement(finishedWork) {\n var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n var parent;\n var isContainer;\n var parentStateNode = parentFiber.stateNode;\n\n switch (parentFiber.tag) {\n case HostComponent:\n parent = parentStateNode;\n isContainer = false;\n break;\n\n case HostRoot:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case HostPortal:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case FundamentalComponent: // eslint-disable-next-line-no-fallthrough\n\n default:\n {\n {\n throw Error(\"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n if (parentFiber.effectTag & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(parent); // Clear ContentReset from the effect tag\n\n parentFiber.effectTag &= ~ContentReset;\n }\n\n var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n if (isContainer) {\n insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);\n } else {\n insertOrAppendPlacementNode(finishedWork, before, parent);\n }\n }\n\n function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertInContainerBefore(parent, stateNode, before);\n } else {\n appendChildToContainer(parent, stateNode);\n }\n } else if (tag === HostPortal) ;else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n }\n\n function insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertBefore(parent, stateNode, before);\n } else {\n appendChild(parent, stateNode);\n }\n } else if (tag === HostPortal) ;else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n }\n\n function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {\n // We only have the top Fiber that was deleted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = current; // Each iteration, currentParent is populated with node's host parent if not\n // currentParentIsValid.\n\n var currentParentIsValid = false; // Note: these two variables *must* always be updated together.\n\n var currentParent;\n var currentParentIsContainer;\n\n while (true) {\n if (!currentParentIsValid) {\n var parent = node.return;\n\n findParent: while (true) {\n if (!(parent !== null)) {\n {\n throw Error(\"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var parentStateNode = parent.stateNode;\n\n switch (parent.tag) {\n case HostComponent:\n currentParent = parentStateNode;\n currentParentIsContainer = false;\n break findParent;\n\n case HostRoot:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n\n case HostPortal:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n }\n\n parent = parent.return;\n }\n\n currentParentIsValid = true;\n }\n\n if (node.tag === HostComponent || node.tag === HostText) {\n commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the\n // node from the tree.\n\n if (currentParentIsContainer) {\n removeChildFromContainer(currentParent, node.stateNode);\n } else {\n removeChild(currentParent, node.stateNode);\n } // Don't visit children because we already visited them.\n\n } else if (node.tag === HostPortal) {\n if (node.child !== null) {\n // When we go into a portal, it becomes the parent to remove from.\n // We will reassign it back when we pop the portal on the way up.\n currentParent = node.stateNode.containerInfo;\n currentParentIsContainer = true; // Visit children because portals might contain host components.\n\n node.child.return = node;\n node = node.child;\n continue;\n }\n } else {\n commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below.\n\n if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n }\n\n if (node === current) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === current) {\n return;\n }\n\n node = node.return;\n\n if (node.tag === HostPortal) {\n // When we go out of the portal, we need to restore the parent.\n // Since we don't keep a stack of them, we will search for it.\n currentParentIsValid = false;\n }\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n function commitDeletion(finishedRoot, current, renderPriorityLevel) {\n {\n // Recursively delete all host nodes from the parent.\n // Detach refs and call componentWillUnmount() on the whole subtree.\n unmountHostComponents(finishedRoot, current, renderPriorityLevel);\n }\n detachFiber(current);\n }\n\n function commitWork(current, finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n // Layout effects are destroyed during the mutation phase so that all\n // destroy functions for all fibers are called before any create functions.\n // This prevents sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork);\n return;\n }\n\n case ClassComponent:\n {\n return;\n }\n\n case HostComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (instance != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n if (updatePayload !== null) {\n commitUpdate(instance, updatePayload, type, oldProps, newProps);\n }\n }\n\n return;\n }\n\n case HostText:\n {\n if (!(finishedWork.stateNode !== null)) {\n {\n throw Error(\"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldText = current !== null ? current.memoizedProps : newText;\n commitTextUpdate(textInstance, oldText, newText);\n return;\n }\n\n case HostRoot:\n {\n {\n var _root = finishedWork.stateNode;\n\n if (_root.hydrate) {\n // We've just hydrated. No need to hydrate again.\n _root.hydrate = false;\n commitHydratedContainer(_root.containerInfo);\n }\n }\n return;\n }\n\n case Profiler:\n {\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseComponent(finishedWork);\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n {\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case IncompleteClassComponent:\n {\n return;\n }\n }\n\n {\n {\n throw Error(\"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function commitSuspenseComponent(finishedWork) {\n var newState = finishedWork.memoizedState;\n var newDidTimeout;\n var primaryChildParent = finishedWork;\n\n if (newState === null) {\n newDidTimeout = false;\n } else {\n newDidTimeout = true;\n primaryChildParent = finishedWork.child;\n markCommitTimeOfFallback();\n }\n\n if (primaryChildParent !== null) {\n hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);\n }\n }\n\n function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n var newState = finishedWork.memoizedState;\n\n if (newState === null) {\n var current = finishedWork.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n\n if (suspenseInstance !== null) {\n commitHydratedSuspenseInstance(suspenseInstance);\n }\n }\n }\n }\n }\n\n function attachSuspenseRetryListeners(finishedWork) {\n // If this boundary just timed out, then it will have a set of thenables.\n // For each thenable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var thenables = finishedWork.updateQueue;\n\n if (thenables !== null) {\n finishedWork.updateQueue = null;\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n thenables.forEach(function (thenable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryThenable.bind(null, finishedWork, thenable);\n\n if (!retryCache.has(thenable)) {\n {\n if (thenable.__reactDoNotTraceInteractions !== true) {\n retry = tracing.unstable_wrap(retry);\n }\n }\n retryCache.add(thenable);\n thenable.then(retry, retry);\n }\n });\n }\n }\n\n function commitResetTextContent(current) {\n resetTextContent(current.stateNode);\n }\n\n var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\n function createRootErrorUpdate(fiber, errorInfo, expirationTime) {\n var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.\n\n update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: null\n };\n var error = errorInfo.value;\n\n update.callback = function () {\n onUncaughtError(error);\n logError(fiber, errorInfo);\n };\n\n return update;\n }\n\n function createClassErrorUpdate(fiber, errorInfo, expirationTime) {\n var update = createUpdate(expirationTime, null);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n\n update.payload = function () {\n logError(fiber, errorInfo);\n return getDerivedStateFromError(error$1);\n };\n }\n\n var inst = fiber.stateNode;\n\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n if (typeof getDerivedStateFromError !== 'function') {\n // To preserve the preexisting retry behavior of error boundaries,\n // we keep track of which ones already failed during this batch.\n // This gets reset before we yield back to the browser.\n // TODO: Warn in strict mode if getDerivedStateFromError is\n // not defined.\n markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined\n\n logError(fiber, errorInfo);\n }\n\n var error$1 = errorInfo.value;\n var stack = errorInfo.stack;\n this.componentDidCatch(error$1, {\n componentStack: stack !== null ? stack : ''\n });\n {\n if (typeof getDerivedStateFromError !== 'function') {\n // If componentDidCatch is the only error boundary method defined,\n // then it needs to call setState to recover from errors.\n // If no state update is scheduled then the boundary will swallow the error.\n if (fiber.expirationTime !== Sync) {\n error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');\n }\n }\n }\n };\n } else {\n update.callback = function () {\n markFailedErrorBoundaryForHotReloading(fiber);\n };\n }\n\n return update;\n }\n\n function attachPingListener(root, renderExpirationTime, thenable) {\n // Attach a listener to the promise to \"ping\" the root and retry. But\n // only if one does not already exist for the current render expiration\n // time (which acts like a \"thread ID\" here).\n var pingCache = root.pingCache;\n var threadIDs;\n\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap$1();\n threadIDs = new Set();\n pingCache.set(thenable, threadIDs);\n } else {\n threadIDs = pingCache.get(thenable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(thenable, threadIDs);\n }\n }\n\n if (!threadIDs.has(renderExpirationTime)) {\n // Memoize using the thread ID to prevent redundant listeners.\n threadIDs.add(renderExpirationTime);\n var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);\n thenable.then(ping, ping);\n }\n }\n\n function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {\n // The source fiber did not complete.\n sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid.\n\n sourceFiber.firstEffect = sourceFiber.lastEffect = null;\n\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a thenable.\n var thenable = value;\n\n if ((sourceFiber.mode & BlockingMode) === NoMode) {\n // Reset the memoizedState to what it was before we attempted\n // to render it.\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.expirationTime = currentSource.expirationTime;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n\n var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.\n\n var _workInProgress = returnFiber;\n\n do {\n if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {\n // Found the nearest boundary.\n // Stash the promise on the boundary fiber. If the boundary times out, we'll\n // attach another listener to flip the boundary back to its normal state.\n var thenables = _workInProgress.updateQueue;\n\n if (thenables === null) {\n var updateQueue = new Set();\n updateQueue.add(thenable);\n _workInProgress.updateQueue = updateQueue;\n } else {\n thenables.add(thenable);\n } // If the boundary is outside of blocking mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. In the commit phase, we'll schedule a\n // subsequent synchronous update to re-render the Suspense.\n //\n // Note: It doesn't matter whether the component that suspended was\n // inside a blocking mode tree. If the Suspense is outside of it, we\n // should *not* suspend the commit.\n\n\n if ((_workInProgress.mode & BlockingMode) === NoMode) {\n _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.\n // But we shouldn't call any lifecycle methods or callbacks. Remove\n // all lifecycle effect tags.\n\n sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);\n\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\n\n if (currentSourceFiber === null) {\n // This is a new mount. Change the tag so it's not mistaken for a\n // completed class component. For example, we should not call\n // componentWillUnmount if it is deleted.\n sourceFiber.tag = IncompleteClassComponent;\n } else {\n // When we try rendering again, we should not reuse the current fiber,\n // since it's known to be in an inconsistent state. Use a force update to\n // prevent a bail out.\n var update = createUpdate(Sync, null);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n\n sourceFiber.expirationTime = Sync; // Exit without suspending.\n\n return;\n } // Confirmed that the boundary is in a concurrent mode tree. Continue\n // with the normal suspend path.\n //\n // After this we'll use a set of heuristics to determine whether this\n // render pass will run to completion or restart or \"suspend\" the commit.\n // The actual logic for this is spread out in different places.\n //\n // This first principle is that if we're going to suspend when we complete\n // a root, then we should also restart if we get an update or ping that\n // might unsuspend it, and vice versa. The only reason to suspend is\n // because you think you might want to restart before committing. However,\n // it doesn't make sense to restart only while in the period we're suspended.\n //\n // Restarting too aggressively is also not good because it starves out any\n // intermediate loading state. So we use heuristics to determine when.\n // Suspense Heuristics\n //\n // If nothing threw a Promise or all the same fallbacks are already showing,\n // then don't suspend/restart.\n //\n // If this is an initial render of a new tree of Suspense boundaries and\n // those trigger a fallback, then don't suspend/restart. We want to ensure\n // that we can show the initial loading state as quickly as possible.\n //\n // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n // a fallback, then we should always suspend/restart. SuspenseConfig applies to\n // this case. If none is defined, JND is used instead.\n //\n // If we're already showing a fallback and it gets \"retried\", allowing us to show\n // another level, but there's still an inner boundary that would show a fallback,\n // then we suspend/restart for 500ms since the last time we showed a fallback\n // anywhere in the tree. This effectively throttles progressive loading into a\n // consistent train of commits. This also gives us an opportunity to restart to\n // get to the completed state slightly earlier.\n //\n // If there's ambiguity due to batching it's resolved in preference of:\n // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n //\n // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n // ensure that new initial loading states can commit as soon as possible.\n\n\n attachPingListener(root, renderExpirationTime, thenable);\n _workInProgress.effectTag |= ShouldCapture;\n _workInProgress.expirationTime = renderExpirationTime;\n return;\n } // This boundary already captured during this render. Continue to the next\n // boundary.\n\n\n _workInProgress = _workInProgress.return;\n } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.\n // TODO: Use invariant so the message is stripped in prod?\n\n\n value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\\n' + '\\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));\n } // We didn't find a boundary that could handle this type of exception. Start\n // over and traverse parent path again, this time treating the exception\n // as an error.\n\n\n renderDidError();\n value = createCapturedValue(value, sourceFiber);\n var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.effectTag |= ShouldCapture;\n workInProgress.expirationTime = renderExpirationTime;\n\n var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n\n if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.effectTag |= ShouldCapture;\n workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state\n\n var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);\n\n enqueueCapturedUpdate(workInProgress, _update2);\n return;\n }\n\n break;\n }\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n }\n\n var ceil = Math.ceil;\n var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;\n var NoContext =\n /* */\n 0;\n var BatchedContext =\n /* */\n 1;\n var EventContext =\n /* */\n 2;\n var DiscreteEventContext =\n /* */\n 4;\n var LegacyUnbatchedContext =\n /* */\n 8;\n var RenderContext =\n /* */\n 16;\n var CommitContext =\n /* */\n 32;\n var RootIncomplete = 0;\n var RootFatalErrored = 1;\n var RootErrored = 2;\n var RootSuspended = 3;\n var RootSuspendedWithDelay = 4;\n var RootCompleted = 5; // Describes where we are in the React execution stack\n\n var executionContext = NoContext; // The root we're working on\n\n var workInProgressRoot = null; // The fiber we're working on\n\n var workInProgress = null; // The expiration time we're rendering\n\n var renderExpirationTime$1 = NoWork; // Whether to root completed, errored, suspended, etc.\n\n var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown\n\n var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render.\n // This is conceptually a time stamp but expressed in terms of an ExpirationTime\n // because we deal mostly with expiration times in the hot path, so this avoids\n // the conversion happening in the hot path.\n\n var workInProgressRootLatestProcessedExpirationTime = Sync;\n var workInProgressRootLatestSuspenseTimeout = Sync;\n var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only\n // includes unprocessed updates, not work in bailed out children.\n\n var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately.\n // This flag determines if it might be worthwhile to restart if an opportunity\n // happens latere.\n\n var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train\n // model where we don't commit new loading states in too quick succession.\n\n var globalMostRecentFallbackTime = 0;\n var FALLBACK_THROTTLE_MS = 500;\n var nextEffect = null;\n var hasUncaughtError = false;\n var firstUncaughtError = null;\n var legacyErrorBoundariesThatAlreadyFailed = null;\n var rootDoesHavePassiveEffects = false;\n var rootWithPendingPassiveEffects = null;\n var pendingPassiveEffectsRenderPriority = NoPriority;\n var pendingPassiveEffectsExpirationTime = NoWork;\n var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates\n\n var NESTED_UPDATE_LIMIT = 50;\n var nestedUpdateCount = 0;\n var rootWithNestedUpdates = null;\n var NESTED_PASSIVE_UPDATE_LIMIT = 50;\n var nestedPassiveUpdateCount = 0;\n var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times\n // during the commit phase. This enables them to be traced across components\n // that spawn new work during render. E.g. hidden boundaries, suspended SSR\n // hydration or SuspenseList.\n\n var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start\n // time). However, if two updates are scheduled within the same event, we\n // should treat their start times as simultaneous, even if the actual clock\n // time has advanced between the first and second call.\n // In other words, because expiration times determine how updates are batched,\n // we want all updates of like priority that occur within the same event to\n // receive the same expiration time. Otherwise we get tearing.\n\n var currentEventTime = NoWork;\n\n function requestCurrentTimeForUpdate() {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // We're inside React, so it's fine to read the actual time.\n return msToExpirationTime(now());\n } // We're not inside React, so we may be in the middle of a browser event.\n\n\n if (currentEventTime !== NoWork) {\n // Use the same start time for all updates until we enter React again.\n return currentEventTime;\n } // This is the first update since React yielded. Compute a new start time.\n\n\n currentEventTime = msToExpirationTime(now());\n return currentEventTime;\n }\n\n function getCurrentTime() {\n return msToExpirationTime(now());\n }\n\n function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {\n var mode = fiber.mode;\n\n if ((mode & BlockingMode) === NoMode) {\n return Sync;\n }\n\n var priorityLevel = getCurrentPriorityLevel();\n\n if ((mode & ConcurrentMode) === NoMode) {\n return priorityLevel === ImmediatePriority ? Sync : Batched;\n }\n\n if ((executionContext & RenderContext) !== NoContext) {\n // Use whatever time we're already rendering\n // TODO: Should there be a way to opt out, like with `runWithPriority`?\n return renderExpirationTime$1;\n }\n\n var expirationTime;\n\n if (suspenseConfig !== null) {\n // Compute an expiration time based on the Suspense timeout.\n expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);\n } else {\n // Compute an expiration time based on the Scheduler priority.\n switch (priorityLevel) {\n case ImmediatePriority:\n expirationTime = Sync;\n break;\n\n case UserBlockingPriority$1:\n // TODO: Rename this to computeUserBlockingExpiration\n expirationTime = computeInteractiveExpiration(currentTime);\n break;\n\n case NormalPriority:\n case LowPriority:\n // TODO: Handle LowPriority\n // TODO: Rename this to... something better.\n expirationTime = computeAsyncExpiration(currentTime);\n break;\n\n case IdlePriority:\n expirationTime = Idle;\n break;\n\n default:\n {\n {\n throw Error(\"Expected a valid priority level\");\n }\n }\n }\n } // If we're in the middle of rendering a tree, do not update at the same\n // expiration time that is already rendering.\n // TODO: We shouldn't have to do this if the update is on a different root.\n // Refactor computeExpirationForFiber + scheduleUpdate so we have access to\n // the root when we check for this condition.\n\n\n if (workInProgressRoot !== null && expirationTime === renderExpirationTime$1) {\n // This is a trick to move this update into a separate batch\n expirationTime -= 1;\n }\n\n return expirationTime;\n }\n\n function scheduleUpdateOnFiber(fiber, expirationTime) {\n checkForNestedUpdates();\n warnAboutRenderPhaseUpdatesInDEV(fiber);\n var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);\n\n if (root === null) {\n warnAboutUpdateOnUnmountedFiberInDEV(fiber);\n return;\n }\n\n checkForInterruption(fiber, expirationTime);\n recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the\n // priority as an argument to that function and this one.\n\n var priorityLevel = getCurrentPriorityLevel();\n\n if (expirationTime === Sync) {\n if ( // Check if we're inside unbatchedUpdates\n (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering\n (executionContext & (RenderContext | CommitContext)) === NoContext) {\n // Register pending interactions on the root to avoid losing traced interaction data.\n schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed\n // root inside of batchedUpdates should be synchronous, but layout updates\n // should be deferred until the end of the batch.\n\n performSyncWorkOnRoot(root);\n } else {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, expirationTime);\n\n if (executionContext === NoContext) {\n // Flush the synchronous work now, unless we're already working or inside\n // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n // scheduleCallbackForFiber to preserve the ability to schedule a callback\n // without immediately flushing it. We only do this for user-initiated\n // updates, to preserve historical behavior of legacy mode.\n flushSyncCallbackQueue();\n }\n }\n } else {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, expirationTime);\n }\n\n if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered\n // discrete, even inside a discrete event.\n priorityLevel === UserBlockingPriority$1 || priorityLevel === ImmediatePriority)) {\n // This is the result of a discrete event. Track the lowest priority\n // discrete update per root so we can flush them early, if needed.\n if (rootsWithPendingDiscreteUpdates === null) {\n rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);\n } else {\n var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);\n\n if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {\n rootsWithPendingDiscreteUpdates.set(root, expirationTime);\n }\n }\n }\n }\n\n var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending\n // work without treating it as a typical update that originates from an event;\n // e.g. retrying a Suspense boundary isn't an update, but it does schedule work\n // on a fiber.\n\n function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime$1);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n }\n\n function getNextRootExpirationTimeToWorkOn(root) {\n // Determines the next expiration time that the root should render, taking\n // into account levels that may be suspended, or levels that may have\n // received a ping.\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n return lastExpiredTime;\n } // \"Pending\" refers to any update that hasn't committed yet, including if it\n // suspended. The \"suspended\" range is therefore a subset.\n\n\n var firstPendingTime = root.firstPendingTime;\n\n if (!isRootSuspendedAtTime(root, firstPendingTime)) {\n // The highest priority pending time is not suspended. Let's work on that.\n return firstPendingTime;\n } // If the first pending time is suspended, check if there's a lower priority\n // pending level that we know about. Or check if we received a ping. Work\n // on whichever is higher priority.\n\n\n var lastPingedTime = root.lastPingedTime;\n var nextKnownPendingLevel = root.nextKnownPendingLevel;\n var nextLevel = lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel;\n\n if (nextLevel <= Idle && firstPendingTime !== nextLevel) {\n // Don't work on Idle/Never priority unless everything else is committed.\n return NoWork;\n }\n\n return nextLevel;\n } // Use this function to schedule a task for a root. There's only one task per\n // root; if a task was already scheduled, we'll check to make sure the\n // expiration time of the existing task is the same as the expiration time of\n // the next level that the root has work on. This function is called on every\n // update, and right before exiting a task.\n\n\n function ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that\n // goes through Scheduler.\n\n\n function performConcurrentWorkOnRoot(root, didTimeout) {\n // Since we know we're in a React event, we can clear the current\n // event time. The next update will compute a new event time.\n currentEventTime = NoWork;\n\n if (didTimeout) {\n // The render task took too long to complete. Mark the current time as\n // expired to synchronously render all expired work in a single batch.\n var currentTime = requestCurrentTimeForUpdate();\n markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback.\n\n ensureRootIsScheduled(root);\n return null;\n } // Determine the next expiration time to work on, using the fields stored\n // on the root.\n\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n\n if (expirationTime !== NoWork) {\n var originalCallbackNode = root.callbackNode;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Should not already be working.\");\n }\n }\n\n flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {\n prepareFreshStack(root, expirationTime);\n startWorkOnPendingInteractions(root, expirationTime);\n } // If we have a work-in-progress fiber, it means there's still work to do\n // in this root.\n\n\n if (workInProgress !== null) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher();\n var prevInteractions = pushInteractions(root);\n startWorkLoopTimer(workInProgress);\n\n do {\n try {\n workLoopConcurrent();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n {\n popInteractions(prevInteractions);\n }\n\n if (workInProgressRootExitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n stopInterruptedWorkLoopTimer();\n prepareFreshStack(root, expirationTime);\n markRootSuspendedAtTime(root, expirationTime);\n ensureRootIsScheduled(root);\n throw fatalError;\n }\n\n if (workInProgress !== null) {\n // There's still work left over. Exit without committing.\n stopInterruptedWorkLoopTimer();\n } else {\n // We now have a consistent tree. The next step is either to commit it,\n // or, if something suspended, wait to commit it after a timeout.\n stopFinishedWorkLoopTimer();\n var finishedWork = root.finishedWork = root.current.alternate;\n root.finishedExpirationTime = expirationTime;\n finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime);\n }\n\n ensureRootIsScheduled(root);\n\n if (root.callbackNode === originalCallbackNode) {\n // The task node scheduled for this root is the same one that's\n // currently executed. Need to return a continuation.\n return performConcurrentWorkOnRoot.bind(null, root);\n }\n }\n }\n\n return null;\n }\n\n function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) {\n // Set this to null to indicate there's no in-progress render.\n workInProgressRoot = null;\n\n switch (exitStatus) {\n case RootIncomplete:\n case RootFatalErrored:\n {\n {\n {\n throw Error(\"Root did not complete. This is a bug in React.\");\n }\n }\n }\n // Flow knows about invariant, so it complains if I add a break\n // statement, but eslint doesn't know about invariant, so it complains\n // if I do. eslint-disable-next-line no-fallthrough\n\n case RootErrored:\n {\n // If this was an async render, the error may have happened due to\n // a mutation in a concurrent event. Try rendering one more time,\n // synchronously, to see if the error goes away. If there are\n // lower priority updates, let's include those, too, in case they\n // fix the inconsistency. Render at Idle to include all updates.\n // If it was Idle or Never or some not-yet-invented time, render\n // at that time.\n markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous\n // and therefore not hit this path again.\n\n break;\n }\n\n case RootSuspended:\n {\n markRootSuspendedAtTime(root, expirationTime);\n var lastSuspendedTime = root.lastSuspendedTime;\n\n if (expirationTime === lastSuspendedTime) {\n root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);\n } // We have an acceptable loading state. We need to figure out if we\n // should immediately commit it or wait a bit.\n // If we have processed new updates during this render, we may now\n // have a new loading state ready. We want to ensure that we commit\n // that as soon as possible.\n\n\n var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;\n\n if (hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope\n !IsThisRendererActing.current) {\n // If we have not processed any new updates during this pass, then\n // this is either a retry of an existing fallback state or a\n // hidden tree. Hidden trees shouldn't be batched with other work\n // and after that's fixed it can only be a retry. We're going to\n // throttle committing retries so that we don't show too many\n // loading states too quickly.\n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.\n\n if (msUntilTimeout > 10) {\n if (workInProgressRootHasPendingPing) {\n var lastPingedTime = root.lastPingedTime;\n\n if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) {\n // This render was pinged but we didn't get to restart\n // earlier so try restarting now instead.\n root.lastPingedTime = expirationTime;\n prepareFreshStack(root, expirationTime);\n break;\n }\n }\n\n var nextTime = getNextRootExpirationTimeToWorkOn(root);\n\n if (nextTime !== NoWork && nextTime !== expirationTime) {\n // There's additional work on this root.\n break;\n }\n\n if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) {\n // We should prefer to render the fallback of at the last\n // suspended level. Ping the last suspended level to try\n // rendering it again.\n root.lastPingedTime = lastSuspendedTime;\n break;\n } // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n\n\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root);\n break;\n }\n\n case RootSuspendedWithDelay:\n {\n markRootSuspendedAtTime(root, expirationTime);\n var _lastSuspendedTime = root.lastSuspendedTime;\n\n if (expirationTime === _lastSuspendedTime) {\n root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);\n }\n\n if ( // do not delay if we're inside an act() scope\n !IsThisRendererActing.current) {\n // We're suspended in a state that should be avoided. We'll try to\n // avoid committing it for as long as the timeouts let us.\n if (workInProgressRootHasPendingPing) {\n var _lastPingedTime = root.lastPingedTime;\n\n if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) {\n // This render was pinged but we didn't get to restart earlier\n // so try restarting now instead.\n root.lastPingedTime = expirationTime;\n prepareFreshStack(root, expirationTime);\n break;\n }\n }\n\n var _nextTime = getNextRootExpirationTimeToWorkOn(root);\n\n if (_nextTime !== NoWork && _nextTime !== expirationTime) {\n // There's additional work on this root.\n break;\n }\n\n if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) {\n // We should prefer to render the fallback of at the last\n // suspended level. Ping the last suspended level to try\n // rendering it again.\n root.lastPingedTime = _lastSuspendedTime;\n break;\n }\n\n var _msUntilTimeout;\n\n if (workInProgressRootLatestSuspenseTimeout !== Sync) {\n // We have processed a suspense config whose expiration time we\n // can use as the timeout.\n _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();\n } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {\n // This should never normally happen because only new updates\n // cause delayed states, so we should have processed something.\n // However, this could also happen in an offscreen tree.\n _msUntilTimeout = 0;\n } else {\n // If we don't have a suspense config, we're going to use a\n // heuristic to determine how long we can suspend.\n var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);\n var currentTimeMs = now();\n var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;\n var timeElapsed = currentTimeMs - eventTimeMs;\n\n if (timeElapsed < 0) {\n // We get this wrong some time since we estimate the time.\n timeElapsed = 0;\n }\n\n _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the\n // event time is exact instead of inferred from expiration time\n // we don't need this.\n\n if (timeUntilExpirationMs < _msUntilTimeout) {\n _msUntilTimeout = timeUntilExpirationMs;\n }\n } // Don't bother with a very short suspense time.\n\n\n if (_msUntilTimeout > 10) {\n // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root);\n break;\n }\n\n case RootCompleted:\n {\n // The work completed. Ready to commit.\n if ( // do not delay if we're inside an act() scope\n !IsThisRendererActing.current && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {\n // If we have exceeded the minimum loading delay, which probably\n // means we have shown a spinner already, we might have to suspend\n // a bit longer to ensure that the spinner is shown for\n // enough time.\n var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);\n\n if (_msUntilTimeout2 > 10) {\n markRootSuspendedAtTime(root, expirationTime);\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);\n break;\n }\n }\n\n commitRoot(root);\n break;\n }\n\n default:\n {\n {\n {\n throw Error(\"Unknown root exit status.\");\n }\n }\n }\n }\n } // This is the entry point for synchronous tasks that don't go\n // through Scheduler\n\n\n function performSyncWorkOnRoot(root) {\n // Check if there's expired work on this root. Otherwise, render at Sync.\n var lastExpiredTime = root.lastExpiredTime;\n var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Should not already be working.\");\n }\n }\n\n flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {\n prepareFreshStack(root, expirationTime);\n startWorkOnPendingInteractions(root, expirationTime);\n } // If we have a work-in-progress fiber, it means there's still work to do\n // in this root.\n\n\n if (workInProgress !== null) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher();\n var prevInteractions = pushInteractions(root);\n startWorkLoopTimer(workInProgress);\n\n do {\n try {\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n {\n popInteractions(prevInteractions);\n }\n\n if (workInProgressRootExitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n stopInterruptedWorkLoopTimer();\n prepareFreshStack(root, expirationTime);\n markRootSuspendedAtTime(root, expirationTime);\n ensureRootIsScheduled(root);\n throw fatalError;\n }\n\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n {\n {\n throw Error(\"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n } else {\n // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n stopFinishedWorkLoopTimer();\n root.finishedWork = root.current.alternate;\n root.finishedExpirationTime = expirationTime;\n finishSyncRender(root);\n } // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n\n ensureRootIsScheduled(root);\n }\n\n return null;\n }\n\n function finishSyncRender(root) {\n // Set this to null to indicate there's no in-progress render.\n workInProgressRoot = null;\n commitRoot(root);\n }\n\n function flushDiscreteUpdates() {\n // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.\n // However, `act` uses `batchedUpdates`, so there's no way to distinguish\n // those two cases. Need to fix this before exposing flushDiscreteUpdates\n // as a public API.\n if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');\n }\n } // We're already rendering, so we can't synchronously flush pending work.\n // This is probably a nested event dispatch triggered by a lifecycle/effect,\n // like `el.focus()`. Exit.\n\n return;\n }\n\n flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that\n // they fire before the next serial event.\n\n flushPassiveEffects();\n }\n\n function syncUpdates(fn, a, b, c) {\n return runWithPriority$1(ImmediatePriority, fn.bind(null, a, b, c));\n }\n\n function flushPendingDiscreteUpdates() {\n if (rootsWithPendingDiscreteUpdates !== null) {\n // For each root with pending discrete updates, schedule a callback to\n // immediately flush them.\n var roots = rootsWithPendingDiscreteUpdates;\n rootsWithPendingDiscreteUpdates = null;\n roots.forEach(function (expirationTime, root) {\n markRootExpiredAtTime(root, expirationTime);\n ensureRootIsScheduled(root);\n }); // Now flush the immediate queue.\n\n flushSyncCallbackQueue();\n }\n }\n\n function batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n flushSyncCallbackQueue();\n }\n }\n }\n\n function batchedEventUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= EventContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n flushSyncCallbackQueue();\n }\n }\n }\n\n function discreteUpdates$1(fn, a, b, c, d) {\n var prevExecutionContext = executionContext;\n executionContext |= DiscreteEventContext;\n\n try {\n // Should this\n return runWithPriority$1(UserBlockingPriority$1, fn.bind(null, a, b, c, d));\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n flushSyncCallbackQueue();\n }\n }\n }\n\n function unbatchedUpdates(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext &= ~BatchedContext;\n executionContext |= LegacyUnbatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n flushSyncCallbackQueue();\n }\n }\n }\n\n function flushSync(fn, a) {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n {\n {\n throw Error(\"flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.\");\n }\n }\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return runWithPriority$1(ImmediatePriority, fn.bind(null, a));\n } finally {\n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n // Note that this will happen even if batchedUpdates is higher up\n // the stack.\n\n flushSyncCallbackQueue();\n }\n }\n\n function prepareFreshStack(root, expirationTime) {\n root.finishedWork = null;\n root.finishedExpirationTime = NoWork;\n var timeoutHandle = root.timeoutHandle;\n\n if (timeoutHandle !== noTimeout) {\n // The root previous suspended and scheduled a timeout to commit a fallback\n // state. Now that we have additional work, cancel the timeout.\n root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above\n\n cancelTimeout(timeoutHandle);\n }\n\n if (workInProgress !== null) {\n var interruptedWork = workInProgress.return;\n\n while (interruptedWork !== null) {\n unwindInterruptedWork(interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n }\n\n workInProgressRoot = root;\n workInProgress = createWorkInProgress(root.current, null);\n renderExpirationTime$1 = expirationTime;\n workInProgressRootExitStatus = RootIncomplete;\n workInProgressRootFatalError = null;\n workInProgressRootLatestProcessedExpirationTime = Sync;\n workInProgressRootLatestSuspenseTimeout = Sync;\n workInProgressRootCanSuspendUsingConfig = null;\n workInProgressRootNextUnprocessedUpdateTime = NoWork;\n workInProgressRootHasPendingPing = false;\n {\n spawnedWorkDuringRender = null;\n }\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n }\n\n function handleError(root, thrownValue) {\n do {\n try {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksAfterThrow();\n resetCurrentFiber();\n\n if (workInProgress === null || workInProgress.return === null) {\n // Expected to be working on a non-root fiber. This is a fatal error\n // because there's no ancestor that can handle it; the root is\n // supposed to capture all errors that weren't caught by an error\n // boundary.\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n // sibling, or the parent if there are no siblings. But since the root\n // has no siblings nor a parent, we set it to null. Usually this is\n // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n // interntionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return null;\n }\n\n if (enableProfilerTimer && workInProgress.mode & ProfileMode) {\n // Record the time spent rendering before an error was thrown. This\n // avoids inaccurate Profiler durations in the case of a\n // suspended render.\n stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);\n }\n\n throwException(root, workInProgress.return, workInProgress, thrownValue, renderExpirationTime$1);\n workInProgress = completeUnitOfWork(workInProgress);\n } catch (yetAnotherThrownValue) {\n // Something in the return path also threw.\n thrownValue = yetAnotherThrownValue;\n continue;\n } // Return to the normal work loop.\n\n\n return;\n } while (true);\n }\n\n function pushDispatcher(root) {\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n if (prevDispatcher === null) {\n // The React isomorphic package does not include a default dispatcher.\n // Instead the first renderer will lazily attach one, in order to give\n // nicer error messages.\n return ContextOnlyDispatcher;\n } else {\n return prevDispatcher;\n }\n }\n\n function popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n\n function pushInteractions(root) {\n {\n var prevInteractions = tracing.__interactionsRef.current;\n tracing.__interactionsRef.current = root.memoizedInteractions;\n return prevInteractions;\n }\n }\n\n function popInteractions(prevInteractions) {\n {\n tracing.__interactionsRef.current = prevInteractions;\n }\n }\n\n function markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now();\n }\n\n function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {\n if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) {\n workInProgressRootLatestProcessedExpirationTime = expirationTime;\n }\n\n if (suspenseConfig !== null) {\n if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) {\n workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad.\n\n workInProgressRootCanSuspendUsingConfig = suspenseConfig;\n }\n }\n }\n\n function markUnprocessedUpdateTime(expirationTime) {\n if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) {\n workInProgressRootNextUnprocessedUpdateTime = expirationTime;\n }\n }\n\n function renderDidSuspend() {\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootSuspended;\n }\n }\n\n function renderDidSuspendDelayIfPossible() {\n if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {\n workInProgressRootExitStatus = RootSuspendedWithDelay;\n } // Check if there's a lower priority update somewhere else in the tree.\n\n\n if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) {\n // Mark the current render as suspended, and then mark that there's a\n // pending update.\n // TODO: This should immediately interrupt the current render, instead\n // of waiting until the next time we yield.\n markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime$1);\n markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime);\n }\n }\n\n function renderDidError() {\n if (workInProgressRootExitStatus !== RootCompleted) {\n workInProgressRootExitStatus = RootErrored;\n }\n } // Called during render to determine if anything has suspended.\n // Returns false if we're not sure.\n\n\n function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }\n\n function inferTimeFromExpirationTime(expirationTime) {\n // We don't know exactly when the update was scheduled, but we can infer an\n // approximate start time from the expiration time.\n var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);\n return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;\n }\n\n function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {\n // We don't know exactly when the update was scheduled, but we can infer an\n // approximate start time from the expiration time by subtracting the timeout\n // that was added to the event time.\n var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);\n return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);\n } // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n /** @noinline */\n\n\n function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }\n /** @noinline */\n\n\n function workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n }\n\n function performUnitOfWork(unitOfWork) {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = unitOfWork.alternate;\n startWorkTimer(unitOfWork);\n setCurrentFiber(unitOfWork);\n var next;\n\n if ((unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork$1(current, unitOfWork, renderExpirationTime$1);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork$1(current, unitOfWork, renderExpirationTime$1);\n }\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n next = completeUnitOfWork(unitOfWork);\n }\n\n ReactCurrentOwner$2.current = null;\n return next;\n }\n\n function completeUnitOfWork(unitOfWork) {\n // Attempt to complete the current unit of work, then move to the next\n // sibling. If there are no more siblings, return to the parent fiber.\n workInProgress = unitOfWork;\n\n do {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = workInProgress.alternate;\n var returnFiber = workInProgress.return; // Check if the work completed or if something threw.\n\n if ((workInProgress.effectTag & Incomplete) === NoEffect) {\n setCurrentFiber(workInProgress);\n var next = void 0;\n\n if ((workInProgress.mode & ProfileMode) === NoMode) {\n next = completeWork(current, workInProgress, renderExpirationTime$1);\n } else {\n startProfilerTimer(workInProgress);\n next = completeWork(current, workInProgress, renderExpirationTime$1); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);\n }\n\n stopWorkTimer(workInProgress);\n resetCurrentFiber();\n resetChildExpirationTime(workInProgress);\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n return next;\n }\n\n if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete\n (returnFiber.effectTag & Incomplete) === NoEffect) {\n // Append all the effects of the subtree and this fiber onto the effect\n // list of the parent. The completion order of the children affects the\n // side-effect order.\n if (returnFiber.firstEffect === null) {\n returnFiber.firstEffect = workInProgress.firstEffect;\n }\n\n if (workInProgress.lastEffect !== null) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;\n }\n\n returnFiber.lastEffect = workInProgress.lastEffect;\n } // If this fiber had side-effects, we append it AFTER the children's\n // side-effects. We can perform certain side-effects earlier if needed,\n // by doing multiple passes over the effect list. We don't want to\n // schedule our own side-effect on our own list because if end up\n // reusing children we'll schedule this effect onto itself since we're\n // at the end.\n\n\n var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect\n // list. PerformedWork effect is read by React DevTools but shouldn't be\n // committed.\n\n if (effectTag > PerformedWork) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = workInProgress;\n } else {\n returnFiber.firstEffect = workInProgress;\n }\n\n returnFiber.lastEffect = workInProgress;\n }\n }\n } else {\n // This fiber did not complete because something threw. Pop values off\n // the stack without entering the complete phase. If this is a boundary,\n // capture values if possible.\n var _next = unwindWork(workInProgress); // Because this fiber did not complete, don't reset its expiration time.\n\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = workInProgress.actualDuration;\n var child = workInProgress.child;\n\n while (child !== null) {\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n workInProgress.actualDuration = actualDuration;\n }\n\n if (_next !== null) {\n // If completing this work spawned new work, do that next. We'll come\n // back here again.\n // Since we're restarting, remove anything that is not a host effect\n // from the effect tag.\n // TODO: The name stopFailedWorkTimer is misleading because Suspense\n // also captures and restarts.\n stopFailedWorkTimer(workInProgress);\n _next.effectTag &= HostEffectMask;\n return _next;\n }\n\n stopWorkTimer(workInProgress);\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its effect list.\n returnFiber.firstEffect = returnFiber.lastEffect = null;\n returnFiber.effectTag |= Incomplete;\n }\n }\n\n var siblingFiber = workInProgress.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n return siblingFiber;\n } // Otherwise, return to the parent\n\n\n workInProgress = returnFiber;\n } while (workInProgress !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootCompleted;\n }\n\n return null;\n }\n\n function getRemainingExpirationTime(fiber) {\n var updateExpirationTime = fiber.expirationTime;\n var childExpirationTime = fiber.childExpirationTime;\n return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime;\n }\n\n function resetChildExpirationTime(completedWork) {\n if (renderExpirationTime$1 !== Never && completedWork.childExpirationTime === Never) {\n // The children of this component are hidden. Don't bubble their\n // expiration times.\n return;\n }\n\n var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time.\n\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var actualDuration = completedWork.actualDuration;\n var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n // When work is done, it should bubble to the parent's actualDuration. If\n // the fiber has not been cloned though, (meaning no work was done), then\n // this value will reflect the amount of time spent working on a previous\n // render. In that case it should not bubble. We determine whether it was\n // cloned by comparing the child pointer.\n\n var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;\n var child = completedWork.child;\n\n while (child !== null) {\n var childUpdateExpirationTime = child.expirationTime;\n var childChildExpirationTime = child.childExpirationTime;\n\n if (childUpdateExpirationTime > newChildExpirationTime) {\n newChildExpirationTime = childUpdateExpirationTime;\n }\n\n if (childChildExpirationTime > newChildExpirationTime) {\n newChildExpirationTime = childChildExpirationTime;\n }\n\n if (shouldBubbleActualDurations) {\n actualDuration += child.actualDuration;\n }\n\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n\n while (_child !== null) {\n var _childUpdateExpirationTime = _child.expirationTime;\n var _childChildExpirationTime = _child.childExpirationTime;\n\n if (_childUpdateExpirationTime > newChildExpirationTime) {\n newChildExpirationTime = _childUpdateExpirationTime;\n }\n\n if (_childChildExpirationTime > newChildExpirationTime) {\n newChildExpirationTime = _childChildExpirationTime;\n }\n\n _child = _child.sibling;\n }\n }\n\n completedWork.childExpirationTime = newChildExpirationTime;\n }\n\n function commitRoot(root) {\n var renderPriorityLevel = getCurrentPriorityLevel();\n runWithPriority$1(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel));\n return null;\n }\n\n function commitRootImpl(root, renderPriorityLevel) {\n do {\n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n // means `flushPassiveEffects` will sometimes result in additional\n // passive effects. So we need to keep flushing in a loop until there are\n // no more pending effects.\n // TODO: Might be better if `flushPassiveEffects` did not automatically\n // flush synchronous work at the end, to avoid factoring hazards like this.\n flushPassiveEffects();\n } while (rootWithPendingPassiveEffects !== null);\n\n flushRenderPhaseStrictModeWarningsInDEV();\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Should not already be working.\");\n }\n }\n\n var finishedWork = root.finishedWork;\n var expirationTime = root.finishedExpirationTime;\n\n if (finishedWork === null) {\n return null;\n }\n\n root.finishedWork = null;\n root.finishedExpirationTime = NoWork;\n\n if (!(finishedWork !== root.current)) {\n {\n throw Error(\"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\");\n }\n } // commitRoot never returns a continuation; it always finishes synchronously.\n // So we can clear these now to allow a new callback to be scheduled.\n\n\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n root.nextKnownPendingLevel = NoWork;\n startCommitTimer(); // Update the first and last pending times on this root. The new first\n // pending time is whatever is left on the root fiber.\n\n var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork);\n markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit);\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n renderExpirationTime$1 = NoWork;\n } // This indicates that the last root we worked on is not the same one that\n // we're committing now. This most commonly happens when a suspended root\n // times out.\n // Get the list of effects.\n\n\n var firstEffect;\n\n if (finishedWork.effectTag > PerformedWork) {\n // A fiber's effect list consists only of its children, not itself. So if\n // the root has an effect, we need to add it to the end of the list. The\n // resulting list is the set that would belong to the root's parent, if it\n // had one; that is, all the effects in the tree including the root.\n if (finishedWork.lastEffect !== null) {\n finishedWork.lastEffect.nextEffect = finishedWork;\n firstEffect = finishedWork.firstEffect;\n } else {\n firstEffect = finishedWork;\n }\n } else {\n // There is no effect on the root.\n firstEffect = finishedWork.firstEffect;\n }\n\n if (firstEffect !== null) {\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles\n\n ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n // of the effect list for each phase: all mutation effects come before all\n // layout effects, and so on.\n // The first phase a \"before mutation\" phase. We use this phase to read the\n // state of the host tree right before we mutate it. This is where\n // getSnapshotBeforeUpdate is called.\n\n startCommitSnapshotEffectsTimer();\n prepareForCommit(root.containerInfo);\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitBeforeMutationEffects, null);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var error = clearCaughtError();\n captureCommitPhaseError(nextEffect, error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n stopCommitSnapshotEffectsTimer();\n {\n // Mark the current commit time to be shared by all Profilers in this\n // batch. This enables them to be grouped later.\n recordCommitTime();\n } // The next phase is the mutation phase, where we mutate the host tree.\n\n startCommitHostEffectsTimer();\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var _error = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n stopCommitHostEffectsTimer();\n resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after\n // the mutation phase, so that the previous tree is still current during\n // componentWillUnmount, but before the layout phase, so that the finished\n // work is current during componentDidMount/Update.\n\n root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n // the host tree after it's been mutated. The idiomatic use case for this is\n // layout, but class component lifecycles also fire here for legacy reasons.\n\n startCommitLifeCyclesTimer();\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var _error2 = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error2);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n stopCommitLifeCyclesTimer();\n nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an\n // opportunity to paint.\n\n requestPaint();\n {\n popInteractions(prevInteractions);\n }\n executionContext = prevExecutionContext;\n } else {\n // No effects.\n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n // no effects.\n // TODO: Maybe there's a better way to report this.\n\n startCommitSnapshotEffectsTimer();\n stopCommitSnapshotEffectsTimer();\n {\n recordCommitTime();\n }\n startCommitHostEffectsTimer();\n stopCommitHostEffectsTimer();\n startCommitLifeCyclesTimer();\n stopCommitLifeCyclesTimer();\n }\n\n stopCommitTimer();\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n if (rootDoesHavePassiveEffects) {\n // This commit has passive effects. Stash a reference to them. But don't\n // schedule a callback until after flushing layout work.\n rootDoesHavePassiveEffects = false;\n rootWithPendingPassiveEffects = root;\n pendingPassiveEffectsExpirationTime = expirationTime;\n pendingPassiveEffectsRenderPriority = renderPriorityLevel;\n } else {\n // We are done with the effect chain at this point so let's clear the\n // nextEffect pointers to assist with GC. If we have passive effects, we'll\n // clear this in flushPassiveEffects.\n nextEffect = firstEffect;\n\n while (nextEffect !== null) {\n var nextNextEffect = nextEffect.nextEffect;\n nextEffect.nextEffect = null;\n nextEffect = nextNextEffect;\n }\n } // Check if there's remaining work on this root\n\n\n var remainingExpirationTime = root.firstPendingTime;\n\n if (remainingExpirationTime !== NoWork) {\n {\n if (spawnedWorkDuringRender !== null) {\n var expirationTimes = spawnedWorkDuringRender;\n spawnedWorkDuringRender = null;\n\n for (var i = 0; i < expirationTimes.length; i++) {\n scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);\n }\n }\n\n schedulePendingInteractions(root, remainingExpirationTime);\n }\n } else {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n\n {\n if (!rootDidHavePassiveEffects) {\n // If there are no passive effects, then we can complete the pending interactions.\n // Otherwise, we'll wait until after the passive effects are flushed.\n // Wait to do this until after remaining work has been scheduled,\n // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.\n finishPendingInteractions(root, expirationTime);\n }\n }\n\n if (remainingExpirationTime === Sync) {\n // Count the number of times the root synchronously re-renders without\n // finishing. If there are too many, it indicates an infinite update loop.\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n }\n\n onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n ensureRootIsScheduled(root);\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var _error3 = firstUncaughtError;\n firstUncaughtError = null;\n throw _error3;\n }\n\n if ((executionContext & LegacyUnbatchedContext) !== NoContext) {\n // This is a legacy edge case. We just committed the initial mount of\n // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired\n // synchronously, but layout updates should be deferred until the end\n // of the batch.\n return null;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncCallbackQueue();\n return null;\n }\n\n function commitBeforeMutationEffects() {\n while (nextEffect !== null) {\n var effectTag = nextEffect.effectTag;\n\n if ((effectTag & Snapshot) !== NoEffect) {\n setCurrentFiber(nextEffect);\n recordEffect();\n var current = nextEffect.alternate;\n commitBeforeMutationLifeCycles(current, nextEffect);\n resetCurrentFiber();\n }\n\n if ((effectTag & Passive) !== NoEffect) {\n // If there are passive effects, schedule a callback to flush at\n // the earliest opportunity.\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n\n nextEffect = nextEffect.nextEffect;\n }\n }\n\n function commitMutationEffects(root, renderPriorityLevel) {\n // TODO: Should probably move the bulk of this function to commitWork.\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var effectTag = nextEffect.effectTag;\n\n if (effectTag & ContentReset) {\n commitResetTextContent(nextEffect);\n }\n\n if (effectTag & Ref) {\n var current = nextEffect.alternate;\n\n if (current !== null) {\n commitDetachRef(current);\n }\n } // The following switch statement is only concerned about placement,\n // updates, and deletions. To avoid needing to add a case for every possible\n // bitmap value, we remove the secondary effects from the effect tag and\n // switch on that value.\n\n\n var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating);\n\n switch (primaryEffectTag) {\n case Placement:\n {\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted does\n // and isMounted is deprecated anyway so we should be able to kill this.\n\n nextEffect.effectTag &= ~Placement;\n break;\n }\n\n case PlacementAndUpdate:\n {\n // Placement\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n\n nextEffect.effectTag &= ~Placement; // Update\n\n var _current = nextEffect.alternate;\n commitWork(_current, nextEffect);\n break;\n }\n\n case Hydrating:\n {\n nextEffect.effectTag &= ~Hydrating;\n break;\n }\n\n case HydratingAndUpdate:\n {\n nextEffect.effectTag &= ~Hydrating; // Update\n\n var _current2 = nextEffect.alternate;\n commitWork(_current2, nextEffect);\n break;\n }\n\n case Update:\n {\n var _current3 = nextEffect.alternate;\n commitWork(_current3, nextEffect);\n break;\n }\n\n case Deletion:\n {\n commitDeletion(root, nextEffect, renderPriorityLevel);\n break;\n }\n } // TODO: Only record a mutation effect if primaryEffectTag is non-zero.\n\n\n recordEffect();\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n }\n\n function commitLayoutEffects(root, committedExpirationTime) {\n // TODO: Should probably move the bulk of this function to commitWork.\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var effectTag = nextEffect.effectTag;\n\n if (effectTag & (Update | Callback)) {\n recordEffect();\n var current = nextEffect.alternate;\n commitLifeCycles(root, current, nextEffect);\n }\n\n if (effectTag & Ref) {\n recordEffect();\n commitAttachRef(nextEffect);\n }\n\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n }\n\n function flushPassiveEffects() {\n if (pendingPassiveEffectsRenderPriority !== NoPriority) {\n var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority ? NormalPriority : pendingPassiveEffectsRenderPriority;\n pendingPassiveEffectsRenderPriority = NoPriority;\n return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);\n }\n }\n\n function flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n }\n\n var root = rootWithPendingPassiveEffects;\n var expirationTime = pendingPassiveEffectsExpirationTime;\n rootWithPendingPassiveEffects = null;\n pendingPassiveEffectsExpirationTime = NoWork;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Cannot flush passive effects while already rendering.\");\n }\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root);\n {\n // Note: This currently assumes there are no passive effects on the root fiber\n // because the root is not part of its own effect list.\n // This could change in the future.\n var _effect2 = root.current.firstEffect;\n\n while (_effect2 !== null) {\n {\n setCurrentFiber(_effect2);\n invokeGuardedCallback(null, commitPassiveHookEffects, null, _effect2);\n\n if (hasCaughtError()) {\n if (!(_effect2 !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var _error5 = clearCaughtError();\n\n captureCommitPhaseError(_effect2, _error5);\n }\n\n resetCurrentFiber();\n }\n var nextNextEffect = _effect2.nextEffect; // Remove nextEffect pointer to assist GC\n\n _effect2.nextEffect = null;\n _effect2 = nextNextEffect;\n }\n }\n {\n popInteractions(prevInteractions);\n finishPendingInteractions(root, expirationTime);\n }\n executionContext = prevExecutionContext;\n flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n\n nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;\n return true;\n }\n\n function isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n }\n\n function markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n }\n\n function prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n }\n\n var onUncaughtError = prepareToThrowUncaughtError;\n\n function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, Sync);\n enqueueUpdate(rootFiber, update);\n var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync);\n\n if (root !== null) {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, Sync);\n }\n }\n\n function captureCommitPhaseError(sourceFiber, error) {\n if (sourceFiber.tag === HostRoot) {\n // Error was thrown at the root. There is no parent, so the root\n // itself should capture it.\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n return;\n }\n\n var fiber = sourceFiber.return;\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, // TODO: This is always sync\n Sync);\n enqueueUpdate(fiber, update);\n var root = markUpdateTimeFromFiberToRoot(fiber, Sync);\n\n if (root !== null) {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, Sync);\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n }\n\n function pingSuspendedRoot(root, thenable, suspendedTime) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The thenable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(thenable);\n }\n\n if (workInProgressRoot === root && renderExpirationTime$1 === suspendedTime) {\n // Received a ping at the same priority level at which we're currently\n // rendering. We might want to restart this render. This should mirror\n // the logic of whether or not a root suspends once it completes.\n // TODO: If we're rendering sync either due to Sync, Batched or expired,\n // we should probably never restart.\n // If we're suspended with delay, we'll always suspend so we can always\n // restart. If we're suspended without any updates, it might be a retry.\n // If it's early in the retry we can restart. We can't know for sure\n // whether we'll eventually process an update during this render pass,\n // but it's somewhat unlikely that we get to a ping before that, since\n // getting to the root most update is usually very fast.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && workInProgressRootLatestProcessedExpirationTime === Sync && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Restart from the root. Don't need to schedule a ping because\n // we're already working on this tree.\n prepareFreshStack(root, renderExpirationTime$1);\n } else {\n // Even though we can't restart right now, we might get an\n // opportunity later. So we mark this render as having a ping.\n workInProgressRootHasPendingPing = true;\n }\n\n return;\n }\n\n if (!isRootSuspendedAtTime(root, suspendedTime)) {\n // The root is no longer suspended at this time.\n return;\n }\n\n var lastPingedTime = root.lastPingedTime;\n\n if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) {\n // There's already a lower priority ping scheduled.\n return;\n } // Mark the time at which this ping was scheduled.\n\n\n root.lastPingedTime = suspendedTime;\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, suspendedTime);\n }\n\n function retryTimedOutBoundary(boundaryFiber, retryTime) {\n // The boundary fiber (a Suspense component or SuspenseList component)\n // previously was rendered in its fallback state. One of the promises that\n // suspended it has resolved, which means at least part of the tree was\n // likely unblocked. Try rendering again, at a new expiration time.\n if (retryTime === NoWork) {\n var suspenseConfig = null; // Retries don't carry over the already committed update.\n\n var currentTime = requestCurrentTimeForUpdate();\n retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig);\n } // TODO: Special case idle priority?\n\n\n var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime);\n\n if (root !== null) {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, retryTime);\n }\n }\n\n function resolveRetryThenable(boundaryFiber, thenable) {\n var retryTime = NoWork; // Default\n\n var retryCache;\n {\n retryCache = boundaryFiber.stateNode;\n }\n\n if (retryCache !== null) {\n // The thenable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(thenable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryTime);\n } // Computes the next Just Noticeable Difference (JND) boundary.\n // The theory is that a person can't tell the difference between small differences in time.\n // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable\n // difference in the experience. However, waiting for longer might mean that we can avoid\n // showing an intermediate loading state. The longer we have already waited, the harder it\n // is to tell small differences in time. Therefore, the longer we've already waited,\n // the longer we can wait additionally. At some point we have to give up though.\n // We pick a train model where the next boundary commits at a consistent schedule.\n // These particular numbers are vague estimates. We expect to adjust them based on research.\n\n\n function jnd(timeElapsed) {\n return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;\n }\n\n function computeMsUntilSuspenseLoadingDelay(mostRecentEventTime, committedExpirationTime, suspenseConfig) {\n var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0;\n\n if (busyMinDurationMs <= 0) {\n return 0;\n }\n\n var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire.\n\n var currentTimeMs = now();\n var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig(mostRecentEventTime, suspenseConfig);\n var timeElapsed = currentTimeMs - eventTimeMs;\n\n if (timeElapsed <= busyDelayMs) {\n // If we haven't yet waited longer than the initial delay, we don't\n // have to wait any additional time.\n return 0;\n }\n\n var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`.\n\n return msUntilTimeout;\n }\n\n function checkForNestedUpdates() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = null;\n {\n {\n throw Error(\"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\");\n }\n }\n }\n\n {\n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n }\n }\n }\n\n function flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n {\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n }\n }\n\n function stopFinishedWorkLoopTimer() {\n var didCompleteRoot = true;\n stopWorkLoopTimer(interruptedBy, didCompleteRoot);\n interruptedBy = null;\n }\n\n function stopInterruptedWorkLoopTimer() {\n // TODO: Track which fiber caused the interruption.\n var didCompleteRoot = false;\n stopWorkLoopTimer(interruptedBy, didCompleteRoot);\n interruptedBy = null;\n }\n\n function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) {\n if (workInProgressRoot !== null && updateExpirationTime > renderExpirationTime$1) {\n interruptedBy = fiberThatReceivedUpdate;\n }\n }\n\n var didWarnStateUpdateForUnmountedComponent = null;\n\n function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {\n {\n var tag = fiber.tag;\n\n if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentName(fiber.type) || 'ReactComponent';\n\n if (didWarnStateUpdateForUnmountedComponent !== null) {\n if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForUnmountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForUnmountedComponent = new Set([componentName]);\n }\n\n error(\"Can't perform a React state update on an unmounted component. This \" + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));\n }\n }\n\n var beginWork$1;\n {\n var dummyFiber = null;\n\n beginWork$1 = function (current, unitOfWork, expirationTime) {\n // If a component throws an error, we replay it again in a synchronously\n // dispatched event, so that the debugger will treat it as an uncaught\n // error See ReactErrorUtils for more information.\n // Before entering the begin phase, copy the work-in-progress onto a dummy\n // fiber. If beginWork throws, we'll use this to reset the state.\n var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n try {\n return beginWork(current, unitOfWork, expirationTime);\n } catch (originalError) {\n if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises. Treat everything else like an error.\n throw originalError;\n } // Keep this code in sync with handleError; any changes here must have\n // corresponding changes there.\n\n\n resetContextDependencies();\n resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the\n // same fiber again.\n // Unwind the failed stack frame\n\n unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.\n\n assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if (unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n } // Run beginWork again.\n\n\n invokeGuardedCallback(null, beginWork, null, current, unitOfWork, expirationTime);\n\n if (hasCaughtError()) {\n var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.\n // Rethrow this error instead of the original one.\n\n throw replayError;\n } else {\n // This branch is reachable if the render phase is impure.\n throw originalError;\n }\n }\n };\n }\n var didWarnAboutUpdateInRender = false;\n var didWarnAboutUpdateInRenderForAnotherComponent;\n {\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n }\n\n function warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering && (executionContext & RenderContext) !== NoContext) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentName(fiber.type) || 'Unknown';\n error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://fb.me/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n if (!didWarnAboutUpdateInRender) {\n error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n didWarnAboutUpdateInRender = true;\n }\n\n break;\n }\n }\n }\n }\n } // a 'shared' variable that changes when act() opens/closes in tests.\n\n\n var IsThisRendererActing = {\n current: false\n };\n\n function warnIfNotScopedWithMatchingAct(fiber) {\n {\n if (IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {\n error(\"It looks like you're using the wrong act() around your test interactions.\\n\" + 'Be sure to use the matching version of act() corresponding to your renderer:\\n\\n' + '// for react-dom:\\n' + \"import {act} from 'react-dom/test-utils';\\n\" + '// ...\\n' + 'act(() => ...);\\n\\n' + '// for react-test-renderer:\\n' + \"import TestRenderer from 'react-test-renderer';\\n\" + 'const {act} = TestRenderer;\\n' + '// ...\\n' + 'act(() => ...);' + '%s', getStackByFiberInDevAndProd(fiber));\n }\n }\n }\n\n function warnIfNotCurrentlyActingEffectsInDEV(fiber) {\n {\n if ((fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n error('An update to %s ran an effect, but was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));\n }\n }\n }\n\n function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {\n {\n if (executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n error('An update to %s inside a test was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));\n }\n }\n }\n\n var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.\n\n var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked\n // scheduler is the actual recommendation. The alternative could be a testing build,\n // a new lib, or whatever; we dunno just yet. This message is for early adopters\n // to get their tests right.\n\n function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n }\n\n function computeThreadID(root, expirationTime) {\n // Interaction threads are unique per root and expiration time.\n return expirationTime * 1000 + root.interactionThreadID;\n }\n\n function markSpawnedWork(expirationTime) {\n if (spawnedWorkDuringRender === null) {\n spawnedWorkDuringRender = [expirationTime];\n } else {\n spawnedWorkDuringRender.push(expirationTime);\n }\n }\n\n function scheduleInteractions(root, expirationTime, interactions) {\n if (interactions.size > 0) {\n var pendingInteractionMap = root.pendingInteractionMap;\n var pendingInteractions = pendingInteractionMap.get(expirationTime);\n\n if (pendingInteractions != null) {\n interactions.forEach(function (interaction) {\n if (!pendingInteractions.has(interaction)) {\n // Update the pending async work count for previously unscheduled interaction.\n interaction.__count++;\n }\n\n pendingInteractions.add(interaction);\n });\n } else {\n pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions.\n\n interactions.forEach(function (interaction) {\n interaction.__count++;\n });\n }\n\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, expirationTime);\n subscriber.onWorkScheduled(interactions, threadID);\n }\n }\n }\n\n function schedulePendingInteractions(root, expirationTime) {\n scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);\n }\n\n function startWorkOnPendingInteractions(root, expirationTime) {\n // we can accurately attribute time spent working on it, And so that cascading\n // work triggered during the render phase will be associated with it.\n var interactions = new Set();\n root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {\n if (scheduledExpirationTime >= expirationTime) {\n scheduledInteractions.forEach(function (interaction) {\n return interactions.add(interaction);\n });\n }\n }); // Store the current set of interactions on the FiberRoot for a few reasons:\n // We can re-use it in hot functions like performConcurrentWorkOnRoot()\n // without having to recalculate it. We will also use it in commitWork() to\n // pass to any Profiler onRender() hooks. This also provides DevTools with a\n // way to access it when the onCommitRoot() hook is called.\n\n root.memoizedInteractions = interactions;\n\n if (interactions.size > 0) {\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, expirationTime);\n\n try {\n subscriber.onWorkStarted(interactions, threadID);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority, function () {\n throw error;\n });\n }\n }\n }\n }\n\n function finishPendingInteractions(root, committedExpirationTime) {\n var earliestRemainingTimeAfterCommit = root.firstPendingTime;\n var subscriber;\n\n try {\n subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null && root.memoizedInteractions.size > 0) {\n var threadID = computeThreadID(root, committedExpirationTime);\n subscriber.onWorkStopped(root.memoizedInteractions, threadID);\n }\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority, function () {\n throw error;\n });\n } finally {\n // Clear completed interactions from the pending Map.\n // Unless the render was suspended or cascading work was scheduled,\n // In which case– leave pending interactions until the subsequent render.\n var pendingInteractionMap = root.pendingInteractionMap;\n pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {\n // Only decrement the pending interaction count if we're done.\n // If there's still work at the current priority,\n // That indicates that we are waiting for suspense data.\n if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {\n pendingInteractionMap.delete(scheduledExpirationTime);\n scheduledInteractions.forEach(function (interaction) {\n interaction.__count--;\n\n if (subscriber !== null && interaction.__count === 0) {\n try {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority, function () {\n throw error;\n });\n }\n }\n });\n }\n });\n }\n }\n\n var onScheduleFiberRoot = null;\n var onCommitFiberRoot = null;\n var onCommitFiberUnmount = null;\n var hasLoggedError = false;\n var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\n\n function injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n\n if (!hook.supportsFiber) {\n {\n error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');\n } // DevTools exists, even though it doesn't support Fiber.\n\n return true;\n }\n\n try {\n var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n if (true) {\n // Only used by Fast Refresh\n if (typeof hook.onScheduleFiberRoot === 'function') {\n onScheduleFiberRoot = function (root, children) {\n try {\n hook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if (true && !hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n };\n }\n }\n\n onCommitFiberRoot = function (root, expirationTime) {\n try {\n var didError = (root.current.effectTag & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n var currentTime = getCurrentTime();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime);\n hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);\n } else {\n hook.onCommitFiberRoot(rendererID, root, undefined, didError);\n }\n } catch (err) {\n if (true) {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n };\n\n onCommitFiberUnmount = function (fiber) {\n try {\n hook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n if (true) {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n };\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n error('React instrumentation encountered an error: %s.', err);\n }\n } // DevTools exists\n\n\n return true;\n }\n\n function onScheduleRoot(root, children) {\n if (typeof onScheduleFiberRoot === 'function') {\n onScheduleFiberRoot(root, children);\n }\n }\n\n function onCommitRoot(root, expirationTime) {\n if (typeof onCommitFiberRoot === 'function') {\n onCommitFiberRoot(root, expirationTime);\n }\n }\n\n function onCommitUnmount(fiber) {\n if (typeof onCommitFiberUnmount === 'function') {\n onCommitFiberUnmount(fiber);\n }\n }\n\n var hasBadMapPolyfill;\n {\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n var testMap = new Map([[nonExtensibleObject, null]]);\n var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused.\n // https://github.com/rollup/rollup/issues/1771\n // TODO: we can remove these if Rollup fixes the bug.\n\n testMap.set(0, 0);\n testSet.add(0);\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n }\n var debugCounter = 1;\n\n function FiberNode(tag, pendingProps, key, mode) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.elementType = null;\n this.type = null;\n this.stateNode = null; // Fiber\n\n this.return = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n this.ref = null;\n this.pendingProps = pendingProps;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n this.dependencies = null;\n this.mode = mode; // Effects\n\n this.effectTag = NoEffect;\n this.nextEffect = null;\n this.firstEffect = null;\n this.lastEffect = null;\n this.expirationTime = NoWork;\n this.childExpirationTime = NoWork;\n this.alternate = null;\n {\n // Note: The following is done to avoid a v8 performance cliff.\n //\n // Initializing the fields below to smis and later updating them with\n // double values will cause Fibers to end up having separate shapes.\n // This behavior/bug has something to do with Object.preventExtension().\n // Fortunately this only impacts DEV builds.\n // Unfortunately it makes React unusably slow for some applications.\n // To work around this, initialize the fields below with doubles.\n //\n // Learn more about this here:\n // https://github.com/facebook/react/issues/14365\n // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n this.actualDuration = Number.NaN;\n this.actualStartTime = Number.NaN;\n this.selfBaseDuration = Number.NaN;\n this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n // This won't trigger the performance cliff mentioned above,\n // and it simplifies other profiler code (including DevTools).\n\n this.actualDuration = 0;\n this.actualStartTime = -1;\n this.selfBaseDuration = 0;\n this.treeBaseDuration = 0;\n } // This is normally DEV-only except www when it adds listeners.\n // TODO: remove the User Timing integration in favor of Root Events.\n\n {\n this._debugID = debugCounter++;\n this._debugIsCurrentlyTiming = false;\n }\n {\n this._debugSource = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\n\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n } // This is a constructor function, rather than a POJO constructor, still\n // please ensure we do the following:\n // 1) Nobody should add any instance methods on this. Instance methods can be\n // more difficult to predict when they get optimized and they are almost\n // never inlined properly in static compilers.\n // 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n // always know when it is a fiber.\n // 3) We might want to experiment with using numeric keys since they are easier\n // to optimize in a non-JIT environment.\n // 4) We can easily go from a constructor to a createFiber object literal if that\n // is faster.\n // 5) It should be easy to port this to a C struct and keep a C implementation\n // compatible.\n\n\n var createFiber = function (tag, pendingProps, key, mode) {\n // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, pendingProps, key, mode);\n };\n\n function shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n }\n\n function isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;\n }\n\n function resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n\n return IndeterminateComponent;\n } // This is used to create an alternate fiber to do work on.\n\n\n function createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n {\n // DEV-only fields\n {\n workInProgress._debugID = current._debugID;\n }\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.effectTag = NoEffect; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n expirationTime: currentDependencies.expirationTime,\n firstContext: currentDependencies.firstContext,\n responders: currentDependencies.responders\n }; // These will be overridden during the parent's reconciliation\n\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n return workInProgress;\n } // Used to reuse a Fiber for a second pass.\n\n\n function resetWorkInProgress(workInProgress, renderExpirationTime) {\n // This resets the Fiber to what createFiber or createWorkInProgress would\n // have set the values to before during the first pass. Ideally this wouldn't\n // be necessary but unfortunately many code paths reads from the workInProgress\n // when they should be reading from current and writing to workInProgress.\n // We assume pendingProps, index, key, ref, return are still untouched to\n // avoid doing another reconciliation.\n // Reset the effect tag but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.effectTag &= Placement; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childExpirationTime = NoWork;\n workInProgress.expirationTime = renderExpirationTime;\n workInProgress.child = null;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = 0;\n workInProgress.treeBaseDuration = 0;\n }\n } else {\n // Reset to the cloned values that createWorkInProgress would've.\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n expirationTime: currentDependencies.expirationTime,\n firstContext: currentDependencies.firstContext,\n responders: currentDependencies.responders\n };\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n }\n\n return workInProgress;\n }\n\n function createHostRootFiber(tag) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode | BlockingMode | StrictMode;\n } else if (tag === BlockingRoot) {\n mode = BlockingMode | StrictMode;\n } else {\n mode = NoMode;\n }\n\n if (isDevToolsPresent) {\n // Always collect profile timings when DevTools are present.\n // This enables DevTools to start capturing timing at any point–\n // Without some nodes in the tree having empty base times.\n mode |= ProfileMode;\n }\n\n return createFiber(HostRoot, null, null, mode);\n }\n\n function createFiberFromTypeAndProps(type, // React$ElementType\n key, pendingProps, owner, mode, expirationTime) {\n var fiber;\n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n var resolvedType = type;\n\n if (typeof type === 'function') {\n if (shouldConstruct(type)) {\n fiberTag = ClassComponent;\n {\n resolvedType = resolveClassForHotReloading(resolvedType);\n }\n } else {\n {\n resolvedType = resolveFunctionForHotReloading(resolvedType);\n }\n }\n } else if (typeof type === 'string') {\n fiberTag = HostComponent;\n } else {\n getTag: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);\n\n case REACT_CONCURRENT_MODE_TYPE:\n fiberTag = Mode;\n mode |= ConcurrentMode | BlockingMode | StrictMode;\n break;\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictMode;\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, expirationTime, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, expirationTime, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key);\n\n default:\n {\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = ContextProvider;\n break getTag;\n\n case REACT_CONTEXT_TYPE:\n // This is a consumer\n fiberTag = ContextConsumer;\n break getTag;\n\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n break getTag;\n\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\n\n case REACT_BLOCK_TYPE:\n fiberTag = Block;\n break getTag;\n }\n }\n\n var info = '';\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n\n var ownerName = owner ? getComponentName(owner.type) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n {\n {\n throw Error(\"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" + (type == null ? type : typeof type) + \".\" + info);\n }\n }\n }\n }\n }\n\n fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.expirationTime = expirationTime;\n return fiber;\n }\n\n function createFiberFromElement(element, mode, expirationTime) {\n var owner = null;\n {\n owner = element._owner;\n }\n var type = element.type;\n var key = element.key;\n var pendingProps = element.props;\n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n return fiber;\n }\n\n function createFiberFromFragment(elements, mode, expirationTime, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.expirationTime = expirationTime;\n return fiber;\n }\n\n function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {\n {\n if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {\n error('Profiler must specify an \"id\" string and \"onRender\" function as props');\n }\n }\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.\n\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.type = REACT_PROFILER_TYPE;\n fiber.expirationTime = expirationTime;\n return fiber;\n }\n\n function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n fiber.type = REACT_SUSPENSE_TYPE;\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.expirationTime = expirationTime;\n return fiber;\n }\n\n function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n {\n // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n fiber.type = REACT_SUSPENSE_LIST_TYPE;\n }\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.expirationTime = expirationTime;\n return fiber;\n }\n\n function createFiberFromText(content, mode, expirationTime) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.expirationTime = expirationTime;\n return fiber;\n }\n\n function createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.\n\n fiber.elementType = 'DELETED';\n fiber.type = 'DELETED';\n return fiber;\n }\n\n function createFiberFromPortal(portal, mode, expirationTime) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.expirationTime = expirationTime;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n } // Used for stashing WIP properties to replay failed work in DEV.\n\n\n function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n } // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n {\n target._debugID = source._debugID;\n }\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n }\n\n function FiberRootNode(containerInfo, tag, hydrate) {\n this.tag = tag;\n this.current = null;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.pingCache = null;\n this.finishedExpirationTime = NoWork;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.context = null;\n this.pendingContext = null;\n this.hydrate = hydrate;\n this.callbackNode = null;\n this.callbackPriority = NoPriority;\n this.firstPendingTime = NoWork;\n this.firstSuspendedTime = NoWork;\n this.lastSuspendedTime = NoWork;\n this.nextKnownPendingLevel = NoWork;\n this.lastPingedTime = NoWork;\n this.lastExpiredTime = NoWork;\n {\n this.interactionThreadID = tracing.unstable_getThreadID();\n this.memoizedInteractions = new Set();\n this.pendingInteractionMap = new Map();\n }\n }\n\n function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {\n var root = new FiberRootNode(containerInfo, tag, hydrate); // stateNode is any.\n\n var uninitializedFiber = createHostRootFiber(tag);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n initializeUpdateQueue(uninitializedFiber);\n return root;\n }\n\n function isRootSuspendedAtTime(root, expirationTime) {\n var firstSuspendedTime = root.firstSuspendedTime;\n var lastSuspendedTime = root.lastSuspendedTime;\n return firstSuspendedTime !== NoWork && firstSuspendedTime >= expirationTime && lastSuspendedTime <= expirationTime;\n }\n\n function markRootSuspendedAtTime(root, expirationTime) {\n var firstSuspendedTime = root.firstSuspendedTime;\n var lastSuspendedTime = root.lastSuspendedTime;\n\n if (firstSuspendedTime < expirationTime) {\n root.firstSuspendedTime = expirationTime;\n }\n\n if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) {\n root.lastSuspendedTime = expirationTime;\n }\n\n if (expirationTime <= root.lastPingedTime) {\n root.lastPingedTime = NoWork;\n }\n\n if (expirationTime <= root.lastExpiredTime) {\n root.lastExpiredTime = NoWork;\n }\n }\n\n function markRootUpdatedAtTime(root, expirationTime) {\n // Update the range of pending times\n var firstPendingTime = root.firstPendingTime;\n\n if (expirationTime > firstPendingTime) {\n root.firstPendingTime = expirationTime;\n } // Update the range of suspended times. Treat everything lower priority or\n // equal to this update as unsuspended.\n\n\n var firstSuspendedTime = root.firstSuspendedTime;\n\n if (firstSuspendedTime !== NoWork) {\n if (expirationTime >= firstSuspendedTime) {\n // The entire suspended range is now unsuspended.\n root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;\n } else if (expirationTime >= root.lastSuspendedTime) {\n root.lastSuspendedTime = expirationTime + 1;\n } // This is a pending level. Check if it's higher priority than the next\n // known pending level.\n\n\n if (expirationTime > root.nextKnownPendingLevel) {\n root.nextKnownPendingLevel = expirationTime;\n }\n }\n }\n\n function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) {\n // Update the range of pending times\n root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or\n // equal to this update as unsuspended.\n\n if (finishedExpirationTime <= root.lastSuspendedTime) {\n // The entire suspended range is now unsuspended.\n root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;\n } else if (finishedExpirationTime <= root.firstSuspendedTime) {\n // Part of the suspended range is now unsuspended. Narrow the range to\n // include everything between the unsuspended time (non-inclusive) and the\n // last suspended time.\n root.firstSuspendedTime = finishedExpirationTime - 1;\n }\n\n if (finishedExpirationTime <= root.lastPingedTime) {\n // Clear the pinged time\n root.lastPingedTime = NoWork;\n }\n\n if (finishedExpirationTime <= root.lastExpiredTime) {\n // Clear the expired time\n root.lastExpiredTime = NoWork;\n }\n }\n\n function markRootExpiredAtTime(root, expirationTime) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) {\n root.lastExpiredTime = expirationTime;\n }\n }\n\n var didWarnAboutNestedUpdates;\n var didWarnAboutFindNodeInStrictMode;\n {\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n }\n\n function getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n\n return parentContext;\n }\n\n function findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n } else {\n {\n {\n throw Error(\"Argument appears to not be a ReactComponent. Keys: \" + Object.keys(component));\n }\n }\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictMode) {\n var componentName = getComponentName(fiber.type) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n\n if (fiber.mode & StrictMode) {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));\n } else {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));\n }\n }\n }\n\n return hostFiber.stateNode;\n }\n }\n\n function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {\n return createFiberRoot(containerInfo, tag, hydrate);\n }\n\n function updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n var current$1 = container.current;\n var currentTime = requestCurrentTimeForUpdate();\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfUnmockedScheduler(current$1);\n warnIfNotScopedWithMatchingAct(current$1);\n }\n }\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, current$1, suspenseConfig);\n var context = getContextForSubtree(parentComponent);\n\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n {\n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');\n }\n }\n var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: element\n };\n callback = callback === undefined ? null : callback;\n\n if (callback !== null) {\n {\n if (typeof callback !== 'function') {\n error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n update.callback = callback;\n }\n\n enqueueUpdate(current$1, update);\n scheduleWork(current$1, expirationTime);\n return expirationTime;\n }\n\n function getPublicRootInstance(container) {\n var containerFiber = container.current;\n\n if (!containerFiber.child) {\n return null;\n }\n\n switch (containerFiber.child.tag) {\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n\n default:\n return containerFiber.child.stateNode;\n }\n }\n\n function markRetryTimeImpl(fiber, retryTime) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n if (suspenseState.retryTime < retryTime) {\n suspenseState.retryTime = retryTime;\n }\n }\n } // Increases the priority of thennables when they resolve within this boundary.\n\n\n function markRetryTimeIfNotHydrated(fiber, retryTime) {\n markRetryTimeImpl(fiber, retryTime);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryTimeImpl(alternate, retryTime);\n }\n }\n\n function attemptUserBlockingHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate());\n scheduleWork(fiber, expTime);\n markRetryTimeIfNotHydrated(fiber, expTime);\n }\n\n function attemptContinuousHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n scheduleWork(fiber, ContinuousHydration);\n markRetryTimeIfNotHydrated(fiber, ContinuousHydration);\n }\n\n function attemptHydrationAtCurrentPriority$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority other than synchronously flush it.\n return;\n }\n\n var currentTime = requestCurrentTimeForUpdate();\n var expTime = computeExpirationForFiber(currentTime, fiber, null);\n scheduleWork(fiber, expTime);\n markRetryTimeIfNotHydrated(fiber, expTime);\n }\n\n function findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.tag === FundamentalComponent) {\n return hostFiber.stateNode.instance;\n }\n\n return hostFiber.stateNode;\n }\n\n var shouldSuspendImpl = function (fiber) {\n return false;\n };\n\n function shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n }\n\n var overrideHookState = null;\n var overrideProps = null;\n var scheduleUpdate = null;\n var setSuspenseHandler = null;\n {\n var copyWithSetImpl = function (obj, path, idx, value) {\n if (idx >= path.length) {\n return value;\n }\n\n var key = path[idx];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n // For now, the \"id\" of stateful hooks is just the stateful hook index.\n // This may change in the future with e.g. nested hooks.\n var currentHook = fiber.memoizedState;\n\n while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n\n if (currentHook !== null) {\n var newState = copyWithSet(currentHook.memoizedState, path, value);\n currentHook.memoizedState = newState;\n currentHook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleWork(fiber, Sync);\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleWork(fiber, Sync);\n };\n\n scheduleUpdate = function (fiber) {\n scheduleWork(fiber, Sync);\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n }\n\n function injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals(_assign({}, devToolsConfig, {\n overrideHookState: overrideHookState,\n overrideProps: overrideProps,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: function (fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n },\n findFiberByHostInstance: function (instance) {\n if (!findFiberByHostInstance) {\n // Might not be implemented by the renderer.\n return null;\n }\n\n return findFiberByHostInstance(instance);\n },\n // React Refresh\n findHostInstancesForRefresh: findHostInstancesForRefresh,\n scheduleRefresh: scheduleRefresh,\n scheduleRoot: scheduleRoot,\n setRefreshHandler: setRefreshHandler,\n // Enables DevTools to append owner stacks to error messages in DEV mode.\n getCurrentFiber: function () {\n return current;\n }\n }));\n }\n\n var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing;\n\n function ReactDOMRoot(container, options) {\n this._internalRoot = createRootImpl(container, ConcurrentRoot, options);\n }\n\n function ReactDOMBlockingRoot(container, tag, options) {\n this._internalRoot = createRootImpl(container, tag, options);\n }\n\n ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {\n var root = this._internalRoot;\n {\n if (typeof arguments[1] === 'function') {\n error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n\n var container = root.containerInfo;\n\n if (container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(root.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + \"root.unmount() to empty a root's container.\");\n }\n }\n }\n }\n updateContainer(children, root, null, null);\n };\n\n ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {\n {\n if (typeof arguments[0] === 'function') {\n error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n }\n var root = this._internalRoot;\n var container = root.containerInfo;\n updateContainer(null, root, null, function () {\n unmarkContainerAsRoot(container);\n });\n };\n\n function createRootImpl(container, tag, options) {\n // Tag is either LegacyRoot or Concurrent Root\n var hydrate = options != null && options.hydrate === true;\n var hydrationCallbacks = options != null && options.hydrationOptions || null;\n var root = createContainer(container, tag, hydrate);\n markContainerAsRoot(root.current, container);\n\n if (hydrate && tag !== LegacyRoot) {\n var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument;\n eagerlyTrapReplayableEvents(container, doc);\n }\n\n return root;\n }\n\n function createLegacyRoot(container, options) {\n return new ReactDOMBlockingRoot(container, LegacyRoot, options);\n }\n\n function isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n }\n\n var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\n var topLevelUpdateWarnings;\n var warnedAboutHydrateAPI = false;\n {\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n }\n }\n }\n\n var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));\n\n if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');\n }\n\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');\n }\n };\n }\n\n function getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n }\n\n function shouldHydrateDueToLegacyHeuristic(container) {\n var rootElement = getReactRootElementInContainer(container);\n return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));\n }\n\n function legacyCreateRootFromDOMContainer(container, forceHydrate) {\n var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.\n\n if (!shouldHydrate) {\n var warned = false;\n var rootSibling;\n\n while (rootSibling = container.lastChild) {\n {\n if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {\n warned = true;\n error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');\n }\n }\n container.removeChild(rootSibling);\n }\n }\n\n {\n if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {\n warnedAboutHydrateAPI = true;\n warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');\n }\n }\n return createLegacyRoot(container, shouldHydrate ? {\n hydrate: true\n } : undefined);\n }\n\n function warnOnInvalidCallback$1(callback, callerName) {\n {\n if (callback !== null && typeof callback !== 'function') {\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n }\n }\n\n function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n } // TODO: Without `any` type, Flow says \"Property cannot be accessed on any\n // member of intersection type.\" Whyyyyyy.\n\n var root = container._reactRootContainer;\n var fiberRoot;\n\n if (!root) {\n // Initial mount\n root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n originalCallback.call(instance);\n };\n } // Initial mount should not be batched.\n\n\n unbatchedUpdates(function () {\n updateContainer(children, fiberRoot, parentComponent, callback);\n });\n } else {\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n\n _originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, fiberRoot, parentComponent, callback);\n }\n\n return getPublicRootInstance(fiberRoot);\n }\n\n function findDOMNode(componentOrElement) {\n {\n var owner = ReactCurrentOwner$3.current;\n\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n if (!warnedAboutRefsInRender) {\n error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component');\n }\n\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n\n if (componentOrElement == null) {\n return null;\n }\n\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n }\n\n function hydrate(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error(\"Target container is not a DOM element.\");\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n }\n\n function render(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error(\"Target container is not a DOM element.\");\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n }\n }\n return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n }\n\n function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n if (!isValidContainer(containerNode)) {\n {\n throw Error(\"Target container is not a DOM element.\");\n }\n }\n\n if (!(parentComponent != null && has(parentComponent))) {\n {\n throw Error(\"parentComponent must be a valid React Component\");\n }\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n }\n\n function unmountComponentAtNode(container) {\n if (!isValidContainer(container)) {\n {\n throw Error(\"unmountComponentAtNode(...): Target container is not a DOM element.\");\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);\n\n if (renderedByDifferentReact) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n }\n } // Unmount should not be batched.\n\n unbatchedUpdates(function () {\n legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n // $FlowFixMe This should probably use `delete container._reactRootContainer`\n container._reactRootContainer = null;\n unmarkContainerAsRoot(container);\n });\n }); // If you call unmountComponentAtNode twice in quick succession, you'll\n // get `true` twice. That's probably fine?\n\n return true;\n } else {\n {\n var _rootEl = getReactRootElementInContainer(container);\n\n var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;\n\n if (hasNonRootReactChild) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n }\n }\n return false;\n }\n }\n\n function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\n implementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n }\n\n var ReactVersion = '16.13.1';\n setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);\n setAttemptContinuousHydration(attemptContinuousHydration$1);\n setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\n var didWarnAboutUnstableCreatePortal = false;\n {\n if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype\n Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');\n }\n }\n setRestoreImplementation(restoreControlledState$3);\n setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);\n\n function createPortal$1(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n {\n throw Error(\"Target container is not a DOM element.\");\n }\n } // TODO: pass ReactDOM portal implementation as third argument\n // $FlowFixMe The Flow type is opaque but there's no way to actually create it.\n\n\n return createPortal(children, container, null, key);\n }\n\n function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n }\n\n function unstable_createPortal(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n {\n if (!didWarnAboutUnstableCreatePortal) {\n didWarnAboutUnstableCreatePortal = true;\n warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the \"unstable_\" prefix.');\n }\n }\n return createPortal$1(children, container, key);\n }\n\n var Internals = {\n // Keep in sync with ReactDOMUnstableNativeDependencies.js\n // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.\n Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]\n };\n var foundDevTools = injectIntoDevTools({\n findFiberByHostInstance: getClosestInstanceFromNode,\n bundleType: 1,\n version: ReactVersion,\n rendererPackageName: 'react-dom'\n });\n {\n if (!foundDevTools && canUseDOM && window.top === window.self) {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n if (/^(https?|file):$/.test(protocol)) {\n // eslint-disable-next-line react-internal/no-production-logging\n console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');\n }\n }\n }\n }\n exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\n exports.createPortal = createPortal$1;\n exports.findDOMNode = findDOMNode;\n exports.flushSync = flushSync;\n exports.hydrate = hydrate;\n exports.render = render;\n exports.unmountComponentAtNode = unmountComponentAtNode;\n exports.unstable_batchedUpdates = batchedUpdates$1;\n exports.unstable_createPortal = unstable_createPortal;\n exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\n exports.version = ReactVersion;\n })();\n}","map":{"version":3,"sources":["C:/Users/user/Documents/myapp/node_modules/react-dom/cjs/react-dom.development.js"],"names":["process","env","NODE_ENV","React","require","_assign","Scheduler","checkPropTypes","tracing","ReactSharedInternals","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","hasOwnProperty","ReactCurrentDispatcher","current","ReactCurrentBatchConfig","suspense","warn","format","_len","arguments","length","args","Array","_key","printWarning","error","_len2","_key2","level","hasExistingStack","indexOf","ReactDebugCurrentFrame","stack","getStackAddendum","concat","argsWithFormat","map","item","unshift","Function","prototype","apply","call","console","argIndex","message","replace","Error","x","invokeGuardedCallbackImpl","name","func","context","a","b","c","d","e","f","funcArgs","slice","onError","window","dispatchEvent","document","createEvent","fakeNode","createElement","invokeGuardedCallbackDev","evt","didError","windowEvent","event","windowEventDescriptor","Object","getOwnPropertyDescriptor","callCallback","removeEventListener","evtType","didSetError","isCrossOriginError","handleWindowError","colno","lineno","defaultPrevented","_suppressLogging","inner","addEventListener","initEvent","defineProperty","invokeGuardedCallbackImpl$1","hasError","caughtError","hasRethrowError","rethrowError","reporter","invokeGuardedCallback","invokeGuardedCallbackAndCatchFirstError","clearCaughtError","rethrowCaughtError","hasCaughtError","getFiberCurrentPropsFromNode","getInstanceFromNode","getNodeFromInstance","setComponentTree","getFiberCurrentPropsFromNodeImpl","getInstanceFromNodeImpl","getNodeFromInstanceImpl","validateEventDispatches","dispatchListeners","_dispatchListeners","dispatchInstances","_dispatchInstances","listenersIsArr","isArray","listenersLen","instancesIsArr","instancesLen","executeDispatch","listener","inst","type","currentTarget","undefined","executeDispatchesInOrder","i","isPropagationStopped","FunctionComponent","ClassComponent","IndeterminateComponent","HostRoot","HostPortal","HostComponent","HostText","Fragment","Mode","ContextConsumer","ContextProvider","ForwardRef","Profiler","SuspenseComponent","MemoComponent","SimpleMemoComponent","LazyComponent","IncompleteClassComponent","DehydratedFragment","SuspenseListComponent","FundamentalComponent","ScopeComponent","Block","eventPluginOrder","namesToPlugins","recomputePluginOrdering","pluginName","pluginModule","pluginIndex","plugins","extractEvents","publishedEvents","eventTypes","eventName","publishEventForPlugin","dispatchConfig","eventNameDispatchConfigs","phasedRegistrationNames","phaseName","phasedRegistrationName","publishRegistrationName","registrationName","registrationNameModules","registrationNameDependencies","dependencies","lowerCasedName","toLowerCase","possibleRegistrationNames","ondblclick","injectEventPluginOrder","injectedEventPluginOrder","injectEventPluginsByName","injectedNamesToPlugins","isOrderingDirty","canUseDOM","PLUGIN_EVENT_SYSTEM","IS_REPLAYED","IS_FIRST_ANCESTOR","restoreImpl","restoreTarget","restoreQueue","restoreStateOfTarget","target","internalInstance","stateNode","_props","setRestoreImplementation","impl","enqueueStateRestore","push","needsStateRestore","restoreStateIfNeeded","queuedTargets","enableProfilerTimer","enableDeprecatedFlareAPI","enableFundamentalAPI","warnAboutStringRefs","batchedUpdatesImpl","fn","bookkeeping","discreteUpdatesImpl","flushDiscreteUpdatesImpl","batchedEventUpdatesImpl","isInsideEventHandler","isBatchingEventUpdates","finishEventHandler","controlledComponentsHavePendingUpdates","batchedUpdates","batchedEventUpdates","discreteUpdates","prevIsInsideEventHandler","flushDiscreteUpdatesIfNeeded","timeStamp","setBatchingImplementation","_batchedUpdatesImpl","_discreteUpdatesImpl","_flushDiscreteUpdatesImpl","_batchedEventUpdatesImpl","DiscreteEvent","UserBlockingEvent","ContinuousEvent","RESERVED","STRING","BOOLEANISH_STRING","BOOLEAN","OVERLOADED_BOOLEAN","NUMERIC","POSITIVE_NUMERIC","ATTRIBUTE_NAME_START_CHAR","ATTRIBUTE_NAME_CHAR","ROOT_ATTRIBUTE_NAME","VALID_ATTRIBUTE_NAME_REGEX","RegExp","illegalAttributeNameCache","validatedAttributeNameCache","isAttributeNameSafe","attributeName","test","shouldIgnoreAttribute","propertyInfo","isCustomComponentTag","shouldRemoveAttributeWithWarning","value","acceptsBooleans","prefix","shouldRemoveAttribute","isNaN","getPropertyInfo","properties","PropertyInfoRecord","mustUseProperty","attributeNamespace","sanitizeURL","propertyName","reservedProps","forEach","_ref","CAMELIZE","capitalize","token","toUpperCase","xlinkHref","isJavaScriptProtocol","didWarn","url","JSON","stringify","getValueForProperty","node","expected","stringValue","hasAttribute","getAttribute","getValueForAttribute","setValueForProperty","_attributeName","removeAttribute","setAttribute","_type","attributeValue","toString","setAttributeNS","BEFORE_SLASH_RE","describeComponentFrame","source","ownerName","sourceInfo","path","fileName","match","pathBeforeSlash","folderName","lineNumber","hasSymbol","Symbol","for","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","Uninitialized","Pending","Resolved","Rejected","refineResolvedLazyComponent","lazyComponent","_status","_result","initializeLazyComponentType","ctor","_ctor","thenable","then","moduleObject","defaultExport","default","getWrappedName","outerType","innerType","wrapperName","functionName","displayName","getComponentName","tag","$$typeof","render","resolvedThenable","ReactDebugCurrentFrame$1","describeFiber","fiber","owner","_debugOwner","_debugSource","getStackByFiberInDevAndProd","workInProgress","info","return","isRendering","getCurrentFiberOwnerNameInDevOrNull","getCurrentFiberStackInDev","resetCurrentFiber","getCurrentStack","setCurrentFiber","setIsRendering","rendering","getToStringValue","ReactDebugCurrentFrame$2","ReactControlledValuePropTypes","hasReadOnlyValue","button","checkbox","image","hidden","radio","reset","submit","propTypes","props","propName","componentName","onChange","readOnly","disabled","checked","tagName","isCheckable","elem","nodeName","getTracker","_valueTracker","detachTracker","getValueFromNode","trackValueOnNode","valueField","descriptor","constructor","currentValue","get","set","configurable","enumerable","tracker","getValue","setValue","stopTracking","track","updateValueIfChanged","lastValue","nextValue","didWarnValueDefaultValue","didWarnCheckedDefaultChecked","didWarnControlledToUncontrolled","didWarnUncontrolledToControlled","isControlled","usesChecked","getHostProps","element","hostProps","defaultChecked","defaultValue","_wrapperState","initialChecked","initWrapperState","initialValue","controlled","updateChecked","updateWrapper","setDefaultValue","postMountWrapper","isHydrating","isButton","restoreControlledState","updateNamedCousins","rootNode","queryRoot","parentNode","group","querySelectorAll","otherNode","form","otherProps","getFiberCurrentPropsFromNode$1","ownerDocument","activeElement","didWarnSelectedSetOnOption","didWarnInvalidChild","flattenChildren","children","content","Children","child","validateProps","selected","postMountWrapper$1","getHostProps$1","didWarnValueDefaultValue$1","getDeclarationErrorAddendum","valuePropNames","checkSelectPropTypes","multiple","updateOptions","propValue","setDefaultSelected","options","selectedValues","selectedValue","_i","defaultSelected","_selectedValue","_i2","getHostProps$2","initWrapperState$1","wasMultiple","postMountWrapper$2","postUpdateWrapper","restoreControlledState$1","didWarnValDefaultVal","getHostProps$3","dangerouslySetInnerHTML","initWrapperState$2","updateWrapper$1","newValue","postMountWrapper$3","textContent","restoreControlledState$2","HTML_NAMESPACE","MATH_NAMESPACE","SVG_NAMESPACE","Namespaces","html","mathml","svg","getIntrinsicNamespace","getChildNamespace","parentNamespace","createMicrosoftUnsafeLocalFunction","MSApp","execUnsafeLocalFunction","arg0","arg1","arg2","arg3","reusableSVGContainer","setInnerHTML","namespaceURI","innerHTML","valueOf","svgNode","firstChild","removeChild","appendChild","ELEMENT_NODE","TEXT_NODE","COMMENT_NODE","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","setTextContent","text","lastChild","nodeType","nodeValue","unsafeCastStringToDOMTopLevelType","topLevelType","unsafeCastDOMTopLevelTypeToString","makePrefixMap","styleProp","prefixes","vendorPrefixes","animationend","animationiteration","animationstart","transitionend","prefixedEventNames","style","animation","transition","getVendorPrefixedEventName","prefixMap","TOP_ABORT","TOP_ANIMATION_END","TOP_ANIMATION_ITERATION","TOP_ANIMATION_START","TOP_BLUR","TOP_CAN_PLAY","TOP_CAN_PLAY_THROUGH","TOP_CANCEL","TOP_CHANGE","TOP_CLICK","TOP_CLOSE","TOP_COMPOSITION_END","TOP_COMPOSITION_START","TOP_COMPOSITION_UPDATE","TOP_CONTEXT_MENU","TOP_COPY","TOP_CUT","TOP_DOUBLE_CLICK","TOP_AUX_CLICK","TOP_DRAG","TOP_DRAG_END","TOP_DRAG_ENTER","TOP_DRAG_EXIT","TOP_DRAG_LEAVE","TOP_DRAG_OVER","TOP_DRAG_START","TOP_DROP","TOP_DURATION_CHANGE","TOP_EMPTIED","TOP_ENCRYPTED","TOP_ENDED","TOP_ERROR","TOP_FOCUS","TOP_GOT_POINTER_CAPTURE","TOP_INPUT","TOP_INVALID","TOP_KEY_DOWN","TOP_KEY_PRESS","TOP_KEY_UP","TOP_LOAD","TOP_LOAD_START","TOP_LOADED_DATA","TOP_LOADED_METADATA","TOP_LOST_POINTER_CAPTURE","TOP_MOUSE_DOWN","TOP_MOUSE_MOVE","TOP_MOUSE_OUT","TOP_MOUSE_OVER","TOP_MOUSE_UP","TOP_PASTE","TOP_PAUSE","TOP_PLAY","TOP_PLAYING","TOP_POINTER_CANCEL","TOP_POINTER_DOWN","TOP_POINTER_MOVE","TOP_POINTER_OUT","TOP_POINTER_OVER","TOP_POINTER_UP","TOP_PROGRESS","TOP_RATE_CHANGE","TOP_RESET","TOP_SCROLL","TOP_SEEKED","TOP_SEEKING","TOP_SELECTION_CHANGE","TOP_STALLED","TOP_SUBMIT","TOP_SUSPEND","TOP_TEXT_INPUT","TOP_TIME_UPDATE","TOP_TOGGLE","TOP_TOUCH_CANCEL","TOP_TOUCH_END","TOP_TOUCH_MOVE","TOP_TOUCH_START","TOP_TRANSITION_END","TOP_VOLUME_CHANGE","TOP_WAITING","TOP_WHEEL","mediaEventTypes","getRawEventName","PossiblyWeakMap","WeakMap","Map","elementListenerMap","getListenerMapForElement","listenerMap","key","_reactInternalFiber","has","NoEffect","PerformedWork","Placement","Update","PlacementAndUpdate","Deletion","ContentReset","Callback","DidCapture","Ref","Snapshot","Passive","Hydrating","HydratingAndUpdate","LifecycleEffectMask","HostEffectMask","Incomplete","ShouldCapture","ReactCurrentOwner","getNearestMountedFiber","nearestMounted","alternate","nextNode","effectTag","getSuspenseInstanceFromFiber","suspenseState","memoizedState","dehydrated","getContainerFromFiber","containerInfo","isFiberMounted","isMounted","component","ownerFiber","instance","_warnedAboutRefsInRender","assertIsMounted","findCurrentFiberUsingSlowPath","parentA","parentB","nextParent","sibling","didFindChild","_child","findCurrentHostFiber","parent","currentParent","findCurrentHostFiberWithNoPortals","accumulateInto","next","forEachAccumulated","arr","cb","scope","eventQueue","executeDispatchesAndRelease","isPersistent","release","executeDispatchesAndReleaseTopLevel","runEventsInBatch","events","processingEventQueue","getEventTarget","nativeEvent","srcElement","correspondingUseElement","isEventSupported","eventNameSuffix","isSupported","CALLBACK_BOOKKEEPING_POOL_SIZE","callbackBookkeepingPool","releaseTopLevelCallbackBookKeeping","targetInst","ancestors","getTopLevelCallbackBookKeeping","eventSystemFlags","pop","findRootContainerNode","extractPluginEvents","nativeEventTarget","possiblePlugin","extractedEvents","runExtractedPluginEventsInBatch","handleTopLevel","bookKeeping","ancestor","root","getClosestInstanceFromNode","eventTarget","dispatchEventForLegacyPluginEventSystem","legacyListenToEvent","mountAt","dependency","legacyListenToTopLevelEvent","trapCapturedEvent","isMediaEvent","trapBubbledEvent","isListeningToAllDependencies","attemptUserBlockingHydration","setAttemptUserBlockingHydration","attemptContinuousHydration","setAttemptContinuousHydration","attemptHydrationAtCurrentPriority","setAttemptHydrationAtCurrentPriority","hasScheduledReplayAttempt","queuedDiscreteEvents","queuedFocus","queuedDrag","queuedMouse","queuedPointers","queuedPointerCaptures","queuedExplicitHydrationTargets","hasQueuedDiscreteEvents","discreteReplayableEvents","continuousReplayableEvents","isReplayableDiscreteEvent","eventType","trapReplayableEventForDocument","eagerlyTrapReplayableEvents","container","listenerMapForDoc","createQueuedReplayableEvent","blockedOn","queueDiscreteEvent","queuedEvent","clearIfContinuousEvent","pointerId","delete","_pointerId","accumulateOrCreateContinuousQueuedReplayableEvent","existingQueuedEvent","_fiber2","getInstanceFromNode$1","queueIfContinuousEvent","focusEvent","dragEvent","mouseEvent","pointerEvent","_pointerEvent","_pointerId2","attemptExplicitHydrationTarget","queuedTarget","unstable_runWithPriority","priority","hydrate","attemptReplayContinuousQueuedEvent","nextBlockedOn","attemptToDispatchEvent","_fiber3","attemptReplayContinuousQueuedEventInMap","replayUnblockedEvents","nextDiscreteEvent","_fiber4","shift","scheduleCallbackIfUnblocked","unblocked","unstable_scheduleCallback","unstable_NormalPriority","retryIfBlockedOn","unblock","nextExplicitTarget","addEventBubbleListener","addEventCaptureListener","simpleEventPluginEventTypes","topLevelEventsToDispatchConfig","eventPriorities","discreteEventPairsForSimpleEventPlugin","otherDiscreteEvents","userBlockingPairsForSimpleEventPlugin","continuousPairsForSimpleEventPlugin","processSimpleEventPluginPairsByPriority","topEvent","capitalizedEvent","onEvent","config","bubbled","captured","eventPriority","processTopEventPairsByPriority","getEventPriorityForPluginSystem","UserBlockingPriority","unstable_UserBlockingPriority","runWithPriority","_enabled","setEnabled","enabled","isEnabled","trapEventForPluginEventSystem","capture","dispatchDiscreteEvent","bind","dispatchUserBlockingUpdate","rawEventName","shorthandToLonghand","background","backgroundPosition","border","borderBlockEnd","borderBlockStart","borderBottom","borderColor","borderImage","borderInlineEnd","borderInlineStart","borderLeft","borderRadius","borderRight","borderStyle","borderTop","borderWidth","columnRule","columns","flex","flexFlow","font","fontVariant","gap","grid","gridArea","gridColumn","gridColumnGap","gridGap","gridRow","gridRowGap","gridTemplate","listStyle","margin","marker","mask","maskPosition","outline","overflow","padding","placeContent","placeItems","placeSelf","textDecoration","textEmphasis","wordWrap","isUnitlessNumber","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRowEnd","gridRowSpan","gridRowStart","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixKey","charAt","substring","keys","prop","dangerousStyleValue","isCustomProperty","isEmpty","trim","uppercasePattern","msPattern","hyphenateStyleName","warnValidStyle","badVendoredStyleNamePattern","msPattern$1","hyphenPattern","badStyleValueWithSemicolonPattern","warnedStyleNames","warnedStyleValues","warnedForNaNValue","warnedForInfinityValue","camelize","string","_","character","warnHyphenatedStyleName","warnBadVendoredStyleName","warnStyleValueWithSemicolon","warnStyleValueIsNaN","warnStyleValueIsInfinity","isFinite","warnValidStyle$1","createDangerousStringForStyles","styles","serialized","delimiter","styleName","styleValue","setValueForStyles","setProperty","isValueEmpty","expandShorthandMap","expanded","longhands","validateShorthandPropertyCollisionInDev","styleUpdates","nextStyles","expandedUpdates","expandedStyles","warnedAbout","originalKey","correctOriginalKey","warningKey","omittedCloseTags","area","base","br","col","embed","hr","img","input","keygen","link","meta","param","wbr","voidElementTags","menuitem","HTML","ReactDebugCurrentFrame$3","assertValidProps","suppressContentEditableWarning","contentEditable","isCustomComponent","is","possibleStandardNames","accept","acceptcharset","accesskey","action","allowfullscreen","alt","as","async","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","autosave","cellpadding","cellspacing","challenge","charset","cite","class","classid","classname","cols","colspan","contenteditable","contextmenu","controls","controlslist","coords","crossorigin","dangerouslysetinnerhtml","data","datetime","defaultchecked","defaultvalue","defer","dir","disablepictureinpicture","download","draggable","enctype","formmethod","formaction","formenctype","formnovalidate","formtarget","frameborder","headers","height","high","href","hreflang","htmlfor","httpequiv","icon","id","innerhtml","inputmode","integrity","itemid","itemprop","itemref","itemscope","itemtype","keyparams","keytype","kind","label","lang","list","loop","low","manifest","marginwidth","marginheight","max","maxlength","media","mediagroup","method","min","minlength","muted","nomodule","nonce","novalidate","open","optimum","pattern","placeholder","playsinline","poster","preload","profile","radiogroup","readonly","referrerpolicy","rel","required","reversed","role","rows","rowspan","sandbox","scoped","scrolling","seamless","shape","size","sizes","span","spellcheck","src","srcdoc","srclang","srcset","start","step","summary","tabindex","title","usemap","width","wmode","wrap","about","accentheight","accumulate","additive","alignmentbaseline","allowreorder","alphabetic","amplitude","arabicform","ascent","attributename","attributetype","autoreverse","azimuth","basefrequency","baselineshift","baseprofile","bbox","begin","bias","by","calcmode","capheight","clip","clippath","clippathunits","cliprule","color","colorinterpolation","colorinterpolationfilters","colorprofile","colorrendering","contentscripttype","contentstyletype","cursor","cx","cy","datatype","decelerate","descent","diffuseconstant","direction","display","divisor","dominantbaseline","dur","dx","dy","edgemode","elevation","enablebackground","end","exponent","externalresourcesrequired","fill","fillopacity","fillrule","filter","filterres","filterunits","floodopacity","floodcolor","focusable","fontfamily","fontsize","fontsizeadjust","fontstretch","fontstyle","fontvariant","fontweight","from","fx","fy","g1","g2","glyphname","glyphorientationhorizontal","glyphorientationvertical","glyphref","gradienttransform","gradientunits","hanging","horizadvx","horizoriginx","ideographic","imagerendering","in2","in","inlist","intercept","k1","k2","k3","k4","k","kernelmatrix","kernelunitlength","kerning","keypoints","keysplines","keytimes","lengthadjust","letterspacing","lightingcolor","limitingconeangle","local","markerend","markerheight","markermid","markerstart","markerunits","markerwidth","maskcontentunits","maskunits","mathematical","mode","numoctaves","offset","operator","orient","orientation","origin","overlineposition","overlinethickness","paintorder","panose1","pathlength","patterncontentunits","patterntransform","patternunits","pointerevents","points","pointsatx","pointsaty","pointsatz","preservealpha","preserveaspectratio","primitiveunits","property","r","radius","refx","refy","renderingintent","repeatcount","repeatdur","requiredextensions","requiredfeatures","resource","restart","result","results","rotate","rx","ry","scale","security","seed","shaperendering","slope","spacing","specularconstant","specularexponent","speed","spreadmethod","startoffset","stddeviation","stemh","stemv","stitchtiles","stopcolor","stopopacity","strikethroughposition","strikethroughthickness","stroke","strokedasharray","strokedashoffset","strokelinecap","strokelinejoin","strokemiterlimit","strokewidth","strokeopacity","suppresscontenteditablewarning","suppresshydrationwarning","surfacescale","systemlanguage","tablevalues","targetx","targety","textanchor","textdecoration","textlength","textrendering","to","transform","typeof","u1","u2","underlineposition","underlinethickness","unicode","unicodebidi","unicoderange","unitsperem","unselectable","valphabetic","values","vectoreffect","version","vertadvy","vertoriginx","vertoriginy","vhanging","videographic","viewbox","viewtarget","visibility","vmathematical","vocab","widths","wordspacing","writingmode","x1","x2","xchannelselector","xheight","xlinkactuate","xlinkarcrole","xlinkhref","xlinkrole","xlinkshow","xlinktitle","xlinktype","xmlbase","xmllang","xmlns","xmlnsxlink","xmlspace","y1","y2","y","ychannelselector","z","zoomandpan","ariaProperties","warnedProperties","rARIA","rARIACamel","hasOwnProperty$1","validateProperty","ariaName","correctName","standardName","warnInvalidARIAProps","invalidProps","isValid","unknownPropString","join","validateProperties","didWarnValueNull","validateProperties$1","validateProperty$1","warnedProperties$1","_hasOwnProperty","EVENT_NAME_REGEX","INVALID_EVENT_NAME_REGEX","rARIA$1","rARIACamel$1","canUseEventSystem","isReserved","warnUnknownProperties","unknownProps","validateProperties$2","didWarnInvalidHydration","DANGEROUSLY_SET_INNER_HTML","SUPPRESS_CONTENT_EDITABLE_WARNING","SUPPRESS_HYDRATION_WARNING","AUTOFOCUS","CHILDREN","STYLE","HTML$1","HTML_NAMESPACE$1","warnedUnknownTags","suppressHydrationWarning","validatePropertiesInDevelopment","warnForTextDifference","warnForPropDifference","warnForExtraAttributes","warnForInvalidEventListener","canDiffStyleForHydrationWarning","normalizeMarkupForTextOrAttribute","normalizeHTML","time","dialog","webview","documentMode","NORMALIZE_NEWLINES_REGEX","NORMALIZE_NULL_AND_REPLACEMENT_REGEX","markup","markupString","serverText","clientText","normalizedClientText","normalizedServerText","serverValue","clientValue","normalizedClientValue","normalizedServerValue","attributeNames","names","testElement","createElementNS","ensureListeningTo","rootContainerElement","isDocumentOrFragment","doc","getOwnerDocumentFromRootContainer","noop","trapClickOnNonInteractiveElement","onclick","setInitialDOMProperties","domElement","nextProps","propKey","nextProp","freeze","nextHtml","canSetTextContent","updateDOMProperties","updatePayload","wasCustomComponentTag","div","createTextNode","setInitialProperties","rawProps","onClick","diffProperties","lastRawProps","nextRawProps","lastProps","lastStyle","lastProp","lastHtml","updateProperties","getPossibleStandardName","diffHydratedProperties","extraAttributeNames","Set","attributes","add","serverHTML","expectedHTML","expectedStyle","isMismatchDueToBadCasing","ownNamespace","diffHydratedText","textNode","isDifferent","warnForUnmatchedText","warnForDeletedHydratableElement","warnForDeletedHydratableText","warnForInsertedHydratedElement","warnForInsertedHydratedText","restoreControlledState$3","getActiveElement","body","getLeafNode","getSiblingNode","nextSibling","getNodeForCharacterOffset","nodeStart","nodeEnd","getOffsets","outerNode","win","defaultView","selection","getSelection","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","getModernOffsetsFromPoints","indexWithinAnchor","indexWithinFocus","outer","setOffsets","offsets","Math","extend","temp","startMarker","endMarker","range","createRange","setStart","removeAllRanges","addRange","setEnd","isTextNode","containsNode","innerNode","contains","compareDocumentPosition","isInDocument","documentElement","isSameOriginFrame","iframe","contentWindow","location","err","getActiveElementDeep","HTMLIFrameElement","hasSelectionCapabilities","getSelectionInformation","focusedElem","activeElementDetached","selectionRange","restoreSelection","priorSelectionInformation","curFocusedElem","priorFocusedElem","priorSelectionRange","setSelection","left","scrollLeft","top","scrollTop","focus","selectionStart","selectionEnd","validateDOMNesting","updatedAncestorInfo","specialTags","inScopeTags","buttonScopeTags","impliedEndTags","emptyAncestorInfo","formTag","aTagInScope","buttonTagInScope","nobrTagInScope","pTagInButtonScope","listItemTagAutoclosing","dlItemTagAutoclosing","oldInfo","ancestorInfo","isTagValidWithParent","parentTag","findInvalidAncestorForTag","didWarn$1","childTag","childText","parentInfo","invalidParent","invalidAncestor","invalidParentOrAncestor","ancestorTag","addendum","warnKey","tagDisplayName","whitespaceInfo","SUPPRESS_HYDRATION_WARNING$1","SUSPENSE_START_DATA","SUSPENSE_END_DATA","SUSPENSE_PENDING_START_DATA","SUSPENSE_FALLBACK_START_DATA","STYLE$1","eventsEnabled","selectionInformation","shouldAutoFocusHostComponent","autoFocus","getRootHostContext","rootContainerInstance","namespace","validatedTag","getChildHostContext","parentHostContext","parentHostContextDev","getPublicInstance","prepareForCommit","resetAfterCommit","createInstance","hostContext","internalInstanceHandle","hostContextDev","ownAncestorInfo","precacheFiberNode","updateFiberProps","appendInitialChild","parentInstance","finalizeInitialChildren","prepareUpdate","oldProps","newProps","shouldSetTextContent","__html","shouldDeprioritizeSubtree","createTextInstance","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","commitMount","commitUpdate","resetTextContent","commitTextUpdate","textInstance","oldText","newText","appendChildToContainer","insertBefore","reactRootContainer","_reactRootContainer","beforeChild","insertInContainerBefore","removeChildFromContainer","hideInstance","hideTextInstance","unhideInstance","unhideTextInstance","canHydrateInstance","canHydrateTextInstance","isSuspenseInstancePending","isSuspenseInstanceFallback","getNextHydratable","getNextHydratableSibling","getFirstHydratableChild","hydrateInstance","hydrateTextInstance","getNextHydratableInstanceAfterSuspenseInstance","suspenseInstance","depth","getParentSuspenseInstance","targetInstance","previousSibling","commitHydratedContainer","commitHydratedSuspenseInstance","didNotMatchHydratedContainerTextInstance","parentContainer","didNotMatchHydratedTextInstance","parentType","parentProps","didNotHydrateContainerInstance","didNotHydrateInstance","didNotFindHydratableContainerInstance","didNotFindHydratableContainerTextInstance","didNotFindHydratableInstance","didNotFindHydratableTextInstance","didNotFindHydratableSuspenseInstance","randomKey","random","internalInstanceKey","internalEventHandlersKey","internalContainerInstanceKey","hostInst","markContainerAsRoot","hostRoot","unmarkContainerAsRoot","isContainerMarkedAsRoot","targetNode","targetSuspenseInst","getNodeFromInstance$1","getParent","getLowestCommonAncestor","instA","instB","depthA","tempA","depthB","tempB","traverseTwoPhase","arg","traverseEnterLeave","argFrom","argTo","common","pathFrom","pathTo","_alternate","isInteractive","shouldPreventMouseEvent","getListener","listenerAtPhase","propagationPhase","accumulateDirectionalDispatches","phase","accumulateTwoPhaseDispatchesSingle","_targetInst","accumulateDispatches","ignoredDirection","accumulateDirectDispatchesSingle","accumulateTwoPhaseDispatches","accumulateEnterLeaveDispatches","leave","enter","accumulateDirectDispatches","startText","fallbackText","initialize","getText","getData","startValue","startLength","endValue","endLength","minEnd","sliceTail","EVENT_POOL_SIZE","EventInterface","eventPhase","bubbles","cancelable","Date","now","isTrusted","functionThatReturnsTrue","functionThatReturnsFalse","SyntheticEvent","preventDefault","stopPropagation","isDefaultPrevented","Interface","normalize","returnValue","cancelBubble","persist","destructor","getPooledWarningPropertyDefinition","Super","E","Class","addEventPoolingTo","getVal","isFunction","val","getPooledEvent","nativeInst","EventConstructor","eventPool","releasePooledEvent","getPooled","SyntheticCompositionEvent","SyntheticInputEvent","END_KEYCODES","START_KEYCODE","canUseCompositionEvent","canUseTextInputEvent","useFallbackCompositionData","SPACEBAR_CODE","SPACEBAR_CHAR","String","fromCharCode","beforeInput","compositionEnd","compositionStart","compositionUpdate","hasSpaceKeypress","isKeypressCommand","ctrlKey","altKey","metaKey","getCompositionEventType","isFallbackCompositionStart","keyCode","isFallbackCompositionEnd","getDataFromCustomEvent","detail","isUsingKoreanIME","locale","isComposing","extractCompositionEvent","fallbackData","customData","getNativeBeforeInputChars","which","chars","getFallbackBeforeInputChars","char","extractBeforeInputEvent","BeforeInputEventPlugin","composition","supportedInputTypes","date","email","month","number","password","search","tel","week","isTextInputElement","eventTypes$1","change","createAndAccumulateChangeEvent","activeElementInst","shouldUseChangeEvent","manualDispatchChangeEvent","runEventInBatch","getInstIfValueChanged","getTargetInstForChangeEvent","isInputEventSupported","startWatchingForValueChange","attachEvent","handlePropertyChange","stopWatchingForValueChange","detachEvent","handleEventsForInputEventPolyfill","getTargetInstForInputEventPolyfill","shouldUseClickEvent","getTargetInstForClickEvent","getTargetInstForInputOrChangeEvent","handleControlledInputBlur","state","ChangeEventPlugin","_isInputEventSupported","getTargetInstFunc","handleEventFunc","SyntheticUIEvent","view","modifierKeyToProp","Alt","Control","Meta","Shift","modifierStateGetter","keyArg","syntheticEvent","getModifierState","keyProp","getEventModifierState","previousScreenX","previousScreenY","isMovementXSet","isMovementYSet","SyntheticMouseEvent","screenX","screenY","clientX","clientY","pageX","pageY","shiftKey","buttons","relatedTarget","fromElement","toElement","movementX","movementY","SyntheticPointerEvent","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","eventTypes$2","mouseEnter","mouseLeave","pointerEnter","pointerLeave","EnterLeaveEventPlugin","isOverEvent","isOutEvent","parentWindow","related","eventInterface","leaveEventType","enterEventType","eventTypePrefix","fromNode","toNode","objectIs","hasOwnProperty$2","shallowEqual","objA","objB","keysA","keysB","skipSelectionChangeEvent","eventTypes$3","select","activeElement$1","activeElementInst$1","lastSelection","mouseDown","getSelection$1","getEventTargetDocument","constructSelectEvent","currentSelection","SelectEventPlugin","containerOrDoc","SyntheticAnimationEvent","animationName","elapsedTime","pseudoElement","SyntheticClipboardEvent","clipboardData","SyntheticFocusEvent","getEventCharCode","charCode","normalizeKey","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","translateToKey","getEventKey","SyntheticKeyboardEvent","repeat","SyntheticDragEvent","dataTransfer","SyntheticTouchEvent","touches","targetTouches","changedTouches","SyntheticTransitionEvent","SyntheticWheelEvent","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","knownHTMLTopLevelTypes","SimpleEventPlugin","DOMEventPluginOrder","reactEmoji","warningEmoji","supportsUserTiming","performance","mark","clearMarks","measure","clearMeasures","currentFiber","currentPhase","currentPhaseFiber","isCommitting","hasScheduledUpdateInCurrentCommit","hasScheduledUpdateInCurrentPhase","commitCountInCurrentWorkLoop","effectCountInCurrentCommit","labelsInCurrentCommit","formatMarkName","markName","formatLabel","warning","suffix","beginMark","clearMark","endMark","formattedMarkName","formattedLabel","getFiberMarkName","debugID","getFiberLabel","beginFiberMark","_debugID","clearFiberMark","endFiberMark","shouldIgnoreFiber","clearPendingPhaseMeasurement","pauseTimers","_debugIsCurrentlyTiming","resumeTimersRecursively","resumeTimers","recordEffect","recordScheduleUpdate","startWorkTimer","cancelWorkTimer","stopWorkTimer","stopFailedWorkTimer","startPhaseTimer","stopPhaseTimer","startWorkLoopTimer","nextUnitOfWork","stopWorkLoopTimer","interruptedBy","didCompleteRoot","startCommitTimer","clear","stopCommitTimer","startCommitSnapshotEffectsTimer","stopCommitSnapshotEffectsTimer","count","startCommitHostEffectsTimer","stopCommitHostEffectsTimer","startCommitLifeCyclesTimer","stopCommitLifeCyclesTimer","valueStack","fiberStack","index","createCursor","warnedAboutMissingGetChildContext","emptyContextObject","contextStackCursor","didPerformWorkStackCursor","previousContext","getUnmaskedContext","Component","didPushOwnContextIfProvider","isContextProvider","cacheContext","unmaskedContext","maskedContext","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","getMaskedContext","contextTypes","hasContextChanged","childContextTypes","popContext","popTopLevelContextObject","pushTopLevelContextObject","didChange","processChildContext","parentContext","getChildContext","childContext","contextKey","pushContextProvider","memoizedMergedChildContext","__reactInternalMemoizedMergedChildContext","invalidateContextProvider","mergedContext","findCurrentUnmaskedContext","LegacyRoot","BlockingRoot","ConcurrentRoot","Scheduler_runWithPriority","Scheduler_scheduleCallback","Scheduler_cancelCallback","unstable_cancelCallback","Scheduler_shouldYield","unstable_shouldYield","Scheduler_requestPaint","unstable_requestPaint","Scheduler_now","unstable_now","Scheduler_getCurrentPriorityLevel","unstable_getCurrentPriorityLevel","Scheduler_ImmediatePriority","unstable_ImmediatePriority","Scheduler_UserBlockingPriority","Scheduler_NormalPriority","Scheduler_LowPriority","unstable_LowPriority","Scheduler_IdlePriority","unstable_IdlePriority","__interactionsRef","fakeCallbackNode","ImmediatePriority","UserBlockingPriority$1","NormalPriority","LowPriority","IdlePriority","NoPriority","shouldYield","requestPaint","syncQueue","immediateQueueCallbackNode","isFlushingSyncQueue","initialTimeMs","getCurrentPriorityLevel","reactPriorityToSchedulerPriority","reactPriorityLevel","runWithPriority$1","priorityLevel","scheduleCallback","callback","scheduleSyncCallback","flushSyncCallbackQueueImpl","cancelCallback","callbackNode","flushSyncCallbackQueue","_isSync","queue","NoMode","StrictMode","BlockingMode","ConcurrentMode","ProfileMode","MAX_SIGNED_31_BIT_INT","NoWork","Never","Idle","ContinuousHydration","Sync","Batched","UNIT_SIZE","MAGIC_NUMBER_OFFSET","msToExpirationTime","ms","expirationTimeToMs","expirationTime","ceiling","num","precision","computeExpirationBucket","currentTime","expirationInMs","bucketSizeMs","LOW_PRIORITY_EXPIRATION","LOW_PRIORITY_BATCH_SIZE","computeAsyncExpiration","computeSuspenseExpiration","timeoutMs","HIGH_PRIORITY_EXPIRATION","HIGH_PRIORITY_BATCH_SIZE","computeInteractiveExpiration","inferPriorityFromExpirationTime","msUntil","ReactStrictModeWarnings","recordUnsafeLifecycleWarnings","flushPendingUnsafeLifecycleWarnings","recordLegacyContextWarning","flushLegacyContextWarning","discardPendingWarnings","findStrictRoot","maybeStrictRoot","setToSortedString","array","sort","pendingComponentWillMountWarnings","pendingUNSAFE_ComponentWillMountWarnings","pendingComponentWillReceivePropsWarnings","pendingUNSAFE_ComponentWillReceivePropsWarnings","pendingComponentWillUpdateWarnings","pendingUNSAFE_ComponentWillUpdateWarnings","didWarnAboutUnsafeLifecycles","componentWillMount","__suppressDeprecationWarning","UNSAFE_componentWillMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","componentWillUpdate","UNSAFE_componentWillUpdate","componentWillMountUniqueNames","UNSAFE_componentWillMountUniqueNames","componentWillReceivePropsUniqueNames","UNSAFE_componentWillReceivePropsUniqueNames","componentWillUpdateUniqueNames","UNSAFE_componentWillUpdateUniqueNames","sortedNames","_sortedNames","_sortedNames2","_sortedNames3","_sortedNames4","_sortedNames5","pendingLegacyContextWarning","didWarnAboutLegacyContext","strictRoot","warningsForRoot","fiberArray","firstFiber","uniqueNames","firstComponentStack","resolveFamily","failedBoundaries","setRefreshHandler","handler","resolveFunctionForHotReloading","family","resolveClassForHotReloading","resolveForwardRefForHotReloading","currentRender","syntheticType","isCompatibleFamilyForHotReloading","prevType","elementType","nextType","needsCompareFamilies","$$typeofNextType","prevFamily","markFailedErrorBoundaryForHotReloading","WeakSet","scheduleRefresh","update","staleFamilies","updatedFamilies","flushPassiveEffects","flushSync","scheduleFibersWithFamiliesRecursively","scheduleRoot","syncUpdates","updateContainer","candidateType","needsRender","needsRemount","_debugNeedsRemount","scheduleWork","findHostInstancesForRefresh","families","hostInstances","types","findHostInstancesForMatchingFibersRecursively","didMatch","findHostInstancesForFiberShallowly","foundHostInstances","findChildHostInstancesForFiberShallowly","resolveDefaultProps","baseProps","defaultProps","readLazyComponentType","valueCursor","rendererSigil","currentlyRenderingFiber","lastContextDependency","lastContextWithAllBitsObserved","isDisallowedContextReadInDEV","resetContextDependencies","enterDisallowedContextReadInDEV","exitDisallowedContextReadInDEV","pushProvider","providerFiber","_context","_currentValue","_currentRenderer","popProvider","calculateChangedBits","oldValue","changedBits","_calculateChangedBits","scheduleWorkOnParentPath","renderExpirationTime","childExpirationTime","propagateContextChange","nextFiber","firstContext","observedBits","createUpdate","ForceUpdate","enqueueUpdate","prepareToReadContext","markWorkInProgressReceivedUpdate","readContext","resolvedObservedBits","contextItem","responders","UpdateState","ReplaceState","CaptureUpdate","hasForceUpdate","didWarnUpdateInsideUpdate","currentlyProcessingQueue","initializeUpdateQueue","baseState","baseQueue","shared","pending","effects","updateQueue","cloneUpdateQueue","currentQueue","clone","suspenseConfig","payload","sharedQueue","enqueueCapturedUpdate","last","getStateFromUpdate","prevState","nextState","_payload","partialState","processUpdateQueue","pendingQueue","baseFirst","pendingFirst","first","newState","newExpirationTime","newBaseState","newBaseQueueFirst","newBaseQueueLast","updateExpirationTime","_clone","markRenderEventTimeAndConfig","markUnprocessedUpdateTime","resetHasForceUpdateBeforeProcessing","checkHasForceUpdateAfterProcessing","commitUpdateQueue","finishedWork","finishedQueue","effect","requestCurrentSuspenseConfig","fakeInternalInstance","emptyRefsObject","refs","didWarnAboutStateAssignmentForComponent","didWarnAboutUninitializedState","didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate","didWarnAboutLegacyLifecyclesAndDerivedState","didWarnAboutUndefinedDerivedState","warnOnUndefinedDerivedState","warnOnInvalidCallback","didWarnAboutDirectlyAssigningPropsToState","didWarnAboutContextTypeAndContextTypes","didWarnAboutInvalidateContextType","didWarnOnInvalidCallback","callerName","applyDerivedStateFromProps","getDerivedStateFromProps","classComponentUpdater","enqueueSetState","requestCurrentTimeForUpdate","computeExpirationForFiber","enqueueReplaceState","enqueueForceUpdate","checkShouldComponentUpdate","oldState","nextContext","shouldComponentUpdate","shouldUpdate","isPureReactComponent","checkClassInstance","renderPresent","getInitialState","isReactClassApproved","getDefaultProps","contextType","componentShouldUpdate","componentDidUnmount","componentDidReceiveProps","componentWillRecieveProps","UNSAFE_componentWillRecieveProps","hasMutatedProps","getSnapshotBeforeUpdate","componentDidUpdate","getDerivedStateFromError","_state","adoptClassInstance","updater","_reactInternalInstance","constructClassInstance","isLegacyContextConsumer","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","_componentName","newApiName","callComponentWillMount","callComponentWillReceiveProps","mountClassInstance","componentDidMount","resumeMountClassInstance","memoizedProps","oldContext","nextLegacyUnmaskedContext","hasNewLifecycles","updateClassInstance","nextUnmaskedContext","didWarnAboutMaps","didWarnAboutGenerators","didWarnAboutStringRefs","ownerHasKeyUseWarning","ownerHasFunctionTypeWarning","warnForMissingKey","_store","validated","currentComponentErrorInfo","isArray$1","coerceRef","returnFiber","mixedRef","ref","_owner","_self","stringRef","_stringRef","throwOnInvalidObjectType","newChild","warnOnFunctionType","ChildReconciler","shouldTrackSideEffects","deleteChild","childToDelete","lastEffect","nextEffect","firstEffect","deleteRemainingChildren","currentFirstChild","mapRemainingChildren","existingChildren","existingChild","useFiber","pendingProps","createWorkInProgress","placeChild","newFiber","lastPlacedIndex","newIndex","oldIndex","placeSingleChild","updateTextNode","created","createFiberFromText","existing","updateElement","_source","createFiberFromElement","updatePortal","portal","implementation","createFiberFromPortal","updateFragment","fragment","createFiberFromFragment","createChild","_created","_created2","_created3","updateSlot","oldFiber","updateFromMap","newIdx","matchedFiber","_matchedFiber","_matchedFiber2","_matchedFiber3","warnOnInvalidKey","knownKeys","reconcileChildrenArray","newChildren","resultingFirstChild","previousNewFiber","nextOldFiber","_newFiber","_newFiber2","reconcileChildrenIterator","newChildrenIterable","iteratorFn","toStringTag","entries","_newChildren","_step","done","_newFiber3","_newFiber4","reconcileSingleTextNode","reconcileSingleElement","_existing3","_created4","reconcileSinglePortal","reconcileChildFibers","isUnkeyedTopLevelFragment","isObject","_isMockFunction","mountChildFibers","cloneChildFibers","currentChild","resetChildFibers","resetWorkInProgress","NO_CONTEXT","contextStackCursor$1","contextFiberStackCursor","rootInstanceStackCursor","requiredContext","getRootHostContainer","rootInstance","pushHostContainer","nextRootInstance","nextRootContext","popHostContainer","getHostContext","pushHostContext","popHostContext","DefaultSuspenseContext","SubtreeSuspenseContextMask","InvisibleParentSuspenseContext","ForceSuspenseFallback","suspenseStackCursor","hasSuspenseContext","flag","setDefaultShallowSuspenseContext","setShallowSuspenseContext","shallowContext","addSubtreeSuspenseContext","subtreeContext","pushSuspenseContext","newContext","popSuspenseContext","shouldCaptureSuspense","hasInvisibleParent","fallback","unstable_avoidThisFallback","findFirstSuspended","row","revealOrder","didSuspend","createDeprecatedResponderListener","responder","eventResponderListener","HasEffect","Layout","Passive$1","ReactCurrentBatchConfig$1","didWarnAboutMismatchedHooksForComponent","currentlyRenderingFiber$1","currentHook","workInProgressHook","didScheduleRenderPhaseUpdate","RE_RENDER_LIMIT","currentHookNameInDev","hookTypesDev","hookTypesUpdateIndexDev","ignorePreviousDependencies","mountHookTypesDev","hookName","updateHookTypesDev","warnOnHookMismatchInDev","checkDepsAreArrayDev","deps","currentHookName","table","secondColumnStart","oldHookName","newHookName","throwInvalidHookError","areHookInputsEqual","nextDeps","prevDeps","renderWithHooks","secondArg","nextRenderExpirationTime","_debugHookTypes","HooksDispatcherOnUpdateInDEV","HooksDispatcherOnMountWithHookTypesInDEV","HooksDispatcherOnMountInDEV","numberOfReRenders","HooksDispatcherOnRerenderInDEV","ContextOnlyDispatcher","didRenderTooFewHooks","bailoutHooks","resetHooksAfterThrow","hook","mountWorkInProgressHook","updateWorkInProgressHook","nextCurrentHook","nextWorkInProgressHook","newHook","createFunctionComponentUpdateQueue","basicStateReducer","mountReducer","reducer","initialArg","init","initialState","dispatch","lastRenderedReducer","lastRenderedState","dispatchAction","updateReducer","eagerReducer","eagerState","rerenderReducer","lastRenderPhaseUpdate","firstRenderPhaseUpdate","mountState","updateState","rerenderState","pushEffect","create","destroy","componentUpdateQueue","mountRef","seal","updateRef","mountEffectImpl","fiberEffectTag","hookEffectTag","updateEffectImpl","prevEffect","mountEffect","jest","warnIfNotCurrentlyActingEffectsInDEV","updateEffect","mountLayoutEffect","updateLayoutEffect","imperativeHandleEffect","refCallback","_inst","refObject","_inst2","mountImperativeHandle","effectDeps","updateImperativeHandle","mountDebugValue","formatterFn","updateDebugValue","mountCallback","updateCallback","mountMemo","nextCreate","updateMemo","mountDeferredValue","_mountState","prevValue","previousConfig","updateDeferredValue","_updateState","rerenderDeferredValue","_rerenderState","startTransition","setPending","mountTransition","_mountState2","isPending","updateTransition","_updateState2","rerenderTransition","_rerenderState2","prevDispatcher","InvalidNestedHooksDispatcherOnUpdateInDEV","currentState","warnIfNotScopedWithMatchingAct","warnIfNotCurrentlyActingUpdatesInDev","useCallback","useContext","useEffect","useImperativeHandle","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useResponder","useDeferredValue","useTransition","InvalidNestedHooksDispatcherOnMountInDEV","InvalidNestedHooksDispatcherOnRerenderInDEV","warnInvalidContextAccess","warnInvalidHookAccess","now$1","commitTime","profilerStartTime","getCommitTime","recordCommitTime","startProfilerTimer","actualStartTime","stopProfilerTimerIfRunning","stopProfilerTimerIfRunningAndRecordDelta","overrideBaseTime","actualDuration","selfBaseDuration","hydrationParentFiber","nextHydratableInstance","enterHydrationState","deleteHydratableInstance","createFiberFromHostInstanceForDeletion","insertNonHydratedInstance","_text","tryHydrate","nextInstance","tryToClaimNextHydratableInstance","firstAttemptedInstance","prepareToHydrateHostInstance","prepareToHydrateHostTextInstance","skipPastDehydratedSuspenseInstance","popToNextHostParent","popHydrationState","resetHydrationState","ReactCurrentOwner$1","didReceiveUpdate","didWarnAboutBadClass","didWarnAboutModulePatternComponent","didWarnAboutContextTypeOnFunctionComponent","didWarnAboutGetDerivedStateOnFunctionComponent","didWarnAboutFunctionRefs","didWarnAboutReassigningProps","didWarnAboutRevealOrder","didWarnAboutTailOptions","reconcileChildren","nextChildren","forceUnmountCurrentAndReconcile","updateForwardRef","innerPropTypes","bailoutOnAlreadyFinishedWork","updateMemoComponent","isSimpleFunctionComponent","compare","resolvedType","validateFunctionComponentInDev","updateSimpleMemoComponent","createFiberFromTypeAndProps","_innerPropTypes","prevProps","outerMemoType","outerPropTypes","updateFunctionComponent","updateMode","updateProfiler","markRef","updateClassComponent","hasContext","finishClassComponent","didCaptureError","pushHostRootContext","pendingContext","updateHostRoot","prevChildren","updateHostComponent","isDirectTextChild","markSpawnedWork","updateHostText","mountLazyComponent","_current","resolvedTag","resolveLazyComponentTag","resolvedProps","hint","mountIncompleteClassComponent","mountIndeterminateComponent","debugSource","_componentName2","_componentName3","SUSPENDED_MARKER","retryTime","shouldRemainOnFallback","suspenseContext","updateSuspenseComponent","shouldSuspend","nextDidTimeout","nextFallbackChildren","primaryChildFragment","progressedState","progressedPrimaryChild","progressedChild","fallbackChildFragment","nextPrimaryChildren","currentPrimaryChildFragment","currentFallbackChildFragment","_nextFallbackChildren2","_primaryChildFragment2","_progressedState","_progressedPrimaryChild","_progressedChild2","_treeBaseDuration","_hiddenChild","treeBaseDuration","_fallbackChildFragment2","_nextPrimaryChildren","currentPrimaryChild","primaryChild","_currentPrimaryChild","_nextFallbackChildren3","_primaryChildFragment3","_progressedState2","_progressedPrimaryChild2","_progressedChild3","_treeBaseDuration2","_hiddenChild2","_fallbackChildFragment3","_nextPrimaryChildren2","scheduleWorkOnFiber","propagateSuspenseContextChange","findLastContentRow","lastContentRow","currentRow","validateRevealOrder","validateTailOptions","tailMode","validateSuspenseListNestedChild","childSlot","isIterable","validateSuspenseListChildren","childrenIterator","initSuspenseListRenderState","isBackwards","tail","lastEffectBeforeRendering","renderState","renderingStartTime","tailExpiration","updateSuspenseListComponent","shouldForceFallback","didSuspendBefore","_tail","nextRow","updatePortalComponent","updateContextProvider","providerType","providerPropTypes","hasWarnedAboutUsingContextAsConsumer","updateContextConsumer","Consumer","unstable_observedBits","remountFiber","oldWorkInProgress","newWorkInProgress","prevSibling","beginWork","hasChildWork","primaryChildExpirationTime","_hasChildWork","_Component","unresolvedProps","_Component2","_unresolvedProps","_resolvedProps","_unresolvedProps2","_resolvedProps2","_type2","_unresolvedProps3","_resolvedProps3","_Component3","_unresolvedProps4","_resolvedProps4","markUpdate","markRef$1","appendAllChildren","updateHostContainer","updateHostComponent$1","updateHostText$1","needsVisibilityToggle","isHidden","currentHostContext","cutOffTailIfNeeded","hasRenderedATailFallback","tailNode","lastTailNode","_tailNode","_lastTailNode","completeWork","fiberRoot","wasHydrated","_wasHydrated","_rootContainerInstance","_currentHostContext","_wasHydrated2","prevDidTimeout","currentFallbackChild","hasInvisibleChildContext","renderDidSuspend","renderDidSuspendDelayIfPossible","didSuspendAlready","renderedTail","cannotBeSuspended","renderHasNotSuspendedYet","suspended","newThennables","_suspended","_newThennables","nextPriority","TAIL_EXPIRATION_TIMEOUT_MS","unwindWork","_effectTag","_effectTag2","unwindInterruptedWork","interruptedWork","createCapturedValue","logCapturedError","capturedError","componentStack","errorBoundaryName","errorBoundaryFound","willRetry","componentNameMessage","errorBoundaryMessage","combinedMessage","didWarnAboutUndefinedSnapshotBeforeUpdate","PossiblyWeakSet","logError","boundary","errorInfo","errorBoundary","callComponentWillUnmountWithTimer","componentWillUnmount","safelyCallComponentWillUnmount","unmountError","captureCommitPhaseError","safelyDetachRef","refError","safelyCallDestroy","commitBeforeMutationLifeCycles","snapshot","didWarnSet","__reactInternalSnapshotBeforeUpdate","commitHookEffectListUnmount","commitHookEffectListMount","commitPassiveHookEffects","commitLifeCycles","finishedRoot","committedExpirationTime","_updateQueue","_instance","_instance2","onRender","memoizedInteractions","commitSuspenseHydrationCallbacks","hideOrUnhideAllChildren","_instance3","commitAttachRef","instanceToUse","commitDetachRef","currentRef","commitUnmount","renderPriorityLevel","onCommitUnmount","_destroy","unmountHostComponents","commitNestedUnmounts","detachFiber","getHostParentFiber","isHostParent","getHostSibling","siblings","commitPlacement","parentFiber","isContainer","parentStateNode","before","insertOrAppendPlacementNodeIntoContainer","insertOrAppendPlacementNode","isHost","currentParentIsValid","currentParentIsContainer","findParent","commitDeletion","commitWork","_root","commitSuspenseComponent","attachSuspenseRetryListeners","newDidTimeout","primaryChildParent","markCommitTimeOfFallback","thenables","retryCache","retry","resolveRetryThenable","__reactDoNotTraceInteractions","unstable_wrap","commitResetTextContent","PossiblyWeakMap$1","createRootErrorUpdate","onUncaughtError","createClassErrorUpdate","error$1","componentDidCatch","markLegacyErrorBoundaryAsFailed","attachPingListener","pingCache","threadIDs","ping","pingSuspendedRoot","throwException","sourceFiber","currentSource","hasInvisibleParentBoundary","_workInProgress","currentSourceFiber","renderDidError","_errorInfo","_update","isAlreadyFailedLegacyErrorBoundary","_update2","ceil","ReactCurrentDispatcher$1","ReactCurrentOwner$2","IsSomeRendererActing","NoContext","BatchedContext","EventContext","DiscreteEventContext","LegacyUnbatchedContext","RenderContext","CommitContext","RootIncomplete","RootFatalErrored","RootErrored","RootSuspended","RootSuspendedWithDelay","RootCompleted","executionContext","workInProgressRoot","renderExpirationTime$1","workInProgressRootExitStatus","workInProgressRootFatalError","workInProgressRootLatestProcessedExpirationTime","workInProgressRootLatestSuspenseTimeout","workInProgressRootCanSuspendUsingConfig","workInProgressRootNextUnprocessedUpdateTime","workInProgressRootHasPendingPing","globalMostRecentFallbackTime","FALLBACK_THROTTLE_MS","hasUncaughtError","firstUncaughtError","legacyErrorBoundariesThatAlreadyFailed","rootDoesHavePassiveEffects","rootWithPendingPassiveEffects","pendingPassiveEffectsRenderPriority","pendingPassiveEffectsExpirationTime","rootsWithPendingDiscreteUpdates","NESTED_UPDATE_LIMIT","nestedUpdateCount","rootWithNestedUpdates","NESTED_PASSIVE_UPDATE_LIMIT","nestedPassiveUpdateCount","spawnedWorkDuringRender","currentEventTime","getCurrentTime","scheduleUpdateOnFiber","checkForNestedUpdates","warnAboutRenderPhaseUpdatesInDEV","markUpdateTimeFromFiberToRoot","warnAboutUpdateOnUnmountedFiberInDEV","checkForInterruption","schedulePendingInteractions","performSyncWorkOnRoot","ensureRootIsScheduled","lastDiscreteTime","markRootSuspendedAtTime","markRootUpdatedAtTime","getNextRootExpirationTimeToWorkOn","lastExpiredTime","firstPendingTime","isRootSuspendedAtTime","lastPingedTime","nextKnownPendingLevel","nextLevel","callbackExpirationTime","callbackPriority","existingCallbackNode","existingCallbackPriority","existingCallbackExpirationTime","performConcurrentWorkOnRoot","timeout","didTimeout","markRootExpiredAtTime","originalCallbackNode","prepareFreshStack","startWorkOnPendingInteractions","prevExecutionContext","pushDispatcher","prevInteractions","pushInteractions","workLoopConcurrent","thrownValue","handleError","popDispatcher","popInteractions","fatalError","stopInterruptedWorkLoopTimer","stopFinishedWorkLoopTimer","finishedExpirationTime","finishConcurrentRender","exitStatus","lastSuspendedTime","getRemainingExpirationTime","hasNotProcessedNewUpdates","IsThisRendererActing","msUntilTimeout","nextTime","timeoutHandle","commitRoot","_lastSuspendedTime","_lastPingedTime","_nextTime","_msUntilTimeout","eventTimeMs","inferTimeFromExpirationTime","currentTimeMs","timeUntilExpirationMs","timeElapsed","jnd","_msUntilTimeout2","computeMsUntilSuspenseLoadingDelay","workLoopSync","finishSyncRender","flushDiscreteUpdates","flushPendingDiscreteUpdates","roots","batchedUpdates$1","batchedEventUpdates$1","discreteUpdates$1","unbatchedUpdates","completeUnitOfWork","yetAnotherThrownValue","earliestExpirationTimeMs","inferTimeFromExpirationTimeWithSuspenseConfig","performUnitOfWork","unitOfWork","beginWork$1","resetChildExpirationTime","_next","siblingFiber","completedWork","newChildExpirationTime","shouldBubbleActualDurations","childUpdateExpirationTime","childChildExpirationTime","_childUpdateExpirationTime","_childChildExpirationTime","commitRootImpl","flushRenderPhaseStrictModeWarningsInDEV","remainingExpirationTimeBeforeCommit","markRootFinishedAtTime","commitBeforeMutationEffects","commitMutationEffects","_error","commitLayoutEffects","_error2","rootDidHavePassiveEffects","nextNextEffect","remainingExpirationTime","expirationTimes","scheduleInteractions","finishPendingInteractions","onCommitRoot","_error3","primaryEffectTag","_current2","_current3","flushPassiveEffectsImpl","_effect2","_error5","prepareToThrowUncaughtError","captureCommitPhaseErrorOnRoot","rootFiber","suspendedTime","retryTimedOutBoundary","boundaryFiber","mostRecentEventTime","busyMinDurationMs","busyDelayMs","fiberThatReceivedUpdate","didWarnStateUpdateForUnmountedComponent","dummyFiber","originalWorkInProgressCopy","assignFiberPropertiesInDEV","originalError","replayError","didWarnAboutUpdateInRender","didWarnAboutUpdateInRenderForAnotherComponent","renderingComponentName","dedupeKey","setStateComponentName","warnIfNotCurrentlyActingUpdatesInDEV","didWarnAboutUnmockedScheduler","warnIfUnmockedScheduler","unstable_flushAllWithoutAsserting","computeThreadID","interactionThreadID","interactions","pendingInteractionMap","pendingInteractions","interaction","__count","subscriber","__subscriberRef","threadID","onWorkScheduled","scheduledInteractions","scheduledExpirationTime","onWorkStarted","earliestRemainingTimeAfterCommit","onWorkStopped","onInteractionScheduledWorkCompleted","onScheduleFiberRoot","onCommitFiberRoot","onCommitFiberUnmount","hasLoggedError","isDevToolsPresent","__REACT_DEVTOOLS_GLOBAL_HOOK__","injectInternals","internals","isDisabled","supportsFiber","rendererID","inject","onScheduleRoot","hasBadMapPolyfill","nonExtensibleObject","preventExtensions","testMap","testSet","debugCounter","FiberNode","Number","NaN","createFiber","shouldConstruct","isReactComponent","currentDependencies","createHostRootFiber","fiberTag","getTag","createFiberFromProfiler","createFiberFromSuspense","createFiberFromSuspenseList","elements","pendingChildren","FiberRootNode","firstSuspendedTime","unstable_getThreadID","createFiberRoot","hydrationCallbacks","uninitializedFiber","didWarnAboutNestedUpdates","didWarnAboutFindNodeInStrictMode","getContextForSubtree","parentComponent","findHostInstanceWithWarning","methodName","hostFiber","createContainer","current$1","getPublicRootInstance","containerFiber","markRetryTimeImpl","markRetryTimeIfNotHydrated","attemptUserBlockingHydration$1","expTime","attemptContinuousHydration$1","attemptHydrationAtCurrentPriority$1","findHostInstanceWithNoPortals","shouldSuspendImpl","overrideHookState","overrideProps","scheduleUpdate","setSuspenseHandler","copyWithSetImpl","obj","idx","updated","copyWithSet","newShouldSuspendImpl","injectIntoDevTools","devToolsConfig","findFiberByHostInstance","currentDispatcherRef","findHostInstanceByFiber","getCurrentFiber","IsSomeRendererActing$1","ReactDOMRoot","_internalRoot","createRootImpl","ReactDOMBlockingRoot","hostInstance","unmount","hydrationOptions","createLegacyRoot","isValidContainer","ReactCurrentOwner$3","topLevelUpdateWarnings","warnedAboutHydrateAPI","isRootRenderedBySomeReact","rootEl","getReactRootElementInContainer","hasNonRootReactChild","shouldHydrateDueToLegacyHeuristic","rootElement","legacyCreateRootFromDOMContainer","forceHydrate","shouldHydrate","warned","rootSibling","warnOnInvalidCallback$1","legacyRenderSubtreeIntoContainer","originalCallback","_originalCallback","findDOMNode","componentOrElement","warnedAboutRefsInRender","isModernRoot","unstable_renderSubtreeIntoContainer","containerNode","unmountComponentAtNode","renderedByDifferentReact","_rootEl","isContainerReactRoot","createPortal","ReactVersion","didWarnAboutUnstableCreatePortal","createPortal$1","renderSubtreeIntoContainer","unstable_createPortal","Internals","Events","foundDevTools","bundleType","rendererPackageName","self","navigator","userAgent","protocol","exports","unstable_batchedUpdates"],"mappings":"AAAA;;;;;;;;AASA;;AAIA,IAAIA,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC,GAAC,YAAW;AACd;;AAEA,QAAIC,KAAK,GAAGC,OAAO,CAAC,OAAD,CAAnB;;AACA,QAAIC,OAAO,GAAGD,OAAO,CAAC,eAAD,CAArB;;AACA,QAAIE,SAAS,GAAGF,OAAO,CAAC,WAAD,CAAvB;;AACA,QAAIG,cAAc,GAAGH,OAAO,CAAC,2BAAD,CAA5B;;AACA,QAAII,OAAO,GAAGJ,OAAO,CAAC,mBAAD,CAArB;;AAEA,QAAIK,oBAAoB,GAAGN,KAAK,CAACO,kDAAjC,CATc,CASuE;AACrF;AACA;;AAEA,QAAI,CAACD,oBAAoB,CAACE,cAArB,CAAoC,wBAApC,CAAL,EAAoE;AAClEF,MAAAA,oBAAoB,CAACG,sBAArB,GAA8C;AAC5CC,QAAAA,OAAO,EAAE;AADmC,OAA9C;AAGD;;AAED,QAAI,CAACJ,oBAAo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GAAkCvN,gBAAlC;AACAsN,IAAAA,OAAO,CAACV,qBAAR,GAAgCA,qBAAhC;AACAU,IAAAA,OAAO,CAACrB,mCAAR,GAA8CU,0BAA9C;AACAW,IAAAA,OAAO,CAACx8D,OAAR,GAAkB07D,YAAlB;AACG,GAp6wBD;AAq6wBD","sourcesContent":["/** @license React v16.13.1\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\nvar _assign = require('object-assign');\nvar Scheduler = require('scheduler');\nvar checkPropTypes = require('prop-types/checkPropTypes');\nvar tracing = require('scheduler/tracing');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.\n// Current owner and dispatcher used to share the same ref,\n// but PR #14548 split them out to better support the react-debug-tools package.\n\nif (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {\n ReactSharedInternals.ReactCurrentDispatcher = {\n current: null\n };\n}\n\nif (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {\n ReactSharedInternals.ReactCurrentBatchConfig = {\n suspense: null\n };\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n}\nfunction error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\\n in') === 0;\n\n if (!hasExistingStack) {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(message);\n } catch (x) {}\n }\n}\n\nif (!React) {\n {\n throw Error( \"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.\" );\n }\n}\n\nvar invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n};\n\n{\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n\n var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {\n // If document doesn't exist we know for sure we will crash in this method\n // when we call document.createEvent(). However this can cause confusing\n // errors: https://github.com/facebookincubator/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (!(typeof document !== 'undefined')) {\n {\n throw Error( \"The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.\" );\n }\n }\n\n var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n function callCallback() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n\n func.apply(context, funcArgs);\n didError = false;\n } // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n } // Create a fake event type.\n\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n\n if (didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n } else if (isCrossOriginError) {\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');\n }\n\n this.onError(error);\n } // Remove our event listeners\n\n\n window.removeEventListener('error', handleWindowError);\n };\n\n invokeGuardedCallbackImpl = invokeGuardedCallbackDev;\n }\n}\n\nvar invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n\nvar hasError = false;\nvar caughtError = null; // Used by event system to capture/rethrow the first error.\n\nvar hasRethrowError = false;\nvar rethrowError = null;\nvar reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n};\n/**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n}\n/**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n\n if (hasError) {\n var error = clearCaughtError();\n\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n}\n/**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\nfunction rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}\nfunction hasCaughtError() {\n return hasError;\n}\nfunction clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n {\n {\n throw Error( \"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\nvar getFiberCurrentPropsFromNode = null;\nvar getInstanceFromNode = null;\nvar getNodeFromInstance = null;\nfunction setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {\n getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;\n getInstanceFromNode = getInstanceFromNodeImpl;\n getNodeFromInstance = getNodeFromInstanceImpl;\n\n {\n if (!getNodeFromInstance || !getInstanceFromNode) {\n error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');\n }\n }\n}\nvar validateEventDispatches;\n\n{\n validateEventDispatches = function (event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n var listenersIsArr = Array.isArray(dispatchListeners);\n var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;\n var instancesIsArr = Array.isArray(dispatchInstances);\n var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;\n\n if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {\n error('EventPluginUtils: Invalid `event`.');\n }\n };\n}\n/**\n * Dispatch the event to the listener.\n * @param {SyntheticEvent} event SyntheticEvent to handle\n * @param {function} listener Application-level callback\n * @param {*} inst Internal component instance\n */\n\n\nfunction executeDispatch(event, listener, inst) {\n var type = event.type || 'unknown-event';\n event.currentTarget = getNodeFromInstance(inst);\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n/**\n * Standard/simple iteration through an event's collected dispatches.\n */\n\nfunction executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar FundamentalComponent = 20;\nvar ScopeComponent = 21;\nvar Block = 22;\n\n/**\n * Injectable ordering of event plugins.\n */\nvar eventPluginOrder = null;\n/**\n * Injectable mapping from names to event plugin modules.\n */\n\nvar namesToPlugins = {};\n/**\n * Recomputes the plugin list using the injected plugins and plugin ordering.\n *\n * @private\n */\n\nfunction recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error( \"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\" );\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error( \"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\" );\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error( \"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\" );\n }\n }\n }\n }\n}\n/**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\n\n\nfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {\n {\n throw Error( \"EventPluginRegistry: More than one plugin attempted to publish the same event name, `\" + eventName + \"`.\" );\n }\n }\n\n eventNameDispatchConfigs[eventName] = dispatchConfig;\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n\n if (phasedRegistrationNames) {\n for (var phaseName in phasedRegistrationNames) {\n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n var phasedRegistrationName = phasedRegistrationNames[phaseName];\n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n }\n }\n\n return true;\n } else if (dispatchConfig.registrationName) {\n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n return true;\n }\n\n return false;\n}\n/**\n * Publishes a registration name that is used to identify dispatched events.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\n\n\nfunction publishRegistrationName(registrationName, pluginModule, eventName) {\n if (!!registrationNameModules[registrationName]) {\n {\n throw Error( \"EventPluginRegistry: More than one plugin attempted to publish the same registration name, `\" + registrationName + \"`.\" );\n }\n }\n\n registrationNameModules[registrationName] = pluginModule;\n registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n}\n/**\n * Registers plugins so that they can extract and dispatch events.\n */\n\n/**\n * Ordered list of injected plugins.\n */\n\n\nvar plugins = [];\n/**\n * Mapping from event name to dispatch config\n */\n\nvar eventNameDispatchConfigs = {};\n/**\n * Mapping from registration name to plugin module\n */\n\nvar registrationNameModules = {};\n/**\n * Mapping from registration name to event name\n */\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\nvar possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true\n\n/**\n * Injects an ordering of plugins (by plugin name). This allows the ordering\n * to be decoupled from injection of the actual plugins so that ordering is\n * always deterministic regardless of packaging, on-the-fly injection, etc.\n *\n * @param {array} InjectedEventPluginOrder\n * @internal\n */\n\nfunction injectEventPluginOrder(injectedEventPluginOrder) {\n if (!!eventPluginOrder) {\n {\n throw Error( \"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.\" );\n }\n } // Clone the ordering so it cannot be dynamically mutated.\n\n\n eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n recomputePluginOrdering();\n}\n/**\n * Injects plugins to be used by plugin event system. The plugin names must be\n * in the ordering injected by `injectEventPluginOrder`.\n *\n * Plugins can be injected as part of page initialization or on-the-fly.\n *\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n * @internal\n */\n\nfunction injectEventPluginsByName(injectedNamesToPlugins) {\n var isOrderingDirty = false;\n\n for (var pluginName in injectedNamesToPlugins) {\n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n continue;\n }\n\n var pluginModule = injectedNamesToPlugins[pluginName];\n\n if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n if (!!namesToPlugins[pluginName]) {\n {\n throw Error( \"EventPluginRegistry: Cannot inject two different event plugins using the same name, `\" + pluginName + \"`.\" );\n }\n }\n\n namesToPlugins[pluginName] = pluginModule;\n isOrderingDirty = true;\n }\n }\n\n if (isOrderingDirty) {\n recomputePluginOrdering();\n }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar PLUGIN_EVENT_SYSTEM = 1;\nvar IS_REPLAYED = 1 << 5;\nvar IS_FIRST_ANCESTOR = 1 << 6;\n\nvar restoreImpl = null;\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n if (!(typeof restoreImpl === 'function')) {\n {\n throw Error( \"setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var _props = getFiberCurrentPropsFromNode(stateNode);\n\n restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n }\n}\n\nfunction setRestoreImplementation(impl) {\n restoreImpl = impl;\n}\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\nfunction needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\nvar enableProfilerTimer = true; // Trace which interactions trigger each commit.\n\nvar enableDeprecatedFlareAPI = false; // Experimental Host Component support.\n\nvar enableFundamentalAPI = false; // Experimental Scope support.\nvar warnAboutStringRefs = false;\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n// Defaults\n\nvar batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n};\n\nvar discreteUpdatesImpl = function (fn, a, b, c, d) {\n return fn(a, b, c, d);\n};\n\nvar flushDiscreteUpdatesImpl = function () {};\n\nvar batchedEventUpdatesImpl = batchedUpdatesImpl;\nvar isInsideEventHandler = false;\nvar isBatchingEventUpdates = false;\n\nfunction finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n flushDiscreteUpdatesImpl();\n restoreStateIfNeeded();\n }\n}\n\nfunction batchedUpdates(fn, bookkeeping) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(bookkeeping);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n}\nfunction batchedEventUpdates(fn, a, b) {\n if (isBatchingEventUpdates) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isBatchingEventUpdates = true;\n\n try {\n return batchedEventUpdatesImpl(fn, a, b);\n } finally {\n isBatchingEventUpdates = false;\n finishEventHandler();\n }\n} // This is for the React Flare event system\nfunction discreteUpdates(fn, a, b, c, d) {\n var prevIsInsideEventHandler = isInsideEventHandler;\n isInsideEventHandler = true;\n\n try {\n return discreteUpdatesImpl(fn, a, b, c, d);\n } finally {\n isInsideEventHandler = prevIsInsideEventHandler;\n\n if (!isInsideEventHandler) {\n finishEventHandler();\n }\n }\n}\nfunction flushDiscreteUpdatesIfNeeded(timeStamp) {\n // event.timeStamp isn't overly reliable due to inconsistencies in\n // how different browsers have historically provided the time stamp.\n // Some browsers provide high-resolution time stamps for all events,\n // some provide low-resolution time stamps for all events. FF < 52\n // even mixes both time stamps together. Some browsers even report\n // negative time stamps or time stamps that are 0 (iOS9) in some cases.\n // Given we are only comparing two time stamps with equality (!==),\n // we are safe from the resolution differences. If the time stamp is 0\n // we bail-out of preventing the flush, which can affect semantics,\n // such as if an earlier flush removes or adds event listeners that\n // are fired in the subsequent flush. However, this is the same\n // behaviour as we had before this change, so the risks are low.\n if (!isInsideEventHandler && (!enableDeprecatedFlareAPI )) {\n flushDiscreteUpdatesImpl();\n }\n}\nfunction setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n discreteUpdatesImpl = _discreteUpdatesImpl;\n flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;\n batchedEventUpdatesImpl = _batchedEventUpdatesImpl;\n}\n\nvar DiscreteEvent = 0;\nvar UserBlockingEvent = 1;\nvar ContinuousEvent = 2;\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the whitelist are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar ROOT_ATTRIBUTE_NAME = 'data-reactroot';\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\nfunction shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n\n return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n}\nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n\n case OVERLOADED_BOOLEAN:\n return value === false;\n\n case NUMERIC:\n return isNaN(value);\n\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n\n return false;\n}\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n\nreservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML whitelist.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true);\n});\n\nvar ReactDebugCurrentFrame = null;\n\n{\n ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n} // A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n }\n }\n}\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\nfunction setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n } // If the prop isn't in the special list, treat it as a simple attribute.\n\n\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n node.setAttribute(_attributeName, '' + value);\n }\n }\n\n return;\n }\n\n var mustUseProperty = propertyInfo.mustUseProperty;\n\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n if (value === null) {\n var type = propertyInfo.type;\n node[propertyName] = type === BOOLEAN ? false : '';\n } else {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyName] = value;\n }\n\n return;\n } // The rest are treated as attributes with special cases.\n\n\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n var attributeValue;\n\n if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n // If attribute type is boolean, we know for sure it won't be an execution sink\n // and we won't require Trusted Type here.\n attributeValue = '';\n } else {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n {\n attributeValue = '' + value;\n }\n\n if (propertyInfo.sanitizeURL) {\n sanitizeURL(attributeValue.toString());\n }\n }\n\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n}\n\nvar BEFORE_SLASH_RE = /^(.*)[\\\\\\/]/;\nfunction describeComponentFrame (name, source, ownerName) {\n var sourceInfo = '';\n\n if (source) {\n var path = source.fileName;\n var fileName = path.replace(BEFORE_SLASH_RE, '');\n\n {\n // In DEV, include code for a common special case:\n // prefer \"folder/index.js\" instead of just \"index.js\".\n if (/^index\\./.test(fileName)) {\n var match = path.match(BEFORE_SLASH_RE);\n\n if (match) {\n var pathBeforeSlash = match[1];\n\n if (pathBeforeSlash) {\n var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');\n fileName = folderName + '/' + fileName;\n }\n }\n }\n }\n\n sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';\n } else if (ownerName) {\n sourceInfo = ' (created by ' + ownerName + ')';\n }\n\n return '\\n in ' + (name || 'Unknown') + sourceInfo;\n}\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\nfunction refineResolvedLazyComponent(lazyComponent) {\n return lazyComponent._status === Resolved ? lazyComponent._result : null;\n}\nfunction initializeLazyComponentType(lazyComponent) {\n if (lazyComponent._status === Uninitialized) {\n lazyComponent._status = Pending;\n var ctor = lazyComponent._ctor;\n var thenable = ctor();\n lazyComponent._result = thenable;\n thenable.then(function (moduleObject) {\n if (lazyComponent._status === Pending) {\n var defaultExport = moduleObject.default;\n\n {\n if (defaultExport === undefined) {\n error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + \"const MyComponent = lazy(() => import('./MyComponent'))\", moduleObject);\n }\n }\n\n lazyComponent._status = Resolved;\n lazyComponent._result = defaultExport;\n }\n }, function (error) {\n if (lazyComponent._status === Pending) {\n lazyComponent._status = Rejected;\n lazyComponent._result = error;\n }\n });\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n return 'Context.Consumer';\n\n case REACT_PROVIDER_TYPE:\n return 'Context.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type.render);\n\n case REACT_LAZY_TYPE:\n {\n var thenable = type;\n var resolvedThenable = refineResolvedLazyComponent(thenable);\n\n if (resolvedThenable) {\n return getComponentName(resolvedThenable);\n }\n\n break;\n }\n }\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction describeFiber(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n case HostPortal:\n case HostText:\n case Fragment:\n case ContextProvider:\n case ContextConsumer:\n return '';\n\n default:\n var owner = fiber._debugOwner;\n var source = fiber._debugSource;\n var name = getComponentName(fiber.type);\n var ownerName = null;\n\n if (owner) {\n ownerName = getComponentName(owner.type);\n }\n\n return describeComponentFrame(name, source, ownerName);\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n\n return info;\n}\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentName(owner.type);\n }\n }\n\n return null;\n}\nfunction getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n}\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame$1.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n}\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n}\nfunction setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n}\n\n// Flow does not allow string concatenation of most non-string types. To work\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\nfunction toString(value) {\n return '' + value;\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'object':\n case 'string':\n case 'undefined':\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nvar ReactDebugCurrentFrame$2 = null;\nvar ReactControlledValuePropTypes = {\n checkPropTypes: null\n};\n\n{\n ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;\n var hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n };\n var propTypes = {\n value: function (props, propName, componentName) {\n if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {\n return null;\n }\n\n return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n checked: function (props, propName, componentName) {\n if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {\n return null;\n }\n\n return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n };\n /**\n * Provide a linked `value` attribute for controlled forms. You should not use\n * this outside of the ReactDOM controlled form components.\n */\n\n ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {\n checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);\n };\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n}\n\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\nfunction getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}\nfunction initWrapperState(element, props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnValueDefaultValue = true;\n }\n }\n\n var node = element;\n var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n controlled: isControlled(props)\n };\n}\nfunction updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n}\nfunction updateWrapper(element, props) {\n var node = element;\n\n {\n var controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n error('A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);\n\n didWarnUncontrolledToControlled = true;\n }\n\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n error('A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);\n\n didWarnControlledToUncontrolled = true;\n }\n }\n\n updateChecked(element, props);\n var value = getToStringValue(props.value);\n var type = props.type;\n\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(value);\n }\n } else if (node.value !== toString(value)) {\n node.value = toString(value);\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n return;\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (props.hasOwnProperty('value')) {\n setDefaultValue(node, props.type, value);\n } else if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n }\n\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n}\nfunction postMountWrapper(element, props, isHydrating) {\n var node = element; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n var type = props.type;\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (props.value === undefined || props.value === null)) {\n return;\n }\n\n var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var name = node.name;\n\n if (name !== '') {\n node.name = '';\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!node._wrapperState.initialChecked;\n }\n\n if (name !== '') {\n node.name = name;\n }\n}\nfunction restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode$1(otherNode);\n\n if (!otherProps) {\n {\n throw Error( \"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.\" );\n }\n } // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n\n\n updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n updateWrapper(otherNode, otherProps);\n }\n }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value <x> is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\n\nfunction setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\n\nfunction flattenChildren(children) {\n var content = ''; // Flatten children. We'll warn if they are invalid\n // during validateProps() which runs for hydration too.\n // Note that this would throw on non-element objects.\n // Elements are stringified (which is normally irrelevant\n // but matters for <fbt>).\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child; // Note: we don't warn about invalid children here.\n // Instead, this is done separately below so that\n // it happens during the hydration codepath too.\n });\n return content;\n}\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\n\nfunction validateProps(element, props) {\n {\n // This mirrors the codepath above, but runs for hydration too.\n // Warn about invalid children here so that client and hydration are consistent.\n // TODO: this seems like it could cause a DEV-only throw for hydration\n // if children contains a non-element object. We should try to avoid that.\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n\n if (typeof child.type !== 'string') {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n\n error('Only strings and numbers are supported as <option> children.');\n }\n });\n } // TODO: Remove support for `selected` in <option>.\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n}\nfunction postMountWrapper$1(element, props) {\n // value=\"\" should make a value attribute (#6219)\n if (props.value != null) {\n element.setAttribute('value', toString(getToStringValue(props.value)));\n }\n}\nfunction getHostProps$1(element, props) {\n var hostProps = _assign({\n children: undefined\n }, props);\n\n var content = flattenChildren(props.children);\n\n if (content) {\n hostProps.children = content;\n }\n\n return hostProps;\n}\n\nvar didWarnValueDefaultValue$1;\n\n{\n didWarnValueDefaultValue$1 = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n}\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction getHostProps$2(element, props) {\n return _assign({}, props, {\n value: undefined\n });\n}\nfunction initWrapperState$1(element, props) {\n var node = element;\n\n {\n checkSelectPropTypes(props);\n }\n\n node._wrapperState = {\n wasMultiple: !!props.multiple\n };\n\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');\n\n didWarnValueDefaultValue$1 = true;\n }\n }\n}\nfunction postMountWrapper$2(element, props) {\n var node = element;\n node.multiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n }\n}\nfunction postUpdateWrapper(element, props) {\n var node = element;\n var wasMultiple = node._wrapperState.wasMultiple;\n node._wrapperState.wasMultiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (wasMultiple !== !!props.multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n }\n }\n}\nfunction restoreControlledState$1(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n}\n\nvar didWarnValDefaultVal = false;\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nfunction getHostProps$3(element, props) {\n var node = element;\n\n if (!(props.dangerouslySetInnerHTML == null)) {\n {\n throw Error( \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\" );\n }\n } // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n\n\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n\n return hostProps;\n}\nfunction initWrapperState$2(element, props) {\n var node = element;\n\n {\n ReactControlledValuePropTypes.checkPropTypes('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n\n didWarnValDefaultVal = true;\n }\n }\n\n var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n var children = props.children,\n defaultValue = props.defaultValue;\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n\n {\n if (!(defaultValue == null)) {\n {\n throw Error( \"If you supply `defaultValue` on a <textarea>, do not pass children.\" );\n }\n }\n\n if (Array.isArray(children)) {\n if (!(children.length <= 1)) {\n {\n throw Error( \"<textarea> can only have at most one child.\" );\n }\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n node._wrapperState = {\n initialValue: getToStringValue(initialValue)\n };\n}\nfunction updateWrapper$1(element, props) {\n var node = element;\n var value = getToStringValue(props.value);\n var defaultValue = getToStringValue(props.defaultValue);\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n }\n\n if (props.defaultValue == null && node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\n }\n}\nfunction postMountWrapper$3(element, props) {\n var node = element; // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === node._wrapperState.initialValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n}\nfunction restoreControlledState$2(element, props) {\n // DOM component is still mounted; update\n updateWrapper$1(element, props);\n}\n\nvar HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nvar Namespaces = {\n html: HTML_NAMESPACE,\n mathml: MATH_NAMESPACE,\n svg: SVG_NAMESPACE\n}; // Assumes there is no parent namespace.\n\nfunction getIntrinsicNamespace(type) {\n switch (type) {\n case 'svg':\n return SVG_NAMESPACE;\n\n case 'math':\n return MATH_NAMESPACE;\n\n default:\n return HTML_NAMESPACE;\n }\n}\nfunction getChildNamespace(parentNamespace, type) {\n if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n // No (or default) parent namespace: potential entry point.\n return getIntrinsicNamespace(type);\n }\n\n if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n // We're leaving SVG.\n return HTML_NAMESPACE;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n}\n\n/* globals MSApp */\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n};\n\nvar reusableSVGContainer;\n/**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n if (node.namespaceURI === Namespaces.svg) {\n\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n});\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n};\n\n// Do not use the below two methods directly!\n// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.\n// (It is the only module that is allowed to access these methods.)\nfunction unsafeCastStringToDOMTopLevelType(topLevelType) {\n return topLevelType;\n}\nfunction unsafeCastDOMTopLevelTypeToString(topLevelType) {\n return topLevelType;\n}\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n}\n\n/**\n * To identify top level events in ReactDOM, we use constants defined by this\n * module. This is the only module that uses the unsafe* methods to express\n * that the constants actually correspond to the browser event names. This lets\n * us save some bundle size by avoiding a top level type -> event name map.\n * The rest of ReactDOM code should import top level types from this file.\n */\n\nvar TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');\nvar TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));\nvar TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));\nvar TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));\nvar TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');\nvar TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');\nvar TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');\nvar TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');\nvar TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');\nvar TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');\nvar TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');\nvar TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');\nvar TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');\nvar TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');\nvar TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');\nvar TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');\nvar TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');\nvar TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');\nvar TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');\nvar TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');\nvar TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');\nvar TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');\nvar TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');\nvar TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');\nvar TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');\nvar TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');\nvar TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');\nvar TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');\nvar TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');\nvar TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');\nvar TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');\nvar TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');\nvar TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');\nvar TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');\nvar TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');\nvar TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');\nvar TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');\nvar TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');\nvar TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');\nvar TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');\nvar TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');\nvar TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');\nvar TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');\nvar TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');\nvar TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');\nvar TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');\nvar TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');\nvar TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');\nvar TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');\nvar TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');\nvar TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');\nvar TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');\nvar TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');\nvar TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');\nvar TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');\nvar TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');\nvar TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');\nvar TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');\nvar TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');\nvar TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');\nvar TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');\nvar TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');\nvar TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');\nvar TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');\nvar TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');\nvar TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');\nvar TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');\nvar TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');\nvar TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');\nvar TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');\nvar TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');\nvar TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');\nvar TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');\nvar TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');\nvar TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');\nvar TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');\nvar TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));\nvar TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');\nvar TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');\nvar TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.\n// Note that events in this list will *not* be listened to at the top level\n// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.\n\nvar mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];\nfunction getRawEventName(topLevelType) {\n return unsafeCastDOMTopLevelTypeToString(topLevelType);\n}\n\nvar PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // prettier-ignore\n\nvar elementListenerMap = new PossiblyWeakMap();\nfunction getListenerMapForElement(element) {\n var listenerMap = elementListenerMap.get(element);\n\n if (listenerMap === undefined) {\n listenerMap = new Map();\n elementListenerMap.set(element, listenerMap);\n }\n\n return listenerMap;\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternalFiber;\n}\nfunction has(key) {\n return key._reactInternalFiber !== undefined;\n}\nfunction set(key, value) {\n key._reactInternalFiber = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoEffect =\n/* */\n0;\nvar PerformedWork =\n/* */\n1; // You can change the rest (and add more).\n\nvar Placement =\n/* */\n2;\nvar Update =\n/* */\n4;\nvar PlacementAndUpdate =\n/* */\n6;\nvar Deletion =\n/* */\n8;\nvar ContentReset =\n/* */\n16;\nvar Callback =\n/* */\n32;\nvar DidCapture =\n/* */\n64;\nvar Ref =\n/* */\n128;\nvar Snapshot =\n/* */\n256;\nvar Passive =\n/* */\n512;\nvar Hydrating =\n/* */\n1024;\nvar HydratingAndUpdate =\n/* */\n1028; // Passive & Update & Callback & Ref & Snapshot\n\nvar LifecycleEffectMask =\n/* */\n932; // Union of all host effects\n\nvar HostEffectMask =\n/* */\n2047;\nvar Incomplete =\n/* */\n2048;\nvar ShouldCapture =\n/* */\n4096;\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n }\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n}\nfunction getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n if (!(getNearestMountedFiber(fiber) === fiber)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (!(nearestMounted !== null)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n {\n throw Error( \"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\" );\n }\n }\n }\n }\n\n if (!(a.alternate === b)) {\n {\n throw Error( \"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (!(a.tag === HostRoot)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n}\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {\n return node;\n } else if (node.child && node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n}\n\n/**\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\nfunction accumulateInto(current, next) {\n if (!(next != null)) {\n {\n throw Error( \"accumulateInto(...): Accumulated items must not be null or undefined.\" );\n }\n }\n\n if (current == null) {\n return next;\n } // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n\n\n if (Array.isArray(current)) {\n if (Array.isArray(next)) {\n current.push.apply(current, next);\n return current;\n }\n\n current.push(next);\n return current;\n }\n\n if (Array.isArray(next)) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n}\n\n/**\n * @param {array} arr an \"accumulation\" of items which is either an Array or\n * a single item. Useful when paired with the `accumulate` module. This is a\n * simple utility that allows us to reason about a collection of items, but\n * handling the case when there is exactly one item (and we do not need to\n * allocate an array).\n * @param {function} cb Callback invoked with each element or a collection.\n * @param {?} [scope] Scope used as `this` in a callback.\n */\nfunction forEachAccumulated(arr, cb, scope) {\n if (Array.isArray(arr)) {\n arr.forEach(cb, scope);\n } else if (arr) {\n cb.call(scope, arr);\n }\n}\n\n/**\n * Internal queue of events that have accumulated their dispatches and are\n * waiting to have their dispatches executed.\n */\n\nvar eventQueue = null;\n/**\n * Dispatches an event and releases it back into the pool, unless persistent.\n *\n * @param {?object} event Synthetic event to be dispatched.\n * @private\n */\n\nvar executeDispatchesAndRelease = function (event) {\n if (event) {\n executeDispatchesInOrder(event);\n\n if (!event.isPersistent()) {\n event.constructor.release(event);\n }\n }\n};\n\nvar executeDispatchesAndReleaseTopLevel = function (e) {\n return executeDispatchesAndRelease(e);\n};\n\nfunction runEventsInBatch(events) {\n if (events !== null) {\n eventQueue = accumulateInto(eventQueue, events);\n } // Set `eventQueue` to null before processing it so that we can tell if more\n // events get enqueued while processing.\n\n\n var processingEventQueue = eventQueue;\n eventQueue = null;\n\n if (!processingEventQueue) {\n return;\n }\n\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n\n if (!!eventQueue) {\n {\n throw Error( \"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.\" );\n }\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n}\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n}\n\n/**\n * Summary of `DOMEventPluginSystem` event handling:\n *\n * - Top-level delegation is used to trap most native browser events. This\n * may only occur in the main thread and is the responsibility of\n * ReactDOMEventListener, which is injected and can therefore support\n * pluggable event sources. This is the only work that occurs in the main\n * thread.\n *\n * - We normalize and de-duplicate events to account for browser quirks. This\n * may be done in the worker thread.\n *\n * - Forward these native events (with the associated top-level type used to\n * trap it) to `EventPluginRegistry`, which in turn will ask plugins if they want\n * to extract any synthetic events.\n *\n * - The `EventPluginRegistry` will then process each event by annotating them with\n * \"dispatches\", a sequence of listeners and IDs that care about that event.\n *\n * - The `EventPluginRegistry` then dispatches the events.\n *\n * Overview of React and the event system:\n *\n * +------------+ .\n * | DOM | .\n * +------------+ .\n * | .\n * v .\n * +------------+ .\n * | ReactEvent | .\n * | Listener | .\n * +------------+ . +-----------+\n * | . +--------+|SimpleEvent|\n * | . | |Plugin |\n * +-----|------+ . v +-----------+\n * | | | . +--------------+ +------------+\n * | +-----------.--->|PluginRegistry| | Event |\n * | | . | | +-----------+ | Propagators|\n * | ReactEvent | . | | |TapEvent | |------------|\n * | Emitter | . | |<---+|Plugin | |other plugin|\n * | | . | | +-----------+ | utilities |\n * | +-----------.--->| | +------------+\n * | | | . +--------------+\n * +-----|------+ . ^ +-----------+\n * | . | |Enter/Leave|\n * + . +-------+|Plugin |\n * +-------------+ . +-----------+\n * | application | .\n * |-------------| .\n * | | .\n * | | .\n * +-------------+ .\n * .\n * React Core . General Purpose Event Plugin System\n */\n\nvar CALLBACK_BOOKKEEPING_POOL_SIZE = 10;\nvar callbackBookkeepingPool = [];\n\nfunction releaseTopLevelCallbackBookKeeping(instance) {\n instance.topLevelType = null;\n instance.nativeEvent = null;\n instance.targetInst = null;\n instance.ancestors.length = 0;\n\n if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {\n callbackBookkeepingPool.push(instance);\n }\n} // Used to store ancestor hierarchy in top level callback\n\n\nfunction getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) {\n if (callbackBookkeepingPool.length) {\n var instance = callbackBookkeepingPool.pop();\n instance.topLevelType = topLevelType;\n instance.eventSystemFlags = eventSystemFlags;\n instance.nativeEvent = nativeEvent;\n instance.targetInst = targetInst;\n return instance;\n }\n\n return {\n topLevelType: topLevelType,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetInst: targetInst,\n ancestors: []\n };\n}\n/**\n * Find the deepest React component completely containing the root of the\n * passed-in instance (for use when entire React trees are nested within each\n * other). If React trees are not nested, returns null.\n */\n\n\nfunction findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n}\n/**\n * Allows registered plugins an opportunity to extract events from top-level\n * native browser events.\n *\n * @return {*} An accumulation of synthetic events.\n * @internal\n */\n\n\nfunction extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var events = null;\n\n for (var i = 0; i < plugins.length; i++) {\n // Not every plugin in the ordering may be loaded at runtime.\n var possiblePlugin = plugins[i];\n\n if (possiblePlugin) {\n var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n\n if (extractedEvents) {\n events = accumulateInto(events, extractedEvents);\n }\n }\n }\n\n return events;\n}\n\nfunction runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n runEventsInBatch(events);\n}\n\nfunction handleTopLevel(bookKeeping) {\n var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components.\n // It's important that we build the array of ancestors before calling any\n // event handlers, because event handlers can modify the DOM, leading to\n // inconsistencies with ReactMount's node cache. See #1105.\n\n var ancestor = targetInst;\n\n do {\n if (!ancestor) {\n var ancestors = bookKeeping.ancestors;\n ancestors.push(ancestor);\n break;\n }\n\n var root = findRootContainerNode(ancestor);\n\n if (!root) {\n break;\n }\n\n var tag = ancestor.tag;\n\n if (tag === HostComponent || tag === HostText) {\n bookKeeping.ancestors.push(ancestor);\n }\n\n ancestor = getClosestInstanceFromNode(root);\n } while (ancestor);\n\n for (var i = 0; i < bookKeeping.ancestors.length; i++) {\n targetInst = bookKeeping.ancestors[i];\n var eventTarget = getEventTarget(bookKeeping.nativeEvent);\n var topLevelType = bookKeeping.topLevelType;\n var nativeEvent = bookKeeping.nativeEvent;\n var eventSystemFlags = bookKeeping.eventSystemFlags; // If this is the first ancestor, we mark it on the system flags\n\n if (i === 0) {\n eventSystemFlags |= IS_FIRST_ANCESTOR;\n }\n\n runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, eventTarget, eventSystemFlags);\n }\n}\n\nfunction dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {\n var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags);\n\n try {\n // Event queue being processed in the same cycle allows\n // `preventDefault`.\n batchedEventUpdates(handleTopLevel, bookKeeping);\n } finally {\n releaseTopLevelCallbackBookKeeping(bookKeeping);\n }\n}\n/**\n * We listen for bubbled touch events on the document object.\n *\n * Firefox v8.01 (and possibly others) exhibited strange behavior when\n * mounting `onmousemove` events at some node that was not the document\n * element. The symptoms were that if your mouse is not moving over something\n * contained within that mount point (for example on the background) the\n * top-level listeners for `onmousemove` won't be called. However, if you\n * register the `mousemove` on the document object, then it will of course\n * catch all `mousemove`s. This along with iOS quirks, justifies restricting\n * top-level listeners to the document object only, at least for these\n * movement types of events and possibly all events.\n *\n * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n *\n * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but\n * they bubble to document.\n *\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {object} mountAt Container where to mount the listener\n */\n\nfunction legacyListenToEvent(registrationName, mountAt) {\n var listenerMap = getListenerMapForElement(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n legacyListenToTopLevelEvent(dependency, mountAt, listenerMap);\n }\n}\nfunction legacyListenToTopLevelEvent(topLevelType, mountAt, listenerMap) {\n if (!listenerMap.has(topLevelType)) {\n switch (topLevelType) {\n case TOP_SCROLL:\n trapCapturedEvent(TOP_SCROLL, mountAt);\n break;\n\n case TOP_FOCUS:\n case TOP_BLUR:\n trapCapturedEvent(TOP_FOCUS, mountAt);\n trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function,\n // but this ensures we mark both as attached rather than just one.\n\n listenerMap.set(TOP_BLUR, null);\n listenerMap.set(TOP_FOCUS, null);\n break;\n\n case TOP_CANCEL:\n case TOP_CLOSE:\n if (isEventSupported(getRawEventName(topLevelType))) {\n trapCapturedEvent(topLevelType, mountAt);\n }\n\n break;\n\n case TOP_INVALID:\n case TOP_SUBMIT:\n case TOP_RESET:\n // We listen to them on the target DOM elements.\n // Some of them bubble so we don't want them to fire twice.\n break;\n\n default:\n // By default, listen on the top level to all non-media events.\n // Media events don't bubble so adding the listener wouldn't do anything.\n var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1;\n\n if (!isMediaEvent) {\n trapBubbledEvent(topLevelType, mountAt);\n }\n\n break;\n }\n\n listenerMap.set(topLevelType, null);\n }\n}\nfunction isListeningToAllDependencies(registrationName, mountAt) {\n var listenerMap = getListenerMapForElement(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n\n if (!listenerMap.has(dependency)) {\n return false;\n }\n }\n\n return true;\n}\n\nvar attemptUserBlockingHydration;\nfunction setAttemptUserBlockingHydration(fn) {\n attemptUserBlockingHydration = fn;\n}\nvar attemptContinuousHydration;\nfunction setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n}\nvar attemptHydrationAtCurrentPriority;\nfunction setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n} // TODO: Upgrade this definition once we're on a newer version of Flow that\nvar hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\nvar queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nfunction hasQueuedDiscreteEvents() {\n return queuedDiscreteEvents.length > 0;\n}\nvar discreteReplayableEvents = [TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_TOUCH_START, TOP_AUX_CLICK, TOP_DOUBLE_CLICK, TOP_POINTER_CANCEL, TOP_POINTER_DOWN, TOP_POINTER_UP, TOP_DRAG_END, TOP_DRAG_START, TOP_DROP, TOP_COMPOSITION_END, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_INPUT, TOP_TEXT_INPUT, TOP_CLOSE, TOP_CANCEL, TOP_COPY, TOP_CUT, TOP_PASTE, TOP_CLICK, TOP_CHANGE, TOP_CONTEXT_MENU, TOP_RESET, TOP_SUBMIT];\nvar continuousReplayableEvents = [TOP_FOCUS, TOP_BLUR, TOP_DRAG_ENTER, TOP_DRAG_LEAVE, TOP_MOUSE_OVER, TOP_MOUSE_OUT, TOP_POINTER_OVER, TOP_POINTER_OUT, TOP_GOT_POINTER_CAPTURE, TOP_LOST_POINTER_CAPTURE];\nfunction isReplayableDiscreteEvent(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction trapReplayableEventForDocument(topLevelType, document, listenerMap) {\n legacyListenToTopLevelEvent(topLevelType, document, listenerMap);\n}\n\nfunction eagerlyTrapReplayableEvents(container, document) {\n var listenerMapForDoc = getListenerMapForElement(document); // Discrete\n\n discreteReplayableEvents.forEach(function (topLevelType) {\n trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);\n }); // Continuous\n\n continuousReplayableEvents.forEach(function (topLevelType) {\n trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);\n });\n}\n\nfunction createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n return {\n blockedOn: blockedOn,\n topLevelType: topLevelType,\n eventSystemFlags: eventSystemFlags | IS_REPLAYED,\n nativeEvent: nativeEvent,\n container: container\n };\n}\n\nfunction queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n queuedDiscreteEvents.push(queuedEvent);\n} // Resets the replaying for this type of continuous event to no event.\n\nfunction clearIfContinuousEvent(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_FOCUS:\n case TOP_BLUR:\n queuedFocus = null;\n break;\n\n case TOP_DRAG_ENTER:\n case TOP_DRAG_LEAVE:\n queuedDrag = null;\n break;\n\n case TOP_MOUSE_OVER:\n case TOP_MOUSE_OUT:\n queuedMouse = null;\n break;\n\n case TOP_POINTER_OVER:\n case TOP_POINTER_OUT:\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case TOP_GOT_POINTER_CAPTURE:\n case TOP_LOST_POINTER_CAPTURE:\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode$1(blockedOn);\n\n if (_fiber2 !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(_fiber2);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags and store a single event to be\n // replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (topLevelType) {\n case TOP_FOCUS:\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, topLevelType, eventSystemFlags, container, focusEvent);\n return true;\n }\n\n case TOP_DRAG_ENTER:\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, topLevelType, eventSystemFlags, container, dragEvent);\n return true;\n }\n\n case TOP_MOUSE_OVER:\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, topLevelType, eventSystemFlags, container, mouseEvent);\n return true;\n }\n\n case TOP_POINTER_OVER:\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, topLevelType, eventSystemFlags, container, pointerEvent));\n return true;\n }\n\n case TOP_GOT_POINTER_CAPTURE:\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, topLevelType, eventSystemFlags, container, _pointerEvent));\n return true;\n }\n }\n\n return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with attemptToDispatchEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var nextBlockedOn = attemptToDispatchEvent(queuedEvent.topLevelType, queuedEvent.eventSystemFlags, queuedEvent.container, queuedEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode$1(nextBlockedOn);\n\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n }\n\n return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n}\n\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = false; // First replay discrete events.\n\n while (queuedDiscreteEvents.length > 0) {\n var nextDiscreteEvent = queuedDiscreteEvents[0];\n\n if (nextDiscreteEvent.blockedOn !== null) {\n // We're still blocked.\n // Increase the priority of this boundary to unblock\n // the next discrete event.\n var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);\n\n if (_fiber4 !== null) {\n attemptUserBlockingHydration(_fiber4);\n }\n\n break;\n }\n\n var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n nextDiscreteEvent.blockedOn = nextBlockedOn;\n } else {\n // We've successfully replayed the first event. Let's try the next one.\n queuedDiscreteEvents.shift();\n }\n } // Next replay any continuous events.\n\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n}\n\nfunction retryIfBlockedOn(unblocked) {\n // Mark anything that was blocked on this as no longer blocked\n // and eligible for a replay.\n if (queuedDiscreteEvents.length > 0) {\n scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n // worth it because we expect very few discrete events to queue up and once\n // we are actually fully unblocked it will be fast to replay them.\n\n for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n var queuedEvent = queuedDiscreteEvents[i];\n\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n }\n }\n }\n\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n}\n\nfunction addEventBubbleListener(element, eventType, listener) {\n element.addEventListener(eventType, listener, false);\n}\nfunction addEventCaptureListener(element, eventType, listener) {\n element.addEventListener(eventType, listener, true);\n}\n\n// do it in two places, which duplicates logic\n// and increases the bundle size, we do it all\n// here once. If we remove or refactor the\n// SimpleEventPlugin, we should also remove or\n// update the below line.\n\nvar simpleEventPluginEventTypes = {};\nvar topLevelEventsToDispatchConfig = new Map();\nvar eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use\n// the code required to apply the same logic for event prioritization and that of the\n// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code\n// duplication (for which there would be quite a bit). For the events that are not needed\n// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an\n// array of top level events.\n// Lastly, we ignore prettier so we can keep the formatting sane.\n// prettier-ignore\n\nvar discreteEventPairsForSimpleEventPlugin = [TOP_BLUR, 'blur', TOP_CANCEL, 'cancel', TOP_CLICK, 'click', TOP_CLOSE, 'close', TOP_CONTEXT_MENU, 'contextMenu', TOP_COPY, 'copy', TOP_CUT, 'cut', TOP_AUX_CLICK, 'auxClick', TOP_DOUBLE_CLICK, 'doubleClick', TOP_DRAG_END, 'dragEnd', TOP_DRAG_START, 'dragStart', TOP_DROP, 'drop', TOP_FOCUS, 'focus', TOP_INPUT, 'input', TOP_INVALID, 'invalid', TOP_KEY_DOWN, 'keyDown', TOP_KEY_PRESS, 'keyPress', TOP_KEY_UP, 'keyUp', TOP_MOUSE_DOWN, 'mouseDown', TOP_MOUSE_UP, 'mouseUp', TOP_PASTE, 'paste', TOP_PAUSE, 'pause', TOP_PLAY, 'play', TOP_POINTER_CANCEL, 'pointerCancel', TOP_POINTER_DOWN, 'pointerDown', TOP_POINTER_UP, 'pointerUp', TOP_RATE_CHANGE, 'rateChange', TOP_RESET, 'reset', TOP_SEEKED, 'seeked', TOP_SUBMIT, 'submit', TOP_TOUCH_CANCEL, 'touchCancel', TOP_TOUCH_END, 'touchEnd', TOP_TOUCH_START, 'touchStart', TOP_VOLUME_CHANGE, 'volumeChange'];\nvar otherDiscreteEvents = [TOP_CHANGE, TOP_SELECTION_CHANGE, TOP_TEXT_INPUT, TOP_COMPOSITION_START, TOP_COMPOSITION_END, TOP_COMPOSITION_UPDATE]; // prettier-ignore\n\nvar userBlockingPairsForSimpleEventPlugin = [TOP_DRAG, 'drag', TOP_DRAG_ENTER, 'dragEnter', TOP_DRAG_EXIT, 'dragExit', TOP_DRAG_LEAVE, 'dragLeave', TOP_DRAG_OVER, 'dragOver', TOP_MOUSE_MOVE, 'mouseMove', TOP_MOUSE_OUT, 'mouseOut', TOP_MOUSE_OVER, 'mouseOver', TOP_POINTER_MOVE, 'pointerMove', TOP_POINTER_OUT, 'pointerOut', TOP_POINTER_OVER, 'pointerOver', TOP_SCROLL, 'scroll', TOP_TOGGLE, 'toggle', TOP_TOUCH_MOVE, 'touchMove', TOP_WHEEL, 'wheel']; // prettier-ignore\n\nvar continuousPairsForSimpleEventPlugin = [TOP_ABORT, 'abort', TOP_ANIMATION_END, 'animationEnd', TOP_ANIMATION_ITERATION, 'animationIteration', TOP_ANIMATION_START, 'animationStart', TOP_CAN_PLAY, 'canPlay', TOP_CAN_PLAY_THROUGH, 'canPlayThrough', TOP_DURATION_CHANGE, 'durationChange', TOP_EMPTIED, 'emptied', TOP_ENCRYPTED, 'encrypted', TOP_ENDED, 'ended', TOP_ERROR, 'error', TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', TOP_LOAD, 'load', TOP_LOADED_DATA, 'loadedData', TOP_LOADED_METADATA, 'loadedMetadata', TOP_LOAD_START, 'loadStart', TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', TOP_PLAYING, 'playing', TOP_PROGRESS, 'progress', TOP_SEEKING, 'seeking', TOP_STALLED, 'stalled', TOP_SUSPEND, 'suspend', TOP_TIME_UPDATE, 'timeUpdate', TOP_TRANSITION_END, 'transitionEnd', TOP_WAITING, 'waiting'];\n/**\n * Turns\n * ['abort', ...]\n * into\n * eventTypes = {\n * 'abort': {\n * phasedRegistrationNames: {\n * bubbled: 'onAbort',\n * captured: 'onAbortCapture',\n * },\n * dependencies: [TOP_ABORT],\n * },\n * ...\n * };\n * topLevelEventsToDispatchConfig = new Map([\n * [TOP_ABORT, { sameConfig }],\n * ]);\n */\n\nfunction processSimpleEventPluginPairsByPriority(eventTypes, priority) {\n // As the event types are in pairs of two, we need to iterate\n // through in twos. The events are in pairs of two to save code\n // and improve init perf of processing this array, as it will\n // result in far fewer object allocations and property accesses\n // if we only use three arrays to process all the categories of\n // instead of tuples.\n for (var i = 0; i < eventTypes.length; i += 2) {\n var topEvent = eventTypes[i];\n var event = eventTypes[i + 1];\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var onEvent = 'on' + capitalizedEvent;\n var config = {\n phasedRegistrationNames: {\n bubbled: onEvent,\n captured: onEvent + 'Capture'\n },\n dependencies: [topEvent],\n eventPriority: priority\n };\n eventPriorities.set(topEvent, priority);\n topLevelEventsToDispatchConfig.set(topEvent, config);\n simpleEventPluginEventTypes[event] = config;\n }\n}\n\nfunction processTopEventPairsByPriority(eventTypes, priority) {\n for (var i = 0; i < eventTypes.length; i++) {\n eventPriorities.set(eventTypes[i], priority);\n }\n} // SimpleEventPlugin\n\n\nprocessSimpleEventPluginPairsByPriority(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);\nprocessSimpleEventPluginPairsByPriority(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);\nprocessSimpleEventPluginPairsByPriority(continuousPairsForSimpleEventPlugin, ContinuousEvent); // Not used by SimpleEventPlugin\n\nprocessTopEventPairsByPriority(otherDiscreteEvents, DiscreteEvent);\nfunction getEventPriorityForPluginSystem(topLevelType) {\n var priority = eventPriorities.get(topLevelType); // Default to a ContinuousEvent. Note: we might\n // want to warn if we can't detect the priority\n // for the event.\n\n return priority === undefined ? ContinuousEvent : priority;\n}\n\n// Intentionally not named imports because Rollup would use dynamic dispatch for\nvar UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?\n\nvar _enabled = true;\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\nfunction isEnabled() {\n return _enabled;\n}\nfunction trapBubbledEvent(topLevelType, element) {\n trapEventForPluginEventSystem(element, topLevelType, false);\n}\nfunction trapCapturedEvent(topLevelType, element) {\n trapEventForPluginEventSystem(element, topLevelType, true);\n}\n\nfunction trapEventForPluginEventSystem(container, topLevelType, capture) {\n var listener;\n\n switch (getEventPriorityForPluginSystem(topLevelType)) {\n case DiscreteEvent:\n listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n\n case UserBlockingEvent:\n listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n\n case ContinuousEvent:\n default:\n listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n }\n\n var rawEventName = getRawEventName(topLevelType);\n\n if (capture) {\n addEventCaptureListener(container, rawEventName, listener);\n } else {\n addEventBubbleListener(container, rawEventName, listener);\n }\n}\n\nfunction dispatchDiscreteEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);\n discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, container, nativeEvent);\n}\n\nfunction dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, container, nativeEvent) {\n runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, container, nativeEvent));\n}\n\nfunction dispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) {\n // If we already have a queue of discrete events, and this is another discrete\n // event, then we can't dispatch it regardless of its target, since they\n // need to dispatch in order.\n queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.\n topLevelType, eventSystemFlags, container, nativeEvent);\n return;\n }\n\n var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent);\n\n if (blockedOn === null) {\n // We successfully dispatched this event.\n clearIfContinuousEvent(topLevelType, nativeEvent);\n return;\n }\n\n if (isReplayableDiscreteEvent(topLevelType)) {\n // This this to be replayed later once the target is available.\n queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent)) {\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accummulative.\n\n\n clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n {\n dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null);\n }\n} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.\n\nfunction attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n // TODO: Warn if _enabled is false.\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n {\n dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);\n } // We're not blocked on anything.\n\n\n return null;\n}\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n};\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return ('' + value).trim();\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\nvar warnValidStyle = function () {};\n\n{\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern$1 = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n {\n if (!isCustomProperty) {\n warnValidStyle$1(styleName, styles[styleName]);\n }\n }\n\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n}\n\nfunction isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n {\n\n if (!nextStyles) {\n return;\n }\n\n var expandedUpdates = expandShorthandMap(styleUpdates);\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var key in expandedUpdates) {\n var originalKey = expandedUpdates[key];\n var correctOriginalKey = expandedStyles[key];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n}\n\n// For HTML, certain tags should omit their close tag. We keep a whitelist for\n// those special-case tags.\nvar omittedCloseTags = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n};\n\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = _assign({\n menuitem: true\n}, omittedCloseTags);\n\nvar HTML = '__html';\nvar ReactDebugCurrentFrame$3 = null;\n\n{\n ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;\n}\n\nfunction assertValidProps(tag, props) {\n if (!props) {\n return;\n } // Note the use of `==` which checks for null or undefined.\n\n\n if (voidElementTags[tag]) {\n if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {\n {\n throw Error( tag + \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\" + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );\n }\n }\n }\n\n if (props.dangerouslySetInnerHTML != null) {\n if (!(props.children == null)) {\n {\n throw Error( \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\" );\n }\n }\n\n if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {\n {\n throw Error( \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.\" );\n }\n }\n }\n\n {\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n\n if (!(props.style == null || typeof props.style === 'object')) {\n {\n throw Error( \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\" + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );\n }\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this whitelist too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\n// When adding attributes to the HTML or SVG whitelist, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\nfunction validateProperty(tagName, name) {\n {\n if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nvar validateProperty$1 = function () {};\n\n{\n var warnedProperties$1 = {};\n var _hasOwnProperty = Object.prototype.hasOwnProperty;\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, canUseEventSystem) {\n if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (canUseEventSystem) {\n if (registrationNameModules.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n}\n\nvar warnUnknownProperties = function (type, props, canUseEventSystem) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);\n }\n }\n};\n\nfunction validateProperties$2(type, props, canUseEventSystem) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, canUseEventSystem);\n}\n\nvar didWarnInvalidHydration = false;\nvar DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\nvar SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar AUTOFOCUS = 'autoFocus';\nvar CHILDREN = 'children';\nvar STYLE = 'style';\nvar HTML$1 = '__html';\nvar HTML_NAMESPACE$1 = Namespaces.html;\nvar warnedUnknownTags;\nvar suppressHydrationWarning;\nvar validatePropertiesInDevelopment;\nvar warnForTextDifference;\nvar warnForPropDifference;\nvar warnForExtraAttributes;\nvar warnForInvalidEventListener;\nvar canDiffStyleForHydrationWarning;\nvar normalizeMarkupForTextOrAttribute;\nvar normalizeHTML;\n\n{\n warnedUnknownTags = {\n // Chrome is the only major browser not shipping <time>. But as of July\n // 2017 it intends to ship it due to widespread usage. We intentionally\n // *don't* warn for <time> even if it's unrecognized by Chrome because\n // it soon will be, and many apps have been using it anyway.\n time: true,\n // There are working polyfills for <dialog>. Let people use it.\n dialog: true,\n // Electron ships a custom <webview> tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n };\n\n validatePropertiesInDevelopment = function (type, props) {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props,\n /* canUseEventSystem */\n true);\n }; // IE 11 parses & normalizes the style attribute as opposed to other\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n\n\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.\n // It also can turn \\u0000 into \\uFFFD inside attributes.\n // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n // If we have a mismatch, it might be caused by that.\n // We will still patch up in this case but not fire the warning.\n\n var NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\n var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\n normalizeMarkupForTextOrAttribute = function (markup) {\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n };\n\n warnForTextDifference = function (serverText, clientText) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n };\n\n warnForPropDifference = function (propName, serverValue, clientValue) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n };\n\n warnForExtraAttributes = function (attributeNames) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n\n error('Extra attributes from the server: %s', names);\n };\n\n warnForInvalidEventListener = function (registrationName, listener) {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }; // Parse the HTML and read it back to normalize the HTML string so that it\n // can be used for comparison.\n\n\n normalizeHTML = function (parent, html) {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how <noscript> is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n}\n\nfunction ensureListeningTo(rootContainerElement, registrationName) {\n var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;\n var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;\n legacyListenToEvent(registrationName, doc);\n}\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction noop() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop;\n}\n\nfunction setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n for (var propKey in nextProps) {\n if (!nextProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = nextProps[propKey];\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n\n setValueForStyles(domElement, nextProp);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n setInnerHTML(domElement, nextHtml);\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string') {\n // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a <textarea> will cause the placeholder to not\n // show within the <textarea> until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n if (canSetTextContent) {\n setTextContent(domElement, nextProp);\n }\n } else if (typeof nextProp === 'number') {\n setTextContent(domElement, '' + nextProp);\n }\n } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n ensureListeningTo(rootContainerElement, propKey);\n }\n } else if (nextProp != null) {\n setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n }\n }\n}\n\nfunction updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n // TODO: Handle wasCustomComponentTag\n for (var i = 0; i < updatePayload.length; i += 2) {\n var propKey = updatePayload[i];\n var propValue = updatePayload[i + 1];\n\n if (propKey === STYLE) {\n setValueForStyles(domElement, propValue);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n setInnerHTML(domElement, propValue);\n } else if (propKey === CHILDREN) {\n setTextContent(domElement, propValue);\n } else {\n setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n }\n }\n}\n\nfunction createElement(type, props, rootContainerElement, parentNamespace) {\n var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n var domElement;\n var namespaceURI = parentNamespace;\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n {\n isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n // allow <SVG> or <mATH>.\n\n if (!isCustomComponentTag && type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n\n if (type === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n\n div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n // This is guaranteed to yield a script element.\n\n var firstChild = div.firstChild;\n domElement = div.removeChild(firstChild);\n } else if (typeof props.is === 'string') {\n // $FlowIssue `createElement` should be updated for Web Components\n domElement = ownerDocument.createElement(type, {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`\n // attributes on `select`s needs to be added before `option`s are inserted.\n // This prevents:\n // - a bug where the `select` does not scroll to the correct option because singular\n // `select` elements automatically pick the first item #13222\n // - a bug where the `select` set the first item as selected despite the `size` attribute #14239\n // See https://github.com/facebook/react/issues/13222\n // and https://github.com/facebook/react/issues/14239\n\n if (type === 'select') {\n var node = domElement;\n\n if (props.multiple) {\n node.multiple = true;\n } else if (props.size) {\n // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n // it is possible that no option is selected.\n //\n // This is only necessary when a select in \"single selection mode\".\n node.size = props.size;\n }\n }\n }\n } else {\n domElement = ownerDocument.createElementNS(namespaceURI, type);\n }\n\n {\n if (namespaceURI === HTML_NAMESPACE$1) {\n if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {\n warnedUnknownTags[type] = true;\n\n error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n }\n }\n }\n\n return domElement;\n}\nfunction createTextNode(text, rootContainerElement) {\n return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\n}\nfunction setInitialProperties(domElement, tag, rawProps, rootContainerElement) {\n var isCustomComponentTag = isCustomComponent(tag, rawProps);\n\n {\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n var props;\n\n switch (tag) {\n case 'iframe':\n case 'object':\n case 'embed':\n trapBubbledEvent(TOP_LOAD, domElement);\n props = rawProps;\n break;\n\n case 'video':\n case 'audio':\n // Create listener for each media event\n for (var i = 0; i < mediaEventTypes.length; i++) {\n trapBubbledEvent(mediaEventTypes[i], domElement);\n }\n\n props = rawProps;\n break;\n\n case 'source':\n trapBubbledEvent(TOP_ERROR, domElement);\n props = rawProps;\n break;\n\n case 'img':\n case 'image':\n case 'link':\n trapBubbledEvent(TOP_ERROR, domElement);\n trapBubbledEvent(TOP_LOAD, domElement);\n props = rawProps;\n break;\n\n case 'form':\n trapBubbledEvent(TOP_RESET, domElement);\n trapBubbledEvent(TOP_SUBMIT, domElement);\n props = rawProps;\n break;\n\n case 'details':\n trapBubbledEvent(TOP_TOGGLE, domElement);\n props = rawProps;\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n props = getHostProps(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n props = getHostProps$1(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n props = getHostProps$2(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n props = getHostProps$3(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n default:\n props = rawProps;\n }\n\n assertValidProps(tag, props);\n setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, false);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'option':\n postMountWrapper$1(domElement, rawProps);\n break;\n\n case 'select':\n postMountWrapper$2(domElement, rawProps);\n break;\n\n default:\n if (typeof props.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n} // Calculate the diff between the two objects.\n\nfunction diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n var lastProps;\n var nextProps;\n\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n assertValidProps(tag, nextProps);\n var propKey;\n var styleName;\n var styleUpdates = null;\n\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the whitelist in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n } // Update styles that changed since `lastProp`.\n\n\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n\n updatePayload.push(propKey, styleUpdates);\n }\n\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n var lastHtml = lastProp ? lastProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, nextHtml);\n }\n }\n } else if (propKey === CHILDREN) {\n if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n ensureListeningTo(rootContainerElement, propKey);\n }\n\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the whitelist during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n }\n\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n\n return updatePayload;\n} // Apply the diff.\n\nfunction updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {\n // Update checked *before* name.\n // In the middle of an update, it is possible to have multiple checked.\n // When a checked radio tries to change name, browser makes another radio's checked false.\n if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {\n updateChecked(domElement, nextRawProps);\n }\n\n var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);\n var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.\n\n updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props\n // changed.\n\n switch (tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n updateWrapper(domElement, nextRawProps);\n break;\n\n case 'textarea':\n updateWrapper$1(domElement, nextRawProps);\n break;\n\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n postUpdateWrapper(domElement, nextRawProps);\n break;\n }\n}\n\nfunction getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n\n return possibleStandardNames[lowerCasedName] || null;\n }\n}\n\nfunction diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {\n var isCustomComponentTag;\n var extraAttributeNames;\n\n {\n suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;\n isCustomComponentTag = isCustomComponent(tag, rawProps);\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n switch (tag) {\n case 'iframe':\n case 'object':\n case 'embed':\n trapBubbledEvent(TOP_LOAD, domElement);\n break;\n\n case 'video':\n case 'audio':\n // Create listener for each media event\n for (var i = 0; i < mediaEventTypes.length; i++) {\n trapBubbledEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n trapBubbledEvent(TOP_ERROR, domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n trapBubbledEvent(TOP_ERROR, domElement);\n trapBubbledEvent(TOP_LOAD, domElement);\n break;\n\n case 'form':\n trapBubbledEvent(TOP_RESET, domElement);\n trapBubbledEvent(TOP_SUBMIT, domElement);\n break;\n\n case 'details':\n trapBubbledEvent(TOP_TOGGLE, domElement);\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening\n // to onChange. Even if there is no listener.\n\n ensureListeningTo(rootContainerElement, 'onChange');\n break;\n }\n\n assertValidProps(tag, rawProps);\n\n {\n extraAttributeNames = new Set();\n var attributes = domElement.attributes;\n\n for (var _i = 0; _i < attributes.length; _i++) {\n var name = attributes[_i].name.toLowerCase();\n\n switch (name) {\n // Built-in SSR attribute is whitelisted\n case 'data-reactroot':\n break;\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n\n case 'value':\n break;\n\n case 'checked':\n break;\n\n case 'selected':\n break;\n\n default:\n // Intentionally use the original name.\n // See discussion in https://github.com/facebook/react/pull/10676.\n extraAttributeNames.add(attributes[_i].name);\n }\n }\n }\n\n var updatePayload = null;\n\n for (var propKey in rawProps) {\n if (!rawProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = rawProps[propKey];\n\n if (propKey === CHILDREN) {\n // For text content children we compare against textContent. This\n // might match additional HTML that is hidden when we read it using\n // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n // satisfies our requirement. Our requirement is not to produce perfect\n // HTML and attributes. Ideally we should preserve structure but it's\n // ok not to if the visible content is still enough to indicate what\n // even listeners these nodes might be wired up to.\n // TODO: Warn if there is more than a single textNode as a child.\n // TODO: Should we use domElement.firstChild.nodeValue to compare?\n if (typeof nextProp === 'string') {\n if (domElement.textContent !== nextProp) {\n if ( !suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, nextProp];\n }\n } else if (typeof nextProp === 'number') {\n if (domElement.textContent !== '' + nextProp) {\n if ( !suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, '' + nextProp];\n }\n }\n } else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n ensureListeningTo(rootContainerElement, propKey);\n }\n } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)\n typeof isCustomComponentTag === 'boolean') {\n // Validate that the properties correspond to their expected values.\n var serverValue = void 0;\n var propertyInfo = getPropertyInfo(propKey);\n\n if (suppressHydrationWarning) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var serverHTML = domElement.innerHTML;\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');\n\n if (expectedHTML !== serverHTML) {\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n } else if (propKey === STYLE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey);\n\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(nextProp);\n serverValue = domElement.getAttribute('style');\n\n if (expectedStyle !== serverValue) {\n warnForPropDifference(propKey, serverValue, expectedStyle);\n }\n }\n } else if (isCustomComponentTag) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n\n if (nextProp !== serverValue) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {\n var isMismatchDueToBadCasing = false;\n\n if (propertyInfo !== null) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propertyInfo.attributeName);\n serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);\n } else {\n var ownNamespace = parentNamespace;\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n ownNamespace = getIntrinsicNamespace(tag);\n }\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\n\n if (standardName !== null && standardName !== propKey) {\n // If an SVG prop is supplied with bad casing, it will\n // be successfully parsed from HTML, but will produce a mismatch\n // (and would be incorrectly rendered on the client).\n // However, we already warn about bad casing elsewhere.\n // So we'll skip the misleading extra mismatch warning in this case.\n isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.\n\n extraAttributeNames.delete(standardName);\n } // $FlowFixMe - Should be inferred as not undefined.\n\n\n extraAttributeNames.delete(propKey);\n }\n\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n }\n\n if (nextProp !== serverValue && !isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n }\n }\n }\n\n {\n // $FlowFixMe - Should be inferred as not undefined.\n if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {\n // $FlowFixMe - Should be inferred as not undefined.\n warnForExtraAttributes(extraAttributeNames);\n }\n }\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, true);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'select':\n case 'option':\n // For input and textarea we current always set the value property at\n // post mount to force it to diverge from attributes. However, for\n // option and select we don't quite do the same thing and select\n // is not resilient to the DOM state changing so we don't do that here.\n // TODO: Consider not doing this for input and textarea.\n break;\n\n default:\n if (typeof rawProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n return updatePayload;\n}\nfunction diffHydratedText(textNode, text) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n}\nfunction warnForUnmatchedText(textNode, text) {\n {\n warnForTextDifference(textNode.nodeValue, text);\n }\n}\nfunction warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedText(parentNode, text) {\n {\n if (text === '') {\n // We expect to insert empty text nodes since they're not represented in\n // the HTML.\n // TODO: Remove this special case if we can just avoid inserting empty\n // text nodes.\n return;\n }\n\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n }\n}\nfunction restoreControlledState$3(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledState(domElement, props);\n return;\n\n case 'textarea':\n restoreControlledState$2(domElement, props);\n return;\n\n case 'select':\n restoreControlledState$1(domElement, props);\n return;\n }\n}\n\nfunction getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n\n node = node.parentNode;\n }\n}\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\nfunction getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n\n if ((next = node.nextSibling) !== null) {\n break;\n }\n\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\nfunction setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nfunction isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nfunction isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n}\n\nfunction getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n\n element = getActiveElement(win.document);\n }\n\n return element;\n}\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\nfunction getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n // Used by Flare\n activeElementDetached: null,\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null\n };\n}\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\nfunction restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n } // Focusing a node can change the scroll position, which is undesirable\n\n\n var ancestors = [];\n var ancestor = priorFocusedElem;\n\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n}\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\nfunction getSelection(input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || {\n start: 0,\n end: 0\n };\n}\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n\nfunction setSelection(input, offsets) {\n var start = offsets.start,\n end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n}\n\nvar validateDOMNesting = function () {};\n\nvar updatedAncestorInfo = function () {};\n\n{\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example, <b><div></div></b> is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n // <p> tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for <title>, including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\n var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n var emptyAncestorInfo = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n\n updatedAncestorInfo = function (oldInfo, tag) {\n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);\n\n var info = {\n tag: tag\n };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n } // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n return ancestorInfo;\n };\n /**\n * Returns whether\n */\n\n\n var isTagValidWithParent = function (tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n case 'html':\n return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n case 'frameset':\n return tag === 'frame';\n\n case '#document':\n return tag === 'html';\n } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frameset':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n };\n /**\n * Returns whether\n */\n\n\n var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n };\n\n var didWarn$1 = {};\n\n validateDOMNesting = function (childTag, childText, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n\n if (childText != null) {\n if (childTag != null) {\n error('validateDOMNesting: when childText is passed, childTag should be null');\n }\n\n childTag = '#text';\n }\n\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n if (!invalidParentOrAncestor) {\n return;\n }\n\n var ancestorTag = invalidParentOrAncestor.tag;\n var addendum = getCurrentFiberStackInDev();\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;\n\n if (didWarn$1[warnKey]) {\n return;\n }\n\n didWarn$1[warnKey] = true;\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n\n if (invalidParent) {\n var info = '';\n\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n\n error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);\n } else {\n error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n }\n };\n}\n\nvar SUPPRESS_HYDRATION_WARNING$1;\n\n{\n SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';\n}\n\nvar SUSPENSE_START_DATA = '$';\nvar SUSPENSE_END_DATA = '/$';\nvar SUSPENSE_PENDING_START_DATA = '$?';\nvar SUSPENSE_FALLBACK_START_DATA = '$!';\nvar STYLE$1 = 'style';\nvar eventsEnabled = null;\nvar selectionInformation = null;\n\nfunction shouldAutoFocusHostComponent(type, props) {\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n }\n\n return false;\n}\nfunction getRootHostContext(rootContainerInstance) {\n var type;\n var namespace;\n var nodeType = rootContainerInstance.nodeType;\n\n switch (nodeType) {\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n {\n type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n var root = rootContainerInstance.documentElement;\n namespace = root ? root.namespaceURI : getChildNamespace(null, '');\n break;\n }\n\n default:\n {\n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n var ownNamespace = container.namespaceURI || null;\n type = container.tagName;\n namespace = getChildNamespace(ownNamespace, type);\n break;\n }\n }\n\n {\n var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getChildHostContext(parentHostContext, type, rootContainerInstance) {\n {\n var parentHostContextDev = parentHostContext;\n var namespace = getChildNamespace(parentHostContextDev.namespace, type);\n var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getPublicInstance(instance) {\n return instance;\n}\nfunction prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n setEnabled(false);\n}\nfunction resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n\n selectionInformation = null;\n}\nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n var parentNamespace;\n\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n validateDOMNesting(type, null, hostContextDev.ancestorInfo);\n\n if (typeof props.children === 'string' || typeof props.children === 'number') {\n var string = '' + props.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n\n parentNamespace = hostContextDev.namespace;\n }\n\n var domElement = createElement(type, props, rootContainerInstance, parentNamespace);\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n return domElement;\n}\nfunction appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n setInitialProperties(domElement, type, props, rootContainerInstance);\n return shouldAutoFocusHostComponent(type, props);\n}\nfunction prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n {\n var hostContextDev = hostContext;\n\n if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {\n var string = '' + newProps.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n }\n\n return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);\n}\nfunction shouldSetTextContent(type, props) {\n return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\n}\nfunction shouldDeprioritizeSubtree(type, props) {\n return !!props.hidden;\n}\nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n {\n var hostContextDev = hostContext;\n validateDOMNesting(null, text, hostContextDev.ancestorInfo);\n }\n\n var textNode = createTextNode(text, rootContainerInstance);\n precacheFiberNode(internalInstanceHandle, textNode);\n return textNode;\n}\n// if a component just imports ReactDOM (e.g. for findDOMNode).\n// Some environments might not have setTimeout or clearTimeout.\n\nvar scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\nvar cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\nvar noTimeout = -1; // -------------------\nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {\n // Despite the naming that might imply otherwise, this method only\n // fires if there is an `Update` effect scheduled during mounting.\n // This happens if `finalizeInitialChildren` returns `true` (which it\n // does to implement the `autoFocus` attribute on the client). But\n // there are also other cases when this might happen (such as patching\n // up text content during hydration mismatch). So we'll check this again.\n if (shouldAutoFocusHostComponent(type, newProps)) {\n domElement.focus();\n }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.\n\n updateProperties(domElement, updatePayload, type, oldProps, newProps);\n}\nfunction resetTextContent(domElement) {\n setTextContent(domElement, '');\n}\nfunction commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n}\nfunction appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction appendChildToContainer(container, child) {\n var parentNode;\n\n if (container.nodeType === COMMENT_NODE) {\n parentNode = container.parentNode;\n parentNode.insertBefore(child, container);\n } else {\n parentNode = container;\n parentNode.appendChild(child);\n } // This container might be used for a portal.\n // If something inside a portal is clicked, that click should bubble\n // through the React tree. However, on Mobile Safari the click would\n // never bubble through the *DOM* tree unless an ancestor with onclick\n // event exists. So we wouldn't see it and dispatch it.\n // This is why we ensure that non React root containers have inline onclick\n // defined.\n // https://github.com/facebook/react/issues/11918\n\n\n var reactRootContainer = container._reactRootContainer;\n\n if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(parentNode);\n }\n}\nfunction insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\n}\nfunction insertInContainerBefore(container, child, beforeChild) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.insertBefore(child, beforeChild);\n } else {\n container.insertBefore(child, beforeChild);\n }\n}\nfunction removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n}\nfunction removeChildFromContainer(container, child) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.removeChild(child);\n } else {\n container.removeChild(child);\n }\n}\n\nfunction hideInstance(instance) {\n // pass host context to this method?\n\n\n instance = instance;\n var style = instance.style;\n\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n}\nfunction hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\n}\nfunction unhideInstance(instance, props) {\n instance = instance;\n var styleProp = props[STYLE$1];\n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n instance.style.display = dangerousStyleValue('display', display);\n}\nfunction unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n} // -------------------\nfunction canHydrateInstance(instance, type, props) {\n if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {\n return null;\n } // This has now been refined to an element node.\n\n\n return instance;\n}\nfunction canHydrateTextInstance(instance, text) {\n if (text === '' || instance.nodeType !== TEXT_NODE) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n return null;\n } // This has now been refined to a text node.\n\n\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n}\n\nfunction getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n }\n\n return node;\n}\n\nfunction getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n}\nfunction getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n}\nfunction hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n // get attached.\n\n updateFiberProps(instance, props);\n var parentNamespace;\n\n {\n var hostContextDev = hostContext;\n parentNamespace = hostContextDev.namespace;\n }\n\n return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, textInstance);\n return diffHydratedText(textInstance, text);\n}\nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n return getNextHydratableSibling(node);\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n depth++;\n }\n }\n\n node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\n\n\n return null;\n} // Returns the SuspenseInstance if this node is a direct child of a\n// SuspenseInstance. I.e. if its previous sibling is a Comment with\n// SUSPENSE_x_START_DATA. Otherwise, null.\n\nfunction getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n}\nfunction commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n}\nfunction commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {\n {\n warnForUnmatchedText(textInstance, text);\n }\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForUnmatchedText(textInstance, text);\n }\n}\nfunction didNotHydrateContainerInstance(parentContainer, instance) {\n {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentContainer, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentContainer, instance);\n }\n }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentInstance, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentInstance, instance);\n }\n }\n}\nfunction didNotFindHydratableContainerInstance(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n}\nfunction didNotFindHydratableContainerTextInstance(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n}\nfunction didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;\n}\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactInternalInstance$' + randomKey;\nvar internalEventHandlersKey = '__reactEventHandlers$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainere$' + randomKey;\nfunction precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n}\nfunction markContainerAsRoot(hostRoot, node) {\n node[internalContainerInstanceKey] = hostRoot;\n}\nfunction unmarkContainerAsRoot(node) {\n node[internalContainerInstanceKey] = null;\n}\nfunction isContainerMarkedAsRoot(node) {\n return !!node[internalContainerInstanceKey];\n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n// If the target node is part of a hydrated or not yet rendered subtree, then\n// this may also return a SuspenseComponent or HostRoot to indicate that.\n// Conceptually the HostRoot fiber is a child of the Container node. So if you\n// pass the Container node as the targetNode, you will not actually get the\n// HostRoot back. To get to the HostRoot, you need to pass a child of it.\n// The same thing applies to Suspense boundaries.\n\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n}\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\nfunction getInstanceFromNode$1(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n}\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\nfunction getNodeFromInstance$1(inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n } // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n\n\n {\n {\n throw Error( \"getNodeFromInstance: Invalid argument.\" );\n }\n }\n}\nfunction getFiberCurrentPropsFromNode$1(node) {\n return node[internalEventHandlersKey] || null;\n}\nfunction updateFiberProps(node, props) {\n node[internalEventHandlersKey] = props;\n}\n\nfunction getParent(inst) {\n do {\n inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent);\n\n if (inst) {\n return inst;\n }\n\n return null;\n}\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\nfunction getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n\n instA = getParent(instA);\n instB = getParent(instB);\n }\n\n return null;\n}\n/**\n * Simulates the traversal of a two-phase, capture/bubble event dispatch.\n */\n\nfunction traverseTwoPhase(inst, fn, arg) {\n var path = [];\n\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n\n var i;\n\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}\n/**\n * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that\n * should would receive a `mouseEnter` or `mouseLeave` event.\n *\n * Does not invoke the callback on the nearest common ancestor because nothing\n * \"entered\" or \"left\" that element.\n */\n\nfunction traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n\n while (true) {\n if (!from) {\n break;\n }\n\n if (from === common) {\n break;\n }\n\n var alternate = from.alternate;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n pathFrom.push(from);\n from = getParent(from);\n }\n\n var pathTo = [];\n\n while (true) {\n if (!to) {\n break;\n }\n\n if (to === common) {\n break;\n }\n\n var _alternate = to.alternate;\n\n if (_alternate !== null && _alternate === common) {\n break;\n }\n\n pathTo.push(to);\n to = getParent(to);\n }\n\n for (var i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n\n for (var _i = pathTo.length; _i-- > 0;) {\n fn(pathTo[_i], 'captured', argTo);\n }\n}\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n case 'onMouseEnter':\n return !!(props.disabled && isInteractive(type));\n\n default:\n return false;\n }\n}\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\nfunction getListener(inst, registrationName) {\n var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not\n // live here; needs to be moved to a better place soon\n\n var stateNode = inst.stateNode;\n\n if (!stateNode) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (!props) {\n // Work in progress.\n return null;\n }\n\n listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (!(!listener || typeof listener === 'function')) {\n {\n throw Error( \"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\" );\n }\n }\n\n return listener;\n}\n\n/**\n * Some event types have a notion of different registration names for different\n * \"phases\" of propagation. This finds listeners by a given phase.\n */\nfunction listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}\n/**\n * A small set of propagation patterns, each of which will accept a small amount\n * of information, and generate a set of \"dispatch ready event objects\" - which\n * are sets of events that have already been annotated with a set of dispatched\n * listener functions/ids. The API is designed this way to discourage these\n * propagation strategies from actually executing the dispatches, since we\n * always want to collect the entire set of dispatches before executing even a\n * single one.\n */\n\n/**\n * Tags a `SyntheticEvent` with dispatched listeners. Creating this function\n * here, allows us to not have to bind or create functions for each event.\n * Mutating the event's members allows us to not have to create a wrapping\n * \"dispatch\" object that pairs the event with the listener.\n */\n\n\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n {\n if (!inst) {\n error('Dispatching inst must not be null');\n }\n }\n\n var listener = listenerAtPhase(inst, event, phase);\n\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}\n/**\n * Collect dispatches (must be entirely collected before dispatching - see unit\n * tests). Lazily allocate the array to conserve memory. We must loop through\n * each event and perform the traversal for each one. We cannot perform a\n * single traversal for the entire collection of events because each event may\n * have a different target.\n */\n\n\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);\n }\n}\n/**\n * Accumulates without regard to direction, does not look for phased\n * registration names. Same as `accumulateDirectDispatchesSingle` but without\n * requiring that the `dispatchMarker` be the same as the dispatched ID.\n */\n\n\nfunction accumulateDispatches(inst, ignoredDirection, event) {\n if (inst && event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n }\n}\n/**\n * Accumulates dispatches on an `SyntheticEvent`, but only for the\n * `dispatchMarker`.\n * @param {SyntheticEvent} event\n */\n\n\nfunction accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n accumulateDispatches(event._targetInst, null, event);\n }\n}\n\nfunction accumulateTwoPhaseDispatches(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);\n}\nfunction accumulateEnterLeaveDispatches(leave, enter, from, to) {\n traverseEnterLeave(from, to, accumulateDispatches, leave, enter);\n}\nfunction accumulateDirectDispatches(events) {\n forEachAccumulated(events, accumulateDirectDispatchesSingle);\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\nfunction initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\nfunction reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\nfunction getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start;\n var startValue = startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\nfunction getText() {\n if ('value' in root) {\n return root.value;\n }\n\n return root.textContent;\n}\n\nvar EVENT_POOL_SIZE = 10;\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar EventInterface = {\n type: null,\n target: null,\n // currentTarget is set when dispatching; no use in copying it here\n currentTarget: function () {\n return null;\n },\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\n\nfunction functionThatReturnsTrue() {\n return true;\n}\n\nfunction functionThatReturnsFalse() {\n return false;\n}\n/**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n *\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {*} targetInst Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @param {DOMEventTarget} nativeEventTarget Target node.\n */\n\n\nfunction SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {\n {\n // these have a getter/setter for warnings\n delete this.nativeEvent;\n delete this.preventDefault;\n delete this.stopPropagation;\n delete this.isDefaultPrevented;\n delete this.isPropagationStopped;\n }\n\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n var Interface = this.constructor.Interface;\n\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n\n {\n delete this[propName]; // this has a getter/setter for warnings\n }\n\n var normalize = Interface[propName];\n\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n if (propName === 'target') {\n this.target = nativeEventTarget;\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n}\n\n_assign(SyntheticEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault();\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation();\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {\n this.isPersistent = functionThatReturnsTrue;\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsFalse,\n\n /**\n * `PooledClass` looks for `destructor` on each instance it releases.\n */\n destructor: function () {\n var Interface = this.constructor.Interface;\n\n for (var propName in Interface) {\n {\n Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));\n }\n }\n\n this.dispatchConfig = null;\n this._targetInst = null;\n this.nativeEvent = null;\n this.isDefaultPrevented = functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n this._dispatchListeners = null;\n this._dispatchInstances = null;\n\n {\n Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));\n Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));\n Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));\n Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));\n Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));\n }\n }\n});\n\nSyntheticEvent.Interface = EventInterface;\n/**\n * Helper to reduce boilerplate when creating subclasses.\n */\n\nSyntheticEvent.extend = function (Interface) {\n var Super = this;\n\n var E = function () {};\n\n E.prototype = Super.prototype;\n var prototype = new E();\n\n function Class() {\n return Super.apply(this, arguments);\n }\n\n _assign(prototype, Class.prototype);\n\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n Class.Interface = _assign({}, Super.Interface, Interface);\n Class.extend = Super.extend;\n addEventPoolingTo(Class);\n return Class;\n};\n\naddEventPoolingTo(SyntheticEvent);\n/**\n * Helper to nullify syntheticEvent instance properties when destructing\n *\n * @param {String} propName\n * @param {?object} getVal\n * @return {object} defineProperty object\n */\n\nfunction getPooledWarningPropertyDefinition(propName, getVal) {\n var isFunction = typeof getVal === 'function';\n return {\n configurable: true,\n set: set,\n get: get\n };\n\n function set(val) {\n var action = isFunction ? 'setting the method' : 'setting the property';\n warn(action, 'This is effectively a no-op');\n return val;\n }\n\n function get() {\n var action = isFunction ? 'accessing the method' : 'accessing the property';\n var result = isFunction ? 'This is a no-op function' : 'This is set to null';\n warn(action, result);\n return getVal;\n }\n\n function warn(action, result) {\n {\n error(\"This synthetic event is reused for performance reasons. If you're seeing this, \" + \"you're %s `%s` on a released/nullified synthetic event. %s. \" + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);\n }\n }\n}\n\nfunction getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {\n var EventConstructor = this;\n\n if (EventConstructor.eventPool.length) {\n var instance = EventConstructor.eventPool.pop();\n EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);\n return instance;\n }\n\n return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);\n}\n\nfunction releasePooledEvent(event) {\n var EventConstructor = this;\n\n if (!(event instanceof EventConstructor)) {\n {\n throw Error( \"Trying to release an event instance into a pool of a different type.\" );\n }\n }\n\n event.destructor();\n\n if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {\n EventConstructor.eventPool.push(event);\n }\n}\n\nfunction addEventPoolingTo(EventConstructor) {\n EventConstructor.eventPool = [];\n EventConstructor.getPooled = getPooledEvent;\n EventConstructor.release = releasePooledEvent;\n}\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar SyntheticCompositionEvent = SyntheticEvent.extend({\n data: null\n});\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n\nvar SyntheticInputEvent = SyntheticEvent.extend({\n data: null\n});\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\n\nif (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n} // Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\n\n\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\n\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names.\n\nvar eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionEnd',\n captured: 'onCompositionEndCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionStart',\n captured: 'onCompositionStartCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionUpdate',\n captured: 'onCompositionUpdateCapture'\n },\n dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]\n }\n}; // Track whether we've ever handled a keypress on the space key.\n\nvar hasSpaceKeypress = false;\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n/**\n * Translate native top level events into event types.\n *\n * @param {string} topLevelType\n * @return {object}\n */\n\n\nfunction getCompositionEventType(topLevelType) {\n switch (topLevelType) {\n case TOP_COMPOSITION_START:\n return eventTypes.compositionStart;\n\n case TOP_COMPOSITION_END:\n return eventTypes.compositionEnd;\n\n case TOP_COMPOSITION_UPDATE:\n return eventTypes.compositionUpdate;\n }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isFallbackCompositionStart(topLevelType, nativeEvent) {\n return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_KEY_UP:\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case TOP_KEY_DOWN:\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n\n case TOP_KEY_PRESS:\n case TOP_MOUSE_DOWN:\n case TOP_BLUR:\n // Events are not possible without cancelling IME.\n return true;\n\n default:\n return false;\n }\n}\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n\n return null;\n}\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n} // Track the current IME composition status, if any.\n\n\nvar isComposing = false;\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\nfunction extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(topLevelType);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionStart;\n }\n } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionEnd;\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === eventTypes.compositionStart) {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === eventTypes.compositionEnd) {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n\n if (customData !== null) {\n event.data = customData;\n }\n }\n\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n/**\n * @param {TopLevelType} topLevelType Number from `TopLevelType`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The string corresponding to this `beforeInput` event.\n */\n\n\nfunction getNativeBeforeInputChars(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_COMPOSITION_END:\n return getDataFromCustomEvent(nativeEvent);\n\n case TOP_KEY_PRESS:\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case TOP_TEXT_INPUT:\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n * @param {number} topLevelType Number from `TopLevelEventTypes`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The fallback string for this `beforeInput` event.\n */\n\n\nfunction getFallbackBeforeInputChars(topLevelType, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (topLevelType) {\n case TOP_PASTE:\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case TOP_KEY_PRESS:\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case TOP_COMPOSITION_END:\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\nfunction extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n\n if (!chars) {\n return null;\n }\n\n var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);\n event.data = chars;\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\nvar BeforeInputEventPlugin = {\n eventTypes: eventTypes,\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n\n if (composition === null) {\n return beforeInput;\n }\n\n if (beforeInput === null) {\n return composition;\n }\n\n return [composition, beforeInput];\n }\n};\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\nvar eventTypes$1 = {\n change: {\n phasedRegistrationNames: {\n bubbled: 'onChange',\n captured: 'onChangeCapture'\n },\n dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]\n }\n};\n\nfunction createAndAccumulateChangeEvent(inst, nativeEvent, target) {\n var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);\n event.type = 'change'; // Flag this event loop as needing state restore.\n\n enqueueStateRestore(target);\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n/**\n * For IE shims\n */\n\n\nvar activeElement = null;\nvar activeElementInst = null;\n/**\n * SECTION: handle `change` event\n */\n\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n\n batchedUpdates(runEventInBatch, event);\n}\n\nfunction runEventInBatch(event) {\n runEventsInBatch(event);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance$1(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_CHANGE) {\n return targetInst;\n }\n}\n/**\n * SECTION: handle `input` event\n */\n\n\nvar isInputEventSupported = false;\n\nif (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n}\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n\n\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\n\nfunction handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {\n if (topLevelType === TOP_FOCUS) {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (topLevelType === TOP_BLUR) {\n stopWatchingForValueChange();\n }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(topLevelType, targetInst) {\n if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst);\n }\n}\n/**\n * SECTION: handle `click` event\n */\n\n\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_CLICK) {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {\n if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction handleControlledInputBlur(node) {\n var state = node._wrapperState;\n\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n}\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\nvar ChangeEventPlugin = {\n eventTypes: eventTypes$1,\n _isInputEventSupported: isInputEventSupported,\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(topLevelType, targetInst);\n\n if (inst) {\n var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);\n return event;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(topLevelType, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (topLevelType === TOP_BLUR) {\n handleControlledInputBlur(targetNode);\n }\n }\n};\n\nvar SyntheticUIEvent = SyntheticEvent.extend({\n view: null,\n detail: null\n});\n\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n\nvar previousScreenX = 0;\nvar previousScreenY = 0; // Use flags to signal movementX/Y has already been set\n\nvar isMovementXSet = false;\nvar isMovementYSet = false;\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar SyntheticMouseEvent = SyntheticUIEvent.extend({\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n pageX: null,\n pageY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: getEventModifierState,\n button: null,\n buttons: null,\n relatedTarget: function (event) {\n return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n var screenX = previousScreenX;\n previousScreenX = event.screenX;\n\n if (!isMovementXSet) {\n isMovementXSet = true;\n return 0;\n }\n\n return event.type === 'mousemove' ? event.screenX - screenX : 0;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n }\n\n var screenY = previousScreenY;\n previousScreenY = event.screenY;\n\n if (!isMovementYSet) {\n isMovementYSet = true;\n return 0;\n }\n\n return event.type === 'mousemove' ? event.screenY - screenY : 0;\n }\n});\n\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar SyntheticPointerEvent = SyntheticMouseEvent.extend({\n pointerId: null,\n width: null,\n height: null,\n pressure: null,\n tangentialPressure: null,\n tiltX: null,\n tiltY: null,\n twist: null,\n pointerType: null,\n isPrimary: null\n});\n\nvar eventTypes$2 = {\n mouseEnter: {\n registrationName: 'onMouseEnter',\n dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]\n },\n mouseLeave: {\n registrationName: 'onMouseLeave',\n dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]\n },\n pointerEnter: {\n registrationName: 'onPointerEnter',\n dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]\n },\n pointerLeave: {\n registrationName: 'onPointerLeave',\n dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]\n }\n};\nvar EnterLeaveEventPlugin = {\n eventTypes: eventTypes$2,\n\n /**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;\n var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;\n\n if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0 && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {\n // If this is an over event with a target, then we've already dispatched\n // the event in the out event of the other target. If this is replayed,\n // then it's because we couldn't dispatch against this target previously\n // so we have to do it now instead.\n return null;\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return null;\n }\n\n var win;\n\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n\n if (isOutEvent) {\n from = targetInst;\n var related = nativeEvent.relatedTarget || nativeEvent.toElement;\n to = related ? getClosestInstanceFromNode(related) : null;\n\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\n\n if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {\n to = null;\n }\n }\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return null;\n }\n\n var eventInterface, leaveEventType, enterEventType, eventTypePrefix;\n\n if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {\n eventInterface = SyntheticMouseEvent;\n leaveEventType = eventTypes$2.mouseLeave;\n enterEventType = eventTypes$2.mouseEnter;\n eventTypePrefix = 'mouse';\n } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {\n eventInterface = SyntheticPointerEvent;\n leaveEventType = eventTypes$2.pointerLeave;\n enterEventType = eventTypes$2.pointerEnter;\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance$1(from);\n var toNode = to == null ? win : getNodeFromInstance$1(to);\n var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);\n leave.type = eventTypePrefix + 'leave';\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);\n enter.type = eventTypePrefix + 'enter';\n enter.target = toNode;\n enter.relatedTarget = fromNode;\n accumulateEnterLeaveDispatches(leave, enter, from, to); // If we are not processing the first ancestor, then we\n // should not process the same nativeEvent again, as we\n // will have already processed it in the first ancestor.\n\n if ((eventSystemFlags & IS_FIRST_ANCESTOR) === 0) {\n return [leave];\n }\n\n return [leave, enter];\n }\n};\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\nvar eventTypes$3 = {\n select: {\n phasedRegistrationNames: {\n bubbled: 'onSelect',\n captured: 'onSelectCapture'\n },\n dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]\n }\n};\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\nvar lastSelection = null;\nvar mouseDown = false;\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n *\n * @param {DOMElement} node\n * @return {object}\n */\n\nfunction getSelection$1(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n}\n/**\n * Get document associated with the event target.\n *\n * @param {object} nativeEventTarget\n * @return {Document}\n */\n\n\nfunction getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\nfunction constructSelectEvent(nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n return null;\n } // Only fire when selection has actually changed.\n\n\n var currentSelection = getSelection$1(activeElement$1);\n\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);\n syntheticEvent.type = 'select';\n syntheticEvent.target = activeElement$1;\n accumulateTwoPhaseDispatches(syntheticEvent);\n return syntheticEvent;\n }\n\n return null;\n}\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\nvar SelectEventPlugin = {\n eventTypes: eventTypes$3,\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, container) {\n var containerOrDoc = container || getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do\n // not extract events. See #3639.\n\n if (!containerOrDoc || !isListeningToAllDependencies('onSelect', containerOrDoc)) {\n return null;\n }\n\n var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;\n\n switch (topLevelType) {\n // Track the input node that has focus.\n case TOP_FOCUS:\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n\n break;\n\n case TOP_BLUR:\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n\n case TOP_MOUSE_DOWN:\n mouseDown = true;\n break;\n\n case TOP_CONTEXT_MENU:\n case TOP_MOUSE_UP:\n case TOP_DRAG_END:\n mouseDown = false;\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n\n case TOP_SELECTION_CHANGE:\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case TOP_KEY_DOWN:\n case TOP_KEY_UP:\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n }\n\n return null;\n }\n};\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\nvar SyntheticAnimationEvent = SyntheticEvent.extend({\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n});\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar SyntheticClipboardEvent = SyntheticEvent.extend({\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n});\n\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar SyntheticFocusEvent = SyntheticUIEvent.extend({\n relatedTarget: null\n});\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n};\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n\n return '';\n}\n\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar SyntheticKeyboardEvent = SyntheticUIEvent.extend({\n key: getEventKey,\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n }\n});\n\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar SyntheticDragEvent = SyntheticMouseEvent.extend({\n dataTransfer: null\n});\n\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar SyntheticTouchEvent = SyntheticUIEvent.extend({\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: getEventModifierState\n});\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\nvar SyntheticTransitionEvent = SyntheticEvent.extend({\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n});\n\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar SyntheticWheelEvent = SyntheticMouseEvent.extend({\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: null,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: null\n});\n\nvar knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];\nvar SimpleEventPlugin = {\n // simpleEventPluginEventTypes gets populated from\n // the DOMEventProperties module.\n eventTypes: simpleEventPluginEventTypes,\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var dispatchConfig = topLevelEventsToDispatchConfig.get(topLevelType);\n\n if (!dispatchConfig) {\n return null;\n }\n\n var EventConstructor;\n\n switch (topLevelType) {\n case TOP_KEY_PRESS:\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return null;\n }\n\n /* falls through */\n\n case TOP_KEY_DOWN:\n case TOP_KEY_UP:\n EventConstructor = SyntheticKeyboardEvent;\n break;\n\n case TOP_BLUR:\n case TOP_FOCUS:\n EventConstructor = SyntheticFocusEvent;\n break;\n\n case TOP_CLICK:\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return null;\n }\n\n /* falls through */\n\n case TOP_AUX_CLICK:\n case TOP_DOUBLE_CLICK:\n case TOP_MOUSE_DOWN:\n case TOP_MOUSE_MOVE:\n case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case TOP_MOUSE_OUT:\n case TOP_MOUSE_OVER:\n case TOP_CONTEXT_MENU:\n EventConstructor = SyntheticMouseEvent;\n break;\n\n case TOP_DRAG:\n case TOP_DRAG_END:\n case TOP_DRAG_ENTER:\n case TOP_DRAG_EXIT:\n case TOP_DRAG_LEAVE:\n case TOP_DRAG_OVER:\n case TOP_DRAG_START:\n case TOP_DROP:\n EventConstructor = SyntheticDragEvent;\n break;\n\n case TOP_TOUCH_CANCEL:\n case TOP_TOUCH_END:\n case TOP_TOUCH_MOVE:\n case TOP_TOUCH_START:\n EventConstructor = SyntheticTouchEvent;\n break;\n\n case TOP_ANIMATION_END:\n case TOP_ANIMATION_ITERATION:\n case TOP_ANIMATION_START:\n EventConstructor = SyntheticAnimationEvent;\n break;\n\n case TOP_TRANSITION_END:\n EventConstructor = SyntheticTransitionEvent;\n break;\n\n case TOP_SCROLL:\n EventConstructor = SyntheticUIEvent;\n break;\n\n case TOP_WHEEL:\n EventConstructor = SyntheticWheelEvent;\n break;\n\n case TOP_COPY:\n case TOP_CUT:\n case TOP_PASTE:\n EventConstructor = SyntheticClipboardEvent;\n break;\n\n case TOP_GOT_POINTER_CAPTURE:\n case TOP_LOST_POINTER_CAPTURE:\n case TOP_POINTER_CANCEL:\n case TOP_POINTER_DOWN:\n case TOP_POINTER_MOVE:\n case TOP_POINTER_OUT:\n case TOP_POINTER_OVER:\n case TOP_POINTER_UP:\n EventConstructor = SyntheticPointerEvent;\n break;\n\n default:\n {\n if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {\n error('SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);\n }\n } // HTML Events\n // @see http://www.w3.org/TR/html5/index.html#events-0\n\n\n EventConstructor = SyntheticEvent;\n break;\n }\n\n var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);\n accumulateTwoPhaseDispatches(event);\n return event;\n }\n};\n\n/**\n * Specifies a deterministic ordering of `EventPlugin`s. A convenient way to\n * reason about plugins, without having to package every one of them. This\n * is better than having plugins be ordered in the same order that they\n * are injected because that ordering would be influenced by the packaging order.\n * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that\n * preventing default on events is convenient in `SimpleEventPlugin` handlers.\n */\n\nvar DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];\n/**\n * Inject modules for resolving DOM hierarchy and plugin ordering.\n */\n\ninjectEventPluginOrder(DOMEventPluginOrder);\nsetComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);\n/**\n * Some important event plugins included by default (without having to require\n * them).\n */\n\ninjectEventPluginsByName({\n SimpleEventPlugin: SimpleEventPlugin,\n EnterLeaveEventPlugin: EnterLeaveEventPlugin,\n ChangeEventPlugin: ChangeEventPlugin,\n SelectEventPlugin: SelectEventPlugin,\n BeforeInputEventPlugin: BeforeInputEventPlugin\n});\n\n// Prefix measurements so that it's possible to filter them.\n// Longer prefixes are hard to read in DevTools.\nvar reactEmoji = \"\\u269B\";\nvar warningEmoji = \"\\u26D4\";\nvar supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause.\n// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?\n\nvar currentFiber = null; // If we're in the middle of user code, which fiber and method is it?\n// Reusing `currentFiber` would be confusing for this because user code fiber\n// can change during commit phase too, but we don't need to unwind it (since\n// lifecycles in the commit phase don't resemble a tree).\n\nvar currentPhase = null;\nvar currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem,\n// so we will keep track of it, and include it in the report.\n// Track commits caused by cascading updates.\n\nvar isCommitting = false;\nvar hasScheduledUpdateInCurrentCommit = false;\nvar hasScheduledUpdateInCurrentPhase = false;\nvar commitCountInCurrentWorkLoop = 0;\nvar effectCountInCurrentCommit = 0;\n// to avoid stretch the commit phase with measurement overhead.\n\nvar labelsInCurrentCommit = new Set();\n\nvar formatMarkName = function (markName) {\n return reactEmoji + \" \" + markName;\n};\n\nvar formatLabel = function (label, warning) {\n var prefix = warning ? warningEmoji + \" \" : reactEmoji + \" \";\n var suffix = warning ? \" Warning: \" + warning : '';\n return \"\" + prefix + label + suffix;\n};\n\nvar beginMark = function (markName) {\n performance.mark(formatMarkName(markName));\n};\n\nvar clearMark = function (markName) {\n performance.clearMarks(formatMarkName(markName));\n};\n\nvar endMark = function (label, markName, warning) {\n var formattedMarkName = formatMarkName(markName);\n var formattedLabel = formatLabel(label, warning);\n\n try {\n performance.measure(formattedLabel, formattedMarkName);\n } catch (err) {} // If previous mark was missing for some reason, this will throw.\n // This could only happen if React crashed in an unexpected place earlier.\n // Don't pile on with more errors.\n // Clear marks immediately to avoid growing buffer.\n\n\n performance.clearMarks(formattedMarkName);\n performance.clearMeasures(formattedLabel);\n};\n\nvar getFiberMarkName = function (label, debugID) {\n return label + \" (#\" + debugID + \")\";\n};\n\nvar getFiberLabel = function (componentName, isMounted, phase) {\n if (phase === null) {\n // These are composite component total time measurements.\n return componentName + \" [\" + (isMounted ? 'update' : 'mount') + \"]\";\n } else {\n // Composite component methods.\n return componentName + \".\" + phase;\n }\n};\n\nvar beginFiberMark = function (fiber, phase) {\n var componentName = getComponentName(fiber.type) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n\n if (isCommitting && labelsInCurrentCommit.has(label)) {\n // During the commit phase, we don't show duplicate labels because\n // there is a fixed overhead for every measurement, and we don't\n // want to stretch the commit phase beyond necessary.\n return false;\n }\n\n labelsInCurrentCommit.add(label);\n var markName = getFiberMarkName(label, debugID);\n beginMark(markName);\n return true;\n};\n\nvar clearFiberMark = function (fiber, phase) {\n var componentName = getComponentName(fiber.type) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n var markName = getFiberMarkName(label, debugID);\n clearMark(markName);\n};\n\nvar endFiberMark = function (fiber, phase, warning) {\n var componentName = getComponentName(fiber.type) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n var markName = getFiberMarkName(label, debugID);\n endMark(label, markName, warning);\n};\n\nvar shouldIgnoreFiber = function (fiber) {\n // Host components should be skipped in the timeline.\n // We could check typeof fiber.type, but does this work with RN?\n switch (fiber.tag) {\n case HostRoot:\n case HostComponent:\n case HostText:\n case HostPortal:\n case Fragment:\n case ContextProvider:\n case ContextConsumer:\n case Mode:\n return true;\n\n default:\n return false;\n }\n};\n\nvar clearPendingPhaseMeasurement = function () {\n if (currentPhase !== null && currentPhaseFiber !== null) {\n clearFiberMark(currentPhaseFiber, currentPhase);\n }\n\n currentPhaseFiber = null;\n currentPhase = null;\n hasScheduledUpdateInCurrentPhase = false;\n};\n\nvar pauseTimers = function () {\n // Stops all currently active measurements so that they can be resumed\n // if we continue in a later deferred loop from the same unit of work.\n var fiber = currentFiber;\n\n while (fiber) {\n if (fiber._debugIsCurrentlyTiming) {\n endFiberMark(fiber, null, null);\n }\n\n fiber = fiber.return;\n }\n};\n\nvar resumeTimersRecursively = function (fiber) {\n if (fiber.return !== null) {\n resumeTimersRecursively(fiber.return);\n }\n\n if (fiber._debugIsCurrentlyTiming) {\n beginFiberMark(fiber, null);\n }\n};\n\nvar resumeTimers = function () {\n // Resumes all measurements that were active during the last deferred loop.\n if (currentFiber !== null) {\n resumeTimersRecursively(currentFiber);\n }\n};\n\nfunction recordEffect() {\n {\n effectCountInCurrentCommit++;\n }\n}\nfunction recordScheduleUpdate() {\n {\n if (isCommitting) {\n hasScheduledUpdateInCurrentCommit = true;\n }\n\n if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {\n hasScheduledUpdateInCurrentPhase = true;\n }\n }\n}\nfunction startWorkTimer(fiber) {\n {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n } // If we pause, this is the fiber to unwind from.\n\n\n currentFiber = fiber;\n\n if (!beginFiberMark(fiber, null)) {\n return;\n }\n\n fiber._debugIsCurrentlyTiming = true;\n }\n}\nfunction cancelWorkTimer(fiber) {\n {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n } // Remember we shouldn't complete measurement for this fiber.\n // Otherwise flamechart will be deep even for small updates.\n\n\n fiber._debugIsCurrentlyTiming = false;\n clearFiberMark(fiber, null);\n }\n}\nfunction stopWorkTimer(fiber) {\n {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n } // If we pause, its parent is the fiber to unwind from.\n\n\n currentFiber = fiber.return;\n\n if (!fiber._debugIsCurrentlyTiming) {\n return;\n }\n\n fiber._debugIsCurrentlyTiming = false;\n endFiberMark(fiber, null, null);\n }\n}\nfunction stopFailedWorkTimer(fiber) {\n {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n } // If we pause, its parent is the fiber to unwind from.\n\n\n currentFiber = fiber.return;\n\n if (!fiber._debugIsCurrentlyTiming) {\n return;\n }\n\n fiber._debugIsCurrentlyTiming = false;\n var warning = fiber.tag === SuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';\n endFiberMark(fiber, null, warning);\n }\n}\nfunction startPhaseTimer(fiber, phase) {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n clearPendingPhaseMeasurement();\n\n if (!beginFiberMark(fiber, phase)) {\n return;\n }\n\n currentPhaseFiber = fiber;\n currentPhase = phase;\n }\n}\nfunction stopPhaseTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n if (currentPhase !== null && currentPhaseFiber !== null) {\n var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;\n endFiberMark(currentPhaseFiber, currentPhase, warning);\n }\n\n currentPhase = null;\n currentPhaseFiber = null;\n }\n}\nfunction startWorkLoopTimer(nextUnitOfWork) {\n {\n currentFiber = nextUnitOfWork;\n\n if (!supportsUserTiming) {\n return;\n }\n\n commitCountInCurrentWorkLoop = 0; // This is top level call.\n // Any other measurements are performed within.\n\n beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop.\n\n resumeTimers();\n }\n}\nfunction stopWorkLoopTimer(interruptedBy, didCompleteRoot) {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var warning = null;\n\n if (interruptedBy !== null) {\n if (interruptedBy.tag === HostRoot) {\n warning = 'A top-level update interrupted the previous render';\n } else {\n var componentName = getComponentName(interruptedBy.type) || 'Unknown';\n warning = \"An update to \" + componentName + \" interrupted the previous render\";\n }\n } else if (commitCountInCurrentWorkLoop > 1) {\n warning = 'There were cascading updates';\n }\n\n commitCountInCurrentWorkLoop = 0;\n var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop.\n\n pauseTimers();\n endMark(label, '(React Tree Reconciliation)', warning);\n }\n}\nfunction startCommitTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n isCommitting = true;\n hasScheduledUpdateInCurrentCommit = false;\n labelsInCurrentCommit.clear();\n beginMark('(Committing Changes)');\n }\n}\nfunction stopCommitTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var warning = null;\n\n if (hasScheduledUpdateInCurrentCommit) {\n warning = 'Lifecycle hook scheduled a cascading update';\n } else if (commitCountInCurrentWorkLoop > 0) {\n warning = 'Caused by a cascading update in earlier commit';\n }\n\n hasScheduledUpdateInCurrentCommit = false;\n commitCountInCurrentWorkLoop++;\n isCommitting = false;\n labelsInCurrentCommit.clear();\n endMark('(Committing Changes)', '(Committing Changes)', warning);\n }\n}\nfunction startCommitSnapshotEffectsTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n effectCountInCurrentCommit = 0;\n beginMark('(Committing Snapshot Effects)');\n }\n}\nfunction stopCommitSnapshotEffectsTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var count = effectCountInCurrentCommit;\n effectCountInCurrentCommit = 0;\n endMark(\"(Committing Snapshot Effects: \" + count + \" Total)\", '(Committing Snapshot Effects)', null);\n }\n}\nfunction startCommitHostEffectsTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n effectCountInCurrentCommit = 0;\n beginMark('(Committing Host Effects)');\n }\n}\nfunction stopCommitHostEffectsTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var count = effectCountInCurrentCommit;\n effectCountInCurrentCommit = 0;\n endMark(\"(Committing Host Effects: \" + count + \" Total)\", '(Committing Host Effects)', null);\n }\n}\nfunction startCommitLifeCyclesTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n effectCountInCurrentCommit = 0;\n beginMark('(Calling Lifecycle Methods)');\n }\n}\nfunction stopCommitLifeCyclesTimer() {\n {\n if (!supportsUserTiming) {\n return;\n }\n\n var count = effectCountInCurrentCommit;\n effectCountInCurrentCommit = 0;\n endMark(\"(Calling Lifecycle Methods: \" + count + \" Total)\", '(Calling Lifecycle Methods)', null);\n }\n}\n\nvar valueStack = [];\nvar fiberStack;\n\n{\n fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n}\n\nfunction pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n error('Unexpected Fiber popped.');\n }\n }\n\n cursor.current = valueStack[index];\n valueStack[index] = null;\n\n {\n fiberStack[index] = null;\n }\n\n index--;\n}\n\nfunction push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n\n {\n fiberStack[index] = fiber;\n }\n\n cursor.current = value;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n} // A cursor to the current merged context object on the stack.\n\n\nvar contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\nvar didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\n\nvar previousContext = emptyContextObject;\n\nfunction getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n {\n if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n // If the fiber is a context provider itself, when we read its context\n // we may have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n\n return contextStackCursor.current;\n }\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n }\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n } // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n var instance = workInProgress.stateNode;\n\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n\n\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n }\n}\n\nfunction hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n}\n\nfunction isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n}\n\nfunction popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (!(contextStackCursor.current === emptyContextObject)) {\n {\n throw Error( \"Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n }\n}\n\nfunction processChildContext(fiber, type, parentContext) {\n {\n var instance = fiber.stateNode;\n var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentName(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext;\n startPhaseTimer(fiber, 'getChildContext');\n childContext = instance.getChildContext();\n stopPhaseTimer();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n {\n throw Error( (getComponentName(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\" );\n }\n }\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name, // In practice, there is one case in which we won't get a stack. It's when\n // somebody calls unstable_renderSubtreeIntoContainer() and we process\n // context from the parent component instance. The stack will be missing\n // because it's outside of the reconciliation, and so the pointer has not\n // been set. This is rare and doesn't matter. We'll also remove that API.\n getCurrentFiberStackInDev);\n }\n\n return _assign({}, parentContext, {}, childContext);\n }\n}\n\nfunction pushContextProvider(workInProgress) {\n {\n var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n return true;\n }\n}\n\nfunction invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n\n if (!instance) {\n {\n throw Error( \"Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, type, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n }\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {\n {\n throw Error( \"Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var node = fiber;\n\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n\n case ClassComponent:\n {\n var Component = node.type;\n\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n\n break;\n }\n }\n\n node = node.return;\n } while (node !== null);\n\n {\n {\n throw Error( \"Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\nvar LegacyRoot = 0;\nvar BlockingRoot = 1;\nvar ConcurrentRoot = 2;\n\nvar Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,\n Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,\n Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,\n Scheduler_shouldYield = Scheduler.unstable_shouldYield,\n Scheduler_requestPaint = Scheduler.unstable_requestPaint,\n Scheduler_now = Scheduler.unstable_now,\n Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,\n Scheduler_LowPriority = Scheduler.unstable_LowPriority,\n Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;\n\n{\n // Provide explicit error message when production+profiling bundle of e.g.\n // react-dom is used with production (non-profiling) bundle of\n // scheduler/tracing\n if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {\n {\n throw Error( \"It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling\" );\n }\n }\n}\n\nvar fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use\n// ascending numbers so we can compare them like numbers. They start at 90 to\n// avoid clashing with Scheduler's priorities.\n\nvar ImmediatePriority = 99;\nvar UserBlockingPriority$1 = 98;\nvar NormalPriority = 97;\nvar LowPriority = 96;\nvar IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.\n\nvar NoPriority = 90;\nvar shouldYield = Scheduler_shouldYield;\nvar requestPaint = // Fall back gracefully if we're running an older version of Scheduler.\nScheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};\nvar syncQueue = null;\nvar immediateQueueCallbackNode = null;\nvar isFlushingSyncQueue = false;\nvar initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.\n// This will be the case for modern browsers that support `performance.now`. In\n// older browsers, Scheduler falls back to `Date.now`, which returns a Unix\n// timestamp. In that case, subtract the module initialization time to simulate\n// the behavior of performance.now and keep our times small enough to fit\n// within 32 bits.\n// TODO: Consider lifting this into Scheduler.\n\nvar now = initialTimeMs < 10000 ? Scheduler_now : function () {\n return Scheduler_now() - initialTimeMs;\n};\nfunction getCurrentPriorityLevel() {\n switch (Scheduler_getCurrentPriorityLevel()) {\n case Scheduler_ImmediatePriority:\n return ImmediatePriority;\n\n case Scheduler_UserBlockingPriority:\n return UserBlockingPriority$1;\n\n case Scheduler_NormalPriority:\n return NormalPriority;\n\n case Scheduler_LowPriority:\n return LowPriority;\n\n case Scheduler_IdlePriority:\n return IdlePriority;\n\n default:\n {\n {\n throw Error( \"Unknown priority level.\" );\n }\n }\n\n }\n}\n\nfunction reactPriorityToSchedulerPriority(reactPriorityLevel) {\n switch (reactPriorityLevel) {\n case ImmediatePriority:\n return Scheduler_ImmediatePriority;\n\n case UserBlockingPriority$1:\n return Scheduler_UserBlockingPriority;\n\n case NormalPriority:\n return Scheduler_NormalPriority;\n\n case LowPriority:\n return Scheduler_LowPriority;\n\n case IdlePriority:\n return Scheduler_IdlePriority;\n\n default:\n {\n {\n throw Error( \"Unknown priority level.\" );\n }\n }\n\n }\n}\n\nfunction runWithPriority$1(reactPriorityLevel, fn) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_runWithPriority(priorityLevel, fn);\n}\nfunction scheduleCallback(reactPriorityLevel, callback, options) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_scheduleCallback(priorityLevel, callback, options);\n}\nfunction scheduleSyncCallback(callback) {\n // Push this callback into an internal queue. We'll flush these either in\n // the next tick, or earlier if something calls `flushSyncCallbackQueue`.\n if (syncQueue === null) {\n syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.\n\n immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);\n } else {\n // Push onto existing queue. Don't need to schedule a callback because\n // we already scheduled one when we created the queue.\n syncQueue.push(callback);\n }\n\n return fakeCallbackNode;\n}\nfunction cancelCallback(callbackNode) {\n if (callbackNode !== fakeCallbackNode) {\n Scheduler_cancelCallback(callbackNode);\n }\n}\nfunction flushSyncCallbackQueue() {\n if (immediateQueueCallbackNode !== null) {\n var node = immediateQueueCallbackNode;\n immediateQueueCallbackNode = null;\n Scheduler_cancelCallback(node);\n }\n\n flushSyncCallbackQueueImpl();\n}\n\nfunction flushSyncCallbackQueueImpl() {\n if (!isFlushingSyncQueue && syncQueue !== null) {\n // Prevent re-entrancy.\n isFlushingSyncQueue = true;\n var i = 0;\n\n try {\n var _isSync = true;\n var queue = syncQueue;\n runWithPriority$1(ImmediatePriority, function () {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n\n do {\n callback = callback(_isSync);\n } while (callback !== null);\n }\n });\n syncQueue = null;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n if (syncQueue !== null) {\n syncQueue = syncQueue.slice(i + 1);\n } // Resume flushing in the next tick\n\n\n Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);\n throw error;\n } finally {\n isFlushingSyncQueue = false;\n }\n }\n}\n\nvar NoMode = 0;\nvar StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root\n// tag instead\n\nvar BlockingMode = 2;\nvar ConcurrentMode = 4;\nvar ProfileMode = 8;\n\n// Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\nvar MAX_SIGNED_31_BIT_INT = 1073741823;\n\nvar NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that\n// Never work can be committed in an inconsistent state without tearing the UI.\n// The main example is offscreen content, like a hidden subtree. So one possible\n// name is Offscreen. However, it also includes dehydrated Suspense boundaries,\n// which are inconsistent in the sense that they haven't finished yet, but\n// aren't visibly inconsistent because the server rendered HTML matches what the\n// hydrated tree would look like.\n\nvar Never = 1; // Idle is slightly higher priority than Never. It must completely finish in\n// order to be consistent.\n\nvar Idle = 2; // Continuous Hydration is slightly higher than Idle and is used to increase\n// priority of hover targets.\n\nvar ContinuousHydration = 3;\nvar Sync = MAX_SIGNED_31_BIT_INT;\nvar Batched = Sync - 1;\nvar UNIT_SIZE = 10;\nvar MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms.\n\nfunction msToExpirationTime(ms) {\n // Always subtract from the offset so that we don't clash with the magic number for NoWork.\n return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);\n}\nfunction expirationTimeToMs(expirationTime) {\n return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;\n}\n\nfunction ceiling(num, precision) {\n return ((num / precision | 0) + 1) * precision;\n}\n\nfunction computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {\n return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);\n} // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update\n// the names to reflect.\n\n\nvar LOW_PRIORITY_EXPIRATION = 5000;\nvar LOW_PRIORITY_BATCH_SIZE = 250;\nfunction computeAsyncExpiration(currentTime) {\n return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);\n}\nfunction computeSuspenseExpiration(currentTime, timeoutMs) {\n // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time?\n return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE);\n} // We intentionally set a higher expiration time for interactive updates in\n// dev than in production.\n//\n// If the main thread is being blocked so long that you hit the expiration,\n// it's a problem that could be solved with better scheduling.\n//\n// People will be more likely to notice this and fix it with the long\n// expiration time in development.\n//\n// In production we opt for better UX at the risk of masking scheduling\n// problems, by expiring fast.\n\nvar HIGH_PRIORITY_EXPIRATION = 500 ;\nvar HIGH_PRIORITY_BATCH_SIZE = 100;\nfunction computeInteractiveExpiration(currentTime) {\n return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);\n}\nfunction inferPriorityFromExpirationTime(currentTime, expirationTime) {\n if (expirationTime === Sync) {\n return ImmediatePriority;\n }\n\n if (expirationTime === Never || expirationTime === Idle) {\n return IdlePriority;\n }\n\n var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);\n\n if (msUntil <= 0) {\n return ImmediatePriority;\n }\n\n if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {\n return UserBlockingPriority$1;\n }\n\n if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {\n return NormalPriority;\n } // TODO: Handle LowPriority\n // Assume anything lower has idle priority\n\n\n return IdlePriority;\n}\n\nvar ReactStrictModeWarnings = {\n recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n flushPendingUnsafeLifecycleWarnings: function () {},\n recordLegacyContextWarning: function (fiber, instance) {},\n flushLegacyContextWarning: function () {},\n discardPendingWarnings: function () {}\n};\n\n{\n var findStrictRoot = function (fiber) {\n var maybeStrictRoot = null;\n var node = fiber;\n\n while (node !== null) {\n if (node.mode & StrictMode) {\n maybeStrictRoot = node;\n }\n\n node = node.return;\n }\n\n return maybeStrictRoot;\n };\n\n var setToSortedString = function (set) {\n var array = [];\n set.forEach(function (value) {\n array.push(value);\n });\n return array.sort().join(', ');\n };\n\n var pendingComponentWillMountWarnings = [];\n var pendingUNSAFE_ComponentWillMountWarnings = [];\n var pendingComponentWillReceivePropsWarnings = [];\n var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n var pendingComponentWillUpdateWarnings = [];\n var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n var didWarnAboutUnsafeLifecycles = new Set();\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedup strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n\n if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n\n var UNSAFE_componentWillMountUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n\n var componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n\n var componentWillUpdateUniqueNames = new Set();\n\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n } // Finally, we flush all the warnings\n // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n\n error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '\\nPlease update the following components: %s', sortedNames);\n }\n\n if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, \" + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n }\n\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '\\nPlease update the following components: %s', _sortedNames2);\n }\n\n if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames3);\n }\n\n if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, refactor your \" + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames4);\n }\n\n if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames5);\n }\n };\n\n var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\n\n if (strictRoot === null) {\n error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n\n return;\n } // Dedup strategy: Warn once per component.\n\n\n if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n if (warningsForRoot === undefined) {\n warningsForRoot = [];\n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n }\n\n warningsForRoot.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n var firstComponentStack = getStackByFiberInDevAndProd(firstFiber);\n\n error('Legacy context API has been detected within a strict-mode tree.' + '\\n\\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\\n\\nPlease update the following components: %s' + '\\n\\nLearn more about this warning here: https://fb.me/react-legacy-context' + '%s', sortedNames, firstComponentStack);\n });\n };\n\n ReactStrictModeWarnings.discardPendingWarnings = function () {\n pendingComponentWillMountWarnings = [];\n pendingUNSAFE_ComponentWillMountWarnings = [];\n pendingComponentWillReceivePropsWarnings = [];\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n pendingComponentWillUpdateWarnings = [];\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n pendingLegacyContextWarning = new Map();\n };\n}\n\nvar resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\nvar failedBoundaries = null;\nvar setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n};\nfunction resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n}\nfunction resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n // Check if we're dealing with a real forwardRef. Don't want to crash early.\n if (type !== null && type !== undefined && typeof type.render === 'function') {\n // ForwardRef is special because its resolved .type is an object,\n // but it's possible that we only have its inner render function in the map.\n // If that inner render function is different, we'll build a new forwardRef type.\n var currentRender = resolveFunctionForHotReloading(type.render);\n\n if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n\n return syntheticType;\n }\n }\n\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\n }\n\n var prevType = fiber.elementType;\n var nextType = element.type; // If we got here, we know types aren't === equal.\n\n var needsCompareFamilies = false;\n var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case FunctionComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n // We don't know the inner type yet.\n // We're going to assume that the lazy inner type is stable,\n // and so it is sufficient to avoid reconciling it away.\n // We're not going to unwrap or actually use the new lazy type.\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case ForwardRef:\n {\n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ($$typeofNextType === REACT_MEMO_TYPE) {\n // TODO: if it was but can no longer be simple,\n // we shouldn't set this.\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n default:\n return false;\n } // Check if both types have a family and it's the same one.\n\n\n if (needsCompareFamilies) {\n // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n // This means both of them need to be registered to preserve state.\n // If we unwrapped and compared the inner types for wrappers instead,\n // then we would risk falsely saying two separate memo(Foo)\n // calls are equivalent because they wrap the same Foo function.\n var prevFamily = resolveFamily(prevType);\n\n if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n\n return false;\n }\n}\nfunction markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n if (typeof WeakSet !== 'function') {\n return;\n }\n\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n\n failedBoundaries.add(fiber);\n }\n}\nvar scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n var staleFamilies = update.staleFamilies,\n updatedFamilies = update.updatedFamilies;\n flushPassiveEffects();\n flushSync(function () {\n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n });\n }\n};\nvar scheduleRoot = function (root, element) {\n {\n if (root.context !== emptyContextObject) {\n // Super edge case: root has a legacy _renderSubtree context\n // but we don't know the parentComponent so we can't pass it.\n // Just ignore. We'll delete this with _renderSubtree code path later.\n return;\n }\n\n flushPassiveEffects();\n syncUpdates(function () {\n updateContainer(element, root, null, null);\n });\n }\n};\n\nfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n {\n var alternate = fiber.alternate,\n child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n\n var needsRender = false;\n var needsRemount = false;\n\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\n\n if (family !== undefined) {\n if (staleFamilies.has(family)) {\n needsRemount = true;\n } else if (updatedFamilies.has(family)) {\n if (tag === ClassComponent) {\n needsRemount = true;\n } else {\n needsRender = true;\n }\n }\n }\n }\n\n if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n\n if (needsRemount || needsRender) {\n scheduleWork(fiber, Sync);\n }\n\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n }\n }\n}\n\nvar findHostInstancesForRefresh = function (root, families) {\n {\n var hostInstances = new Set();\n var types = new Set(families.map(function (family) {\n return family.current;\n }));\n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n return hostInstances;\n }\n};\n\nfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n {\n var child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n var didMatch = false;\n\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\n }\n }\n\n if (didMatch) {\n // We have a match. This only drills down to the closest host components.\n // There's no need to search deeper because for the purpose of giving\n // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n findHostInstancesForFiberShallowly(fiber, hostInstances);\n } else {\n // If there's no match, maybe there will be one further down in the child tree.\n if (child !== null) {\n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n }\n }\n\n if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n}\n\nfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n\n var node = fiber;\n\n while (true) {\n switch (node.tag) {\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n\n node = node.return;\n }\n }\n}\n\nfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\n\n while (true) {\n if (node.tag === HostComponent) {\n // We got a match.\n foundHostInstances = true;\n hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === fiber) {\n return foundHostInstances;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n return false;\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = _assign({}, baseProps);\n\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\nfunction readLazyComponentType(lazyComponent) {\n initializeLazyComponentType(lazyComponent);\n\n if (lazyComponent._status !== Resolved) {\n throw lazyComponent._result;\n }\n\n return lazyComponent._result;\n}\n\nvar valueCursor = createCursor(null);\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n}\n\nvar currentlyRenderingFiber = null;\nvar lastContextDependency = null;\nvar lastContextWithAllBitsObserved = null;\nvar isDisallowedContextReadInDEV = false;\nfunction resetContextDependencies() {\n // This is called right before React yields execution, to ensure `readContext`\n // cannot be called outside the render phase.\n currentlyRenderingFiber = null;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n}\nfunction exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction pushProvider(providerFiber, nextValue) {\n var context = providerFiber.type._context;\n\n {\n push(valueCursor, context._currentValue, providerFiber);\n context._currentValue = nextValue;\n\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n}\nfunction popProvider(providerFiber) {\n var currentValue = valueCursor.current;\n pop(valueCursor, providerFiber);\n var context = providerFiber.type._context;\n\n {\n context._currentValue = currentValue;\n }\n}\nfunction calculateChangedBits(context, newValue, oldValue) {\n if (objectIs(oldValue, newValue)) {\n // No change\n return 0;\n } else {\n var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n\n {\n if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {\n error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);\n }\n }\n\n return changedBits | 0;\n }\n}\nfunction scheduleWorkOnParentPath(parent, renderExpirationTime) {\n // Update the child expiration time of all the ancestors, including\n // the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (node.childExpirationTime < renderExpirationTime) {\n node.childExpirationTime = renderExpirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {\n alternate.childExpirationTime = renderExpirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {\n alternate.childExpirationTime = renderExpirationTime;\n } else {\n // Neither alternate was updated, which means the rest of the\n // ancestor path already has sufficient priority.\n break;\n }\n\n node = node.return;\n }\n}\nfunction propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {\n var fiber = workInProgress.child;\n\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {\n // Match! Schedule an update on this fiber.\n if (fiber.tag === ClassComponent) {\n // Schedule a force update on the work-in-progress.\n var update = createUpdate(renderExpirationTime, null);\n update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n // update to the current fiber, too, which means it will persist even if\n // this render is thrown away. Since it's a race condition, not sure it's\n // worth fixing.\n\n enqueueUpdate(fiber, update);\n }\n\n if (fiber.expirationTime < renderExpirationTime) {\n fiber.expirationTime = renderExpirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < renderExpirationTime) {\n alternate.expirationTime = renderExpirationTime;\n }\n\n scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too.\n\n if (list.expirationTime < renderExpirationTime) {\n list.expirationTime = renderExpirationTime;\n } // Since we already found a match, we can stop traversing the\n // dependency list.\n\n\n break;\n }\n\n dependency = dependency.next;\n }\n } else if (fiber.tag === ContextProvider) {\n // Don't scan deeper if this is a matching provider\n nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\n }\n\n if (nextFiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n nextFiber.return = fiber;\n } else {\n // No child. Traverse to next sibling.\n nextFiber = fiber;\n\n while (nextFiber !== null) {\n if (nextFiber === workInProgress) {\n // We're back to the root of this subtree. Exit.\n nextFiber = null;\n break;\n }\n\n var sibling = nextFiber.sibling;\n\n if (sibling !== null) {\n // Set the return pointer of the sibling to the work-in-progress fiber.\n sibling.return = nextFiber.return;\n nextFiber = sibling;\n break;\n } // No more siblings. Traverse up.\n\n\n nextFiber = nextFiber.return;\n }\n }\n\n fiber = nextFiber;\n }\n}\nfunction prepareToReadContext(workInProgress, renderExpirationTime) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (dependencies.expirationTime >= renderExpirationTime) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n\n dependencies.firstContext = null;\n }\n }\n}\nfunction readContext(context, observedBits) {\n {\n // This warning would fire if you read context inside a Hook like useMemo.\n // Unlike the class check below, it's not enforced in production for perf.\n if (isDisallowedContextReadInDEV) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {\n var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.\n\n if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {\n // Observe all updates.\n lastContextWithAllBitsObserved = context;\n resolvedObservedBits = MAX_SIGNED_31_BIT_INT;\n } else {\n resolvedObservedBits = observedBits;\n }\n\n var contextItem = {\n context: context,\n observedBits: resolvedObservedBits,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (!(currentlyRenderingFiber !== null)) {\n {\n throw Error( \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\" );\n }\n } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n currentlyRenderingFiber.dependencies = {\n expirationTime: NoWork,\n firstContext: contextItem,\n responders: null\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n\n return context._currentValue ;\n}\n\nvar UpdateState = 0;\nvar ReplaceState = 1;\nvar ForceUpdate = 2;\nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n// It should only be read right after calling `processUpdateQueue`, via\n// `checkHasForceUpdateAfterProcessing`.\n\nvar hasForceUpdate = false;\nvar didWarnUpdateInsideUpdate;\nvar currentlyProcessingQueue;\n\n{\n didWarnUpdateInsideUpdate = false;\n currentlyProcessingQueue = null;\n}\n\nfunction initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n baseQueue: null,\n shared: {\n pending: null\n },\n effects: null\n };\n fiber.updateQueue = queue;\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n // Clone the update queue from current. Unless it's already a clone.\n var queue = workInProgress.updateQueue;\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n baseQueue: currentQueue.baseQueue,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = clone;\n }\n}\nfunction createUpdate(expirationTime, suspenseConfig) {\n var update = {\n expirationTime: expirationTime,\n suspenseConfig: suspenseConfig,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n update.next = update;\n\n {\n update.priority = getCurrentPriorityLevel();\n }\n\n return update;\n}\nfunction enqueueUpdate(fiber, update) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update;\n\n {\n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n\n didWarnUpdateInsideUpdate = true;\n }\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, update) {\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // Ensure the work-in-progress queue is a clone\n cloneUpdateQueue(current, workInProgress);\n } // Captured updates go only on the work-in-progress queue.\n\n\n var queue = workInProgress.updateQueue; // Append the update to the end of the list.\n\n var last = queue.baseQueue;\n\n if (last === null) {\n queue.baseQueue = update.next = update;\n update.next = update;\n } else {\n update.next = last.next;\n last.next = update;\n }\n}\n\nfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n\n if ( workInProgress.mode & StrictMode) {\n payload.call(instance, prevState, nextProps);\n }\n }\n\n var nextState = payload.call(instance, prevState, nextProps);\n\n {\n exitDisallowedContextReadInDEV();\n }\n\n return nextState;\n } // State object\n\n\n return payload;\n }\n\n case CaptureUpdate:\n {\n workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n\n if ( workInProgress.mode & StrictMode) {\n _payload.call(instance, prevState, nextProps);\n }\n }\n\n partialState = _payload.call(instance, prevState, nextProps);\n\n {\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\n }\n\n if (partialState === null || partialState === undefined) {\n // Null and undefined are treated as no-ops.\n return prevState;\n } // Merge the partial state and the previous state.\n\n\n return _assign({}, prevState, partialState);\n }\n\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n\n return prevState;\n}\n\nfunction processUpdateQueue(workInProgress, props, instance, renderExpirationTime) {\n // This is always non-null on a ClassComponent or HostRoot\n var queue = workInProgress.updateQueue;\n hasForceUpdate = false;\n\n {\n currentlyProcessingQueue = queue.shared;\n } // The last rebase update that is NOT part of the base state.\n\n\n var baseQueue = queue.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n baseQueue = pendingQueue;\n queue.shared.pending = null; // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (currentQueue !== null) {\n currentQueue.baseQueue = pendingQueue;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (baseQueue !== null) {\n var first = baseQueue.next; // Iterate through the list of updates to compute the result.\n\n var newState = queue.baseState;\n var newExpirationTime = NoWork;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n\n if (first !== null) {\n var update = first;\n\n do {\n var updateExpirationTime = update.expirationTime;\n\n if (updateExpirationTime < renderExpirationTime) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n expirationTime: update.expirationTime,\n suspenseConfig: update.suspenseConfig,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n\n\n if (updateExpirationTime > newExpirationTime) {\n newExpirationTime = updateExpirationTime;\n }\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n expirationTime: Sync,\n // This update is going to be committed so we never want uncommit it.\n suspenseConfig: update.suspenseConfig,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Mark the event time of this update as relevant to this render pass.\n // TODO: This should ideally use the true event time of this update rather than\n // its priority which is a derived and not reverseable value.\n // TODO: We should skip this update if it was already committed but currently\n // we have no way of detecting the difference between a committed and suspended\n // update here.\n\n\n markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null) {\n workInProgress.effectTag |= Callback;\n var effects = queue.effects;\n\n if (effects === null) {\n queue.effects = [update];\n } else {\n effects.push(update);\n }\n }\n }\n\n update = update.next;\n\n if (update === null || update === first) {\n pendingQueue = queue.shared.pending;\n\n if (pendingQueue === null) {\n break;\n } else {\n // An update was scheduled from inside a reducer. Add the new\n // pending updates to the end of the list and keep processing.\n update = baseQueue.next = pendingQueue.next;\n pendingQueue.next = first;\n queue.baseQueue = baseQueue = pendingQueue;\n queue.shared.pending = null;\n }\n }\n } while (true);\n }\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n }\n\n queue.baseState = newBaseState;\n queue.baseQueue = newBaseQueueLast; // Set the remaining expiration time to be whatever is remaining in the queue.\n // This should be fine because the only two other things that contribute to\n // expiration time are props and context. We're already in the middle of the\n // begin phase by the time we start processing the queue, so we've already\n // dealt with the props. Context in components that specify\n // shouldComponentUpdate is tricky; but we'll have to account for\n // that regardless.\n\n markUnprocessedUpdateTime(newExpirationTime);\n workInProgress.expirationTime = newExpirationTime;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n}\n\nfunction callCallback(callback, context) {\n if (!(typeof callback === 'function')) {\n {\n throw Error( \"Invalid argument passed as callback. Expected a function. Instead received: \" + callback );\n }\n }\n\n callback.call(context);\n}\n\nfunction resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n}\nfunction checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n}\nfunction commitUpdateQueue(finishedWork, finishedQueue, instance) {\n // Commit the effects\n var effects = finishedQueue.effects;\n finishedQueue.effects = null;\n\n if (effects !== null) {\n for (var i = 0; i < effects.length; i++) {\n var effect = effects[i];\n var callback = effect.callback;\n\n if (callback !== null) {\n effect.callback = null;\n callCallback(callback, instance);\n }\n }\n }\n}\n\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;\nfunction requestCurrentSuspenseConfig() {\n return ReactCurrentBatchConfig.suspense;\n}\n\nvar fakeInternalInstance = {};\nvar isArray = Array.isArray; // React.Component uses a shared frozen object by default.\n// We'll use it to determine whether we need to initialize legacy refs.\n\nvar emptyRefsObject = new React.Component().refs;\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\n\n{\n didWarnAboutStateAssignmentForComponent = new Set();\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n var didWarnOnInvalidCallback = new Set();\n\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + \"_\" + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n };\n\n warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentName(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }; // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n\n\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n {\n {\n throw Error( \"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).\" );\n }\n }\n }\n });\n Object.freeze(fakeInternalInstance);\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n\n {\n if ( workInProgress.mode & StrictMode) {\n // Invoke the function an extra time to help detect side-effects.\n getDerivedStateFromProps(nextProps, prevState);\n }\n }\n\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);\n workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n // base state.\n\n if (workInProgress.expirationTime === NoWork) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n}\nvar classComponentUpdater = {\n isMounted: isMounted,\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var currentTime = requestCurrentTimeForUpdate();\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);\n var update = createUpdate(expirationTime, suspenseConfig);\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'setState');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleWork(fiber, expirationTime);\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var currentTime = requestCurrentTimeForUpdate();\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);\n var update = createUpdate(expirationTime, suspenseConfig);\n update.tag = ReplaceState;\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'replaceState');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleWork(fiber, expirationTime);\n },\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var currentTime = requestCurrentTimeForUpdate();\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);\n var update = createUpdate(expirationTime, suspenseConfig);\n update.tag = ForceUpdate;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'forceUpdate');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleWork(fiber, expirationTime);\n }\n};\n\nfunction checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n\n if (typeof instance.shouldComponentUpdate === 'function') {\n {\n if ( workInProgress.mode & StrictMode) {\n // Invoke the function an extra time to help detect side-effects.\n instance.shouldComponentUpdate(newProps, newState, nextContext);\n }\n }\n\n startPhaseTimer(workInProgress, 'shouldComponentUpdate');\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n stopPhaseTimer();\n\n {\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');\n }\n }\n\n return shouldUpdate;\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n}\n\nfunction checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n\n {\n var name = getComponentName(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var _state = instance.state;\n\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction adoptClassInstance(workInProgress, instance) {\n instance.updater = classComponentUpdater;\n workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n set(instance, workInProgress);\n\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n}\n\nfunction constructClassInstance(workInProgress, ctor, props) {\n var isLegacyContextConsumer = false;\n var unmaskedContext = emptyContextObject;\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n var contextTypes = ctor.contextTypes;\n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n } // Instantiate twice to help detect side-effects.\n\n\n {\n if ( workInProgress.mode & StrictMode) {\n new ctor(props, context); // eslint-disable-line no-new\n }\n }\n\n var instance = new ctor(props, context);\n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n adoptClassInstance(workInProgress, instance);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentName(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://fb.me/react-unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n\n if (isLegacyContextConsumer) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n}\n\nfunction callComponentWillMount(workInProgress, instance) {\n startPhaseTimer(workInProgress, 'componentWillMount');\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n stopPhaseTimer();\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n startPhaseTimer(workInProgress, 'componentWillReceiveProps');\n\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n\n stopPhaseTimer();\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentName(workInProgress.type) || 'Component';\n\n if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n didWarnAboutStateAssignmentForComponent.add(componentName);\n\n error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n }\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = emptyRefsObject;\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n {\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n }\n\n processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n instance.state = workInProgress.memoizedState;\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {\n var instance = workInProgress.stateNode;\n var oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n startPhaseTimer(workInProgress, 'componentWillMount');\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n stopPhaseTimer();\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n} // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\nfunction updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var oldProps = workInProgress.memoizedProps;\n instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Snapshot;\n }\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n startPhaseTimer(workInProgress, 'componentWillUpdate');\n\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n\n stopPhaseTimer();\n }\n\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.effectTag |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.effectTag |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Snapshot;\n }\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n}\n\nvar didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\n\nvar warnForMissingKey = function (child) {};\n\n{\n didWarnAboutMaps = false;\n didWarnAboutGenerators = false;\n didWarnAboutStringRefs = {};\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n ownerHasKeyUseWarning = {};\n ownerHasFunctionTypeWarning = {};\n\n warnForMissingKey = function (child) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n\n if (!(typeof child._store === 'object')) {\n {\n throw Error( \"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n child._store.validated = true;\n var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '\"key\" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true;\n\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://fb.me/react-warning-keys for ' + 'more information.');\n };\n}\n\nvar isArray$1 = Array.isArray;\n\nfunction coerceRef(returnFiber, current, element) {\n var mixedRef = element.ref;\n\n if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n {\n // TODO: Clean this up once we turn on the string ref warning for\n // everyone, because the strict mode case will no longer be relevant\n if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs\n // because these cannot be automatically converted to an arrow function\n // using a codemod. Therefore, we don't have to warn about string refs again.\n !(element._owner && element._self && element._owner.stateNode !== element._self)) {\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n {\n error('A string ref, \"%s\", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref%s', mixedRef, getStackByFiberInDevAndProd(returnFiber));\n }\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n\n if (element._owner) {\n var owner = element._owner;\n var inst;\n\n if (owner) {\n var ownerFiber = owner;\n\n if (!(ownerFiber.tag === ClassComponent)) {\n {\n throw Error( \"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref\" );\n }\n }\n\n inst = ownerFiber.stateNode;\n }\n\n if (!inst) {\n {\n throw Error( \"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n return current.ref;\n }\n\n var ref = function (value) {\n var refs = inst.refs;\n\n if (refs === emptyRefsObject) {\n // This is a lazy pooled frozen object, so we need to initialize.\n refs = inst.refs = {};\n }\n\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n\n ref._stringRef = stringRef;\n return ref;\n } else {\n if (!(typeof mixedRef === 'string')) {\n {\n throw Error( \"Expected ref to be a function, a string, an object returned by React.createRef(), or null.\" );\n }\n }\n\n if (!element._owner) {\n {\n throw Error( \"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of the following reasons:\\n1. You may be adding a ref to a function component\\n2. You may be adding a ref to a component that was not created inside a component's render method\\n3. You have multiple copies of React loaded\\nSee https://fb.me/react-refs-must-have-owner for more information.\" );\n }\n }\n }\n }\n\n return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n if (returnFiber.type !== 'textarea') {\n var addendum = '';\n\n {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();\n }\n\n {\n {\n throw Error( \"Objects are not valid as a React child (found: \" + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + \").\" + addendum );\n }\n }\n }\n}\n\nfunction warnOnFunctionType() {\n {\n var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();\n\n if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;\n\n error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n }\n} // This wrapper function exists because I expect to clone the code in each path\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\n\n\nfunction ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, expirationTime);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case FunctionComponent:\n {\n var Component = returnFiber.type;\n\n {\n {\n throw Error( (Component.displayName || Component.name || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = ChildReconciler(true);\nvar mountChildFibers = ChildReconciler(false);\nfunction cloneChildFibers(current, workInProgress) {\n if (!(current === null || workInProgress.child === current.child)) {\n {\n throw Error( \"Resuming work not yet implemented.\" );\n }\n }\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n\n newChild.sibling = null;\n} // Reset a workInProgress child set to prepare it for a second pass.\n\nfunction resetChildFibers(workInProgress, renderExpirationTime) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, renderExpirationTime);\n child = child.sibling;\n }\n}\n\nvar NO_CONTEXT = {};\nvar contextStackCursor$1 = createCursor(NO_CONTEXT);\nvar contextFiberStackCursor = createCursor(NO_CONTEXT);\nvar rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\nfunction requiredContext(c) {\n if (!(c !== NO_CONTEXT)) {\n {\n throw Error( \"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n return c;\n}\n\nfunction getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n}\n\nfunction pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n // However, we can't just call getRootHostContext() and push it because\n // we'd have a different number of entries on the stack depending on\n // whether getRootHostContext() throws somewhere in renderer code or not.\n // So we push an empty value first. This lets us safely unwind on errors.\n\n push(contextStackCursor$1, NO_CONTEXT, fiber);\n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n pop(contextStackCursor$1, fiber);\n push(contextStackCursor$1, nextRootContext, fiber);\n}\n\nfunction popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n}\n\nfunction getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\n}\n\nfunction pushHostContext(fiber) {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n var context = requiredContext(contextStackCursor$1.current);\n var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n if (context === nextContext) {\n return;\n } // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\n}\n\nfunction popHostContext(fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n if (contextFiberStackCursor.current !== fiber) {\n return;\n }\n\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n}\n\nvar DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is\n// inherited deeply down the subtree. The upper bits only affect\n// this immediate suspense boundary and gets reset each new\n// boundary or suspense list.\n\nvar SubtreeSuspenseContextMask = 1; // Subtree Flags:\n// InvisibleParentSuspenseContext indicates that one of our parent Suspense\n// boundaries is not currently showing visible main content.\n// Either because it is already showing a fallback or is not mounted at all.\n// We can use this to determine if it is desirable to trigger a fallback at\n// the parent. If not, then we might need to trigger undesirable boundaries\n// and/or suspend the commit to avoid hiding the parent content.\n\nvar InvisibleParentSuspenseContext = 1; // Shallow Flags:\n// ForceSuspenseFallback can be used by SuspenseList to force newly added\n// items into their fallback state during one of the render passes.\n\nvar ForceSuspenseFallback = 2;\nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);\nfunction hasSuspenseContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n}\nfunction setDefaultShallowSuspenseContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n}\nfunction setShallowSuspenseContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n}\nfunction addSubtreeSuspenseContext(parentContext, subtreeContext) {\n return parentContext | subtreeContext;\n}\nfunction pushSuspenseContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n}\nfunction popSuspenseContext(fiber) {\n pop(suspenseStackCursor, fiber);\n}\n\nfunction shouldCaptureSuspense(workInProgress, hasInvisibleParent) {\n // If it was the primary children that just suspended, capture and render the\n // fallback. Otherwise, don't capture and bubble to the next boundary.\n var nextState = workInProgress.memoizedState;\n\n if (nextState !== null) {\n if (nextState.dehydrated !== null) {\n // A dehydrated boundary always captures.\n return true;\n }\n\n return false;\n }\n\n var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.\n\n if (props.fallback === undefined) {\n return false;\n } // Regular boundaries always capture.\n\n\n if (props.unstable_avoidThisFallback !== true) {\n return true;\n } // If it's a boundary we should avoid, then we prefer to bubble up to the\n // parent boundary if it is currently invisible.\n\n\n if (hasInvisibleParent) {\n return false;\n } // If the parent is not able to handle it, we must handle it.\n\n\n return true;\n}\nfunction findFirstSuspended(row) {\n var node = row;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n var dehydrated = state.dehydrated;\n\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n // keep track of whether it suspended or not.\n node.memoizedProps.revealOrder !== undefined) {\n var didSuspend = (node.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspend) {\n return node;\n }\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === row) {\n return null;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n\n return null;\n}\n\nfunction createDeprecatedResponderListener(responder, props) {\n var eventResponderListener = {\n responder: responder,\n props: props\n };\n\n {\n Object.freeze(eventResponderListener);\n }\n\n return eventResponderListener;\n}\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Layout =\n/* */\n2;\nvar Passive$1 =\n/* */\n4;\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\n\n{\n didWarnAboutMismatchedHooksForComponent = new Set();\n}\n\n// These are set right before calling the component.\nvar renderExpirationTime = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from\n// the work-in-progress hook.\n\nvar currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n// current hook list is the list that belongs to the current fiber. The\n// work-in-progress hook list is a new list that will be added to the\n// work-in-progress fiber.\n\nvar currentHook = null;\nvar workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n// does not get reset if we do another render pass; only when we're completely\n// finished evaluating this component. This is an optimization so we know\n// whether we need to clear render phase updates after a throw.\n\nvar didScheduleRenderPhaseUpdate = false;\nvar RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n// The list stores the order of hooks used during the initial render (mount).\n// Subsequent renders (updates) reference this list.\n\nvar hookTypesDev = null;\nvar hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n// the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n// When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\nvar ignorePreviousDependencies = false;\n\nfunction mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n}\n\nfunction updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n}\n\nfunction checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !Array.isArray(deps)) {\n // Verify deps, but only on mount to avoid extra checks.\n // It's unlikely their type would change as usually you define them inline.\n error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n }\n }\n}\n\nfunction warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentName(currentlyRenderingFiber$1.type);\n\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\n\n for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n var oldHookName = hookTypesDev[i];\n var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n // lol @ IE not supporting String#repeat\n\n while (row.length < secondColumnStart) {\n row += ' ';\n }\n\n row += newHookName + '\\n';\n table += row;\n }\n\n error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\\n\\n' + ' Previous render Next render\\n' + ' ------------------------------------------------------\\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n }\n }\n }\n}\n\nfunction throwInvalidHookError() {\n {\n {\n throw Error( \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.\" );\n }\n }\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n {\n if (ignorePreviousDependencies) {\n // Only true when this component is being hot reloaded.\n return false;\n }\n }\n\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n }\n }\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderExpirationTime) {\n renderExpirationTime = nextRenderExpirationTime;\n currentlyRenderingFiber$1 = workInProgress;\n\n {\n hookTypesDev = current !== null ? current._debugHookTypes : null;\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.expirationTime = NoWork; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // TODO Warn if no hooks are used at all during mount, then some are used during update.\n // Currently we will identify the update render as a mount because memoizedState === null.\n // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n // so memoizedState would be null during updates and mounts.\n\n {\n if (current !== null && current.memoizedState !== null) {\n ReactCurrentDispatcher.current = HooksDispatcherOnUpdateInDEV;\n } else if (hookTypesDev !== null) {\n // This dispatcher handles an edge case where a component is updating,\n // but no stateful hooks have been used.\n // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n // This dispatcher does that.\n ReactCurrentDispatcher.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher.current = HooksDispatcherOnMountInDEV;\n }\n }\n\n var children = Component(props, secondArg); // Check if there was a render phase update\n\n if (workInProgress.expirationTime === renderExpirationTime) {\n // Keep rendering in a loop for as long as render phase updates continue to\n // be scheduled. Use a counter to prevent infinite loops.\n var numberOfReRenders = 0;\n\n do {\n workInProgress.expirationTime = NoWork;\n\n if (!(numberOfReRenders < RE_RENDER_LIMIT)) {\n {\n throw Error( \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\" );\n }\n }\n\n numberOfReRenders += 1;\n\n {\n // Even when hot reloading, allow dependencies to stabilize\n // after first render to prevent infinite render phase updates.\n ignorePreviousDependencies = false;\n } // Start over from the beginning of the list\n\n\n currentHook = null;\n workInProgressHook = null;\n workInProgress.updateQueue = null;\n\n {\n // Also validate hook order for cascading updates.\n hookTypesUpdateIndexDev = -1;\n }\n\n ReactCurrentDispatcher.current = HooksDispatcherOnRerenderInDEV ;\n children = Component(props, secondArg);\n } while (workInProgress.expirationTime === renderExpirationTime);\n } // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n\n\n ReactCurrentDispatcher.current = ContextOnlyDispatcher;\n\n {\n workInProgress._debugHookTypes = hookTypesDev;\n } // This check uses currentHook so that it works the same in DEV and prod bundles.\n // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n\n var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n renderExpirationTime = NoWork;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n }\n\n didScheduleRenderPhaseUpdate = false;\n\n if (!!didRenderTooFewHooks) {\n {\n throw Error( \"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\" );\n }\n }\n\n return children;\n}\nfunction bailoutHooks(current, workInProgress, expirationTime) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.effectTag &= ~(Passive | Update);\n\n if (current.expirationTime <= expirationTime) {\n current.expirationTime = NoWork;\n }\n}\nfunction resetHooksAfterThrow() {\n // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n ReactCurrentDispatcher.current = ContextOnlyDispatcher;\n\n if (didScheduleRenderPhaseUpdate) {\n // There were render phase updates. These are only valid for this render\n // phase, which we are now aborting. Remove the updates from the queues so\n // they do not persist to the next render. Do not remove updates from hooks\n // that weren't processed.\n //\n // Only reset the updates from the queue if it has a clone. If it does\n // not have a clone, that means it wasn't processed, and the updates were\n // scheduled before we entered the render phase.\n var hook = currentlyRenderingFiber$1.memoizedState;\n\n while (hook !== null) {\n var queue = hook.queue;\n\n if (queue !== null) {\n queue.pending = null;\n }\n\n hook = hook.next;\n }\n }\n\n renderExpirationTime = NoWork;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n }\n\n didScheduleRenderPhaseUpdate = false;\n}\n\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n } else {\n // Append to the end of the list\n workInProgressHook = workInProgressHook.next = hook;\n }\n\n return workInProgressHook;\n}\n\nfunction updateWorkInProgressHook() {\n // This function is used both for updates and for re-renders triggered by a\n // render phase update. It assumes there is either a current hook we can\n // clone, or a work-in-progress hook from a previous render pass that we can\n // use as a base. When we reach the end of the base list, we must switch to\n // the dispatcher used for mounts.\n var nextCurrentHook;\n\n if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n\n var nextWorkInProgressHook;\n\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\n }\n\n if (nextWorkInProgressHook !== null) {\n // There's already a work-in-progress. Reuse it.\n workInProgressHook = nextWorkInProgressHook;\n nextWorkInProgressHook = workInProgressHook.next;\n currentHook = nextCurrentHook;\n } else {\n // Clone from the current hook.\n if (!(nextCurrentHook !== null)) {\n {\n throw Error( \"Rendered more hooks than during the previous render.\" );\n }\n }\n\n currentHook = nextCurrentHook;\n var newHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list.\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n } else {\n // Append to the end of the list.\n workInProgressHook = workInProgressHook.next = newHook;\n }\n }\n\n return workInProgressHook;\n}\n\nfunction createFunctionComponentUpdateQueue() {\n return {\n lastEffect: null\n };\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n\n if (init !== undefined) {\n initialState = init(initialArg);\n } else {\n initialState = initialArg;\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error( \"Should have a queue. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n queue.lastRenderedReducer = reducer;\n var current = currentHook; // The last rebase update that is NOT part of the base state.\n\n var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n\n if (baseQueue !== null) {\n // We have a queue to process.\n var first = baseQueue.next;\n var newState = current.baseState;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n var update = first;\n\n do {\n var updateExpirationTime = update.expirationTime;\n\n if (updateExpirationTime < renderExpirationTime) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n expirationTime: update.expirationTime,\n suspenseConfig: update.suspenseConfig,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n\n\n if (updateExpirationTime > currentlyRenderingFiber$1.expirationTime) {\n currentlyRenderingFiber$1.expirationTime = updateExpirationTime;\n markUnprocessedUpdateTime(updateExpirationTime);\n }\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n expirationTime: Sync,\n // This update is going to be committed so we never want uncommit it.\n suspenseConfig: update.suspenseConfig,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Mark the event time of this update as relevant to this render pass.\n // TODO: This should ideally use the true event time of this update rather than\n // its priority which is a derived and not reverseable value.\n // TODO: We should skip this update if it was already committed but currently\n // we have no way of detecting the difference between a committed and suspended\n // update here.\n\n\n markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.\n\n if (update.eagerReducer === reducer) {\n // If this update was processed eagerly, and its reducer matches the\n // current reducer, we can use the eagerly computed state.\n newState = update.eagerState;\n } else {\n var action = update.action;\n newState = reducer(newState, action);\n }\n }\n\n update = update.next;\n } while (update !== null && update !== first);\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n } // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n }\n\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n}\n\nfunction rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error( \"Should have a queue. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n // work-in-progress hook.\n\n var dispatch = queue.dispatch;\n var lastRenderPhaseUpdate = queue.pending;\n var newState = hook.memoizedState;\n\n if (lastRenderPhaseUpdate !== null) {\n // The queue doesn't persist past this render pass.\n queue.pending = null;\n var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n newState = reducer(newState, action);\n update = update.next;\n } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n // the base state unless the queue is empty.\n // TODO: Not sure if this is the desired semantics, but it's what we\n // do for gDSFP. I can't remember why.\n\n if (hook.baseQueue === null) {\n hook.baseState = newState;\n }\n\n queue.lastRenderedState = newState;\n }\n\n return [newState, dispatch];\n}\n\nfunction mountState(initialState) {\n var hook = mountWorkInProgressHook();\n\n if (typeof initialState === 'function') {\n // $FlowFixMe: Flow doesn't like mixed types\n initialState = initialState();\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateState(initialState) {\n return updateReducer(basicStateReducer);\n}\n\nfunction rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\n}\n\nfunction pushEffect(tag, create, destroy, deps) {\n var effect = {\n tag: tag,\n create: create,\n destroy: destroy,\n deps: deps,\n // Circular\n next: null\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var lastEffect = componentUpdateQueue.lastEffect;\n\n if (lastEffect === null) {\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var firstEffect = lastEffect.next;\n lastEffect.next = effect;\n effect.next = firstEffect;\n componentUpdateQueue.lastEffect = effect;\n }\n }\n\n return effect;\n}\n\nfunction mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n var ref = {\n current: initialValue\n };\n\n {\n Object.seal(ref);\n }\n\n hook.memoizedState = ref;\n return ref;\n}\n\nfunction updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.effectTag |= fiberEffectTag;\n hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, undefined, nextDeps);\n}\n\nfunction updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var destroy = undefined;\n\n if (currentHook !== null) {\n var prevEffect = currentHook.memoizedState;\n destroy = prevEffect.destroy;\n\n if (nextDeps !== null) {\n var prevDeps = prevEffect.deps;\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n pushEffect(hookEffectTag, create, destroy, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.effectTag |= fiberEffectTag;\n hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, destroy, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n\n return mountEffectImpl(Update | Passive, Passive$1, create, deps);\n}\n\nfunction updateEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n\n return updateEffectImpl(Update | Passive, Passive$1, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n return mountEffectImpl(Update, Layout, create, deps);\n}\n\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n}\n\nfunction imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n\n var _inst = create();\n\n refCallback(_inst);\n return function () {\n refCallback(null);\n };\n } else if (ref !== null && ref !== undefined) {\n var refObject = ref;\n\n {\n if (!refObject.hasOwnProperty('current')) {\n error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n }\n }\n\n var _inst2 = create();\n\n refObject.current = _inst2;\n return function () {\n refObject.current = null;\n };\n }\n}\n\nfunction mountImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction updateImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n // The react-debug-hooks package injects its own implementation\n // so that e.g. DevTools can display custom hook values.\n}\n\nvar updateDebugValue = mountDebugValue;\n\nfunction mountCallback(callback, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction mountMemo(nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n // Assume these are defined. If they're not, areHookInputsEqual will warn.\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction mountDeferredValue(value, config) {\n var _mountState = mountState(value),\n prevValue = _mountState[0],\n setValue = _mountState[1];\n\n mountEffect(function () {\n var previousConfig = ReactCurrentBatchConfig$1.suspense;\n ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.suspense = previousConfig;\n }\n }, [value, config]);\n return prevValue;\n}\n\nfunction updateDeferredValue(value, config) {\n var _updateState = updateState(),\n prevValue = _updateState[0],\n setValue = _updateState[1];\n\n updateEffect(function () {\n var previousConfig = ReactCurrentBatchConfig$1.suspense;\n ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.suspense = previousConfig;\n }\n }, [value, config]);\n return prevValue;\n}\n\nfunction rerenderDeferredValue(value, config) {\n var _rerenderState = rerenderState(),\n prevValue = _rerenderState[0],\n setValue = _rerenderState[1];\n\n updateEffect(function () {\n var previousConfig = ReactCurrentBatchConfig$1.suspense;\n ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.suspense = previousConfig;\n }\n }, [value, config]);\n return prevValue;\n}\n\nfunction startTransition(setPending, config, callback) {\n var priorityLevel = getCurrentPriorityLevel();\n runWithPriority$1(priorityLevel < UserBlockingPriority$1 ? UserBlockingPriority$1 : priorityLevel, function () {\n setPending(true);\n });\n runWithPriority$1(priorityLevel > NormalPriority ? NormalPriority : priorityLevel, function () {\n var previousConfig = ReactCurrentBatchConfig$1.suspense;\n ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;\n\n try {\n setPending(false);\n callback();\n } finally {\n ReactCurrentBatchConfig$1.suspense = previousConfig;\n }\n });\n}\n\nfunction mountTransition(config) {\n var _mountState2 = mountState(false),\n isPending = _mountState2[0],\n setPending = _mountState2[1];\n\n var start = mountCallback(startTransition.bind(null, setPending, config), [setPending, config]);\n return [start, isPending];\n}\n\nfunction updateTransition(config) {\n var _updateState2 = updateState(),\n isPending = _updateState2[0],\n setPending = _updateState2[1];\n\n var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);\n return [start, isPending];\n}\n\nfunction rerenderTransition(config) {\n var _rerenderState2 = rerenderState(),\n isPending = _rerenderState2[0],\n setPending = _rerenderState2[1];\n\n var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);\n return [start, isPending];\n}\n\nfunction dispatchAction(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var currentTime = requestCurrentTimeForUpdate();\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);\n var update = {\n expirationTime: expirationTime,\n suspenseConfig: suspenseConfig,\n action: action,\n eagerReducer: null,\n eagerState: null,\n next: null\n };\n\n {\n update.priority = getCurrentPriorityLevel();\n } // Append the update to the end of the list.\n\n\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n var alternate = fiber.alternate;\n\n if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdate = true;\n update.expirationTime = renderExpirationTime;\n currentlyRenderingFiber$1.expirationTime = renderExpirationTime;\n } else {\n if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {\n // The queue is currently empty, which means we can eagerly compute the\n // next state before entering the render phase. If the new state is the\n // same as the current state, we may be able to bail out entirely.\n var lastRenderedReducer = queue.lastRenderedReducer;\n\n if (lastRenderedReducer !== null) {\n var prevDispatcher;\n\n {\n prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n }\n\n try {\n var currentState = queue.lastRenderedState;\n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n // it, on the update object. If the reducer hasn't changed by the\n // time we enter the render phase, then the eager state can be used\n // without calling the reducer again.\n\n update.eagerReducer = lastRenderedReducer;\n update.eagerState = eagerState;\n\n if (objectIs(eagerState, currentState)) {\n // Fast path. We can bail out without scheduling React to re-render.\n // It's still possible that we'll need to rebase this update later,\n // if the component re-renders for a different reason and by that\n // time the reducer has changed.\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n }\n }\n }\n\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotScopedWithMatchingAct(fiber);\n warnIfNotCurrentlyActingUpdatesInDev(fiber);\n }\n }\n\n scheduleWork(fiber, expirationTime);\n }\n}\n\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useResponder: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError\n};\nvar HooksDispatcherOnMountInDEV = null;\nvar HooksDispatcherOnMountWithHookTypesInDEV = null;\nvar HooksDispatcherOnUpdateInDEV = null;\nvar HooksDispatcherOnRerenderInDEV = null;\nvar InvalidNestedHooksDispatcherOnMountInDEV = null;\nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;\nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n\n{\n var warnInvalidContextAccess = function () {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n };\n\n var warnInvalidHookAccess = function () {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n mountHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition(config);\n }\n };\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition(config);\n }\n };\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition(config);\n }\n };\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition(config);\n }\n };\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition(config);\n }\n };\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition(config);\n }\n };\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher.current;\n ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useResponder: function (responder, props) {\n currentHookNameInDev = 'useResponder';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return createDeprecatedResponderListener(responder, props);\n },\n useDeferredValue: function (value, config) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value, config);\n },\n useTransition: function (config) {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition(config);\n }\n };\n}\n\nvar now$1 = Scheduler.unstable_now;\nvar commitTime = 0;\nvar profilerStartTime = -1;\n\nfunction getCommitTime() {\n return commitTime;\n}\n\nfunction recordCommitTime() {\n\n commitTime = now$1();\n}\n\nfunction startProfilerTimer(fiber) {\n\n profilerStartTime = now$1();\n\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now$1();\n }\n}\n\nfunction stopProfilerTimerIfRunning(fiber) {\n\n profilerStartTime = -1;\n}\n\nfunction stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n\n if (profilerStartTime >= 0) {\n var elapsedTime = now$1() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n\n profilerStartTime = -1;\n }\n}\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false;\n\nfunction enterHydrationState(fiber) {\n\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChild(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n return true;\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);\n break;\n\n case HostComponent:\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);\n break;\n }\n }\n\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,\n // these children are not part of the reconciliation list of children.\n // Even if we abort and rereconcile the children, that will try to hydrate\n // again and the nodes are still in the host tree so these will be\n // recreated.\n\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n fiber.effectTag = fiber.effectTag & ~Hydrating | Placement;\n\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n\n switch (fiber.tag) {\n case HostComponent:\n var type = fiber.type;\n var props = fiber.pendingProps;\n didNotFindHydratableContainerInstance(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableContainerTextInstance(parentContainer, text);\n break;\n }\n\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n switch (fiber.tag) {\n case HostComponent:\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);\n break;\n\n case HostText:\n var _text = fiber.pendingProps;\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);\n break;\n\n case SuspenseComponent:\n didNotFindHydratableSuspenseInstance(parentType, parentProps);\n break;\n }\n\n break;\n }\n\n default:\n return;\n }\n }\n}\n\nfunction tryHydrate(fiber, nextInstance) {\n switch (fiber.tag) {\n case HostComponent:\n {\n var type = fiber.type;\n var props = fiber.pendingProps;\n var instance = canHydrateInstance(nextInstance, type);\n\n if (instance !== null) {\n fiber.stateNode = instance;\n return true;\n }\n\n return false;\n }\n\n case HostText:\n {\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text);\n\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n return true;\n }\n\n return false;\n }\n\n case SuspenseComponent:\n {\n\n return false;\n }\n\n default:\n return false;\n }\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrate(fiber, nextInstance)) {\n // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n\n if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);\n }\n\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(nextInstance);\n}\n\nfunction prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n\n var instance = fiber.stateNode;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.\n\n fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update.\n\n if (updatePayload !== null) {\n return true;\n }\n\n return false;\n}\n\nfunction prepareToHydrateHostTextInstance(fiber) {\n\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n\n {\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);\n break;\n }\n }\n }\n }\n }\n\n return shouldUpdate;\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n {\n throw Error( \"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n}\n\nfunction popToNextHostParent(fiber) {\n var parent = fiber.return;\n\n while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n parent = parent.return;\n }\n\n hydrationParentFiber = parent;\n}\n\nfunction popHydrationState(fiber) {\n\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n }\n\n var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.\n // We only do this deeper than head and body since they tend to have random\n // other nodes in them. We also ignore components with pure text content in\n // side of them.\n // TODO: Better heuristic.\n\n if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n\n popToNextHostParent(fiber);\n\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n\n return true;\n}\n\nfunction resetHydrationState() {\n\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar didReceiveUpdate = false;\nvar didWarnAboutBadClass;\nvar didWarnAboutModulePatternComponent;\nvar didWarnAboutContextTypeOnFunctionComponent;\nvar didWarnAboutGetDerivedStateOnFunctionComponent;\nvar didWarnAboutFunctionRefs;\nvar didWarnAboutReassigningProps;\nvar didWarnAboutRevealOrder;\nvar didWarnAboutTailOptions;\n\n{\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);\n }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime) {\n // This function is fork of reconcileChildren. It's used in cases where we\n // want to reconcile without matching against the existing set. This has the\n // effect of all current children being unmounted; even if the type and key\n // are the same, the old child is unmounted and a new child is created.\n //\n // To do this, we're going to go through the reconcile algorithm twice. In\n // the first pass, we schedule a deletion for all the current children by\n // passing null.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderExpirationTime); // In the second pass, we mount the new children. The trick here is that we\n // pass null in place of where we usually pass the current child set. This has\n // the effect of remounting all children regardless of whether their\n // identities match.\n\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderExpirationTime) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens after the first render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component), getCurrentFiberStackInDev);\n }\n }\n }\n\n var render = Component.render;\n var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n var nextChildren;\n prepareToReadContext(workInProgress, renderExpirationTime);\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);\n\n if ( workInProgress.mode & StrictMode) {\n // Only double-render components with Hooks\n if (workInProgress.memoizedState !== null) {\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderExpirationTime);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {\n if (current === null) {\n var type = Component.type;\n\n if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n Component.defaultProps === undefined) {\n var resolvedType = type;\n\n {\n resolvedType = resolveFunctionForHotReloading(type);\n } // If this is a plain function component without default props,\n // and with only the default shallow comparison, we upgrade it\n // to a SimpleMemoComponent to allow fast path updates.\n\n\n workInProgress.tag = SimpleMemoComponent;\n workInProgress.type = resolvedType;\n\n {\n validateFunctionComponentInDev(workInProgress, type);\n }\n\n return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateExpirationTime, renderExpirationTime);\n }\n\n {\n var innerPropTypes = type.propTypes;\n\n if (innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(type), getCurrentFiberStackInDev);\n }\n }\n\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n\n {\n var _type = Component.type;\n var _innerPropTypes = _type.propTypes;\n\n if (_innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(_type), getCurrentFiberStackInDev);\n }\n }\n\n var currentChild = current.child; // This is always exactly one child\n\n if (updateExpirationTime < renderExpirationTime) {\n // This will be the props with resolved defaultProps,\n // unlike current.memoizedProps which will be the unresolved ones.\n var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n var compare = Component.compare;\n compare = compare !== null ? compare : shallowEqual;\n\n if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n var newChild = createWorkInProgress(currentChild, nextProps);\n newChild.ref = workInProgress.ref;\n newChild.return = workInProgress;\n workInProgress.child = newChild;\n return newChild;\n}\n\nfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens when the inner render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var outerMemoType = workInProgress.elementType;\n\n if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n // We warn when you define propTypes on lazy()\n // so let's just skip over it to find memo() outer wrapper.\n // Inner props for memo are validated later.\n outerMemoType = refineResolvedLazyComponent(outerMemoType);\n }\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);\n } // Inner propTypes will be validated in the function component path.\n\n }\n }\n\n if (current !== null) {\n var prevProps = current.memoizedProps;\n\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type )) {\n didReceiveUpdate = false;\n\n if (updateExpirationTime < renderExpirationTime) {\n // The pending update priority was cleared at the beginning of\n // beginWork. We're about to bail out, but there might be additional\n // updates at a lower priority. Usually, the priority level of the\n // remaining updates is accumlated during the evaluation of the\n // component (i.e. when processing the update queue). But since since\n // we're bailing out early *without* evaluating the component, we need\n // to account for it here, too. Reset to the value of the current fiber.\n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n // because a MemoComponent fiber does not have hooks or an update queue;\n // rather, it wraps around an inner component, which may or may not\n // contains hooks.\n // TODO: Move the reset at in beginWork out of the common path so that\n // this is no longer necessary.\n workInProgress.expirationTime = current.expirationTime;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime);\n}\n\nfunction updateFragment(current, workInProgress, renderExpirationTime) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderExpirationTime) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderExpirationTime) {\n {\n workInProgress.effectTag |= Update;\n }\n\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n}\n\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n\n if (current === null && ref !== null || current !== null && current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.effectTag |= Ref;\n }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component), getCurrentFiberStackInDev);\n }\n }\n }\n\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n var nextChildren;\n prepareToReadContext(workInProgress, renderExpirationTime);\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);\n\n if ( workInProgress.mode & StrictMode) {\n // Only double-render components with Hooks\n if (workInProgress.memoizedState !== null) {\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderExpirationTime);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component), getCurrentFiberStackInDev);\n }\n }\n } // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderExpirationTime);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n if (current !== null) {\n // A class component without an instance only mounts if it suspended\n // inside a non-concurrent tree, in an inconsistent state. We want to\n // treat it like a new mount, even though an empty version of it already\n // committed. Disconnect the alternate pointers.\n current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.effectTag |= Placement;\n } // In the initial pass we might need to construct the instance.\n\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);\n shouldUpdate = true;\n } else if (current === null) {\n // In a resume, we'll already have an instance we can reuse.\n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderExpirationTime);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);\n\n {\n var inst = workInProgress.stateNode;\n\n if (inst.props !== nextProps) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;\n\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$1.current = workInProgress;\n var nextChildren;\n\n if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n // If we captured an error, but getDerivedStateFromError is not defined,\n // unmount all the children. componentDidCatch will schedule an update to\n // re-render a fallback. This is temporary until we migrate everyone to\n // the new API.\n // TODO: Warn in a future release.\n nextChildren = null;\n\n {\n stopProfilerTimerIfRunning();\n }\n } else {\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if ( workInProgress.mode & StrictMode) {\n instance.render();\n }\n\n setIsRendering(false);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n\n if (current !== null && didCaptureError) {\n // If we're recovering from an error, reconcile without reusing any of\n // the existing children. Conceptually, the normal children and the children\n // that are shown on error are two different sets, so we shouldn't reuse\n // normal children even if their identities match.\n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n\n\n workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, true);\n }\n\n return workInProgress.child;\n}\n\nfunction pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n\n pushHostContainer(workInProgress, root.containerInfo);\n}\n\nfunction updateHostRoot(current, workInProgress, renderExpirationTime) {\n pushHostRootContext(workInProgress);\n var updateQueue = workInProgress.updateQueue;\n\n if (!(current !== null && updateQueue !== null)) {\n {\n throw Error( \"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState !== null ? prevState.element : null;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderExpirationTime);\n var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n var nextChildren = nextState.element;\n\n if (nextChildren === prevChildren) {\n // If the state is the same as before, that's a bailout because we had\n // no work that expires at this time.\n resetHydrationState();\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n\n var root = workInProgress.stateNode;\n\n if (root.hydrate && enterHydrationState(workInProgress)) {\n // If we don't have any current children this might be the first pass.\n // We always try to hydrate. If this isn't a hydration pass there won't\n // be any children to hydrate which is effectively the same thing as\n // not hydrating.\n var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n workInProgress.child = child;\n var node = child;\n\n while (node) {\n // Mark each child as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n node.effectTag = node.effectTag & ~Placement | Hydrating;\n node = node.sibling;\n }\n } else {\n // Otherwise reset hydration state in case we aborted and resumed another\n // root.\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n resetHydrationState();\n }\n\n return workInProgress.child;\n}\n\nfunction updateHostComponent(current, workInProgress, renderExpirationTime) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n var type = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n var prevProps = current !== null ? current.memoizedProps : null;\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also has access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.effectTag |= ContentReset;\n }\n\n markRef(current, workInProgress); // Check the host config to see if the children are offscreen/hidden.\n\n if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(type, nextProps)) {\n {\n markSpawnedWork(Never);\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n workInProgress.expirationTime = workInProgress.childExpirationTime = Never;\n return null;\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n return workInProgress.child;\n}\n\nfunction updateHostText(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n } // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n\n\n return null;\n}\n\nfunction mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {\n if (_current !== null) {\n // A lazy component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.effectTag |= Placement;\n }\n\n var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet.\n // Cancel and resume right after we know the tag.\n\n cancelWorkTimer(workInProgress);\n var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n startWorkTimer(workInProgress);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\n\n switch (resolvedTag) {\n case FunctionComponent:\n {\n {\n validateFunctionComponentInDev(workInProgress, Component);\n workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n }\n\n child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);\n return child;\n }\n\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);\n return child;\n }\n\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);\n return child;\n }\n\n case MemoComponent:\n {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = Component.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n 'prop', getComponentName(Component), getCurrentFiberStackInDev);\n }\n }\n }\n\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n updateExpirationTime, renderExpirationTime);\n return child;\n }\n }\n\n var hint = '';\n\n {\n if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n hint = ' Did you wrap a component in React.lazy() more than once?';\n }\n } // This message intentionally doesn't mention ForwardRef or MemoComponent\n // because the fact that it's a separate type of work is an\n // implementation detail.\n\n\n {\n {\n throw Error( \"Element type is invalid. Received a promise that resolves to: \" + Component + \". Lazy element type must resolve to a class or function.\" + hint );\n }\n }\n}\n\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {\n if (_current !== null) {\n // An incomplete component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.effectTag |= Placement;\n } // Promote the fiber to a class and try rendering again.\n\n\n workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderExpirationTime);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {\n if (_current !== null) {\n // An indeterminate component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.effectTag |= Placement;\n }\n\n var props = workInProgress.pendingProps;\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n prepareToReadContext(workInProgress, renderExpirationTime);\n var value;\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$1.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n } // Proceed under the assumption that this is a class instance\n\n\n workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext = false;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);\n }\n\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderExpirationTime);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n\n {\n\n if ( workInProgress.mode & StrictMode) {\n // Only double-render components with Hooks\n if (workInProgress.memoizedState !== null) {\n value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);\n }\n }\n }\n\n reconcileChildren(null, workInProgress, value, renderExpirationTime);\n\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n\n return workInProgress.child;\n }\n}\n\nfunction validateFunctionComponentInDev(workInProgress, Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = ownerName || workInProgress._debugID || '';\n var debugSource = workInProgress._debugSource;\n\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n }\n\n if (!didWarnAboutFunctionRefs[warningKey]) {\n didWarnAboutFunctionRefs[warningKey] = true;\n\n error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName2 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName2);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName3 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support contextType.', _componentName3);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;\n }\n }\n }\n}\n\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n retryTime: NoWork\n};\n\nfunction shouldRemainOnFallback(suspenseContext, current, workInProgress) {\n // If the context is telling us that we should show a fallback, and we're not\n // already showing content, then we should show the fallback instead.\n return hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && (current === null || current.memoizedState !== null);\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderExpirationTime) {\n var mode = workInProgress.mode;\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.effectTag |= DidCapture;\n }\n }\n\n var suspenseContext = suspenseStackCursor.current;\n var nextDidTimeout = false;\n var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n nextDidTimeout = true;\n workInProgress.effectTag &= ~DidCapture;\n } else {\n // Attempting the main content\n if (current === null || current.memoizedState !== null) {\n // This is a new mount or this boundary is already showing a fallback state.\n // Mark this subtree context as having at least one invisible parent that could\n // handle the fallback state.\n // Boundaries without fallbacks or should be avoided are not considered since\n // they cannot handle preferred fallback states.\n if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {\n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n }\n }\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n pushSuspenseContext(workInProgress, suspenseContext); // This next part is a bit confusing. If the children timeout, we switch to\n // showing the fallback children in place of the \"primary\" children.\n // However, we don't want to delete the primary children because then their\n // state will be lost (both the React state and the host state, e.g.\n // uncontrolled form inputs). Instead we keep them mounted and hide them.\n // Both the fallback children AND the primary children are rendered at the\n // same time. Once the primary children are un-suspended, we can delete\n // the fallback children — don't need to preserve their state.\n //\n // The two sets of children are siblings in the host environment, but\n // semantically, for purposes of reconciliation, they are two separate sets.\n // So we store them using two fragment fibers.\n //\n // However, we want to avoid allocating extra fibers for every placeholder.\n // They're only necessary when the children time out, because that's the\n // only time when both sets are mounted.\n //\n // So, the extra fragment fibers are only used if the children time out.\n // Otherwise, we render the primary children directly. This requires some\n // custom reconciliation logic to preserve the state of the primary\n // children. It's essentially a very basic form of re-parenting.\n\n if (current === null) {\n // If we're currently hydrating, try to hydrate this boundary.\n // But only if this has a fallback.\n if (nextProps.fallback !== undefined) {\n tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n } // This is the initial mount. This branch is pretty simple because there's\n // no previous state that needs to be preserved.\n\n\n if (nextDidTimeout) {\n // Mount separate fragments for primary and fallback children.\n var nextFallbackChildren = nextProps.fallback;\n var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);\n primaryChildFragment.return = workInProgress;\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, we commit the effects from the\n // partially completed, timed-out tree, too.\n var progressedState = workInProgress.memoizedState;\n var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;\n primaryChildFragment.child = progressedPrimaryChild;\n var progressedChild = progressedPrimaryChild;\n\n while (progressedChild !== null) {\n progressedChild.return = primaryChildFragment;\n progressedChild = progressedChild.sibling;\n }\n }\n\n var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n } else {\n // Mount the primary children without an intermediate fragment fiber.\n var nextPrimaryChildren = nextProps.children;\n workInProgress.memoizedState = null;\n return workInProgress.child = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);\n }\n } else {\n // This is an update. This branch is more complicated because we need to\n // ensure the state of the primary children is preserved.\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n // wrapped in a fragment fiber.\n\n\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n\n if (nextDidTimeout) {\n // Still timed out. Reuse the current primary children by cloning\n // its fragment. We're going to skip over these entirely.\n var _nextFallbackChildren2 = nextProps.fallback;\n\n var _primaryChildFragment2 = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps);\n\n _primaryChildFragment2.return = workInProgress;\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, we commit the effects from the\n // partially completed, timed-out tree, too.\n var _progressedState = workInProgress.memoizedState;\n\n var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;\n\n if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {\n _primaryChildFragment2.child = _progressedPrimaryChild;\n var _progressedChild2 = _progressedPrimaryChild;\n\n while (_progressedChild2 !== null) {\n _progressedChild2.return = _primaryChildFragment2;\n _progressedChild2 = _progressedChild2.sibling;\n }\n }\n } // Because primaryChildFragment is a new fiber that we're inserting as the\n // parent of a new tree, we need to set its treeBaseDuration.\n\n\n if ( workInProgress.mode & ProfileMode) {\n // treeBaseDuration is the sum of all the child tree base durations.\n var _treeBaseDuration = 0;\n var _hiddenChild = _primaryChildFragment2.child;\n\n while (_hiddenChild !== null) {\n _treeBaseDuration += _hiddenChild.treeBaseDuration;\n _hiddenChild = _hiddenChild.sibling;\n }\n\n _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;\n } // Clone the fallback child fragment, too. These we'll continue\n // working on.\n\n\n var _fallbackChildFragment2 = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren2);\n\n _fallbackChildFragment2.return = workInProgress;\n _primaryChildFragment2.sibling = _fallbackChildFragment2;\n _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n workInProgress.child = _primaryChildFragment2;\n return _fallbackChildFragment2;\n } else {\n // No longer suspended. Switch back to showing the primary children,\n // and remove the intermediate fragment fiber.\n var _nextPrimaryChildren = nextProps.children;\n var currentPrimaryChild = currentPrimaryChildFragment.child;\n var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime); // If this render doesn't suspend, we need to delete the fallback\n // children. Wait until the complete phase, after we've confirmed the\n // fallback is no longer needed.\n // TODO: Would it be better to store the fallback fragment on\n // the stateNode?\n // Continue rendering the children, like we normally do.\n\n workInProgress.memoizedState = null;\n return workInProgress.child = primaryChild;\n }\n } else {\n // The current tree has not already timed out. That means the primary\n // children are not wrapped in a fragment fiber.\n var _currentPrimaryChild = current.child;\n\n if (nextDidTimeout) {\n // Timed out. Wrap the children in a fragment fiber to keep them\n // separate from the fallback children.\n var _nextFallbackChildren3 = nextProps.fallback;\n\n var _primaryChildFragment3 = createFiberFromFragment( // It shouldn't matter what the pending props are because we aren't\n // going to render this fragment.\n null, mode, NoWork, null);\n\n _primaryChildFragment3.return = workInProgress;\n _primaryChildFragment3.child = _currentPrimaryChild;\n\n if (_currentPrimaryChild !== null) {\n _currentPrimaryChild.return = _primaryChildFragment3;\n } // Even though we're creating a new fiber, there are no new children,\n // because we're reusing an already mounted tree. So we don't need to\n // schedule a placement.\n // primaryChildFragment.effectTag |= Placement;\n\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, we commit the effects from the\n // partially completed, timed-out tree, too.\n var _progressedState2 = workInProgress.memoizedState;\n\n var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;\n\n _primaryChildFragment3.child = _progressedPrimaryChild2;\n var _progressedChild3 = _progressedPrimaryChild2;\n\n while (_progressedChild3 !== null) {\n _progressedChild3.return = _primaryChildFragment3;\n _progressedChild3 = _progressedChild3.sibling;\n }\n } // Because primaryChildFragment is a new fiber that we're inserting as the\n // parent of a new tree, we need to set its treeBaseDuration.\n\n\n if ( workInProgress.mode & ProfileMode) {\n // treeBaseDuration is the sum of all the child tree base durations.\n var _treeBaseDuration2 = 0;\n var _hiddenChild2 = _primaryChildFragment3.child;\n\n while (_hiddenChild2 !== null) {\n _treeBaseDuration2 += _hiddenChild2.treeBaseDuration;\n _hiddenChild2 = _hiddenChild2.sibling;\n }\n\n _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2;\n } // Create a fragment from the fallback children, too.\n\n\n var _fallbackChildFragment3 = createFiberFromFragment(_nextFallbackChildren3, mode, renderExpirationTime, null);\n\n _fallbackChildFragment3.return = workInProgress;\n _primaryChildFragment3.sibling = _fallbackChildFragment3;\n _fallbackChildFragment3.effectTag |= Placement;\n _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n workInProgress.child = _primaryChildFragment3;\n return _fallbackChildFragment3;\n } else {\n // Still haven't timed out. Continue rendering the children, like we\n // normally do.\n workInProgress.memoizedState = null;\n var _nextPrimaryChildren2 = nextProps.children;\n return workInProgress.child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);\n }\n }\n }\n}\n\nfunction scheduleWorkOnFiber(fiber, renderExpirationTime) {\n if (fiber.expirationTime < renderExpirationTime) {\n fiber.expirationTime = renderExpirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < renderExpirationTime) {\n alternate.expirationTime = renderExpirationTime;\n }\n\n scheduleWorkOnParentPath(fiber.return, renderExpirationTime);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) {\n // Mark any Suspense boundaries with fallbacks as having work to do.\n // If they were previously forced into fallbacks, they may now be able\n // to unblock.\n var node = firstChild;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n scheduleWorkOnFiber(node, renderExpirationTime);\n }\n } else if (node.tag === SuspenseListComponent) {\n // If the tail is hidden there might not be an Suspense boundaries\n // to schedule work on. In this case we have to schedule it on the\n // list itself.\n // We don't have to traverse to the children of the list since\n // the list will propagate the change when it rerenders.\n scheduleWorkOnFiber(node, renderExpirationTime);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction findLastContentRow(firstChild) {\n // This is going to find the last row among these children that is already\n // showing content on the screen, as opposed to being in fallback state or\n // new. If a row has multiple Suspense boundaries, any of them being in the\n // fallback state, counts as the whole row being in a fallback state.\n // Note that the \"rows\" will be workInProgress, but any nested children\n // will still be current since we haven't rendered them yet. The mounted\n // order may not be the same as the new order. We use the new order.\n var row = firstChild;\n var lastContentRow = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n lastContentRow = row;\n }\n\n row = row.sibling;\n }\n\n return lastContentRow;\n}\n\nfunction validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\n\n if (typeof revealOrder === 'string') {\n switch (revealOrder.toLowerCase()) {\n case 'together':\n case 'forwards':\n case 'backwards':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n case 'forward':\n case 'backward':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n default:\n error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n\n break;\n }\n } else {\n error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n }\n }\n }\n}\n\nfunction validateTailOptions(tailMode, revealOrder) {\n {\n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n }\n }\n }\n}\n\nfunction validateSuspenseListNestedChild(childSlot, index) {\n {\n var isArray = Array.isArray(childSlot);\n var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isArray || isIterable) {\n var type = isArray ? 'array' : 'iterable';\n\n error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n\n return false;\n }\n }\n\n return true;\n}\n\nfunction validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n if (!validateSuspenseListNestedChild(children[i], i)) {\n return;\n }\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\n }\n\n _i++;\n }\n }\n } else {\n error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n }\n }\n }\n }\n}\n\nfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailExpiration: 0,\n tailMode: tailMode,\n lastEffect: lastEffectBeforeRendering\n };\n } else {\n // We can reuse the existing object from previous renders.\n renderState.isBackwards = isBackwards;\n renderState.rendering = null;\n renderState.renderingStartTime = 0;\n renderState.last = lastContentRow;\n renderState.tail = tail;\n renderState.tailExpiration = 0;\n renderState.tailMode = tailMode;\n renderState.lastEffect = lastEffectBeforeRendering;\n }\n} // This can end up rendering this component multiple passes.\n// The first pass splits the children fibers into two sets. A head and tail.\n// We first render the head. If anything is in fallback state, we do another\n// pass through beginWork to rerender all children (including the tail) with\n// the force suspend context. If the first render didn't have anything in\n// in fallback state. Then we render each row in the tail one-by-one.\n// That happens in the completeWork phase without going back to beginWork.\n\n\nfunction updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.effectTag |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // Outside of blocking mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}\n\nfunction updatePortalComponent(current, workInProgress, renderExpirationTime) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);\n }\n\n return workInProgress.child;\n}\n\nfunction updateContextProvider(current, workInProgress, renderExpirationTime) {\n var providerType = workInProgress.type;\n var context = providerType._context;\n var newProps = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps;\n var newValue = newProps.value;\n\n {\n var providerPropTypes = workInProgress.type.propTypes;\n\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);\n }\n }\n\n pushProvider(workInProgress, newValue);\n\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n var changedBits = calculateChangedBits(context, newValue, oldValue);\n\n if (changedBits === 0) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingContextAsConsumer = false;\n\nfunction updateContextConsumer(current, workInProgress, renderExpirationTime) {\n var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n\n var newProps = workInProgress.pendingProps;\n var render = newProps.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n prepareToReadContext(workInProgress, renderExpirationTime);\n var newValue = readContext(context, newProps.unstable_observedBits);\n var newChildren;\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n\n workInProgress.effectTag |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);\n return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime) {\n cancelWorkTimer(workInProgress);\n\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n\n var updateExpirationTime = workInProgress.expirationTime;\n\n if (updateExpirationTime !== NoWork) {\n markUnprocessedUpdateTime(updateExpirationTime);\n } // Check if the children have any pending work.\n\n\n var childExpirationTime = workInProgress.childExpirationTime;\n\n if (childExpirationTime < renderExpirationTime) {\n // The children don't have any work either. We can skip them.\n // TODO: Once we add back resuming, we should check if the children are\n // a work-in-progress set. If so, we need to transfer their effects.\n return null;\n } else {\n // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n }\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\n\n\n current.alternate = null;\n oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n newWorkInProgress.index = oldWorkInProgress.index;\n newWorkInProgress.sibling = oldWorkInProgress.sibling;\n newWorkInProgress.return = oldWorkInProgress.return;\n newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n if (oldWorkInProgress === returnFiber.child) {\n returnFiber.child = newWorkInProgress;\n } else {\n var prevSibling = returnFiber.child;\n\n if (prevSibling === null) {\n throw new Error('Expected parent to have a child.');\n }\n\n while (prevSibling.sibling !== oldWorkInProgress) {\n prevSibling = prevSibling.sibling;\n\n if (prevSibling === null) {\n throw new Error('Expected to find the previous sibling.');\n }\n }\n\n prevSibling.sibling = newWorkInProgress;\n } // Delete the old fiber and place the new one.\n // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = current;\n returnFiber.lastEffect = current;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = current;\n }\n\n current.nextEffect = null;\n current.effectTag = Deletion;\n newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n}\n\nfunction beginWork(current, workInProgress, renderExpirationTime) {\n var updateExpirationTime = workInProgress.expirationTime;\n\n {\n if (workInProgress._debugNeedsRemount && current !== null) {\n // This will restart the begin phase with a new fiber.\n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.expirationTime));\n }\n }\n\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n\n if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:\n workInProgress.type !== current.type )) {\n // If props or context changed, mark the fiber as having performed work.\n // This may be unset if the props are determined to be equal later (memo).\n didReceiveUpdate = true;\n } else if (updateExpirationTime < renderExpirationTime) {\n didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering\n // the begin phase. There's still some bookkeeping we that needs to be done\n // in this optimized path, mostly pushing stuff onto the stack.\n\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n resetHydrationState();\n break;\n\n case HostComponent:\n pushHostContext(workInProgress);\n\n if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(workInProgress.type, newProps)) {\n {\n markSpawnedWork(Never);\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n workInProgress.expirationTime = workInProgress.childExpirationTime = Never;\n return null;\n }\n\n break;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n\n break;\n }\n\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n pushProvider(workInProgress, newValue);\n break;\n }\n\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;\n\n if (hasChildWork) {\n workInProgress.effectTag |= Update;\n }\n }\n\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n // whether to retry the primary children, or to skip over it and\n // go straight to the fallback. Check the priority of the primary\n // child fragment.\n\n\n var primaryChildFragment = workInProgress.child;\n var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;\n\n if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {\n // The primary children have pending work. Use the normal path\n // to attempt to render the primary children again.\n return updateSuspenseComponent(current, workInProgress, renderExpirationTime);\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient\n // priority. Bailout.\n\n var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n\n if (child !== null) {\n // The fallback children have pending work. Skip over the\n // primary children and work on the fallback.\n return child.sibling;\n } else {\n return null;\n }\n }\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n }\n\n break;\n }\n\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.effectTag & DidCapture) !== NoEffect;\n\n var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;\n\n if (didSuspendBefore) {\n if (_hasChildWork) {\n // If something was in fallback state last time, and we have all the\n // same children then we're still in progressive loading state.\n // Something might get unblocked by state updates or retries in the\n // tree which will affect the tail. So we need to use the normal\n // path to compute the correct tail.\n return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);\n } // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n\n\n workInProgress.effectTag |= DidCapture;\n } // If nothing suspended before and we're rendering the same children,\n // then the tail doesn't matter. Anything new that suspends will work\n // in the \"together\" mode, so we can continue from the state we had.\n\n\n var renderState = workInProgress.memoizedState;\n\n if (renderState !== null) {\n // Reset to the \"together\" mode in case we've started a different\n // update in the past but didn't complete it.\n renderState.rendering = null;\n renderState.tail = null;\n }\n\n pushSuspenseContext(workInProgress, suspenseStackCursor.current);\n\n if (_hasChildWork) {\n break;\n } else {\n // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n return null;\n }\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);\n } else {\n // An update was scheduled on this fiber, but there are no new props\n // nor legacy context. Set this to false. If an update queue or context\n // consumer produces a changed value, it will set this to true. Otherwise,\n // the component will assume the children have not changed and bail out.\n didReceiveUpdate = false;\n }\n } else {\n didReceiveUpdate = false;\n } // Before entering the begin phase, clear pending update priority.\n // TODO: This assumes that we're about to evaluate the component and process\n // the update queue. However, there's an exception: SimpleMemoComponent\n // sometimes bails out later in the begin phase. This indicates that we should\n // move this assignment out of the common path and into each branch.\n\n\n workInProgress.expirationTime = NoWork;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderExpirationTime);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, updateExpirationTime, renderExpirationTime);\n }\n\n case FunctionComponent:\n {\n var _Component = workInProgress.type;\n var unresolvedProps = workInProgress.pendingProps;\n var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);\n return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderExpirationTime);\n }\n\n case ClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderExpirationTime);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderExpirationTime);\n\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderExpirationTime);\n\n case HostText:\n return updateHostText(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderExpirationTime);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderExpirationTime);\n\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderExpirationTime);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderExpirationTime);\n\n case Mode:\n return updateMode(current, workInProgress, renderExpirationTime);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderExpirationTime);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderExpirationTime);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderExpirationTime);\n\n case MemoComponent:\n {\n var _type2 = workInProgress.type;\n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = _type2.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n 'prop', getComponentName(_type2), getCurrentFiberStackInDev);\n }\n }\n }\n\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);\n }\n\n case IncompleteClassComponent:\n {\n var _Component3 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);\n }\n }\n\n {\n {\n throw Error( \"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.effectTag |= Update;\n}\n\nfunction markRef$1(workInProgress) {\n workInProgress.effectTag |= Ref;\n}\n\nvar appendAllChildren;\nvar updateHostContainer;\nvar updateHostComponent$1;\nvar updateHostText$1;\n\n{\n // Mutation mode\n appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n };\n\n updateHostContainer = function (workInProgress) {// Noop\n };\n\n updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n\n if (oldProps === newProps) {\n // In mutation mode, this is sufficient for a bailout because\n // we won't touch this node even if children changed.\n return;\n } // If we get updated because one of our children updated, we don't\n // have newProps so we'll have to reuse them.\n // TODO: Split the update API as separate for the props vs. children.\n // Even better would be if children weren't special cased at all tho.\n\n\n var instance = workInProgress.stateNode;\n var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host\n // component is hitting the resume path. Figure out why. Possibly\n // related to `hidden`.\n\n var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.\n\n workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update. All the work is done in commitWork.\n\n if (updatePayload) {\n markUpdate(workInProgress);\n }\n };\n\n updateHostText$1 = function (current, workInProgress, oldText, newText) {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n };\n}\n\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n switch (renderState.tailMode) {\n case 'hidden':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var tailNode = renderState.tail;\n var lastTailNode = null;\n\n while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (lastTailNode === null) {\n // All remaining items in the tail are insertions.\n renderState.tail = null;\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n lastTailNode.sibling = null;\n }\n\n break;\n }\n\n case 'collapsed':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var _tailNode = renderState.tail;\n var _lastTailNode = null;\n\n while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (_lastTailNode === null) {\n // All remaining items in the tail are insertions.\n if (!hasRenderedATailFallback && renderState.tail !== null) {\n // We suspended during the head. We want to show at least one\n // row at the tail. So we'll keep on and cut off the rest.\n renderState.tail.sibling = null;\n } else {\n renderState.tail = null;\n }\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n _lastTailNode.sibling = null;\n }\n\n break;\n }\n }\n}\n\nfunction completeWork(current, workInProgress, renderExpirationTime) {\n var newProps = workInProgress.pendingProps;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case LazyComponent:\n case SimpleMemoComponent:\n case FunctionComponent:\n case ForwardRef:\n case Fragment:\n case Mode:\n case Profiler:\n case ContextConsumer:\n case MemoComponent:\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n var fiberRoot = workInProgress.stateNode;\n\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n var wasHydrated = popHydrationState(workInProgress);\n\n if (wasHydrated) {\n // If we hydrated, then we'll need to schedule an update for\n // the commit side-effects on the root.\n markUpdate(workInProgress);\n }\n }\n\n updateHostContainer(workInProgress);\n return null;\n }\n\n case HostComponent:\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var type = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);\n\n if (current.ref !== workInProgress.ref) {\n markRef$1(workInProgress);\n }\n } else {\n if (!newProps) {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error( \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // This can happen when we abort work.\n\n\n return null;\n }\n\n var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on whether we want to add them top->down or\n // bottom->up. Top->down is faster in IE11.\n\n var _wasHydrated = popHydrationState(workInProgress);\n\n if (_wasHydrated) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {\n // If changes to the hydrated node need to be applied at the\n // commit-phase we mark this as such.\n markUpdate(workInProgress);\n }\n } else {\n var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);\n appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners\n\n workInProgress.stateNode = instance;\n // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n\n\n if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {\n markUpdate(workInProgress);\n }\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef$1(workInProgress);\n }\n }\n\n return null;\n }\n\n case HostText:\n {\n var newText = newProps;\n\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n\n updateHostText$1(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error( \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // This can happen when we abort work.\n\n }\n\n var _rootContainerInstance = getRootHostContainer();\n\n var _currentHostContext = getHostContext();\n\n var _wasHydrated2 = popHydrationState(workInProgress);\n\n if (_wasHydrated2) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n }\n }\n\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var nextState = workInProgress.memoizedState;\n\n if ((workInProgress.effectTag & DidCapture) !== NoEffect) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list.\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = false;\n\n if (current === null) {\n if (workInProgress.memoizedProps.fallback !== undefined) {\n popHydrationState(workInProgress);\n }\n } else {\n var prevState = current.memoizedState;\n prevDidTimeout = prevState !== null;\n\n if (!nextDidTimeout && prevState !== null) {\n // We just switched from the fallback to the normal children.\n // Delete the fallback.\n // TODO: Would it be better to store the fallback fragment on\n // the stateNode during the begin phase?\n var currentFallbackChild = current.child.sibling;\n\n if (currentFallbackChild !== null) {\n // Deletions go at the beginning of the return fiber's effect list\n var first = workInProgress.firstEffect;\n\n if (first !== null) {\n workInProgress.firstEffect = currentFallbackChild;\n currentFallbackChild.nextEffect = first;\n } else {\n workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;\n currentFallbackChild.nextEffect = null;\n }\n\n currentFallbackChild.effectTag = Deletion;\n }\n }\n }\n\n if (nextDidTimeout && !prevDidTimeout) {\n // If this subtreee is running in blocking mode we can suspend,\n // otherwise we won't suspend.\n // TODO: This will still suspend a synchronous tree if anything\n // in the concurrent tree already suspended during this render.\n // This is a known bug.\n if ((workInProgress.mode & BlockingMode) !== NoMode) {\n // TODO: Move this back to throwException because this is too late\n // if this is a large tree which is common for initial loads. We\n // don't know if we should restart a render or not until we get\n // this marker, and this is too late.\n // If this render already had a ping or lower pri updates,\n // and this is the first time we know we're going to suspend we\n // should be able to immediately restart from within throwException.\n var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;\n\n if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {\n // If this was in an invisible tree or a new render, then showing\n // this boundary is ok.\n renderDidSuspend();\n } else {\n // Otherwise, we're going to have to hide content so we should\n // suspend for longer if possible.\n renderDidSuspendDelayIfPossible();\n }\n }\n }\n\n {\n // TODO: Only schedule updates if these values are non equal, i.e. it changed.\n if (nextDidTimeout || prevDidTimeout) {\n // If this boundary just timed out, schedule an effect to attach a\n // retry listener to the promise. This flag is also used to hide the\n // primary children. In mutation mode, we also need the flag to\n // *unhide* children that were previously hidden, so check if this\n // is currently timed out, too.\n workInProgress.effectTag |= Update;\n }\n }\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n popProvider(workInProgress);\n return null;\n\n case IncompleteClassComponent:\n {\n // Same as class component case. I put it down here so that the tags are\n // sequential to ensure this switch is compiled to a jump table.\n var _Component = workInProgress.type;\n\n if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n return null;\n }\n\n var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;\n var renderedTail = renderState.rendering;\n\n if (renderedTail === null) {\n // We just rendered the head.\n if (!didSuspendAlready) {\n // This is the first pass. We need to figure out if anything is still\n // suspended in the rendered set.\n // If new content unsuspended, but there's still some content that\n // didn't. Then we need to do a second pass that forces everything\n // to keep showing their fallbacks.\n // We might be suspended if something in this render pass suspended, or\n // something in the previous committed pass suspended. Otherwise,\n // there's no chance so we can skip the expensive call to\n // findFirstSuspended.\n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);\n\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.effectTag |= DidCapture;\n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n // part of the second pass. In that case nothing will subscribe to\n // its thennables. Instead, we'll transfer its thennables to the\n // SuspenseList so that it can retry if they resolve.\n // There might be multiple of these in the list but since we're\n // going to wait for all of them anyway, it doesn't really matter\n // which ones gets to ping. In theory we could get clever and keep\n // track of how many dependencies remain but it gets tricky because\n // in the meantime, we can add/remove/change items and dependencies.\n // We might bail out of the loop before finding any but that\n // doesn't matter since that means that the other boundaries that\n // we did find already has their listeners attached.\n\n var newThennables = suspended.updateQueue;\n\n if (newThennables !== null) {\n workInProgress.updateQueue = newThennables;\n workInProgress.effectTag |= Update;\n } // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect list before doing the second pass since that's now invalid.\n\n\n if (renderState.lastEffect === null) {\n workInProgress.firstEffect = null;\n }\n\n workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.\n\n resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately\n // rerender the children.\n\n pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n\n if (_suspended !== null) {\n workInProgress.effectTag |= DidCapture;\n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n // get lost if this row ends up dropped during a second pass.\n\n var _newThennables = _suspended.updateQueue;\n\n if (_newThennables !== null) {\n workInProgress.updateQueue = _newThennables;\n workInProgress.effectTag |= Update;\n }\n\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {\n // We need to delete the row we just rendered.\n // Reset the effect list to what it was before we rendered this\n // child. The nested children have already appended themselves.\n var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.\n\n if (lastEffect !== null) {\n lastEffect.nextEffect = null;\n } // We're done.\n\n\n return null;\n }\n } else if ( // The time it took to render last row is greater than time until\n // the expiration.\n now() * 2 - renderState.renderingStartTime > renderState.tailExpiration && renderExpirationTime > Never) {\n // We have now passed our CPU deadline and we'll just give up further\n // attempts to render the main content and only render fallbacks.\n // The assumption is that this is usually faster.\n workInProgress.effectTag |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. If we can show\n // them, then they really have the same priority as this render.\n // So we'll pick it back up the very next render pass once we've had\n // an opportunity to yield for paint.\n\n var nextPriority = renderExpirationTime - 1;\n workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;\n\n {\n markSpawnedWork(nextPriority);\n }\n }\n }\n\n if (renderState.isBackwards) {\n // The effect list of the backwards tail will have been added\n // to the end. This breaks the guarantee that life-cycles fire in\n // sibling order but that isn't a strong guarantee promised by React.\n // Especially since these might also just pop in during future commits.\n // Append to the beginning of the list.\n renderedTail.sibling = workInProgress.child;\n workInProgress.child = renderedTail;\n } else {\n var previousSibling = renderState.last;\n\n if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n\n renderState.last = renderedTail;\n }\n }\n\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n if (renderState.tailExpiration === 0) {\n // Heuristic for how long we're willing to spend rendering rows\n // until we just give up and show what we have so far.\n var TAIL_EXPIRATION_TIMEOUT_MS = 500;\n renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; // TODO: This is meant to mimic the train model or JND but this\n // is a per component value. It should really be since the start\n // of the total render or last commit. Consider using something like\n // globalMostRecentFallbackTime. That doesn't account for being\n // suspended for part of the time or when it's a new render.\n // It should probably use a global start time value instead.\n } // Pop a row.\n\n\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\n renderState.lastEffect = workInProgress.lastEffect;\n renderState.renderingStartTime = now();\n next.sibling = null; // Restore the context.\n // TODO: We can probably just avoid popping it instead and only\n // setting it the first time we go from not suspended to suspended.\n\n var suspenseContext = suspenseStackCursor.current;\n\n if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n\n return next;\n }\n\n return null;\n }\n }\n\n {\n {\n throw Error( \"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction unwindWork(workInProgress, renderExpirationTime) {\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n var effectTag = workInProgress.effectTag;\n\n if (effectTag & ShouldCapture) {\n workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n var _effectTag = workInProgress.effectTag;\n\n if (!((_effectTag & DidCapture) === NoEffect)) {\n {\n throw Error( \"The root failed to unmount after an error. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;\n return workInProgress;\n }\n\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n\n var _effectTag2 = workInProgress.effectTag;\n\n if (_effectTag2 & ShouldCapture) {\n workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n return workInProgress;\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n // caught by a nested boundary. If not, it should bubble through.\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n popProvider(workInProgress);\n return null;\n\n default:\n return null;\n }\n}\n\nfunction unwindInterruptedWork(interruptedWork) {\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n\n break;\n }\n\n case HostRoot:\n {\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n break;\n }\n\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n\n case SuspenseComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case SuspenseListComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case ContextProvider:\n popProvider(interruptedWork);\n break;\n }\n}\n\nfunction createCapturedValue(value, source) {\n // If the value is an error, call this function immediately after it is thrown\n // so the stack is accurate.\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n}\n\nfunction logCapturedError(capturedError) {\n\n var error = capturedError.error;\n\n {\n var componentName = capturedError.componentName,\n componentStack = capturedError.componentStack,\n errorBoundaryName = capturedError.errorBoundaryName,\n errorBoundaryFound = capturedError.errorBoundaryFound,\n willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling\n // `preventDefault()` in window `error` handler.\n // We record this information as an expando on the error.\n\n if (error != null && error._suppressLogging) {\n if (errorBoundaryFound && willRetry) {\n // The error is recoverable and was silenced.\n // Ignore it and don't print the stack addendum.\n // This is handy for testing error boundaries without noise.\n return;\n } // The error is fatal. Since the silencing might have\n // been accidental, we'll surface it anyway.\n // However, the browser would have silenced the original error\n // so we'll print it first, and then print the stack addendum.\n\n\n console['error'](error); // Don't transform to our wrapper\n // For a more detailed description of this block, see:\n // https://github.com/facebook/react/pull/13384\n }\n\n var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.\n\n if (errorBoundaryFound && errorBoundaryName) {\n if (willRetry) {\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n } else {\n errorBoundaryMessage = \"This error was initially handled by the error boundary \" + errorBoundaryName + \".\\n\" + \"Recreating the tree from scratch failed so React will unmount the tree.\";\n }\n } else {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';\n }\n\n var combinedMessage = \"\" + componentNameMessage + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n // We don't include the original error message and JS stack because the browser\n // has already printed it. Even if the application swallows the error, it is still\n // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n console['error'](combinedMessage); // Don't transform to our wrapper\n }\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n}\n\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\nfunction logError(boundary, errorInfo) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n\n if (stack === null && source !== null) {\n stack = getStackByFiberInDevAndProd(source);\n }\n\n var capturedError = {\n componentName: source !== null ? getComponentName(source.type) : null,\n componentStack: stack !== null ? stack : '',\n error: errorInfo.value,\n errorBoundary: null,\n errorBoundaryName: null,\n errorBoundaryFound: false,\n willRetry: false\n };\n\n if (boundary !== null && boundary.tag === ClassComponent) {\n capturedError.errorBoundary = boundary.stateNode;\n capturedError.errorBoundaryName = getComponentName(boundary.type);\n capturedError.errorBoundaryFound = true;\n capturedError.willRetry = true;\n }\n\n try {\n logCapturedError(capturedError);\n } catch (e) {\n // This method must not throw, or React internal state will get messed up.\n // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n // we want to report this error outside of the normal stack as a last resort.\n // https://github.com/facebook/react/issues/13188\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nvar callComponentWillUnmountWithTimer = function (current, instance) {\n startPhaseTimer(current, 'componentWillUnmount');\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n instance.componentWillUnmount();\n stopPhaseTimer();\n}; // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current, unmountError);\n }\n }\n}\n\nfunction safelyDetachRef(current) {\n var ref = current.ref;\n\n if (ref !== null) {\n if (typeof ref === 'function') {\n {\n invokeGuardedCallback(null, ref, null, null);\n\n if (hasCaughtError()) {\n var refError = clearCaughtError();\n captureCommitPhaseError(current, refError);\n }\n }\n } else {\n ref.current = null;\n }\n }\n}\n\nfunction safelyCallDestroy(current, destroy) {\n {\n invokeGuardedCallback(null, destroy, null);\n\n if (hasCaughtError()) {\n var error = clearCaughtError();\n captureCommitPhaseError(current, error);\n }\n }\n}\n\nfunction commitBeforeMutationLifeCycles(current, finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n return;\n }\n\n case ClassComponent:\n {\n if (finishedWork.effectTag & Snapshot) {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');\n var instance = finishedWork.stateNode; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n\n var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n\n {\n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n didWarnSet.add(finishedWork.type);\n\n error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));\n }\n }\n\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n stopPhaseTimer();\n }\n }\n\n return;\n }\n\n case HostRoot:\n case HostComponent:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n return;\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction commitHookEffectListUnmount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Unmount\n var destroy = effect.destroy;\n effect.destroy = undefined;\n\n if (destroy !== undefined) {\n destroy();\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitHookEffectListMount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Mount\n var create = effect.create;\n effect.destroy = create();\n\n {\n var destroy = effect.destroy;\n\n if (destroy !== undefined && typeof destroy !== 'function') {\n var addendum = void 0;\n\n if (destroy === null) {\n addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n } else if (typeof destroy.then === 'function') {\n addendum = '\\n\\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + 'useEffect(() => {\\n' + ' async function fetchData() {\\n' + ' // You can await here\\n' + ' const response = await MyAPI.getData(someId);\\n' + ' // ...\\n' + ' }\\n' + ' fetchData();\\n' + \"}, [someId]); // Or [] if effect doesn't need props or state\\n\\n\" + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitPassiveHookEffects(finishedWork) {\n if ((finishedWork.effectTag & Passive) !== NoEffect) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n // TODO (#17945) We should call all passive destroy functions (for all fibers)\n // before calling any create functions. The current approach only serializes\n // these for a single fiber.\n commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork);\n commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n break;\n }\n }\n }\n}\n\nfunction commitLifeCycles(finishedRoot, current, finishedWork, committedExpirationTime) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n // At this point layout effects have already been destroyed (during mutation phase).\n // This is done to prevent sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n\n return;\n }\n\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (finishedWork.effectTag & Update) {\n if (current === null) {\n startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n\n instance.componentDidMount();\n stopPhaseTimer();\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState;\n startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n stopPhaseTimer();\n }\n }\n\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n } // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n\n commitUpdateQueue(finishedWork, updateQueue, instance);\n }\n\n return;\n }\n\n case HostRoot:\n {\n var _updateQueue = finishedWork.updateQueue;\n\n if (_updateQueue !== null) {\n var _instance = null;\n\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostComponent:\n _instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n\n case ClassComponent:\n _instance = finishedWork.child.stateNode;\n break;\n }\n }\n\n commitUpdateQueue(finishedWork, _updateQueue, _instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (current === null && finishedWork.effectTag & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props);\n }\n\n return;\n }\n\n case HostText:\n {\n // We have no life-cycles associated with text.\n return;\n }\n\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n return;\n }\n\n case Profiler:\n {\n {\n var onRender = finishedWork.memoizedProps.onRender;\n\n if (typeof onRender === 'function') {\n {\n onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);\n }\n }\n }\n\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n case IncompleteClassComponent:\n case FundamentalComponent:\n case ScopeComponent:\n return;\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n {\n // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n\n while (true) {\n if (node.tag === HostComponent) {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } else if (node.tag === HostText) {\n var _instance3 = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance3);\n } else {\n unhideTextInstance(_instance3, node.memoizedProps);\n }\n } else if (node.tag === SuspenseComponent && node.memoizedState !== null && node.memoizedState.dehydrated === null) {\n // Found a nested Suspense component that timed out. Skip over the\n // primary child fragment, which should remain hidden.\n var fallbackChildFragment = node.child.sibling;\n fallbackChildFragment.return = node;\n node = fallbackChildFragment;\n continue;\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === finishedWork) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n}\n\nfunction commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n\n switch (finishedWork.tag) {\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n if (typeof ref === 'function') {\n ref(instanceToUse);\n } else {\n {\n if (!ref.hasOwnProperty('current')) {\n error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));\n }\n }\n\n ref.current = instanceToUse;\n }\n }\n}\n\nfunction commitDetachRef(current) {\n var currentRef = current.ref;\n\n if (currentRef !== null) {\n if (typeof currentRef === 'function') {\n currentRef(null);\n } else {\n currentRef.current = null;\n }\n }\n} // User-originating errors (lifecycles and refs) should not interrupt\n// deletion, so don't let them throw. Host-originating errors should\n// interrupt deletion, so it's okay\n\n\nfunction commitUnmount(finishedRoot, current, renderPriorityLevel) {\n onCommitUnmount(current);\n\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n var updateQueue = current.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n\n {\n // When the owner fiber is deleted, the destroy function of a passive\n // effect hook is called during the synchronous commit phase. This is\n // a concession to implementation complexity. Calling it in the\n // passive effect phase (like they usually are, when dependencies\n // change during an update) would require either traversing the\n // children of the deleted fiber again, or including unmount effects\n // as part of the fiber effect list.\n //\n // Because this is during the sync commit phase, we need to change\n // the priority.\n //\n // TODO: Reconsider this implementation trade off.\n var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;\n runWithPriority$1(priorityLevel, function () {\n var effect = firstEffect;\n\n do {\n var _destroy = effect.destroy;\n\n if (_destroy !== undefined) {\n safelyCallDestroy(current, _destroy);\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n });\n }\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n safelyDetachRef(current);\n var instance = current.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(current, instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n\n safelyDetachRef(current);\n return;\n }\n\n case HostPortal:\n {\n // TODO: this is recursive.\n // We are also not using this parent because\n // the portal will get pushed immediately.\n {\n unmountHostComponents(finishedRoot, current, renderPriorityLevel);\n }\n\n return;\n }\n\n case FundamentalComponent:\n {\n\n return;\n }\n\n case DehydratedFragment:\n {\n\n return;\n }\n\n case ScopeComponent:\n {\n\n return;\n }\n }\n}\n\nfunction commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {\n // While we're inside a removed host node we don't want to call\n // removeChild on the inner nodes because they're removed by the top\n // call anyway. We also want to call componentWillUnmount on all\n // composites before this host node is removed from the tree. Therefore\n // we do an inner loop while we're still inside the host node.\n var node = root;\n\n while (true) {\n commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes.\n // Skip portals because commitUnmount() currently visits them recursively.\n\n if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.\n // If we don't use mutation we drill down into portals here instead.\n node.tag !== HostPortal)) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === root) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === root) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction detachFiber(current) {\n var alternate = current.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we\n // should clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child. This child\n // itself will be GC:ed when the parent updates the next time.\n\n current.return = null;\n current.child = null;\n current.memoizedState = null;\n current.updateQueue = null;\n current.dependencies = null;\n current.alternate = null;\n current.firstEffect = null;\n current.lastEffect = null;\n current.pendingProps = null;\n current.memoizedProps = null;\n current.stateNode = null;\n\n if (alternate !== null) {\n detachFiber(alternate);\n }\n}\n\nfunction getHostParentFiber(fiber) {\n var parent = fiber.return;\n\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n\n parent = parent.return;\n }\n\n {\n {\n throw Error( \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n}\n\nfunction getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n // TODO: Find a more efficient way to do this.\n var node = fiber;\n\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node.return === null || isHostParent(node.return)) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n\n while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.effectTag & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n } // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n\n\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child.return = node;\n node = node.child;\n }\n } // Check if this host node is stable or about to be placed.\n\n\n if (!(node.effectTag & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n}\n\nfunction commitPlacement(finishedWork) {\n\n\n var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n var parent;\n var isContainer;\n var parentStateNode = parentFiber.stateNode;\n\n switch (parentFiber.tag) {\n case HostComponent:\n parent = parentStateNode;\n isContainer = false;\n break;\n\n case HostRoot:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case HostPortal:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case FundamentalComponent:\n\n // eslint-disable-next-line-no-fallthrough\n\n default:\n {\n {\n throw Error( \"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n }\n\n if (parentFiber.effectTag & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(parent); // Clear ContentReset from the effect tag\n\n parentFiber.effectTag &= ~ContentReset;\n }\n\n var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n if (isContainer) {\n insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);\n } else {\n insertOrAppendPlacementNode(finishedWork, before, parent);\n }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI ) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertInContainerBefore(parent, stateNode, before);\n } else {\n appendChildToContainer(parent, stateNode);\n }\n } else if (tag === HostPortal) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI ) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertBefore(parent, stateNode, before);\n } else {\n appendChild(parent, stateNode);\n }\n } else if (tag === HostPortal) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction unmountHostComponents(finishedRoot, current, renderPriorityLevel) {\n // We only have the top Fiber that was deleted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = current; // Each iteration, currentParent is populated with node's host parent if not\n // currentParentIsValid.\n\n var currentParentIsValid = false; // Note: these two variables *must* always be updated together.\n\n var currentParent;\n var currentParentIsContainer;\n\n while (true) {\n if (!currentParentIsValid) {\n var parent = node.return;\n\n findParent: while (true) {\n if (!(parent !== null)) {\n {\n throw Error( \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var parentStateNode = parent.stateNode;\n\n switch (parent.tag) {\n case HostComponent:\n currentParent = parentStateNode;\n currentParentIsContainer = false;\n break findParent;\n\n case HostRoot:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n\n case HostPortal:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n\n }\n\n parent = parent.return;\n }\n\n currentParentIsValid = true;\n }\n\n if (node.tag === HostComponent || node.tag === HostText) {\n commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the\n // node from the tree.\n\n if (currentParentIsContainer) {\n removeChildFromContainer(currentParent, node.stateNode);\n } else {\n removeChild(currentParent, node.stateNode);\n } // Don't visit children because we already visited them.\n\n } else if (node.tag === HostPortal) {\n if (node.child !== null) {\n // When we go into a portal, it becomes the parent to remove from.\n // We will reassign it back when we pop the portal on the way up.\n currentParent = node.stateNode.containerInfo;\n currentParentIsContainer = true; // Visit children because portals might contain host components.\n\n node.child.return = node;\n node = node.child;\n continue;\n }\n } else {\n commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below.\n\n if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n }\n\n if (node === current) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === current) {\n return;\n }\n\n node = node.return;\n\n if (node.tag === HostPortal) {\n // When we go out of the portal, we need to restore the parent.\n // Since we don't keep a stack of them, we will search for it.\n currentParentIsValid = false;\n }\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction commitDeletion(finishedRoot, current, renderPriorityLevel) {\n {\n // Recursively delete all host nodes from the parent.\n // Detach refs and call componentWillUnmount() on the whole subtree.\n unmountHostComponents(finishedRoot, current, renderPriorityLevel);\n }\n\n detachFiber(current);\n}\n\nfunction commitWork(current, finishedWork) {\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n // Layout effects are destroyed during the mutation phase so that all\n // destroy functions for all fibers are called before any create functions.\n // This prevents sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork);\n return;\n }\n\n case ClassComponent:\n {\n return;\n }\n\n case HostComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (instance != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n if (updatePayload !== null) {\n commitUpdate(instance, updatePayload, type, oldProps, newProps);\n }\n }\n\n return;\n }\n\n case HostText:\n {\n if (!(finishedWork.stateNode !== null)) {\n {\n throw Error( \"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldText = current !== null ? current.memoizedProps : newText;\n commitTextUpdate(textInstance, oldText, newText);\n return;\n }\n\n case HostRoot:\n {\n {\n var _root = finishedWork.stateNode;\n\n if (_root.hydrate) {\n // We've just hydrated. No need to hydrate again.\n _root.hydrate = false;\n commitHydratedContainer(_root.containerInfo);\n }\n }\n\n return;\n }\n\n case Profiler:\n {\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseComponent(finishedWork);\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n {\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case IncompleteClassComponent:\n {\n return;\n }\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction commitSuspenseComponent(finishedWork) {\n var newState = finishedWork.memoizedState;\n var newDidTimeout;\n var primaryChildParent = finishedWork;\n\n if (newState === null) {\n newDidTimeout = false;\n } else {\n newDidTimeout = true;\n primaryChildParent = finishedWork.child;\n markCommitTimeOfFallback();\n }\n\n if ( primaryChildParent !== null) {\n hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);\n }\n}\n\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n\n var newState = finishedWork.memoizedState;\n\n if (newState === null) {\n var current = finishedWork.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n\n if (suspenseInstance !== null) {\n commitHydratedSuspenseInstance(suspenseInstance);\n }\n }\n }\n }\n}\n\nfunction attachSuspenseRetryListeners(finishedWork) {\n // If this boundary just timed out, then it will have a set of thenables.\n // For each thenable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var thenables = finishedWork.updateQueue;\n\n if (thenables !== null) {\n finishedWork.updateQueue = null;\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n thenables.forEach(function (thenable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryThenable.bind(null, finishedWork, thenable);\n\n if (!retryCache.has(thenable)) {\n {\n if (thenable.__reactDoNotTraceInteractions !== true) {\n retry = tracing.unstable_wrap(retry);\n }\n }\n\n retryCache.add(thenable);\n thenable.then(retry, retry);\n }\n });\n }\n}\n\nfunction commitResetTextContent(current) {\n\n resetTextContent(current.stateNode);\n}\n\nvar PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\nfunction createRootErrorUpdate(fiber, errorInfo, expirationTime) {\n var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.\n\n update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: null\n };\n var error = errorInfo.value;\n\n update.callback = function () {\n onUncaughtError(error);\n logError(fiber, errorInfo);\n };\n\n return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, expirationTime) {\n var update = createUpdate(expirationTime, null);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n\n update.payload = function () {\n logError(fiber, errorInfo);\n return getDerivedStateFromError(error$1);\n };\n }\n\n var inst = fiber.stateNode;\n\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n if (typeof getDerivedStateFromError !== 'function') {\n // To preserve the preexisting retry behavior of error boundaries,\n // we keep track of which ones already failed during this batch.\n // This gets reset before we yield back to the browser.\n // TODO: Warn in strict mode if getDerivedStateFromError is\n // not defined.\n markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined\n\n logError(fiber, errorInfo);\n }\n\n var error$1 = errorInfo.value;\n var stack = errorInfo.stack;\n this.componentDidCatch(error$1, {\n componentStack: stack !== null ? stack : ''\n });\n\n {\n if (typeof getDerivedStateFromError !== 'function') {\n // If componentDidCatch is the only error boundary method defined,\n // then it needs to call setState to recover from errors.\n // If no state update is scheduled then the boundary will swallow the error.\n if (fiber.expirationTime !== Sync) {\n error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');\n }\n }\n }\n };\n } else {\n update.callback = function () {\n markFailedErrorBoundaryForHotReloading(fiber);\n };\n }\n\n return update;\n}\n\nfunction attachPingListener(root, renderExpirationTime, thenable) {\n // Attach a listener to the promise to \"ping\" the root and retry. But\n // only if one does not already exist for the current render expiration\n // time (which acts like a \"thread ID\" here).\n var pingCache = root.pingCache;\n var threadIDs;\n\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap$1();\n threadIDs = new Set();\n pingCache.set(thenable, threadIDs);\n } else {\n threadIDs = pingCache.get(thenable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(thenable, threadIDs);\n }\n }\n\n if (!threadIDs.has(renderExpirationTime)) {\n // Memoize using the thread ID to prevent redundant listeners.\n threadIDs.add(renderExpirationTime);\n var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);\n thenable.then(ping, ping);\n }\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {\n // The source fiber did not complete.\n sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid.\n\n sourceFiber.firstEffect = sourceFiber.lastEffect = null;\n\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a thenable.\n var thenable = value;\n\n if ((sourceFiber.mode & BlockingMode) === NoMode) {\n // Reset the memoizedState to what it was before we attempted\n // to render it.\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.expirationTime = currentSource.expirationTime;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n\n var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.\n\n var _workInProgress = returnFiber;\n\n do {\n if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {\n // Found the nearest boundary.\n // Stash the promise on the boundary fiber. If the boundary times out, we'll\n // attach another listener to flip the boundary back to its normal state.\n var thenables = _workInProgress.updateQueue;\n\n if (thenables === null) {\n var updateQueue = new Set();\n updateQueue.add(thenable);\n _workInProgress.updateQueue = updateQueue;\n } else {\n thenables.add(thenable);\n } // If the boundary is outside of blocking mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. In the commit phase, we'll schedule a\n // subsequent synchronous update to re-render the Suspense.\n //\n // Note: It doesn't matter whether the component that suspended was\n // inside a blocking mode tree. If the Suspense is outside of it, we\n // should *not* suspend the commit.\n\n\n if ((_workInProgress.mode & BlockingMode) === NoMode) {\n _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.\n // But we shouldn't call any lifecycle methods or callbacks. Remove\n // all lifecycle effect tags.\n\n sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);\n\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\n\n if (currentSourceFiber === null) {\n // This is a new mount. Change the tag so it's not mistaken for a\n // completed class component. For example, we should not call\n // componentWillUnmount if it is deleted.\n sourceFiber.tag = IncompleteClassComponent;\n } else {\n // When we try rendering again, we should not reuse the current fiber,\n // since it's known to be in an inconsistent state. Use a force update to\n // prevent a bail out.\n var update = createUpdate(Sync, null);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n\n sourceFiber.expirationTime = Sync; // Exit without suspending.\n\n return;\n } // Confirmed that the boundary is in a concurrent mode tree. Continue\n // with the normal suspend path.\n //\n // After this we'll use a set of heuristics to determine whether this\n // render pass will run to completion or restart or \"suspend\" the commit.\n // The actual logic for this is spread out in different places.\n //\n // This first principle is that if we're going to suspend when we complete\n // a root, then we should also restart if we get an update or ping that\n // might unsuspend it, and vice versa. The only reason to suspend is\n // because you think you might want to restart before committing. However,\n // it doesn't make sense to restart only while in the period we're suspended.\n //\n // Restarting too aggressively is also not good because it starves out any\n // intermediate loading state. So we use heuristics to determine when.\n // Suspense Heuristics\n //\n // If nothing threw a Promise or all the same fallbacks are already showing,\n // then don't suspend/restart.\n //\n // If this is an initial render of a new tree of Suspense boundaries and\n // those trigger a fallback, then don't suspend/restart. We want to ensure\n // that we can show the initial loading state as quickly as possible.\n //\n // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n // a fallback, then we should always suspend/restart. SuspenseConfig applies to\n // this case. If none is defined, JND is used instead.\n //\n // If we're already showing a fallback and it gets \"retried\", allowing us to show\n // another level, but there's still an inner boundary that would show a fallback,\n // then we suspend/restart for 500ms since the last time we showed a fallback\n // anywhere in the tree. This effectively throttles progressive loading into a\n // consistent train of commits. This also gives us an opportunity to restart to\n // get to the completed state slightly earlier.\n //\n // If there's ambiguity due to batching it's resolved in preference of:\n // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n //\n // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n // ensure that new initial loading states can commit as soon as possible.\n\n\n attachPingListener(root, renderExpirationTime, thenable);\n _workInProgress.effectTag |= ShouldCapture;\n _workInProgress.expirationTime = renderExpirationTime;\n return;\n } // This boundary already captured during this render. Continue to the next\n // boundary.\n\n\n _workInProgress = _workInProgress.return;\n } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.\n // TODO: Use invariant so the message is stripped in prod?\n\n\n value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\\n' + '\\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));\n } // We didn't find a boundary that could handle this type of exception. Start\n // over and traverse parent path again, this time treating the exception\n // as an error.\n\n\n renderDidError();\n value = createCapturedValue(value, sourceFiber);\n var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.effectTag |= ShouldCapture;\n workInProgress.expirationTime = renderExpirationTime;\n\n var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n\n if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.effectTag |= ShouldCapture;\n workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state\n\n var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);\n\n enqueueCapturedUpdate(workInProgress, _update2);\n return;\n }\n\n break;\n }\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n}\n\nvar ceil = Math.ceil;\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;\nvar NoContext =\n/* */\n0;\nvar BatchedContext =\n/* */\n1;\nvar EventContext =\n/* */\n2;\nvar DiscreteEventContext =\n/* */\n4;\nvar LegacyUnbatchedContext =\n/* */\n8;\nvar RenderContext =\n/* */\n16;\nvar CommitContext =\n/* */\n32;\nvar RootIncomplete = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5;\n// Describes where we are in the React execution stack\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The expiration time we're rendering\n\nvar renderExpirationTime$1 = NoWork; // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // Most recent event time among processed updates during this render.\n// This is conceptually a time stamp but expressed in terms of an ExpirationTime\n// because we deal mostly with expiration times in the hot path, so this avoids\n// the conversion happening in the hot path.\n\nvar workInProgressRootLatestProcessedExpirationTime = Sync;\nvar workInProgressRootLatestSuspenseTimeout = Sync;\nvar workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only\n// includes unprocessed updates, not work in bailed out children.\n\nvar workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately.\n// This flag determines if it might be worthwhile to restart if an opportunity\n// happens latere.\n\nvar workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train\n// model where we don't commit new loading states in too quick succession.\n\nvar globalMostRecentFallbackTime = 0;\nvar FALLBACK_THROTTLE_MS = 500;\nvar nextEffect = null;\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsRenderPriority = NoPriority;\nvar pendingPassiveEffectsExpirationTime = NoWork;\nvar rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0;\nvar interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times\n// during the commit phase. This enables them to be traced across components\n// that spawn new work during render. E.g. hidden boundaries, suspended SSR\n// hydration or SuspenseList.\n\nvar spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start\n// time). However, if two updates are scheduled within the same event, we\n// should treat their start times as simultaneous, even if the actual clock\n// time has advanced between the first and second call.\n// In other words, because expiration times determine how updates are batched,\n// we want all updates of like priority that occur within the same event to\n// receive the same expiration time. Otherwise we get tearing.\n\nvar currentEventTime = NoWork;\nfunction requestCurrentTimeForUpdate() {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // We're inside React, so it's fine to read the actual time.\n return msToExpirationTime(now());\n } // We're not inside React, so we may be in the middle of a browser event.\n\n\n if (currentEventTime !== NoWork) {\n // Use the same start time for all updates until we enter React again.\n return currentEventTime;\n } // This is the first update since React yielded. Compute a new start time.\n\n\n currentEventTime = msToExpirationTime(now());\n return currentEventTime;\n}\nfunction getCurrentTime() {\n return msToExpirationTime(now());\n}\nfunction computeExpirationForFiber(currentTime, fiber, suspenseConfig) {\n var mode = fiber.mode;\n\n if ((mode & BlockingMode) === NoMode) {\n return Sync;\n }\n\n var priorityLevel = getCurrentPriorityLevel();\n\n if ((mode & ConcurrentMode) === NoMode) {\n return priorityLevel === ImmediatePriority ? Sync : Batched;\n }\n\n if ((executionContext & RenderContext) !== NoContext) {\n // Use whatever time we're already rendering\n // TODO: Should there be a way to opt out, like with `runWithPriority`?\n return renderExpirationTime$1;\n }\n\n var expirationTime;\n\n if (suspenseConfig !== null) {\n // Compute an expiration time based on the Suspense timeout.\n expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);\n } else {\n // Compute an expiration time based on the Scheduler priority.\n switch (priorityLevel) {\n case ImmediatePriority:\n expirationTime = Sync;\n break;\n\n case UserBlockingPriority$1:\n // TODO: Rename this to computeUserBlockingExpiration\n expirationTime = computeInteractiveExpiration(currentTime);\n break;\n\n case NormalPriority:\n case LowPriority:\n // TODO: Handle LowPriority\n // TODO: Rename this to... something better.\n expirationTime = computeAsyncExpiration(currentTime);\n break;\n\n case IdlePriority:\n expirationTime = Idle;\n break;\n\n default:\n {\n {\n throw Error( \"Expected a valid priority level\" );\n }\n }\n\n }\n } // If we're in the middle of rendering a tree, do not update at the same\n // expiration time that is already rendering.\n // TODO: We shouldn't have to do this if the update is on a different root.\n // Refactor computeExpirationForFiber + scheduleUpdate so we have access to\n // the root when we check for this condition.\n\n\n if (workInProgressRoot !== null && expirationTime === renderExpirationTime$1) {\n // This is a trick to move this update into a separate batch\n expirationTime -= 1;\n }\n\n return expirationTime;\n}\nfunction scheduleUpdateOnFiber(fiber, expirationTime) {\n checkForNestedUpdates();\n warnAboutRenderPhaseUpdatesInDEV(fiber);\n var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);\n\n if (root === null) {\n warnAboutUpdateOnUnmountedFiberInDEV(fiber);\n return;\n }\n\n checkForInterruption(fiber, expirationTime);\n recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the\n // priority as an argument to that function and this one.\n\n var priorityLevel = getCurrentPriorityLevel();\n\n if (expirationTime === Sync) {\n if ( // Check if we're inside unbatchedUpdates\n (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering\n (executionContext & (RenderContext | CommitContext)) === NoContext) {\n // Register pending interactions on the root to avoid losing traced interaction data.\n schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed\n // root inside of batchedUpdates should be synchronous, but layout updates\n // should be deferred until the end of the batch.\n\n performSyncWorkOnRoot(root);\n } else {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, expirationTime);\n\n if (executionContext === NoContext) {\n // Flush the synchronous work now, unless we're already working or inside\n // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n // scheduleCallbackForFiber to preserve the ability to schedule a callback\n // without immediately flushing it. We only do this for user-initiated\n // updates, to preserve historical behavior of legacy mode.\n flushSyncCallbackQueue();\n }\n }\n } else {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, expirationTime);\n }\n\n if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered\n // discrete, even inside a discrete event.\n priorityLevel === UserBlockingPriority$1 || priorityLevel === ImmediatePriority)) {\n // This is the result of a discrete event. Track the lowest priority\n // discrete update per root so we can flush them early, if needed.\n if (rootsWithPendingDiscreteUpdates === null) {\n rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);\n } else {\n var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);\n\n if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {\n rootsWithPendingDiscreteUpdates.set(root, expirationTime);\n }\n }\n }\n}\nvar scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending\n// work without treating it as a typical update that originates from an event;\n// e.g. retrying a Suspense boundary isn't an update, but it does schedule work\n// on a fiber.\n\nfunction markUpdateTimeFromFiberToRoot(fiber, expirationTime) {\n // Update the source fiber's expiration time\n if (fiber.expirationTime < expirationTime) {\n fiber.expirationTime = expirationTime;\n }\n\n var alternate = fiber.alternate;\n\n if (alternate !== null && alternate.expirationTime < expirationTime) {\n alternate.expirationTime = expirationTime;\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = fiber.return;\n var root = null;\n\n if (node === null && fiber.tag === HostRoot) {\n root = fiber.stateNode;\n } else {\n while (node !== null) {\n alternate = node.alternate;\n\n if (node.childExpirationTime < expirationTime) {\n node.childExpirationTime = expirationTime;\n\n if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {\n alternate.childExpirationTime = expirationTime;\n }\n\n if (node.return === null && node.tag === HostRoot) {\n root = node.stateNode;\n break;\n }\n\n node = node.return;\n }\n }\n\n if (root !== null) {\n if (workInProgressRoot === root) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that's unprocessed work on this root.\n markUnprocessedUpdateTime(expirationTime);\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: This happens to work when receiving an update during the render\n // phase, because of the trick inside computeExpirationForFiber to\n // subtract 1 from `renderExpirationTime` to move it into a\n // separate bucket. But we should probably model it with an exception,\n // using the same mechanism we use to force hydration of a subtree.\n // TODO: This does not account for low pri updates that were already\n // scheduled before the root started rendering. Need to track the next\n // pending expiration time (perhaps by backtracking the return path) and\n // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.\n markRootSuspendedAtTime(root, renderExpirationTime$1);\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdatedAtTime(root, expirationTime);\n }\n\n return root;\n}\n\nfunction getNextRootExpirationTimeToWorkOn(root) {\n // Determines the next expiration time that the root should render, taking\n // into account levels that may be suspended, or levels that may have\n // received a ping.\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n return lastExpiredTime;\n } // \"Pending\" refers to any update that hasn't committed yet, including if it\n // suspended. The \"suspended\" range is therefore a subset.\n\n\n var firstPendingTime = root.firstPendingTime;\n\n if (!isRootSuspendedAtTime(root, firstPendingTime)) {\n // The highest priority pending time is not suspended. Let's work on that.\n return firstPendingTime;\n } // If the first pending time is suspended, check if there's a lower priority\n // pending level that we know about. Or check if we received a ping. Work\n // on whichever is higher priority.\n\n\n var lastPingedTime = root.lastPingedTime;\n var nextKnownPendingLevel = root.nextKnownPendingLevel;\n var nextLevel = lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel;\n\n if ( nextLevel <= Idle && firstPendingTime !== nextLevel) {\n // Don't work on Idle/Never priority unless everything else is committed.\n return NoWork;\n }\n\n return nextLevel;\n} // Use this function to schedule a task for a root. There's only one task per\n// root; if a task was already scheduled, we'll check to make sure the\n// expiration time of the existing task is the same as the expiration time of\n// the next level that the root has work on. This function is called on every\n// update, and right before exiting a task.\n\n\nfunction ensureRootIsScheduled(root) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime !== NoWork) {\n // Special case: Expired work should flush synchronously.\n root.callbackExpirationTime = Sync;\n root.callbackPriority = ImmediatePriority;\n root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n return;\n }\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n var existingCallbackNode = root.callbackNode;\n\n if (expirationTime === NoWork) {\n // There's nothing to work on.\n if (existingCallbackNode !== null) {\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n }\n\n return;\n } // TODO: If this is an update, we already read the current time. Pass the\n // time as an argument.\n\n\n var currentTime = requestCurrentTimeForUpdate();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and\n // expiration time. Otherwise, we'll cancel it and schedule a new one.\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n var existingCallbackExpirationTime = root.callbackExpirationTime;\n\n if ( // Callback must have the exact same expiration time.\n existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.\n existingCallbackPriority >= priorityLevel) {\n // Existing callback is sufficient.\n return;\n } // Need to schedule a new task.\n // TODO: Instead of scheduling a new task, we should be able to change the\n // priority of the existing one.\n\n\n cancelCallback(existingCallbackNode);\n }\n\n root.callbackExpirationTime = expirationTime;\n root.callbackPriority = priorityLevel;\n var callbackNode;\n\n if (expirationTime === Sync) {\n // Sync React callbacks are scheduled on a special internal queue\n callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects\n // ordering because tasks are processed in timeout order.\n {\n timeout: expirationTimeToMs(expirationTime) - now()\n });\n }\n\n root.callbackNode = callbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that\n// goes through Scheduler.\n\n\nfunction performConcurrentWorkOnRoot(root, didTimeout) {\n // Since we know we're in a React event, we can clear the current\n // event time. The next update will compute a new event time.\n currentEventTime = NoWork;\n\n if (didTimeout) {\n // The render task took too long to complete. Mark the current time as\n // expired to synchronously render all expired work in a single batch.\n var currentTime = requestCurrentTimeForUpdate();\n markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback.\n\n ensureRootIsScheduled(root);\n return null;\n } // Determine the next expiration time to work on, using the fields stored\n // on the root.\n\n\n var expirationTime = getNextRootExpirationTimeToWorkOn(root);\n\n if (expirationTime !== NoWork) {\n var originalCallbackNode = root.callbackNode;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n }\n\n flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {\n prepareFreshStack(root, expirationTime);\n startWorkOnPendingInteractions(root, expirationTime);\n } // If we have a work-in-progress fiber, it means there's still work to do\n // in this root.\n\n\n if (workInProgress !== null) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher();\n var prevInteractions = pushInteractions(root);\n startWorkLoopTimer(workInProgress);\n\n do {\n try {\n workLoopConcurrent();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n\n {\n popInteractions(prevInteractions);\n }\n\n if (workInProgressRootExitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n stopInterruptedWorkLoopTimer();\n prepareFreshStack(root, expirationTime);\n markRootSuspendedAtTime(root, expirationTime);\n ensureRootIsScheduled(root);\n throw fatalError;\n }\n\n if (workInProgress !== null) {\n // There's still work left over. Exit without committing.\n stopInterruptedWorkLoopTimer();\n } else {\n // We now have a consistent tree. The next step is either to commit it,\n // or, if something suspended, wait to commit it after a timeout.\n stopFinishedWorkLoopTimer();\n var finishedWork = root.finishedWork = root.current.alternate;\n root.finishedExpirationTime = expirationTime;\n finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime);\n }\n\n ensureRootIsScheduled(root);\n\n if (root.callbackNode === originalCallbackNode) {\n // The task node scheduled for this root is the same one that's\n // currently executed. Need to return a continuation.\n return performConcurrentWorkOnRoot.bind(null, root);\n }\n }\n }\n\n return null;\n}\n\nfunction finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) {\n // Set this to null to indicate there's no in-progress render.\n workInProgressRoot = null;\n\n switch (exitStatus) {\n case RootIncomplete:\n case RootFatalErrored:\n {\n {\n {\n throw Error( \"Root did not complete. This is a bug in React.\" );\n }\n }\n }\n // Flow knows about invariant, so it complains if I add a break\n // statement, but eslint doesn't know about invariant, so it complains\n // if I do. eslint-disable-next-line no-fallthrough\n\n case RootErrored:\n {\n // If this was an async render, the error may have happened due to\n // a mutation in a concurrent event. Try rendering one more time,\n // synchronously, to see if the error goes away. If there are\n // lower priority updates, let's include those, too, in case they\n // fix the inconsistency. Render at Idle to include all updates.\n // If it was Idle or Never or some not-yet-invented time, render\n // at that time.\n markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous\n // and therefore not hit this path again.\n\n break;\n }\n\n case RootSuspended:\n {\n markRootSuspendedAtTime(root, expirationTime);\n var lastSuspendedTime = root.lastSuspendedTime;\n\n if (expirationTime === lastSuspendedTime) {\n root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);\n } // We have an acceptable loading state. We need to figure out if we\n // should immediately commit it or wait a bit.\n // If we have processed new updates during this render, we may now\n // have a new loading state ready. We want to ensure that we commit\n // that as soon as possible.\n\n\n var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;\n\n if (hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope\n !( IsThisRendererActing.current)) {\n // If we have not processed any new updates during this pass, then\n // this is either a retry of an existing fallback state or a\n // hidden tree. Hidden trees shouldn't be batched with other work\n // and after that's fixed it can only be a retry. We're going to\n // throttle committing retries so that we don't show too many\n // loading states too quickly.\n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.\n\n if (msUntilTimeout > 10) {\n if (workInProgressRootHasPendingPing) {\n var lastPingedTime = root.lastPingedTime;\n\n if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) {\n // This render was pinged but we didn't get to restart\n // earlier so try restarting now instead.\n root.lastPingedTime = expirationTime;\n prepareFreshStack(root, expirationTime);\n break;\n }\n }\n\n var nextTime = getNextRootExpirationTimeToWorkOn(root);\n\n if (nextTime !== NoWork && nextTime !== expirationTime) {\n // There's additional work on this root.\n break;\n }\n\n if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) {\n // We should prefer to render the fallback of at the last\n // suspended level. Ping the last suspended level to try\n // rendering it again.\n root.lastPingedTime = lastSuspendedTime;\n break;\n } // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n\n\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root);\n break;\n }\n\n case RootSuspendedWithDelay:\n {\n markRootSuspendedAtTime(root, expirationTime);\n var _lastSuspendedTime = root.lastSuspendedTime;\n\n if (expirationTime === _lastSuspendedTime) {\n root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);\n }\n\n if ( // do not delay if we're inside an act() scope\n !( IsThisRendererActing.current)) {\n // We're suspended in a state that should be avoided. We'll try to\n // avoid committing it for as long as the timeouts let us.\n if (workInProgressRootHasPendingPing) {\n var _lastPingedTime = root.lastPingedTime;\n\n if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) {\n // This render was pinged but we didn't get to restart earlier\n // so try restarting now instead.\n root.lastPingedTime = expirationTime;\n prepareFreshStack(root, expirationTime);\n break;\n }\n }\n\n var _nextTime = getNextRootExpirationTimeToWorkOn(root);\n\n if (_nextTime !== NoWork && _nextTime !== expirationTime) {\n // There's additional work on this root.\n break;\n }\n\n if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) {\n // We should prefer to render the fallback of at the last\n // suspended level. Ping the last suspended level to try\n // rendering it again.\n root.lastPingedTime = _lastSuspendedTime;\n break;\n }\n\n var _msUntilTimeout;\n\n if (workInProgressRootLatestSuspenseTimeout !== Sync) {\n // We have processed a suspense config whose expiration time we\n // can use as the timeout.\n _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();\n } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {\n // This should never normally happen because only new updates\n // cause delayed states, so we should have processed something.\n // However, this could also happen in an offscreen tree.\n _msUntilTimeout = 0;\n } else {\n // If we don't have a suspense config, we're going to use a\n // heuristic to determine how long we can suspend.\n var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);\n var currentTimeMs = now();\n var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;\n var timeElapsed = currentTimeMs - eventTimeMs;\n\n if (timeElapsed < 0) {\n // We get this wrong some time since we estimate the time.\n timeElapsed = 0;\n }\n\n _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the\n // event time is exact instead of inferred from expiration time\n // we don't need this.\n\n if (timeUntilExpirationMs < _msUntilTimeout) {\n _msUntilTimeout = timeUntilExpirationMs;\n }\n } // Don't bother with a very short suspense time.\n\n\n if (_msUntilTimeout > 10) {\n // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root);\n break;\n }\n\n case RootCompleted:\n {\n // The work completed. Ready to commit.\n if ( // do not delay if we're inside an act() scope\n !( IsThisRendererActing.current) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {\n // If we have exceeded the minimum loading delay, which probably\n // means we have shown a spinner already, we might have to suspend\n // a bit longer to ensure that the spinner is shown for\n // enough time.\n var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);\n\n if (_msUntilTimeout2 > 10) {\n markRootSuspendedAtTime(root, expirationTime);\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);\n break;\n }\n }\n\n commitRoot(root);\n break;\n }\n\n default:\n {\n {\n {\n throw Error( \"Unknown root exit status.\" );\n }\n }\n }\n }\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root) {\n // Check if there's expired work on this root. Otherwise, render at Sync.\n var lastExpiredTime = root.lastExpiredTime;\n var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n }\n\n flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {\n prepareFreshStack(root, expirationTime);\n startWorkOnPendingInteractions(root, expirationTime);\n } // If we have a work-in-progress fiber, it means there's still work to do\n // in this root.\n\n\n if (workInProgress !== null) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher();\n var prevInteractions = pushInteractions(root);\n startWorkLoopTimer(workInProgress);\n\n do {\n try {\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n\n {\n popInteractions(prevInteractions);\n }\n\n if (workInProgressRootExitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n stopInterruptedWorkLoopTimer();\n prepareFreshStack(root, expirationTime);\n markRootSuspendedAtTime(root, expirationTime);\n ensureRootIsScheduled(root);\n throw fatalError;\n }\n\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n {\n {\n throw Error( \"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n } else {\n // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n stopFinishedWorkLoopTimer();\n root.finishedWork = root.current.alternate;\n root.finishedExpirationTime = expirationTime;\n finishSyncRender(root);\n } // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n\n ensureRootIsScheduled(root);\n }\n\n return null;\n}\n\nfunction finishSyncRender(root) {\n // Set this to null to indicate there's no in-progress render.\n workInProgressRoot = null;\n commitRoot(root);\n}\nfunction flushDiscreteUpdates() {\n // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.\n // However, `act` uses `batchedUpdates`, so there's no way to distinguish\n // those two cases. Need to fix this before exposing flushDiscreteUpdates\n // as a public API.\n if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');\n }\n } // We're already rendering, so we can't synchronously flush pending work.\n // This is probably a nested event dispatch triggered by a lifecycle/effect,\n // like `el.focus()`. Exit.\n\n\n return;\n }\n\n flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that\n // they fire before the next serial event.\n\n flushPassiveEffects();\n}\nfunction syncUpdates(fn, a, b, c) {\n return runWithPriority$1(ImmediatePriority, fn.bind(null, a, b, c));\n}\n\nfunction flushPendingDiscreteUpdates() {\n if (rootsWithPendingDiscreteUpdates !== null) {\n // For each root with pending discrete updates, schedule a callback to\n // immediately flush them.\n var roots = rootsWithPendingDiscreteUpdates;\n rootsWithPendingDiscreteUpdates = null;\n roots.forEach(function (expirationTime, root) {\n markRootExpiredAtTime(root, expirationTime);\n ensureRootIsScheduled(root);\n }); // Now flush the immediate queue.\n\n flushSyncCallbackQueue();\n }\n}\n\nfunction batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n flushSyncCallbackQueue();\n }\n }\n}\nfunction batchedEventUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= EventContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n flushSyncCallbackQueue();\n }\n }\n}\nfunction discreteUpdates$1(fn, a, b, c, d) {\n var prevExecutionContext = executionContext;\n executionContext |= DiscreteEventContext;\n\n try {\n // Should this\n return runWithPriority$1(UserBlockingPriority$1, fn.bind(null, a, b, c, d));\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n flushSyncCallbackQueue();\n }\n }\n}\nfunction unbatchedUpdates(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext &= ~BatchedContext;\n executionContext |= LegacyUnbatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n flushSyncCallbackQueue();\n }\n }\n}\nfunction flushSync(fn, a) {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n {\n {\n throw Error( \"flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.\" );\n }\n }\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return runWithPriority$1(ImmediatePriority, fn.bind(null, a));\n } finally {\n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n // Note that this will happen even if batchedUpdates is higher up\n // the stack.\n\n flushSyncCallbackQueue();\n }\n}\n\nfunction prepareFreshStack(root, expirationTime) {\n root.finishedWork = null;\n root.finishedExpirationTime = NoWork;\n var timeoutHandle = root.timeoutHandle;\n\n if (timeoutHandle !== noTimeout) {\n // The root previous suspended and scheduled a timeout to commit a fallback\n // state. Now that we have additional work, cancel the timeout.\n root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above\n\n cancelTimeout(timeoutHandle);\n }\n\n if (workInProgress !== null) {\n var interruptedWork = workInProgress.return;\n\n while (interruptedWork !== null) {\n unwindInterruptedWork(interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n }\n\n workInProgressRoot = root;\n workInProgress = createWorkInProgress(root.current, null);\n renderExpirationTime$1 = expirationTime;\n workInProgressRootExitStatus = RootIncomplete;\n workInProgressRootFatalError = null;\n workInProgressRootLatestProcessedExpirationTime = Sync;\n workInProgressRootLatestSuspenseTimeout = Sync;\n workInProgressRootCanSuspendUsingConfig = null;\n workInProgressRootNextUnprocessedUpdateTime = NoWork;\n workInProgressRootHasPendingPing = false;\n\n {\n spawnedWorkDuringRender = null;\n }\n\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n}\n\nfunction handleError(root, thrownValue) {\n do {\n try {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksAfterThrow();\n resetCurrentFiber();\n\n if (workInProgress === null || workInProgress.return === null) {\n // Expected to be working on a non-root fiber. This is a fatal error\n // because there's no ancestor that can handle it; the root is\n // supposed to capture all errors that weren't caught by an error\n // boundary.\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n // sibling, or the parent if there are no siblings. But since the root\n // has no siblings nor a parent, we set it to null. Usually this is\n // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n // interntionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return null;\n }\n\n if (enableProfilerTimer && workInProgress.mode & ProfileMode) {\n // Record the time spent rendering before an error was thrown. This\n // avoids inaccurate Profiler durations in the case of a\n // suspended render.\n stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);\n }\n\n throwException(root, workInProgress.return, workInProgress, thrownValue, renderExpirationTime$1);\n workInProgress = completeUnitOfWork(workInProgress);\n } catch (yetAnotherThrownValue) {\n // Something in the return path also threw.\n thrownValue = yetAnotherThrownValue;\n continue;\n } // Return to the normal work loop.\n\n\n return;\n } while (true);\n}\n\nfunction pushDispatcher(root) {\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n if (prevDispatcher === null) {\n // The React isomorphic package does not include a default dispatcher.\n // Instead the first renderer will lazily attach one, in order to give\n // nicer error messages.\n return ContextOnlyDispatcher;\n } else {\n return prevDispatcher;\n }\n}\n\nfunction popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n}\n\nfunction pushInteractions(root) {\n {\n var prevInteractions = tracing.__interactionsRef.current;\n tracing.__interactionsRef.current = root.memoizedInteractions;\n return prevInteractions;\n }\n}\n\nfunction popInteractions(prevInteractions) {\n {\n tracing.__interactionsRef.current = prevInteractions;\n }\n}\n\nfunction markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now();\n}\nfunction markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {\n if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) {\n workInProgressRootLatestProcessedExpirationTime = expirationTime;\n }\n\n if (suspenseConfig !== null) {\n if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) {\n workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad.\n\n workInProgressRootCanSuspendUsingConfig = suspenseConfig;\n }\n }\n}\nfunction markUnprocessedUpdateTime(expirationTime) {\n if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) {\n workInProgressRootNextUnprocessedUpdateTime = expirationTime;\n }\n}\nfunction renderDidSuspend() {\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootSuspended;\n }\n}\nfunction renderDidSuspendDelayIfPossible() {\n if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {\n workInProgressRootExitStatus = RootSuspendedWithDelay;\n } // Check if there's a lower priority update somewhere else in the tree.\n\n\n if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) {\n // Mark the current render as suspended, and then mark that there's a\n // pending update.\n // TODO: This should immediately interrupt the current render, instead\n // of waiting until the next time we yield.\n markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime$1);\n markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime);\n }\n}\nfunction renderDidError() {\n if (workInProgressRootExitStatus !== RootCompleted) {\n workInProgressRootExitStatus = RootErrored;\n }\n} // Called during render to determine if anything has suspended.\n// Returns false if we're not sure.\n\nfunction renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n}\n\nfunction inferTimeFromExpirationTime(expirationTime) {\n // We don't know exactly when the update was scheduled, but we can infer an\n // approximate start time from the expiration time.\n var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);\n return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;\n}\n\nfunction inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {\n // We don't know exactly when the update was scheduled, but we can infer an\n // approximate start time from the expiration time by subtracting the timeout\n // that was added to the event time.\n var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);\n return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);\n} // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n/** @noinline */\n\n\nfunction workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n workInProgress = performUnitOfWork(workInProgress);\n }\n}\n\nfunction performUnitOfWork(unitOfWork) {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = unitOfWork.alternate;\n startWorkTimer(unitOfWork);\n setCurrentFiber(unitOfWork);\n var next;\n\n if ( (unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork$1(current, unitOfWork, renderExpirationTime$1);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork$1(current, unitOfWork, renderExpirationTime$1);\n }\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n next = completeUnitOfWork(unitOfWork);\n }\n\n ReactCurrentOwner$2.current = null;\n return next;\n}\n\nfunction completeUnitOfWork(unitOfWork) {\n // Attempt to complete the current unit of work, then move to the next\n // sibling. If there are no more siblings, return to the parent fiber.\n workInProgress = unitOfWork;\n\n do {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = workInProgress.alternate;\n var returnFiber = workInProgress.return; // Check if the work completed or if something threw.\n\n if ((workInProgress.effectTag & Incomplete) === NoEffect) {\n setCurrentFiber(workInProgress);\n var next = void 0;\n\n if ( (workInProgress.mode & ProfileMode) === NoMode) {\n next = completeWork(current, workInProgress, renderExpirationTime$1);\n } else {\n startProfilerTimer(workInProgress);\n next = completeWork(current, workInProgress, renderExpirationTime$1); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);\n }\n\n stopWorkTimer(workInProgress);\n resetCurrentFiber();\n resetChildExpirationTime(workInProgress);\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n return next;\n }\n\n if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete\n (returnFiber.effectTag & Incomplete) === NoEffect) {\n // Append all the effects of the subtree and this fiber onto the effect\n // list of the parent. The completion order of the children affects the\n // side-effect order.\n if (returnFiber.firstEffect === null) {\n returnFiber.firstEffect = workInProgress.firstEffect;\n }\n\n if (workInProgress.lastEffect !== null) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;\n }\n\n returnFiber.lastEffect = workInProgress.lastEffect;\n } // If this fiber had side-effects, we append it AFTER the children's\n // side-effects. We can perform certain side-effects earlier if needed,\n // by doing multiple passes over the effect list. We don't want to\n // schedule our own side-effect on our own list because if end up\n // reusing children we'll schedule this effect onto itself since we're\n // at the end.\n\n\n var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect\n // list. PerformedWork effect is read by React DevTools but shouldn't be\n // committed.\n\n if (effectTag > PerformedWork) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = workInProgress;\n } else {\n returnFiber.firstEffect = workInProgress;\n }\n\n returnFiber.lastEffect = workInProgress;\n }\n }\n } else {\n // This fiber did not complete because something threw. Pop values off\n // the stack without entering the complete phase. If this is a boundary,\n // capture values if possible.\n var _next = unwindWork(workInProgress); // Because this fiber did not complete, don't reset its expiration time.\n\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = workInProgress.actualDuration;\n var child = workInProgress.child;\n\n while (child !== null) {\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n workInProgress.actualDuration = actualDuration;\n }\n\n if (_next !== null) {\n // If completing this work spawned new work, do that next. We'll come\n // back here again.\n // Since we're restarting, remove anything that is not a host effect\n // from the effect tag.\n // TODO: The name stopFailedWorkTimer is misleading because Suspense\n // also captures and restarts.\n stopFailedWorkTimer(workInProgress);\n _next.effectTag &= HostEffectMask;\n return _next;\n }\n\n stopWorkTimer(workInProgress);\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its effect list.\n returnFiber.firstEffect = returnFiber.lastEffect = null;\n returnFiber.effectTag |= Incomplete;\n }\n }\n\n var siblingFiber = workInProgress.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n return siblingFiber;\n } // Otherwise, return to the parent\n\n\n workInProgress = returnFiber;\n } while (workInProgress !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootCompleted;\n }\n\n return null;\n}\n\nfunction getRemainingExpirationTime(fiber) {\n var updateExpirationTime = fiber.expirationTime;\n var childExpirationTime = fiber.childExpirationTime;\n return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime;\n}\n\nfunction resetChildExpirationTime(completedWork) {\n if (renderExpirationTime$1 !== Never && completedWork.childExpirationTime === Never) {\n // The children of this component are hidden. Don't bubble their\n // expiration times.\n return;\n }\n\n var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time.\n\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var actualDuration = completedWork.actualDuration;\n var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n // When work is done, it should bubble to the parent's actualDuration. If\n // the fiber has not been cloned though, (meaning no work was done), then\n // this value will reflect the amount of time spent working on a previous\n // render. In that case it should not bubble. We determine whether it was\n // cloned by comparing the child pointer.\n\n var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;\n var child = completedWork.child;\n\n while (child !== null) {\n var childUpdateExpirationTime = child.expirationTime;\n var childChildExpirationTime = child.childExpirationTime;\n\n if (childUpdateExpirationTime > newChildExpirationTime) {\n newChildExpirationTime = childUpdateExpirationTime;\n }\n\n if (childChildExpirationTime > newChildExpirationTime) {\n newChildExpirationTime = childChildExpirationTime;\n }\n\n if (shouldBubbleActualDurations) {\n actualDuration += child.actualDuration;\n }\n\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n\n while (_child !== null) {\n var _childUpdateExpirationTime = _child.expirationTime;\n var _childChildExpirationTime = _child.childExpirationTime;\n\n if (_childUpdateExpirationTime > newChildExpirationTime) {\n newChildExpirationTime = _childUpdateExpirationTime;\n }\n\n if (_childChildExpirationTime > newChildExpirationTime) {\n newChildExpirationTime = _childChildExpirationTime;\n }\n\n _child = _child.sibling;\n }\n }\n\n completedWork.childExpirationTime = newChildExpirationTime;\n}\n\nfunction commitRoot(root) {\n var renderPriorityLevel = getCurrentPriorityLevel();\n runWithPriority$1(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel));\n return null;\n}\n\nfunction commitRootImpl(root, renderPriorityLevel) {\n do {\n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n // means `flushPassiveEffects` will sometimes result in additional\n // passive effects. So we need to keep flushing in a loop until there are\n // no more pending effects.\n // TODO: Might be better if `flushPassiveEffects` did not automatically\n // flush synchronous work at the end, to avoid factoring hazards like this.\n flushPassiveEffects();\n } while (rootWithPendingPassiveEffects !== null);\n\n flushRenderPhaseStrictModeWarningsInDEV();\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n }\n\n var finishedWork = root.finishedWork;\n var expirationTime = root.finishedExpirationTime;\n\n if (finishedWork === null) {\n return null;\n }\n\n root.finishedWork = null;\n root.finishedExpirationTime = NoWork;\n\n if (!(finishedWork !== root.current)) {\n {\n throw Error( \"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // commitRoot never returns a continuation; it always finishes synchronously.\n // So we can clear these now to allow a new callback to be scheduled.\n\n\n root.callbackNode = null;\n root.callbackExpirationTime = NoWork;\n root.callbackPriority = NoPriority;\n root.nextKnownPendingLevel = NoWork;\n startCommitTimer(); // Update the first and last pending times on this root. The new first\n // pending time is whatever is left on the root fiber.\n\n var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork);\n markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit);\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n renderExpirationTime$1 = NoWork;\n } // This indicates that the last root we worked on is not the same one that\n // we're committing now. This most commonly happens when a suspended root\n // times out.\n // Get the list of effects.\n\n\n var firstEffect;\n\n if (finishedWork.effectTag > PerformedWork) {\n // A fiber's effect list consists only of its children, not itself. So if\n // the root has an effect, we need to add it to the end of the list. The\n // resulting list is the set that would belong to the root's parent, if it\n // had one; that is, all the effects in the tree including the root.\n if (finishedWork.lastEffect !== null) {\n finishedWork.lastEffect.nextEffect = finishedWork;\n firstEffect = finishedWork.firstEffect;\n } else {\n firstEffect = finishedWork;\n }\n } else {\n // There is no effect on the root.\n firstEffect = finishedWork.firstEffect;\n }\n\n if (firstEffect !== null) {\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles\n\n ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n // of the effect list for each phase: all mutation effects come before all\n // layout effects, and so on.\n // The first phase a \"before mutation\" phase. We use this phase to read the\n // state of the host tree right before we mutate it. This is where\n // getSnapshotBeforeUpdate is called.\n\n startCommitSnapshotEffectsTimer();\n prepareForCommit(root.containerInfo);\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitBeforeMutationEffects, null);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var error = clearCaughtError();\n captureCommitPhaseError(nextEffect, error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n stopCommitSnapshotEffectsTimer();\n\n {\n // Mark the current commit time to be shared by all Profilers in this\n // batch. This enables them to be grouped later.\n recordCommitTime();\n } // The next phase is the mutation phase, where we mutate the host tree.\n\n\n startCommitHostEffectsTimer();\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n stopCommitHostEffectsTimer();\n resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after\n // the mutation phase, so that the previous tree is still current during\n // componentWillUnmount, but before the layout phase, so that the finished\n // work is current during componentDidMount/Update.\n\n root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n // the host tree after it's been mutated. The idiomatic use case for this is\n // layout, but class component lifecycles also fire here for legacy reasons.\n\n startCommitLifeCyclesTimer();\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error2 = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error2);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n stopCommitLifeCyclesTimer();\n nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an\n // opportunity to paint.\n\n requestPaint();\n\n {\n popInteractions(prevInteractions);\n }\n\n executionContext = prevExecutionContext;\n } else {\n // No effects.\n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n // no effects.\n // TODO: Maybe there's a better way to report this.\n\n startCommitSnapshotEffectsTimer();\n stopCommitSnapshotEffectsTimer();\n\n {\n recordCommitTime();\n }\n\n startCommitHostEffectsTimer();\n stopCommitHostEffectsTimer();\n startCommitLifeCyclesTimer();\n stopCommitLifeCyclesTimer();\n }\n\n stopCommitTimer();\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n if (rootDoesHavePassiveEffects) {\n // This commit has passive effects. Stash a reference to them. But don't\n // schedule a callback until after flushing layout work.\n rootDoesHavePassiveEffects = false;\n rootWithPendingPassiveEffects = root;\n pendingPassiveEffectsExpirationTime = expirationTime;\n pendingPassiveEffectsRenderPriority = renderPriorityLevel;\n } else {\n // We are done with the effect chain at this point so let's clear the\n // nextEffect pointers to assist with GC. If we have passive effects, we'll\n // clear this in flushPassiveEffects.\n nextEffect = firstEffect;\n\n while (nextEffect !== null) {\n var nextNextEffect = nextEffect.nextEffect;\n nextEffect.nextEffect = null;\n nextEffect = nextNextEffect;\n }\n } // Check if there's remaining work on this root\n\n\n var remainingExpirationTime = root.firstPendingTime;\n\n if (remainingExpirationTime !== NoWork) {\n {\n if (spawnedWorkDuringRender !== null) {\n var expirationTimes = spawnedWorkDuringRender;\n spawnedWorkDuringRender = null;\n\n for (var i = 0; i < expirationTimes.length; i++) {\n scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);\n }\n }\n\n schedulePendingInteractions(root, remainingExpirationTime);\n }\n } else {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n\n {\n if (!rootDidHavePassiveEffects) {\n // If there are no passive effects, then we can complete the pending interactions.\n // Otherwise, we'll wait until after the passive effects are flushed.\n // Wait to do this until after remaining work has been scheduled,\n // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.\n finishPendingInteractions(root, expirationTime);\n }\n }\n\n if (remainingExpirationTime === Sync) {\n // Count the number of times the root synchronously re-renders without\n // finishing. If there are too many, it indicates an infinite update loop.\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n }\n\n onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n ensureRootIsScheduled(root);\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var _error3 = firstUncaughtError;\n firstUncaughtError = null;\n throw _error3;\n }\n\n if ((executionContext & LegacyUnbatchedContext) !== NoContext) {\n // This is a legacy edge case. We just committed the initial mount of\n // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired\n // synchronously, but layout updates should be deferred until the end\n // of the batch.\n return null;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncCallbackQueue();\n return null;\n}\n\nfunction commitBeforeMutationEffects() {\n while (nextEffect !== null) {\n var effectTag = nextEffect.effectTag;\n\n if ((effectTag & Snapshot) !== NoEffect) {\n setCurrentFiber(nextEffect);\n recordEffect();\n var current = nextEffect.alternate;\n commitBeforeMutationLifeCycles(current, nextEffect);\n resetCurrentFiber();\n }\n\n if ((effectTag & Passive) !== NoEffect) {\n // If there are passive effects, schedule a callback to flush at\n // the earliest opportunity.\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction commitMutationEffects(root, renderPriorityLevel) {\n // TODO: Should probably move the bulk of this function to commitWork.\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var effectTag = nextEffect.effectTag;\n\n if (effectTag & ContentReset) {\n commitResetTextContent(nextEffect);\n }\n\n if (effectTag & Ref) {\n var current = nextEffect.alternate;\n\n if (current !== null) {\n commitDetachRef(current);\n }\n } // The following switch statement is only concerned about placement,\n // updates, and deletions. To avoid needing to add a case for every possible\n // bitmap value, we remove the secondary effects from the effect tag and\n // switch on that value.\n\n\n var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating);\n\n switch (primaryEffectTag) {\n case Placement:\n {\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted does\n // and isMounted is deprecated anyway so we should be able to kill this.\n\n nextEffect.effectTag &= ~Placement;\n break;\n }\n\n case PlacementAndUpdate:\n {\n // Placement\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n\n nextEffect.effectTag &= ~Placement; // Update\n\n var _current = nextEffect.alternate;\n commitWork(_current, nextEffect);\n break;\n }\n\n case Hydrating:\n {\n nextEffect.effectTag &= ~Hydrating;\n break;\n }\n\n case HydratingAndUpdate:\n {\n nextEffect.effectTag &= ~Hydrating; // Update\n\n var _current2 = nextEffect.alternate;\n commitWork(_current2, nextEffect);\n break;\n }\n\n case Update:\n {\n var _current3 = nextEffect.alternate;\n commitWork(_current3, nextEffect);\n break;\n }\n\n case Deletion:\n {\n commitDeletion(root, nextEffect, renderPriorityLevel);\n break;\n }\n } // TODO: Only record a mutation effect if primaryEffectTag is non-zero.\n\n\n recordEffect();\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction commitLayoutEffects(root, committedExpirationTime) {\n // TODO: Should probably move the bulk of this function to commitWork.\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var effectTag = nextEffect.effectTag;\n\n if (effectTag & (Update | Callback)) {\n recordEffect();\n var current = nextEffect.alternate;\n commitLifeCycles(root, current, nextEffect);\n }\n\n if (effectTag & Ref) {\n recordEffect();\n commitAttachRef(nextEffect);\n }\n\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction flushPassiveEffects() {\n if (pendingPassiveEffectsRenderPriority !== NoPriority) {\n var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority ? NormalPriority : pendingPassiveEffectsRenderPriority;\n pendingPassiveEffectsRenderPriority = NoPriority;\n return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);\n }\n}\n\nfunction flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n }\n\n var root = rootWithPendingPassiveEffects;\n var expirationTime = pendingPassiveEffectsExpirationTime;\n rootWithPendingPassiveEffects = null;\n pendingPassiveEffectsExpirationTime = NoWork;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Cannot flush passive effects while already rendering.\" );\n }\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root);\n\n {\n // Note: This currently assumes there are no passive effects on the root fiber\n // because the root is not part of its own effect list.\n // This could change in the future.\n var _effect2 = root.current.firstEffect;\n\n while (_effect2 !== null) {\n {\n setCurrentFiber(_effect2);\n invokeGuardedCallback(null, commitPassiveHookEffects, null, _effect2);\n\n if (hasCaughtError()) {\n if (!(_effect2 !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error5 = clearCaughtError();\n\n captureCommitPhaseError(_effect2, _error5);\n }\n\n resetCurrentFiber();\n }\n\n var nextNextEffect = _effect2.nextEffect; // Remove nextEffect pointer to assist GC\n\n _effect2.nextEffect = null;\n _effect2 = nextNextEffect;\n }\n }\n\n {\n popInteractions(prevInteractions);\n finishPendingInteractions(root, expirationTime);\n }\n\n executionContext = prevExecutionContext;\n flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n\n nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;\n return true;\n}\n\nfunction isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n}\nfunction markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n}\n\nfunction prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n}\n\nvar onUncaughtError = prepareToThrowUncaughtError;\n\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, Sync);\n enqueueUpdate(rootFiber, update);\n var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync);\n\n if (root !== null) {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, Sync);\n }\n}\n\nfunction captureCommitPhaseError(sourceFiber, error) {\n if (sourceFiber.tag === HostRoot) {\n // Error was thrown at the root. There is no parent, so the root\n // itself should capture it.\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n return;\n }\n\n var fiber = sourceFiber.return;\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, // TODO: This is always sync\n Sync);\n enqueueUpdate(fiber, update);\n var root = markUpdateTimeFromFiberToRoot(fiber, Sync);\n\n if (root !== null) {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, Sync);\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n}\nfunction pingSuspendedRoot(root, thenable, suspendedTime) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The thenable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(thenable);\n }\n\n if (workInProgressRoot === root && renderExpirationTime$1 === suspendedTime) {\n // Received a ping at the same priority level at which we're currently\n // rendering. We might want to restart this render. This should mirror\n // the logic of whether or not a root suspends once it completes.\n // TODO: If we're rendering sync either due to Sync, Batched or expired,\n // we should probably never restart.\n // If we're suspended with delay, we'll always suspend so we can always\n // restart. If we're suspended without any updates, it might be a retry.\n // If it's early in the retry we can restart. We can't know for sure\n // whether we'll eventually process an update during this render pass,\n // but it's somewhat unlikely that we get to a ping before that, since\n // getting to the root most update is usually very fast.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && workInProgressRootLatestProcessedExpirationTime === Sync && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Restart from the root. Don't need to schedule a ping because\n // we're already working on this tree.\n prepareFreshStack(root, renderExpirationTime$1);\n } else {\n // Even though we can't restart right now, we might get an\n // opportunity later. So we mark this render as having a ping.\n workInProgressRootHasPendingPing = true;\n }\n\n return;\n }\n\n if (!isRootSuspendedAtTime(root, suspendedTime)) {\n // The root is no longer suspended at this time.\n return;\n }\n\n var lastPingedTime = root.lastPingedTime;\n\n if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) {\n // There's already a lower priority ping scheduled.\n return;\n } // Mark the time at which this ping was scheduled.\n\n\n root.lastPingedTime = suspendedTime;\n\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, suspendedTime);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryTime) {\n // The boundary fiber (a Suspense component or SuspenseList component)\n // previously was rendered in its fallback state. One of the promises that\n // suspended it has resolved, which means at least part of the tree was\n // likely unblocked. Try rendering again, at a new expiration time.\n if (retryTime === NoWork) {\n var suspenseConfig = null; // Retries don't carry over the already committed update.\n\n var currentTime = requestCurrentTimeForUpdate();\n retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig);\n } // TODO: Special case idle priority?\n\n\n var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime);\n\n if (root !== null) {\n ensureRootIsScheduled(root);\n schedulePendingInteractions(root, retryTime);\n }\n}\nfunction resolveRetryThenable(boundaryFiber, thenable) {\n var retryTime = NoWork; // Default\n\n var retryCache;\n\n {\n retryCache = boundaryFiber.stateNode;\n }\n\n if (retryCache !== null) {\n // The thenable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(thenable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryTime);\n} // Computes the next Just Noticeable Difference (JND) boundary.\n// The theory is that a person can't tell the difference between small differences in time.\n// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable\n// difference in the experience. However, waiting for longer might mean that we can avoid\n// showing an intermediate loading state. The longer we have already waited, the harder it\n// is to tell small differences in time. Therefore, the longer we've already waited,\n// the longer we can wait additionally. At some point we have to give up though.\n// We pick a train model where the next boundary commits at a consistent schedule.\n// These particular numbers are vague estimates. We expect to adjust them based on research.\n\nfunction jnd(timeElapsed) {\n return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;\n}\n\nfunction computeMsUntilSuspenseLoadingDelay(mostRecentEventTime, committedExpirationTime, suspenseConfig) {\n var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0;\n\n if (busyMinDurationMs <= 0) {\n return 0;\n }\n\n var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire.\n\n var currentTimeMs = now();\n var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig(mostRecentEventTime, suspenseConfig);\n var timeElapsed = currentTimeMs - eventTimeMs;\n\n if (timeElapsed <= busyDelayMs) {\n // If we haven't yet waited longer than the initial delay, we don't\n // have to wait any additional time.\n return 0;\n }\n\n var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`.\n\n return msUntilTimeout;\n}\n\nfunction checkForNestedUpdates() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = null;\n\n {\n {\n throw Error( \"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\" );\n }\n }\n }\n\n {\n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n\n error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n }\n }\n}\n\nfunction flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n\n {\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n }\n}\n\nfunction stopFinishedWorkLoopTimer() {\n var didCompleteRoot = true;\n stopWorkLoopTimer(interruptedBy, didCompleteRoot);\n interruptedBy = null;\n}\n\nfunction stopInterruptedWorkLoopTimer() {\n // TODO: Track which fiber caused the interruption.\n var didCompleteRoot = false;\n stopWorkLoopTimer(interruptedBy, didCompleteRoot);\n interruptedBy = null;\n}\n\nfunction checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) {\n if ( workInProgressRoot !== null && updateExpirationTime > renderExpirationTime$1) {\n interruptedBy = fiberThatReceivedUpdate;\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = null;\n\nfunction warnAboutUpdateOnUnmountedFiberInDEV(fiber) {\n {\n var tag = fiber.tag;\n\n if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n }\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentName(fiber.type) || 'ReactComponent';\n\n if (didWarnStateUpdateForUnmountedComponent !== null) {\n if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForUnmountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForUnmountedComponent = new Set([componentName]);\n }\n\n error(\"Can't perform a React state update on an unmounted component. This \" + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));\n }\n}\n\nvar beginWork$1;\n\n{\n var dummyFiber = null;\n\n beginWork$1 = function (current, unitOfWork, expirationTime) {\n // If a component throws an error, we replay it again in a synchronously\n // dispatched event, so that the debugger will treat it as an uncaught\n // error See ReactErrorUtils for more information.\n // Before entering the begin phase, copy the work-in-progress onto a dummy\n // fiber. If beginWork throws, we'll use this to reset the state.\n var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n try {\n return beginWork(current, unitOfWork, expirationTime);\n } catch (originalError) {\n if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises. Treat everything else like an error.\n throw originalError;\n } // Keep this code in sync with handleError; any changes here must have\n // corresponding changes there.\n\n\n resetContextDependencies();\n resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the\n // same fiber again.\n // Unwind the failed stack frame\n\n unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.\n\n assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if ( unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n } // Run beginWork again.\n\n\n invokeGuardedCallback(null, beginWork, null, current, unitOfWork, expirationTime);\n\n if (hasCaughtError()) {\n var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.\n // Rethrow this error instead of the original one.\n\n throw replayError;\n } else {\n // This branch is reachable if the render phase is impure.\n throw originalError;\n }\n }\n };\n}\n\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering && (executionContext & RenderContext) !== NoContext) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentName(fiber.type) || 'Unknown';\n\n error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://fb.me/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n if (!didWarnAboutUpdateInRender) {\n error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n\n didWarnAboutUpdateInRender = true;\n }\n\n break;\n }\n }\n }\n }\n} // a 'shared' variable that changes when act() opens/closes in tests.\n\n\nvar IsThisRendererActing = {\n current: false\n};\nfunction warnIfNotScopedWithMatchingAct(fiber) {\n {\n if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {\n error(\"It looks like you're using the wrong act() around your test interactions.\\n\" + 'Be sure to use the matching version of act() corresponding to your renderer:\\n\\n' + '// for react-dom:\\n' + \"import {act} from 'react-dom/test-utils';\\n\" + '// ...\\n' + 'act(() => ...);\\n\\n' + '// for react-test-renderer:\\n' + \"import TestRenderer from 'react-test-renderer';\\n\" + 'const {act} = TestRenderer;\\n' + '// ...\\n' + 'act(() => ...);' + '%s', getStackByFiberInDevAndProd(fiber));\n }\n }\n}\nfunction warnIfNotCurrentlyActingEffectsInDEV(fiber) {\n {\n if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n error('An update to %s ran an effect, but was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));\n }\n }\n}\n\nfunction warnIfNotCurrentlyActingUpdatesInDEV(fiber) {\n {\n if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n error('An update to %s inside a test was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));\n }\n }\n}\n\nvar warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.\n\nvar didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked\n// scheduler is the actual recommendation. The alternative could be a testing build,\n// a new lib, or whatever; we dunno just yet. This message is for early adopters\n// to get their tests right.\n\nfunction warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + \"jest.mock('scheduler', () => require('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://fb.me/react-mock-scheduler');\n }\n }\n }\n}\n\nfunction computeThreadID(root, expirationTime) {\n // Interaction threads are unique per root and expiration time.\n return expirationTime * 1000 + root.interactionThreadID;\n}\n\nfunction markSpawnedWork(expirationTime) {\n\n if (spawnedWorkDuringRender === null) {\n spawnedWorkDuringRender = [expirationTime];\n } else {\n spawnedWorkDuringRender.push(expirationTime);\n }\n}\n\nfunction scheduleInteractions(root, expirationTime, interactions) {\n\n if (interactions.size > 0) {\n var pendingInteractionMap = root.pendingInteractionMap;\n var pendingInteractions = pendingInteractionMap.get(expirationTime);\n\n if (pendingInteractions != null) {\n interactions.forEach(function (interaction) {\n if (!pendingInteractions.has(interaction)) {\n // Update the pending async work count for previously unscheduled interaction.\n interaction.__count++;\n }\n\n pendingInteractions.add(interaction);\n });\n } else {\n pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions.\n\n interactions.forEach(function (interaction) {\n interaction.__count++;\n });\n }\n\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, expirationTime);\n subscriber.onWorkScheduled(interactions, threadID);\n }\n }\n}\n\nfunction schedulePendingInteractions(root, expirationTime) {\n\n scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);\n}\n\nfunction startWorkOnPendingInteractions(root, expirationTime) {\n // we can accurately attribute time spent working on it, And so that cascading\n // work triggered during the render phase will be associated with it.\n\n\n var interactions = new Set();\n root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {\n if (scheduledExpirationTime >= expirationTime) {\n scheduledInteractions.forEach(function (interaction) {\n return interactions.add(interaction);\n });\n }\n }); // Store the current set of interactions on the FiberRoot for a few reasons:\n // We can re-use it in hot functions like performConcurrentWorkOnRoot()\n // without having to recalculate it. We will also use it in commitWork() to\n // pass to any Profiler onRender() hooks. This also provides DevTools with a\n // way to access it when the onCommitRoot() hook is called.\n\n root.memoizedInteractions = interactions;\n\n if (interactions.size > 0) {\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, expirationTime);\n\n try {\n subscriber.onWorkStarted(interactions, threadID);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority, function () {\n throw error;\n });\n }\n }\n }\n}\n\nfunction finishPendingInteractions(root, committedExpirationTime) {\n\n var earliestRemainingTimeAfterCommit = root.firstPendingTime;\n var subscriber;\n\n try {\n subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null && root.memoizedInteractions.size > 0) {\n var threadID = computeThreadID(root, committedExpirationTime);\n subscriber.onWorkStopped(root.memoizedInteractions, threadID);\n }\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority, function () {\n throw error;\n });\n } finally {\n // Clear completed interactions from the pending Map.\n // Unless the render was suspended or cascading work was scheduled,\n // In which case– leave pending interactions until the subsequent render.\n var pendingInteractionMap = root.pendingInteractionMap;\n pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {\n // Only decrement the pending interaction count if we're done.\n // If there's still work at the current priority,\n // That indicates that we are waiting for suspense data.\n if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {\n pendingInteractionMap.delete(scheduledExpirationTime);\n scheduledInteractions.forEach(function (interaction) {\n interaction.__count--;\n\n if (subscriber !== null && interaction.__count === 0) {\n try {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority, function () {\n throw error;\n });\n }\n }\n });\n }\n });\n }\n}\n\nvar onScheduleFiberRoot = null;\nvar onCommitFiberRoot = null;\nvar onCommitFiberUnmount = null;\nvar hasLoggedError = false;\nvar isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\nfunction injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n\n if (!hook.supportsFiber) {\n {\n error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');\n } // DevTools exists, even though it doesn't support Fiber.\n\n\n return true;\n }\n\n try {\n var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n if (true) {\n // Only used by Fast Refresh\n if (typeof hook.onScheduleFiberRoot === 'function') {\n onScheduleFiberRoot = function (root, children) {\n try {\n hook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if (true && !hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n };\n }\n }\n\n onCommitFiberRoot = function (root, expirationTime) {\n try {\n var didError = (root.current.effectTag & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n var currentTime = getCurrentTime();\n var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime);\n hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);\n } else {\n hook.onCommitFiberRoot(rendererID, root, undefined, didError);\n }\n } catch (err) {\n if (true) {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n };\n\n onCommitFiberUnmount = function (fiber) {\n try {\n hook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n if (true) {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n };\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n error('React instrumentation encountered an error: %s.', err);\n }\n } // DevTools exists\n\n\n return true;\n}\nfunction onScheduleRoot(root, children) {\n if (typeof onScheduleFiberRoot === 'function') {\n onScheduleFiberRoot(root, children);\n }\n}\nfunction onCommitRoot(root, expirationTime) {\n if (typeof onCommitFiberRoot === 'function') {\n onCommitFiberRoot(root, expirationTime);\n }\n}\nfunction onCommitUnmount(fiber) {\n if (typeof onCommitFiberUnmount === 'function') {\n onCommitFiberUnmount(fiber);\n }\n}\n\nvar hasBadMapPolyfill;\n\n{\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n var testMap = new Map([[nonExtensibleObject, null]]);\n var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused.\n // https://github.com/rollup/rollup/issues/1771\n // TODO: we can remove these if Rollup fixes the bug.\n\n testMap.set(0, 0);\n testSet.add(0);\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n}\n\nvar debugCounter = 1;\n\nfunction FiberNode(tag, pendingProps, key, mode) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.elementType = null;\n this.type = null;\n this.stateNode = null; // Fiber\n\n this.return = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n this.ref = null;\n this.pendingProps = pendingProps;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n this.dependencies = null;\n this.mode = mode; // Effects\n\n this.effectTag = NoEffect;\n this.nextEffect = null;\n this.firstEffect = null;\n this.lastEffect = null;\n this.expirationTime = NoWork;\n this.childExpirationTime = NoWork;\n this.alternate = null;\n\n {\n // Note: The following is done to avoid a v8 performance cliff.\n //\n // Initializing the fields below to smis and later updating them with\n // double values will cause Fibers to end up having separate shapes.\n // This behavior/bug has something to do with Object.preventExtension().\n // Fortunately this only impacts DEV builds.\n // Unfortunately it makes React unusably slow for some applications.\n // To work around this, initialize the fields below with doubles.\n //\n // Learn more about this here:\n // https://github.com/facebook/react/issues/14365\n // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n this.actualDuration = Number.NaN;\n this.actualStartTime = Number.NaN;\n this.selfBaseDuration = Number.NaN;\n this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n // This won't trigger the performance cliff mentioned above,\n // and it simplifies other profiler code (including DevTools).\n\n this.actualDuration = 0;\n this.actualStartTime = -1;\n this.selfBaseDuration = 0;\n this.treeBaseDuration = 0;\n } // This is normally DEV-only except www when it adds listeners.\n // TODO: remove the User Timing integration in favor of Root Events.\n\n\n {\n this._debugID = debugCounter++;\n this._debugIsCurrentlyTiming = false;\n }\n\n {\n this._debugSource = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\n\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n} // This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n// more difficult to predict when they get optimized and they are almost\n// never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n// always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n// to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n// is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n// compatible.\n\n\nvar createFiber = function (tag, pendingProps, key, mode) {\n // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, pendingProps, key, mode);\n};\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n\n return IndeterminateComponent;\n} // This is used to create an alternate fiber to do work on.\n\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n {\n workInProgress._debugID = current._debugID;\n }\n\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.effectTag = NoEffect; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n expirationTime: currentDependencies.expirationTime,\n firstContext: currentDependencies.firstContext,\n responders: currentDependencies.responders\n }; // These will be overridden during the parent's reconciliation\n\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n\n return workInProgress;\n} // Used to reuse a Fiber for a second pass.\n\nfunction resetWorkInProgress(workInProgress, renderExpirationTime) {\n // This resets the Fiber to what createFiber or createWorkInProgress would\n // have set the values to before during the first pass. Ideally this wouldn't\n // be necessary but unfortunately many code paths reads from the workInProgress\n // when they should be reading from current and writing to workInProgress.\n // We assume pendingProps, index, key, ref, return are still untouched to\n // avoid doing another reconciliation.\n // Reset the effect tag but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.effectTag &= Placement; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childExpirationTime = NoWork;\n workInProgress.expirationTime = renderExpirationTime;\n workInProgress.child = null;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = 0;\n workInProgress.treeBaseDuration = 0;\n }\n } else {\n // Reset to the cloned values that createWorkInProgress would've.\n workInProgress.childExpirationTime = current.childExpirationTime;\n workInProgress.expirationTime = current.expirationTime;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n expirationTime: currentDependencies.expirationTime,\n firstContext: currentDependencies.firstContext,\n responders: currentDependencies.responders\n };\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n }\n\n return workInProgress;\n}\nfunction createHostRootFiber(tag) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode | BlockingMode | StrictMode;\n } else if (tag === BlockingRoot) {\n mode = BlockingMode | StrictMode;\n } else {\n mode = NoMode;\n }\n\n if ( isDevToolsPresent) {\n // Always collect profile timings when DevTools are present.\n // This enables DevTools to start capturing timing at any point–\n // Without some nodes in the tree having empty base times.\n mode |= ProfileMode;\n }\n\n return createFiber(HostRoot, null, null, mode);\n}\nfunction createFiberFromTypeAndProps(type, // React$ElementType\nkey, pendingProps, owner, mode, expirationTime) {\n var fiber;\n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n var resolvedType = type;\n\n if (typeof type === 'function') {\n if (shouldConstruct(type)) {\n fiberTag = ClassComponent;\n\n {\n resolvedType = resolveClassForHotReloading(resolvedType);\n }\n } else {\n {\n resolvedType = resolveFunctionForHotReloading(resolvedType);\n }\n }\n } else if (typeof type === 'string') {\n fiberTag = HostComponent;\n } else {\n getTag: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);\n\n case REACT_CONCURRENT_MODE_TYPE:\n fiberTag = Mode;\n mode |= ConcurrentMode | BlockingMode | StrictMode;\n break;\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictMode;\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, expirationTime, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, expirationTime, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key);\n\n default:\n {\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = ContextProvider;\n break getTag;\n\n case REACT_CONTEXT_TYPE:\n // This is a consumer\n fiberTag = ContextConsumer;\n break getTag;\n\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n\n break getTag;\n\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\n\n case REACT_BLOCK_TYPE:\n fiberTag = Block;\n break getTag;\n\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n\n var ownerName = owner ? getComponentName(owner.type) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n\n {\n {\n throw Error( \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" + (type == null ? type : typeof type) + \".\" + info );\n }\n }\n }\n }\n }\n\n fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.expirationTime = expirationTime;\n return fiber;\n}\nfunction createFiberFromElement(element, mode, expirationTime) {\n var owner = null;\n\n {\n owner = element._owner;\n }\n\n var type = element.type;\n var key = element.key;\n var pendingProps = element.props;\n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);\n\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n\n return fiber;\n}\nfunction createFiberFromFragment(elements, mode, expirationTime, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.expirationTime = expirationTime;\n return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, expirationTime, key) {\n {\n if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {\n error('Profiler must specify an \"id\" string and \"onRender\" function as props');\n }\n }\n\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.\n\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.type = REACT_PROFILER_TYPE;\n fiber.expirationTime = expirationTime;\n return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, expirationTime, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n fiber.type = REACT_SUSPENSE_TYPE;\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.expirationTime = expirationTime;\n return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n\n {\n // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n fiber.type = REACT_SUSPENSE_LIST_TYPE;\n }\n\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.expirationTime = expirationTime;\n return fiber;\n}\nfunction createFiberFromText(content, mode, expirationTime) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.expirationTime = expirationTime;\n return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.\n\n fiber.elementType = 'DELETED';\n fiber.type = 'DELETED';\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, expirationTime) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.expirationTime = expirationTime;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n} // Used for stashing WIP properties to replay failed work in DEV.\n\nfunction assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n } // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.effectTag = source.effectTag;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.expirationTime = source.expirationTime;\n target.childExpirationTime = source.childExpirationTime;\n target.alternate = source.alternate;\n\n {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n\n {\n target._debugID = source._debugID;\n }\n\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}\n\nfunction FiberRootNode(containerInfo, tag, hydrate) {\n this.tag = tag;\n this.current = null;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.pingCache = null;\n this.finishedExpirationTime = NoWork;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.context = null;\n this.pendingContext = null;\n this.hydrate = hydrate;\n this.callbackNode = null;\n this.callbackPriority = NoPriority;\n this.firstPendingTime = NoWork;\n this.firstSuspendedTime = NoWork;\n this.lastSuspendedTime = NoWork;\n this.nextKnownPendingLevel = NoWork;\n this.lastPingedTime = NoWork;\n this.lastExpiredTime = NoWork;\n\n {\n this.interactionThreadID = tracing.unstable_getThreadID();\n this.memoizedInteractions = new Set();\n this.pendingInteractionMap = new Map();\n }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {\n var root = new FiberRootNode(containerInfo, tag, hydrate);\n // stateNode is any.\n\n\n var uninitializedFiber = createHostRootFiber(tag);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n initializeUpdateQueue(uninitializedFiber);\n return root;\n}\nfunction isRootSuspendedAtTime(root, expirationTime) {\n var firstSuspendedTime = root.firstSuspendedTime;\n var lastSuspendedTime = root.lastSuspendedTime;\n return firstSuspendedTime !== NoWork && firstSuspendedTime >= expirationTime && lastSuspendedTime <= expirationTime;\n}\nfunction markRootSuspendedAtTime(root, expirationTime) {\n var firstSuspendedTime = root.firstSuspendedTime;\n var lastSuspendedTime = root.lastSuspendedTime;\n\n if (firstSuspendedTime < expirationTime) {\n root.firstSuspendedTime = expirationTime;\n }\n\n if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) {\n root.lastSuspendedTime = expirationTime;\n }\n\n if (expirationTime <= root.lastPingedTime) {\n root.lastPingedTime = NoWork;\n }\n\n if (expirationTime <= root.lastExpiredTime) {\n root.lastExpiredTime = NoWork;\n }\n}\nfunction markRootUpdatedAtTime(root, expirationTime) {\n // Update the range of pending times\n var firstPendingTime = root.firstPendingTime;\n\n if (expirationTime > firstPendingTime) {\n root.firstPendingTime = expirationTime;\n } // Update the range of suspended times. Treat everything lower priority or\n // equal to this update as unsuspended.\n\n\n var firstSuspendedTime = root.firstSuspendedTime;\n\n if (firstSuspendedTime !== NoWork) {\n if (expirationTime >= firstSuspendedTime) {\n // The entire suspended range is now unsuspended.\n root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;\n } else if (expirationTime >= root.lastSuspendedTime) {\n root.lastSuspendedTime = expirationTime + 1;\n } // This is a pending level. Check if it's higher priority than the next\n // known pending level.\n\n\n if (expirationTime > root.nextKnownPendingLevel) {\n root.nextKnownPendingLevel = expirationTime;\n }\n }\n}\nfunction markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) {\n // Update the range of pending times\n root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or\n // equal to this update as unsuspended.\n\n if (finishedExpirationTime <= root.lastSuspendedTime) {\n // The entire suspended range is now unsuspended.\n root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;\n } else if (finishedExpirationTime <= root.firstSuspendedTime) {\n // Part of the suspended range is now unsuspended. Narrow the range to\n // include everything between the unsuspended time (non-inclusive) and the\n // last suspended time.\n root.firstSuspendedTime = finishedExpirationTime - 1;\n }\n\n if (finishedExpirationTime <= root.lastPingedTime) {\n // Clear the pinged time\n root.lastPingedTime = NoWork;\n }\n\n if (finishedExpirationTime <= root.lastExpiredTime) {\n // Clear the expired time\n root.lastExpiredTime = NoWork;\n }\n}\nfunction markRootExpiredAtTime(root, expirationTime) {\n var lastExpiredTime = root.lastExpiredTime;\n\n if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) {\n root.lastExpiredTime = expirationTime;\n }\n}\n\nvar didWarnAboutNestedUpdates;\nvar didWarnAboutFindNodeInStrictMode;\n\n{\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n}\n\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n\n return parentContext;\n}\n\nfunction findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n } else {\n {\n {\n throw Error( \"Argument appears to not be a ReactComponent. Keys: \" + Object.keys(component) );\n }\n }\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictMode) {\n var componentName = getComponentName(fiber.type) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n\n if (fiber.mode & StrictMode) {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));\n } else {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));\n }\n }\n }\n\n return hostFiber.stateNode;\n }\n}\n\nfunction createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {\n return createFiberRoot(containerInfo, tag, hydrate);\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n\n var current$1 = container.current;\n var currentTime = requestCurrentTimeForUpdate();\n\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfUnmockedScheduler(current$1);\n warnIfNotScopedWithMatchingAct(current$1);\n }\n }\n\n var suspenseConfig = requestCurrentSuspenseConfig();\n var expirationTime = computeExpirationForFiber(currentTime, current$1, suspenseConfig);\n var context = getContextForSubtree(parentComponent);\n\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n {\n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n\n error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');\n }\n }\n\n var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: element\n };\n callback = callback === undefined ? null : callback;\n\n if (callback !== null) {\n {\n if (typeof callback !== 'function') {\n error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(current$1, update);\n scheduleWork(current$1, expirationTime);\n return expirationTime;\n}\nfunction getPublicRootInstance(container) {\n var containerFiber = container.current;\n\n if (!containerFiber.child) {\n return null;\n }\n\n switch (containerFiber.child.tag) {\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n\n default:\n return containerFiber.child.stateNode;\n }\n}\n\nfunction markRetryTimeImpl(fiber, retryTime) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n if (suspenseState.retryTime < retryTime) {\n suspenseState.retryTime = retryTime;\n }\n }\n} // Increases the priority of thennables when they resolve within this boundary.\n\n\nfunction markRetryTimeIfNotHydrated(fiber, retryTime) {\n markRetryTimeImpl(fiber, retryTime);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryTimeImpl(alternate, retryTime);\n }\n}\n\nfunction attemptUserBlockingHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate());\n scheduleWork(fiber, expTime);\n markRetryTimeIfNotHydrated(fiber, expTime);\n}\nfunction attemptContinuousHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n scheduleWork(fiber, ContinuousHydration);\n markRetryTimeIfNotHydrated(fiber, ContinuousHydration);\n}\nfunction attemptHydrationAtCurrentPriority$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority other than synchronously flush it.\n return;\n }\n\n var currentTime = requestCurrentTimeForUpdate();\n var expTime = computeExpirationForFiber(currentTime, fiber, null);\n scheduleWork(fiber, expTime);\n markRetryTimeIfNotHydrated(fiber, expTime);\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.tag === FundamentalComponent) {\n return hostFiber.stateNode.instance;\n }\n\n return hostFiber.stateNode;\n}\n\nvar shouldSuspendImpl = function (fiber) {\n return false;\n};\n\nfunction shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideProps = null;\nvar scheduleUpdate = null;\nvar setSuspenseHandler = null;\n\n{\n var copyWithSetImpl = function (obj, path, idx, value) {\n if (idx >= path.length) {\n return value;\n }\n\n var key = path[idx];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n // For now, the \"id\" of stateful hooks is just the stateful hook index.\n // This may change in the future with e.g. nested hooks.\n var currentHook = fiber.memoizedState;\n\n while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n\n if (currentHook !== null) {\n var newState = copyWithSet(currentHook.memoizedState, path, value);\n currentHook.memoizedState = newState;\n currentHook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleWork(fiber, Sync);\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleWork(fiber, Sync);\n };\n\n scheduleUpdate = function (fiber) {\n scheduleWork(fiber, Sync);\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals(_assign({}, devToolsConfig, {\n overrideHookState: overrideHookState,\n overrideProps: overrideProps,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: function (fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n },\n findFiberByHostInstance: function (instance) {\n if (!findFiberByHostInstance) {\n // Might not be implemented by the renderer.\n return null;\n }\n\n return findFiberByHostInstance(instance);\n },\n // React Refresh\n findHostInstancesForRefresh: findHostInstancesForRefresh ,\n scheduleRefresh: scheduleRefresh ,\n scheduleRoot: scheduleRoot ,\n setRefreshHandler: setRefreshHandler ,\n // Enables DevTools to append owner stacks to error messages in DEV mode.\n getCurrentFiber: function () {\n return current;\n } \n }));\n}\nvar IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing;\n\nfunction ReactDOMRoot(container, options) {\n this._internalRoot = createRootImpl(container, ConcurrentRoot, options);\n}\n\nfunction ReactDOMBlockingRoot(container, tag, options) {\n this._internalRoot = createRootImpl(container, tag, options);\n}\n\nReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {\n var root = this._internalRoot;\n\n {\n if (typeof arguments[1] === 'function') {\n error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n\n var container = root.containerInfo;\n\n if (container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(root.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + \"root.unmount() to empty a root's container.\");\n }\n }\n }\n }\n\n updateContainer(children, root, null, null);\n};\n\nReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {\n {\n if (typeof arguments[0] === 'function') {\n error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n }\n\n var root = this._internalRoot;\n var container = root.containerInfo;\n updateContainer(null, root, null, function () {\n unmarkContainerAsRoot(container);\n });\n};\n\nfunction createRootImpl(container, tag, options) {\n // Tag is either LegacyRoot or Concurrent Root\n var hydrate = options != null && options.hydrate === true;\n var hydrationCallbacks = options != null && options.hydrationOptions || null;\n var root = createContainer(container, tag, hydrate);\n markContainerAsRoot(root.current, container);\n\n if (hydrate && tag !== LegacyRoot) {\n var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument;\n eagerlyTrapReplayableEvents(container, doc);\n }\n\n return root;\n}\nfunction createLegacyRoot(container, options) {\n return new ReactDOMBlockingRoot(container, LegacyRoot, options);\n}\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\nvar warnedAboutHydrateAPI = false;\n\n{\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n }\n }\n }\n\n var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));\n\n if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');\n }\n\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');\n }\n };\n}\n\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\n\nfunction shouldHydrateDueToLegacyHeuristic(container) {\n var rootElement = getReactRootElementInContainer(container);\n return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));\n}\n\nfunction legacyCreateRootFromDOMContainer(container, forceHydrate) {\n var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.\n\n if (!shouldHydrate) {\n var warned = false;\n var rootSibling;\n\n while (rootSibling = container.lastChild) {\n {\n if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {\n warned = true;\n\n error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');\n }\n }\n\n container.removeChild(rootSibling);\n }\n }\n\n {\n if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {\n warnedAboutHydrateAPI = true;\n\n warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');\n }\n }\n\n return createLegacyRoot(container, shouldHydrate ? {\n hydrate: true\n } : undefined);\n}\n\nfunction warnOnInvalidCallback$1(callback, callerName) {\n {\n if (callback !== null && typeof callback !== 'function') {\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n }\n}\n\nfunction legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n } // TODO: Without `any` type, Flow says \"Property cannot be accessed on any\n // member of intersection type.\" Whyyyyyy.\n\n\n var root = container._reactRootContainer;\n var fiberRoot;\n\n if (!root) {\n // Initial mount\n root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n originalCallback.call(instance);\n };\n } // Initial mount should not be batched.\n\n\n unbatchedUpdates(function () {\n updateContainer(children, fiberRoot, parentComponent, callback);\n });\n } else {\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n\n _originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, fiberRoot, parentComponent, callback);\n }\n\n return getPublicRootInstance(fiberRoot);\n}\n\nfunction findDOMNode(componentOrElement) {\n {\n var owner = ReactCurrentOwner$3.current;\n\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n if (!warnedAboutRefsInRender) {\n error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component');\n }\n\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n\n if (componentOrElement == null) {\n return null;\n }\n\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n}\nfunction hydrate(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n}\nfunction render(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n }\n }\n\n return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n}\nfunction unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n if (!isValidContainer(containerNode)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n if (!(parentComponent != null && has(parentComponent))) {\n {\n throw Error( \"parentComponent must be a valid React Component\" );\n }\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nfunction unmountComponentAtNode(container) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"unmountComponentAtNode(...): Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);\n\n if (renderedByDifferentReact) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n }\n } // Unmount should not be batched.\n\n\n unbatchedUpdates(function () {\n legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n // $FlowFixMe This should probably use `delete container._reactRootContainer`\n container._reactRootContainer = null;\n unmarkContainerAsRoot(container);\n });\n }); // If you call unmountComponentAtNode twice in quick succession, you'll\n // get `true` twice. That's probably fine?\n\n return true;\n } else {\n {\n var _rootEl = getReactRootElementInContainer(container);\n\n var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;\n\n if (hasNonRootReactChild) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n }\n }\n\n return false;\n }\n}\n\nfunction createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\n\nvar ReactVersion = '16.13.1';\n\nsetAttemptUserBlockingHydration(attemptUserBlockingHydration$1);\nsetAttemptContinuousHydration(attemptContinuousHydration$1);\nsetAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\nvar didWarnAboutUnstableCreatePortal = false;\n\n{\n if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype\n Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');\n }\n}\n\nsetRestoreImplementation(restoreControlledState$3);\nsetBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);\n\nfunction createPortal$1(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n } // TODO: pass ReactDOM portal implementation as third argument\n // $FlowFixMe The Flow type is opaque but there's no way to actually create it.\n\n\n return createPortal(children, container, null, key);\n}\n\nfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nfunction unstable_createPortal(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n {\n if (!didWarnAboutUnstableCreatePortal) {\n didWarnAboutUnstableCreatePortal = true;\n\n warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the \"unstable_\" prefix.');\n }\n }\n\n return createPortal$1(children, container, key);\n}\n\nvar Internals = {\n // Keep in sync with ReactDOMUnstableNativeDependencies.js\n // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.\n Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]\n};\nvar foundDevTools = injectIntoDevTools({\n findFiberByHostInstance: getClosestInstanceFromNode,\n bundleType: 1 ,\n version: ReactVersion,\n rendererPackageName: 'react-dom'\n});\n\n{\n if (!foundDevTools && canUseDOM && window.top === window.self) {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n if (/^(https?|file):$/.test(protocol)) {\n // eslint-disable-next-line react-internal/no-production-logging\n console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');\n }\n }\n }\n}\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\nexports.createPortal = createPortal$1;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync;\nexports.hydrate = hydrate;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_createPortal = unstable_createPortal;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.version = ReactVersion;\n })();\n}\n"]},"metadata":{},"sourceType":"script"}