1 line
2.8 MiB
1 line
2.8 MiB
{"ast":null,"code":"/**\n * @license React\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\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 'function') {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n }\n var React = require('react');\n var Scheduler = require('scheduler');\n var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n var suppressWarning = false;\n function setSuppressWarning(newSuppressWarning) {\n {\n suppressWarning = newSuppressWarning;\n }\n } // In DEV, calls to console.warn and console.error get replaced\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 function warn(format) {\n {\n if (!suppressWarning) {\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 printWarning('warn', format, args);\n }\n }\n }\n function error(format) {\n {\n if (!suppressWarning) {\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 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 ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n var argsWithFormat = args.map(function (item) {\n return String(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 }\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 ScopeComponent = 21;\n var OffscreenComponent = 22;\n var LegacyHiddenComponent = 23;\n var CacheComponent = 24;\n var TracingMarkerComponent = 25;\n\n // -----------------------------------------------------------------------------\n\n var enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing\n // the react-reconciler package.\n\n var enableNewReconciler = false; // Support legacy Primer support on internal FB www\n\n var enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.\n\n var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n\n var enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz\n // React DOM Chopping Block\n //\n // Similar to main Chopping Block but only flags related to React DOM. These are\n // grouped because we will likely batch all of them into a single major release.\n // -----------------------------------------------------------------------------\n // Disable support for comment nodes as React DOM containers. Already disabled\n // in open source, but www codebase still relies on it. Need to remove.\n\n var disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection.\n // and client rendering, mostly to allow JSX attributes to apply to the custom\n // element's object properties instead of only HTML attributes.\n // https://github.com/facebook/react/issues/11347\n\n var enableCustomElementPropertySupport = false; // Disables children for <textarea> elements\n var warnAboutStringRefs = true; // -----------------------------------------------------------------------------\n // Debugging and DevTools\n // -----------------------------------------------------------------------------\n // Adds user timing marks for e.g. state updates, suspense, and work loop stuff,\n // for an experimental timeline tool.\n\n var enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState\n\n var enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\n var enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an \"update\" and a \"cascading-update\".\n\n var allNativeEvents = new Set();\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 function registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + 'Capture', dependencies);\n }\n function registerDirectEvent(registrationName, dependencies) {\n {\n if (registrationNameDependencies[registrationName]) {\n error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n }\n }\n registrationNameDependencies[registrationName] = dependencies;\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n for (var i = 0; i < dependencies.length; i++) {\n allNativeEvents.add(dependencies[i]);\n }\n }\n var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n /*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n // $FlowFixMe only called in DEV, so void return is not possible.\n function typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n } // $FlowFixMe only called in DEV, so void return is not possible.\n\n function willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n }\n function testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n }\n function checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n }\n function checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n }\n function checkPropStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n }\n function checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n }\n function checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n }\n function checkFormFieldValueStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n }\n\n // A reserved attribute.\n // It is handled by React separately and shouldn't be written to the DOM.\n var RESERVED = 0; // A simple string attribute.\n // Attributes that aren't in the filter 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\n /* eslint-disable max-len */\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 VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\n var illegalAttributeNameCache = {};\n var validatedAttributeNameCache = {};\n function isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n illegalAttributeNameCache[attributeName] = true;\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n return false;\n }\n function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n if (isCustomComponentTag) {\n return false;\n }\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n return false;\n }\n function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\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 case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\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 default:\n return false;\n }\n }\n function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n if (isCustomComponentTag) {\n return false;\n }\n if (propertyInfo !== null) {\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n case OVERLOADED_BOOLEAN:\n return value === false;\n case NUMERIC:\n return isNaN(value);\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n return false;\n }\n function getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n }\n function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\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 this.removeEmptyString = removeEmptyString;\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 var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\n var reservedProps = ['children', 'dangerouslySetInnerHTML',\n // 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,\n // mustUseProperty\n name,\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\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,\n // mustUseProperty\n attributeName,\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\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,\n // mustUseProperty\n name.toLowerCase(),\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\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,\n // mustUseProperty\n name,\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\n false);\n }); // These are HTML boolean attributes.\n\n ['allowFullScreen', 'async',\n // 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', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless',\n // Microdata\n 'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false,\n // mustUseProperty\n name.toLowerCase(),\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\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',\n // 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,\n // mustUseProperty\n name,\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\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,\n // mustUseProperty\n name,\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\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,\n // mustUseProperty\n name,\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\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,\n // mustUseProperty\n name.toLowerCase(),\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\n false);\n });\n var CAMELIZE = /[\\-\\:]([a-z])/g;\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 attribute filter.\n // Some of these attributes can be hard to find. This list was created by\n // scraping the MDN documentation.\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,\n // mustUseProperty\n attributeName, null,\n // attributeNamespace\n false,\n // sanitizeURL\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,\n // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false,\n // sanitizeURL\n 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,\n // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false,\n // sanitizeURL\n 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,\n // mustUseProperty\n attributeName.toLowerCase(),\n // attributeName\n null,\n // attributeNamespace\n false,\n // sanitizeURL\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,\n // mustUseProperty\n 'xlink:href', 'http://www.w3.org/1999/xlink', true,\n // sanitizeURL\n false);\n ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false,\n // mustUseProperty\n attributeName.toLowerCase(),\n // attributeName\n null,\n // attributeNamespace\n true,\n // sanitizeURL\n true);\n });\n\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 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 /**\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 function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n // This check protects multiple uses of `expected`, which is why the\n // react-internal/safe-string-coercion rule is disabled in several spots\n // below.\n {\n checkAttributeStringCoercion(expected, name);\n }\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 // eslint-disable-next-line react-internal/safe-string-coercion\n sanitizeURL('' + expected);\n }\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n if (value === '' + expected) {\n return expected;\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 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 stringValue = node.getAttribute(attributeName);\n }\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue; // eslint-disable-next-line react-internal/safe-string-coercion\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 function getValueForAttribute(node, name, expected, isCustomComponentTag) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n {\n checkAttributeStringCoercion(expected, name);\n }\n if (value === '' + expected) {\n return expected;\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 function setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n }\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n {\n checkAttributeStringCoercion(value, name);\n }\n node.setAttribute(_attributeName, '' + value);\n }\n }\n return;\n }\n var mustUseProperty = propertyInfo.mustUseProperty;\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\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 return;\n } // The rest are treated as attributes with special cases.\n\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n var attributeValue;\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 {\n checkAttributeStringCoercion(value, attributeName);\n }\n attributeValue = '' + value;\n }\n if (propertyInfo.sanitizeURL) {\n sanitizeURL(attributeValue.toString());\n }\n }\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n }\n\n // ATTENTION\n // When adding new symbols to this file,\n // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n // The Symbol used to tag the ReactElement-like types.\n var REACT_ELEMENT_TYPE = Symbol.for('react.element');\n var REACT_PORTAL_TYPE = Symbol.for('react.portal');\n var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\n var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\n var REACT_PROFILER_TYPE = Symbol.for('react.profiler');\n var REACT_PROVIDER_TYPE = Symbol.for('react.provider');\n var REACT_CONTEXT_TYPE = Symbol.for('react.context');\n var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\n var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\n var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\n var REACT_MEMO_TYPE = Symbol.for('react.memo');\n var REACT_LAZY_TYPE = Symbol.for('react.lazy');\n var REACT_SCOPE_TYPE = Symbol.for('react.scope');\n var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\n var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n var REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\n var REACT_CACHE_TYPE = Symbol.for('react.cache');\n var REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker');\n var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n function getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n return null;\n }\n var assign = Object.assign;\n\n // Helpers to patch console.logs to avoid logging during side-effect free\n // replaying on render function. This currently only patches the object\n // lazily which won't cover if the log function was extracted eagerly.\n // We could also eagerly patch the method.\n var disabledDepth = 0;\n var prevLog;\n var prevInfo;\n var prevWarn;\n var prevError;\n var prevGroup;\n var prevGroupCollapsed;\n var prevGroupEnd;\n function disabledLog() {}\n disabledLog.__reactDisabledLog = true;\n function disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n disabledDepth++;\n }\n }\n function reenableLogs() {\n {\n disabledDepth--;\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n }\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n var prefix;\n function describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n return '\\n' + prefix + name;\n }\n }\n var reentry = false;\n var componentFrameCache;\n {\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n }\n function describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n {\n var frame = componentFrameCache.get(fn);\n if (frame !== undefined) {\n return frame;\n }\n }\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n break;\n }\n }\n }\n } finally {\n reentry = false;\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n return syntheticFrame;\n }\n function describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n }\n function describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n }\n function shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n }\n function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n if (type == null) {\n return '';\n }\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n return '';\n }\n function describeFiber(fiber) {\n var owner = fiber._debugOwner ? fiber._debugOwner.type : null;\n var source = fiber._debugSource;\n switch (fiber.tag) {\n case HostComponent:\n return describeBuiltInComponentFrame(fiber.type);\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy');\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(fiber.type);\n case ForwardRef:\n return describeFunctionComponentFrame(fiber.type.render);\n case ClassComponent:\n return describeClassComponentFrame(fiber.type);\n default:\n return '';\n }\n }\n function getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = '';\n var node = workInProgress;\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n }\n function getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n if (displayName) {\n return displayName;\n }\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n } // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n function getContextName(type) {\n return type.displayName || 'Context';\n } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n function getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n if (typeof type === 'string') {\n return type;\n }\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n case REACT_PORTAL_TYPE:\n return 'Portal';\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n if (outerName !== null) {\n return outerName;\n }\n return getComponentNameFromType(type.type) || 'Memo';\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n return null;\n }\n function getWrappedName$1(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n } // Keep in sync with shared/getComponentNameFromType\n\n function getContextName$1(type) {\n return type.displayName || 'Context';\n }\n function getComponentNameFromFiber(fiber) {\n var tag = fiber.tag,\n type = fiber.type;\n switch (tag) {\n case CacheComponent:\n return 'Cache';\n case ContextConsumer:\n var context = type;\n return getContextName$1(context) + '.Consumer';\n case ContextProvider:\n var provider = type;\n return getContextName$1(provider._context) + '.Provider';\n case DehydratedFragment:\n return 'DehydratedFragment';\n case ForwardRef:\n return getWrappedName$1(type, type.render, 'ForwardRef');\n case Fragment:\n return 'Fragment';\n case HostComponent:\n // Host component type is the display name (e.g. \"div\", \"View\")\n return type;\n case HostPortal:\n return 'Portal';\n case HostRoot:\n return 'Root';\n case HostText:\n return 'Text';\n case LazyComponent:\n // Name comes from the type in this case; we don't have a tag.\n return getComponentNameFromType(type);\n case Mode:\n if (type === REACT_STRICT_MODE_TYPE) {\n // Don't be less specific than shared/getComponentNameFromType\n return 'StrictMode';\n }\n return 'Mode';\n case OffscreenComponent:\n return 'Offscreen';\n case Profiler:\n return 'Profiler';\n case ScopeComponent:\n return 'Scope';\n case SuspenseComponent:\n return 'Suspense';\n case SuspenseListComponent:\n return 'SuspenseList';\n case TracingMarkerComponent:\n return 'TracingMarker';\n // The display name for this tags come from the user-provided type:\n\n case ClassComponent:\n case FunctionComponent:\n case IncompleteClassComponent:\n case IndeterminateComponent:\n case MemoComponent:\n case SimpleMemoComponent:\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n if (typeof type === 'string') {\n return type;\n }\n break;\n }\n return null;\n }\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var current = null;\n var isRendering = false;\n function getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n var owner = current._debugOwner;\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentNameFromFiber(owner);\n }\n }\n return null;\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 return getStackByFiberInDevAndProd(current);\n }\n }\n function resetCurrentFiber() {\n {\n ReactDebugCurrentFrame.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n }\n function setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n }\n function getCurrentFiber() {\n {\n return current;\n }\n }\n function 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.\n function toString(value) {\n // The coercion safety check is performed in getToStringValue().\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n }\n function getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'string':\n case 'undefined':\n return value;\n case 'object':\n {\n checkFormFieldValueStringCoercion(value);\n }\n return value;\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n }\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 function checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n 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 if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n 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 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 function getTracker(node) {\n return node._valueTracker;\n }\n function detachTracker(node) {\n node._valueTracker = null;\n }\n function getValueFromNode(node) {\n var value = '';\n if (!node) {\n return value;\n }\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n return value;\n }\n function trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n {\n checkFormFieldValueStringCoercion(node[valueField]);\n }\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 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 {\n checkFormFieldValueStringCoercion(value);\n }\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 {\n checkFormFieldValueStringCoercion(value);\n }\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\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 node._valueTracker = trackValueOnNode(node);\n }\n function updateValueIfChanged(node) {\n if (!node) {\n return false;\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 var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n return false;\n }\n function getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n if (typeof doc === 'undefined') {\n return null;\n }\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n }\n var didWarnValueDefaultValue = false;\n var didWarnCheckedDefaultChecked = false;\n var didWarnControlledToUncontrolled = false;\n var didWarnUncontrolledToControlled = false;\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 function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n var hostProps = assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n }\n function initWrapperState(element, props) {\n {\n checkControlledValueProps('input', props);\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://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n didWarnCheckedDefaultChecked = true;\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://reactjs.org/link/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 function updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n }\n function updateWrapper(element, props) {\n var node = element;\n {\n var controlled = isControlled(props);\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n didWarnUncontrolledToControlled = true;\n }\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n didWarnControlledToUncontrolled = true;\n }\n }\n updateChecked(element, props);\n var value = getToStringValue(props.value);\n var type = props.type;\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' ||\n // 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 // 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 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 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 // 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 var name = node.name;\n if (name !== '') {\n node.name = '';\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 if (name !== '') {\n node.name = name;\n }\n }\n function restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n }\n function updateNamedCousins(rootNode, props) {\n var name = props.name;\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\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 checkAttributeStringCoercion(name, 'name');\n }\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\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 var otherProps = getFiberCurrentPropsFromNode(otherNode);\n if (!otherProps) {\n throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');\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 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 function setDefaultValue(node, type, value) {\n if (\n // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== 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 var didWarnSelectedSetOnOption = false;\n var didWarnInvalidChild = false;\n var didWarnInvalidInnerHTML = false;\n /**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\n function validateProps(element, props) {\n {\n // If a value is not provided, then the children must be simple.\n if (props.value == null) {\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 if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n });\n } else if (props.dangerouslySetInnerHTML != null) {\n if (!didWarnInvalidInnerHTML) {\n didWarnInvalidInnerHTML = true;\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n }\n }\n } // TODO: Remove support for `selected` in <option>.\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 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 var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\n function isArray(a) {\n return isArrayImpl(a);\n }\n var didWarnValueDefaultValue$1;\n {\n didWarnValueDefaultValue$1 = false;\n }\n function getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n return '';\n }\n var valuePropNames = ['value', 'defaultValue'];\n /**\n * Validation function for `value` and `defaultValue`.\n */\n\n function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n if (props[propName] == null) {\n continue;\n }\n var propNameIsArray = isArray(props[propName]);\n if (props.multiple && !propNameIsArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && propNameIsArray) {\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 function updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\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 var defaultSelected = null;\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n return;\n }\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\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 function getHostProps$1(element, props) {\n return assign({}, props, {\n value: undefined\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://reactjs.org/link/controlled-components');\n didWarnValueDefaultValue$1 = true;\n }\n }\n }\n function postMountWrapper$2(element, props) {\n var node = element;\n node.multiple = !!props.multiple;\n var value = props.value;\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 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 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 function restoreControlledState$1(element, props) {\n var node = element;\n var value = props.value;\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n }\n var 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 */\n function getHostProps$2(element, props) {\n var node = element;\n if (props.dangerouslySetInnerHTML != null) {\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\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 var hostProps = assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n return hostProps;\n }\n function initWrapperState$2(element, props) {\n var node = element;\n {\n checkControlledValueProps('textarea', props);\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://reactjs.org/link/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 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 throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\n }\n children = children[0];\n }\n defaultValue = children;\n }\n }\n if (defaultValue == null) {\n defaultValue = '';\n }\n initialValue = defaultValue;\n }\n node._wrapperState = {\n initialValue: getToStringValue(initialValue)\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 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 if (props.defaultValue == null && node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n }\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\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 function restoreControlledState$2(element, props) {\n // DOM component is still mounted; update\n updateWrapper$1(element, props);\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'; // Assumes there is no parent namespace.\n\n function getIntrinsicNamespace(type) {\n switch (type) {\n case 'svg':\n return SVG_NAMESPACE;\n case 'math':\n return MATH_NAMESPACE;\n default:\n return HTML_NAMESPACE;\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 if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n // We're leaving SVG.\n return HTML_NAMESPACE;\n } // By default, pass namespace below.\n\n return parentNamespace;\n }\n\n /* globals MSApp */\n\n /**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\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 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 === SVG_NAMESPACE) {\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 while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n return;\n }\n }\n node.innerHTML = html;\n });\n\n /**\n * HTML nodeType values that represent the type of the node\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 /**\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 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n };\n\n // List derived from Gecko source code:\n // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\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 /**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\n var isUnitlessNumber = {\n animationIterationCount: true,\n aspectRatio: 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 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 /**\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 if (isEmpty) {\n return '';\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 checkCSSPropertyStringCoercion(value, name);\n }\n return ('' + value).trim();\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 var warnValidStyle = function () {};\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 var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n warnedStyleNames[name] = true;\n error('Unsupported style property %s. Did you mean %s?', name,\n // 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 var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\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 var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\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 var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n warnedForNaNValue = true;\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n warnedForInfinityValue = true;\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\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 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 /**\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 for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var styleValue = styles[styleName];\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 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 function setValueForStyles(node, styles) {\n var style = node.style;\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\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 if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\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 function expandShorthandMap(styles) {\n var expanded = {};\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\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 function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n {\n if (!nextStyles) {\n return;\n }\n var expandedUpdates = expandShorthandMap(styleUpdates);\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n for (var key in expandedUpdates) {\n var originalKey = expandedUpdates[key];\n var correctOriginalKey = expandedStyles[key];\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n if (warnedAbout[warningKey]) {\n continue;\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 }\n\n // For HTML, certain tags should omit their close tag. We keep a list for\n // those special-case tags.\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\n // `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\n var voidElementTags = assign({\n menuitem: true\n }, omittedCloseTags);\n var HTML = '__html';\n function assertValidProps(tag, props) {\n if (!props) {\n return;\n } // Note the use of `==` which checks for null or undefined.\n\n if (voidElementTags[tag]) {\n if (props.children != null || props.dangerouslySetInnerHTML != null) {\n throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n }\n if (props.dangerouslySetInnerHTML != null) {\n if (props.children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n if (typeof props.dangerouslySetInnerHTML !== 'object' || !(HTML in props.dangerouslySetInnerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\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 if (props.style != null && typeof props.style !== 'object') {\n throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n }\n }\n function isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list 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 default:\n return true;\n }\n }\n\n // When adding attributes to the HTML or SVG allowed attribute list, be sure to\n // also add them to this module to ensure casing and incorrect name\n // warnings.\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 disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\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 imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\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-description': 0,\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 function validateProperty(tagName, name) {\n {\n if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\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 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 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 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 function warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n for (var key in props) {\n var isValid = validateProperty(type, key);\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n }\n }\n }\n function validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n warnInvalidARIAProps(type, props);\n }\n var didWarnValueNull = false;\n function validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\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 var validateProperty$1 = function () {};\n {\n var warnedProperties$1 = {};\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 validateProperty$1 = function (tagName, name, value, eventRegistry) {\n if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n var lowerCasedName = name.toLowerCase();\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 if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\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 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 warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\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 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 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 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 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 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 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 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 if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\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 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 return true;\n };\n }\n var warnUnknownProperties = function (type, props, eventRegistry) {\n {\n var unknownProps = [];\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\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://reactjs.org/link/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://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n }\n }\n };\n function validateProperties$2(type, props, eventRegistry) {\n if (isCustomComponent(type, props)) {\n return;\n }\n warnUnknownProperties(type, props, eventRegistry);\n }\n var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\n var IS_NON_DELEGATED = 1 << 1;\n var IS_CAPTURE_PHASE = 1 << 2;\n // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n // we call willDeferLaterForLegacyFBSupport, thus not bailing out\n // will result in endless cycles like an infinite loop.\n // We also don't want to defer during event replaying.\n\n var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n // This exists to avoid circular dependency between ReactDOMEventReplaying\n // and DOMPluginEventSystem.\n var currentReplayingEvent = null;\n function setReplayingEvent(event) {\n {\n if (currentReplayingEvent !== null) {\n error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n currentReplayingEvent = event;\n }\n function resetReplayingEvent() {\n {\n if (currentReplayingEvent === null) {\n error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n currentReplayingEvent = null;\n }\n function isReplayingEvent(event) {\n return event === currentReplayingEvent;\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\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 return target.nodeType === TEXT_NODE ? target.parentNode : target;\n }\n var restoreImpl = null;\n var restoreTarget = null;\n var restoreQueue = null;\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 if (!internalInstance) {\n // Unmounted\n return;\n }\n if (typeof restoreImpl !== 'function') {\n throw new 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 var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var _props = getFiberCurrentPropsFromNode(stateNode);\n restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n }\n }\n function setRestoreImplementation(impl) {\n restoreImpl = impl;\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 function needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n }\n function restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n }\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\n var batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n };\n var flushSyncImpl = function () {};\n var isInsideEventHandler = false;\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 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 // TODO: Restore state in the microtask, after the discrete updates flush,\n // instead of early flushing them here.\n flushSyncImpl();\n restoreStateIfNeeded();\n }\n }\n function batchedUpdates(fn, a, b) {\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(a, b);\n }\n isInsideEventHandler = true;\n try {\n return batchedUpdatesImpl(fn, a, b);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n } // TODO: Replace with flushSync\n function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n flushSyncImpl = _flushSyncImpl;\n }\n function isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\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 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 function getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n if (stateNode === null) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n var props = getFiberCurrentPropsFromNode(stateNode);\n if (props === null) {\n // Work in progress.\n return null;\n }\n var listener = props[registrationName];\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n if (listener && typeof listener !== 'function') {\n throw new Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n }\n return listener;\n }\n var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\n if (canUseDOM) {\n try {\n var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value\n\n Object.defineProperty(options, 'passive', {\n get: function () {\n passiveBrowserEventsSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (e) {\n passiveBrowserEventsSupported = false;\n }\n }\n function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n }\n var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\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 invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(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/facebook/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (typeof document === 'undefined' || document === null) {\n throw new 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 var evt = document.createEvent('Event');\n var didCall = false; // 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');\n function restoreAfterDispatch() {\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 } // 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 function callCallback() {\n didCall = true;\n restoreAfterDispatch();\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 var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\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 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 if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n if (didCall && didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n // eslint-disable-next-line react-internal/prod-error-codes\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 // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');\n }\n this.onError(error);\n } // Remove our event listeners\n\n window.removeEventListener('error', handleWindowError);\n if (!didCall) {\n // Something went really wrong, and our event was not dispatched.\n // https://github.com/facebook/react/issues/16734\n // https://github.com/facebook/react/issues/16585\n // Fall back to the production implementation.\n restoreAfterDispatch();\n return invokeGuardedCallbackProd.apply(this, arguments);\n }\n };\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 function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n if (hasError) {\n var error = clearCaughtError();\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 function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }\n function hasCaughtError() {\n return hasError;\n }\n function clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n throw new 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 * `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 function get(key) {\n return key._reactInternals;\n }\n function has(key) {\n return key._reactInternals !== undefined;\n }\n function set(key, value) {\n key._reactInternals = value;\n }\n\n // Don't change these two values. They're used by React Dev Tools.\n var NoFlags = /* */\n 0;\n var PerformedWork = /* */\n 1; // You can change the rest (and add more).\n\n var Placement = /* */\n 2;\n var Update = /* */\n 4;\n var ChildDeletion = /* */\n 16;\n var ContentReset = /* */\n 32;\n var Callback = /* */\n 64;\n var DidCapture = /* */\n 128;\n var ForceClientRender = /* */\n 256;\n var Ref = /* */\n 512;\n var Snapshot = /* */\n 1024;\n var Passive = /* */\n 2048;\n var Hydrating = /* */\n 4096;\n var Visibility = /* */\n 8192;\n var StoreConsistency = /* */\n 16384;\n var LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)\n\n var HostEffectMask = /* */\n 32767; // These are not really side effects, but we still reuse this field.\n\n var Incomplete = /* */\n 32768;\n var ShouldCapture = /* */\n 65536;\n var ForceUpdateForLegacySuspense = /* */\n 131072;\n var Forked = /* */\n 1048576; // Static tags describe aspects of a fiber that are not specific to a render,\n // e.g. a fiber uses a passive effect (even if there are no updates on this particular render).\n // This enables us to defer more work in the unmount case,\n // since we can defer traversing the tree during layout to look for Passive effects,\n // and instead rely on the static flag as a signal that there may be cleanup work.\n\n var RefStatic = /* */\n 2097152;\n var LayoutStatic = /* */\n 4194304;\n var PassiveStatic = /* */\n 8388608; // These flags allow us to traverse to fibers that have effects on mount\n // without traversing the entire tree after every commit for\n // double invoking\n\n var MountLayoutDev = /* */\n 16777216;\n var MountPassiveDev = /* */\n 33554432; // Groups of flags that are used in the commit phase to skip over trees that\n // don't contain effects, by checking subtreeFlags.\n\n var BeforeMutationMask =\n // TODO: Remove Update flag from before mutation phase by re-landing Visibility\n // flag logic (see #20043)\n Update | Snapshot | 0;\n var MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;\n var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask\n\n var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.\n // This allows certain concepts to persist without recalculating them,\n // e.g. whether a subtree contains passive effects or portals.\n\n var StaticMask = LayoutStatic | PassiveStatic | RefStatic;\n var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\n function getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\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 do {\n node = nextNode;\n if ((node.flags & (Placement | Hydrating)) !== NoFlags) {\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 nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\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 return null;\n }\n function getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n if (suspenseState === null) {\n var current = fiber.alternate;\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n return null;\n }\n function getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n }\n function isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n }\n function isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\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.', getComponentNameFromFiber(ownerFiber) || 'A component');\n }\n instance._warnedAboutRefsInRender = true;\n }\n }\n var fiber = get(component);\n if (!fiber) {\n return false;\n }\n return getNearestMountedFiber(fiber) === fiber;\n }\n function assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n }\n function findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\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 if (nearestMounted === null) {\n throw new Error('Unable to find node on an unmounted component.');\n }\n if (nearestMounted !== fiber) {\n return null;\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 var a = fiber;\n var b = alternate;\n while (true) {\n var parentA = a.return;\n if (parentA === null) {\n // We're at the root.\n break;\n }\n var parentB = parentA.alternate;\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 if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\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 if (parentA.child === parentB.child) {\n var child = parentA.child;\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 if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\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 throw new Error('Unable to find node on an unmounted component.');\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 while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n _child = _child.sibling;\n }\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n _child = _child.sibling;\n }\n if (!didFindChild) {\n throw new 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 if (a.alternate !== b) {\n throw new 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 } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n if (a.tag !== HostRoot) {\n throw new Error('Unable to find node on an unmounted component.');\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 return alternate;\n }\n function findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;\n }\n function findCurrentHostFiberImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n }\n var child = node.child;\n while (child !== null) {\n var match = findCurrentHostFiberImpl(child);\n if (match !== null) {\n return match;\n }\n child = child.sibling;\n }\n return null;\n }\n function findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;\n }\n function findCurrentHostFiberWithNoPortalsImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n }\n var child = node.child;\n while (child !== null) {\n if (child.tag !== HostPortal) {\n var match = findCurrentHostFiberWithNoPortalsImpl(child);\n if (match !== null) {\n return match;\n }\n }\n child = child.sibling;\n }\n return null;\n }\n\n // This module only exists as an ESM wrapper around the external CommonJS\n var scheduleCallback = Scheduler.unstable_scheduleCallback;\n var cancelCallback = Scheduler.unstable_cancelCallback;\n var shouldYield = Scheduler.unstable_shouldYield;\n var requestPaint = Scheduler.unstable_requestPaint;\n var now = Scheduler.unstable_now;\n var getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;\n var ImmediatePriority = Scheduler.unstable_ImmediatePriority;\n var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;\n var NormalPriority = Scheduler.unstable_NormalPriority;\n var LowPriority = Scheduler.unstable_LowPriority;\n var IdlePriority = Scheduler.unstable_IdlePriority;\n // this doesn't actually exist on the scheduler, but it *does*\n // on scheduler/unstable_mock, which we'll need for internal testing\n var unstable_yieldValue = Scheduler.unstable_yieldValue;\n var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;\n var rendererID = null;\n var injectedHook = null;\n var injectedProfilingHooks = null;\n var hasLoggedError = false;\n var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\n function injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\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 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://reactjs.org/link/react-devtools');\n } // DevTools exists, even though it doesn't support Fiber.\n\n return true;\n }\n try {\n if (enableSchedulingProfiler) {\n // Conditionally inject these hooks only if Timeline profiler is supported by this build.\n // This gives DevTools a way to feature detect that isn't tied to version number\n // (since profiling and timeline are controlled by different feature flags).\n internals = assign({}, internals, {\n getLaneLabelMap: getLaneLabelMap,\n injectProfilingHooks: injectProfilingHooks\n });\n }\n rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n injectedHook = hook;\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 }\n if (hook.checkDCE) {\n // This is the real DevTools.\n return true;\n } else {\n // This is likely a hook installed by Fast Refresh runtime.\n return false;\n }\n }\n function onScheduleRoot(root, children) {\n {\n if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n try {\n injectedHook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n function onCommitRoot(root, eventPriority) {\n if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n try {\n var didError = (root.current.flags & DidCapture) === DidCapture;\n if (enableProfilerTimer) {\n var schedulerPriority;\n switch (eventPriority) {\n case DiscreteEventPriority:\n schedulerPriority = ImmediatePriority;\n break;\n case ContinuousEventPriority:\n schedulerPriority = UserBlockingPriority;\n break;\n case DefaultEventPriority:\n schedulerPriority = NormalPriority;\n break;\n case IdleEventPriority:\n schedulerPriority = IdlePriority;\n break;\n default:\n schedulerPriority = NormalPriority;\n break;\n }\n injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);\n } else {\n injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);\n }\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n function onPostCommitRoot(root) {\n if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, root);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n function onCommitUnmount(fiber) {\n if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n try {\n injectedHook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n function setIsStrictModeForDevtools(newIsStrictMode) {\n {\n if (typeof unstable_yieldValue === 'function') {\n // We're in a test because Scheduler.unstable_yieldValue only exists\n // in SchedulerMock. To reduce the noise in strict mode tests,\n // suppress warnings and disable scheduler yielding during the double render\n unstable_setDisableYieldValue(newIsStrictMode);\n setSuppressWarning(newIsStrictMode);\n }\n if (injectedHook && typeof injectedHook.setStrictMode === 'function') {\n try {\n injectedHook.setStrictMode(rendererID, newIsStrictMode);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n } // Profiler API hooks\n\n function injectProfilingHooks(profilingHooks) {\n injectedProfilingHooks = profilingHooks;\n }\n function getLaneLabelMap() {\n {\n var map = new Map();\n var lane = 1;\n for (var index = 0; index < TotalLanes; index++) {\n var label = getLabelForLane(lane);\n map.set(lane, label);\n lane *= 2;\n }\n return map;\n }\n }\n function markCommitStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {\n injectedProfilingHooks.markCommitStarted(lanes);\n }\n }\n }\n function markCommitStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {\n injectedProfilingHooks.markCommitStopped();\n }\n }\n }\n function markComponentRenderStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {\n injectedProfilingHooks.markComponentRenderStarted(fiber);\n }\n }\n }\n function markComponentRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {\n injectedProfilingHooks.markComponentRenderStopped();\n }\n }\n }\n function markComponentPassiveEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);\n }\n }\n }\n function markComponentPassiveEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStopped();\n }\n }\n }\n function markComponentPassiveEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);\n }\n }\n }\n function markComponentPassiveEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();\n }\n }\n }\n function markComponentLayoutEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);\n }\n }\n }\n function markComponentLayoutEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStopped();\n }\n }\n }\n function markComponentLayoutEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);\n }\n }\n }\n function markComponentLayoutEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n function markComponentErrored(fiber, thrownValue, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {\n injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);\n }\n }\n }\n function markComponentSuspended(fiber, wakeable, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {\n injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);\n }\n }\n }\n function markLayoutEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {\n injectedProfilingHooks.markLayoutEffectsStarted(lanes);\n }\n }\n }\n function markLayoutEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {\n injectedProfilingHooks.markLayoutEffectsStopped();\n }\n }\n }\n function markPassiveEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {\n injectedProfilingHooks.markPassiveEffectsStarted(lanes);\n }\n }\n }\n function markPassiveEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {\n injectedProfilingHooks.markPassiveEffectsStopped();\n }\n }\n }\n function markRenderStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {\n injectedProfilingHooks.markRenderStarted(lanes);\n }\n }\n }\n function markRenderYielded() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {\n injectedProfilingHooks.markRenderYielded();\n }\n }\n }\n function markRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {\n injectedProfilingHooks.markRenderStopped();\n }\n }\n }\n function markRenderScheduled(lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {\n injectedProfilingHooks.markRenderScheduled(lane);\n }\n }\n }\n function markForceUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {\n injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);\n }\n }\n }\n function markStateUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {\n injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);\n }\n }\n }\n var NoMode = /* */\n 0; // TODO: Remove ConcurrentMode by reading from the root tag instead\n\n var ConcurrentMode = /* */\n 1;\n var ProfileMode = /* */\n 2;\n var StrictLegacyMode = /* */\n 8;\n var StrictEffectsMode = /* */\n 16;\n\n // TODO: This is pretty well supported by browsers. Maybe we can drop it.\n var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n // Based on:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\n var log = Math.log;\n var LN2 = Math.LN2;\n function clz32Fallback(x) {\n var asUint = x >>> 0;\n if (asUint === 0) {\n return 32;\n }\n return 31 - (log(asUint) / LN2 | 0) | 0;\n }\n\n // If those values are changed that package should be rebuilt and redeployed.\n\n var TotalLanes = 31;\n var NoLanes = /* */\n 0;\n var NoLane = /* */\n 0;\n var SyncLane = /* */\n 1;\n var InputContinuousHydrationLane = /* */\n 2;\n var InputContinuousLane = /* */\n 4;\n var DefaultHydrationLane = /* */\n 8;\n var DefaultLane = /* */\n 16;\n var TransitionHydrationLane = /* */\n 32;\n var TransitionLanes = /* */\n 4194240;\n var TransitionLane1 = /* */\n 64;\n var TransitionLane2 = /* */\n 128;\n var TransitionLane3 = /* */\n 256;\n var TransitionLane4 = /* */\n 512;\n var TransitionLane5 = /* */\n 1024;\n var TransitionLane6 = /* */\n 2048;\n var TransitionLane7 = /* */\n 4096;\n var TransitionLane8 = /* */\n 8192;\n var TransitionLane9 = /* */\n 16384;\n var TransitionLane10 = /* */\n 32768;\n var TransitionLane11 = /* */\n 65536;\n var TransitionLane12 = /* */\n 131072;\n var TransitionLane13 = /* */\n 262144;\n var TransitionLane14 = /* */\n 524288;\n var TransitionLane15 = /* */\n 1048576;\n var TransitionLane16 = /* */\n 2097152;\n var RetryLanes = /* */\n 130023424;\n var RetryLane1 = /* */\n 4194304;\n var RetryLane2 = /* */\n 8388608;\n var RetryLane3 = /* */\n 16777216;\n var RetryLane4 = /* */\n 33554432;\n var RetryLane5 = /* */\n 67108864;\n var SomeRetryLane = RetryLane1;\n var SelectiveHydrationLane = /* */\n 134217728;\n var NonIdleLanes = /* */\n 268435455;\n var IdleHydrationLane = /* */\n 268435456;\n var IdleLane = /* */\n 536870912;\n var OffscreenLane = /* */\n 1073741824; // This function is used for the experimental timeline (react-devtools-timeline)\n // It should be kept in sync with the Lanes values above.\n\n function getLabelForLane(lane) {\n {\n if (lane & SyncLane) {\n return 'Sync';\n }\n if (lane & InputContinuousHydrationLane) {\n return 'InputContinuousHydration';\n }\n if (lane & InputContinuousLane) {\n return 'InputContinuous';\n }\n if (lane & DefaultHydrationLane) {\n return 'DefaultHydration';\n }\n if (lane & DefaultLane) {\n return 'Default';\n }\n if (lane & TransitionHydrationLane) {\n return 'TransitionHydration';\n }\n if (lane & TransitionLanes) {\n return 'Transition';\n }\n if (lane & RetryLanes) {\n return 'Retry';\n }\n if (lane & SelectiveHydrationLane) {\n return 'SelectiveHydration';\n }\n if (lane & IdleHydrationLane) {\n return 'IdleHydration';\n }\n if (lane & IdleLane) {\n return 'Idle';\n }\n if (lane & OffscreenLane) {\n return 'Offscreen';\n }\n }\n }\n var NoTimestamp = -1;\n var nextTransitionLane = TransitionLane1;\n var nextRetryLane = RetryLane1;\n function getHighestPriorityLanes(lanes) {\n switch (getHighestPriorityLane(lanes)) {\n case SyncLane:\n return SyncLane;\n case InputContinuousHydrationLane:\n return InputContinuousHydrationLane;\n case InputContinuousLane:\n return InputContinuousLane;\n case DefaultHydrationLane:\n return DefaultHydrationLane;\n case DefaultLane:\n return DefaultLane;\n case TransitionHydrationLane:\n return TransitionHydrationLane;\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n return lanes & TransitionLanes;\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n return lanes & RetryLanes;\n case SelectiveHydrationLane:\n return SelectiveHydrationLane;\n case IdleHydrationLane:\n return IdleHydrationLane;\n case IdleLane:\n return IdleLane;\n case OffscreenLane:\n return OffscreenLane;\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n return lanes;\n }\n }\n function getNextLanes(root, wipLanes) {\n // Early bailout if there's no pending work left.\n var pendingLanes = root.pendingLanes;\n if (pendingLanes === NoLanes) {\n return NoLanes;\n }\n var nextLanes = NoLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,\n // even if the work is suspended.\n\n var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n if (nonIdlePendingLanes !== NoLanes) {\n var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n if (nonIdleUnblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n } else {\n var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n if (nonIdlePingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n }\n }\n } else {\n // The only remaining work is Idle.\n var unblockedLanes = pendingLanes & ~suspendedLanes;\n if (unblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(unblockedLanes);\n } else {\n if (pingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(pingedLanes);\n }\n }\n }\n if (nextLanes === NoLanes) {\n // This should only be reachable if we're suspended\n // TODO: Consider warning in this path if a fallback timer is not scheduled.\n return NoLanes;\n } // If we're already in the middle of a render, switching lanes will interrupt\n // it and we'll lose our progress. We should only do this if the new lanes are\n // higher priority.\n\n if (wipLanes !== NoLanes && wipLanes !== nextLanes &&\n // If we already suspended with a delay, then interrupting is fine. Don't\n // bother waiting until the root is complete.\n (wipLanes & suspendedLanes) === NoLanes) {\n var nextLane = getHighestPriorityLane(nextLanes);\n var wipLane = getHighestPriorityLane(wipLanes);\n if (\n // Tests whether the next lane is equal or lower priority than the wip\n // one. This works because the bits decrease in priority as you go left.\n nextLane >= wipLane ||\n // Default priority updates should not interrupt transition updates. The\n // only difference between default updates and transition updates is that\n // default updates do not support refresh transitions.\n nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {\n // Keep working on the existing in-progress tree. Do not interrupt.\n return wipLanes;\n }\n }\n if ((nextLanes & InputContinuousLane) !== NoLanes) {\n // When updates are sync by default, we entangle continuous priority updates\n // and default updates, so they render in the same batch. The only reason\n // they use separate lanes is because continuous updates should interrupt\n // transitions, but default updates should not.\n nextLanes |= pendingLanes & DefaultLane;\n } // Check for entangled lanes and add them to the batch.\n //\n // A lane is said to be entangled with another when it's not allowed to render\n // in a batch that does not also include the other lane. Typically we do this\n // when multiple updates have the same source, and we only want to respond to\n // the most recent event from that source.\n //\n // Note that we apply entanglements *after* checking for partial work above.\n // This means that if a lane is entangled during an interleaved event while\n // it's already rendering, we won't interrupt it. This is intentional, since\n // entanglement is usually \"best effort\": we'll try our best to render the\n // lanes in the same batch, but it's not worth throwing out partially\n // completed work in order to do it.\n // TODO: Reconsider this. The counter-argument is that the partial work\n // represents an intermediate state, which we don't want to show to the user.\n // And by spending extra time finishing it, we're increasing the amount of\n // time it takes to show the final state, which is what they are actually\n // waiting for.\n //\n // For those exceptions where entanglement is semantically important, like\n // useMutableSource, we should ensure that there is no partial work at the\n // time we apply the entanglement.\n\n var entangledLanes = root.entangledLanes;\n if (entangledLanes !== NoLanes) {\n var entanglements = root.entanglements;\n var lanes = nextLanes & entangledLanes;\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n nextLanes |= entanglements[index];\n lanes &= ~lane;\n }\n }\n return nextLanes;\n }\n function getMostRecentEventTime(root, lanes) {\n var eventTimes = root.eventTimes;\n var mostRecentEventTime = NoTimestamp;\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var eventTime = eventTimes[index];\n if (eventTime > mostRecentEventTime) {\n mostRecentEventTime = eventTime;\n }\n lanes &= ~lane;\n }\n return mostRecentEventTime;\n }\n function computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case SyncLane:\n case InputContinuousHydrationLane:\n case InputContinuousLane:\n // User interactions should expire slightly more quickly.\n //\n // NOTE: This is set to the corresponding constant as in Scheduler.js.\n // When we made it larger, a product metric in www regressed, suggesting\n // there's a user interaction that's being starved by a series of\n // synchronous updates. If that theory is correct, the proper solution is\n // to fix the starvation. However, this scenario supports the idea that\n // expiration times are an important safeguard when starvation\n // does happen.\n return currentTime + 250;\n case DefaultHydrationLane:\n case DefaultLane:\n case TransitionHydrationLane:\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n return currentTime + 5000;\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n // TODO: Retries should be allowed to expire if they are CPU bound for\n // too long, but when I made this change it caused a spike in browser\n // crashes. There must be some other underlying bug; not super urgent but\n // ideally should figure out why and fix it. Unfortunately we don't have\n // a repro for the crashes, only detected via production metrics.\n return NoTimestamp;\n case SelectiveHydrationLane:\n case IdleHydrationLane:\n case IdleLane:\n case OffscreenLane:\n // Anything idle priority or lower should never expire.\n return NoTimestamp;\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n }\n return NoTimestamp;\n }\n }\n function markStarvedLanesAsExpired(root, currentTime) {\n // TODO: This gets called every time we yield. We can optimize by storing\n // the earliest expiration time on the root. Then use that to quickly bail out\n // of this function.\n var pendingLanes = root.pendingLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes;\n var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n // expiration time. If so, we'll assume the update is being starved and mark\n // it as expired to force it to finish.\n\n var lanes = pendingLanes;\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var expirationTime = expirationTimes[index];\n if (expirationTime === NoTimestamp) {\n // Found a pending lane with no expiration time. If it's not suspended, or\n // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n // using the current time.\n if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n // Assumes timestamps are monotonically increasing.\n expirationTimes[index] = computeExpirationTime(lane, currentTime);\n }\n } else if (expirationTime <= currentTime) {\n // This lane expired\n root.expiredLanes |= lane;\n }\n lanes &= ~lane;\n }\n } // This returns the highest priority pending lanes regardless of whether they\n // are suspended.\n\n function getHighestPriorityPendingLanes(root) {\n return getHighestPriorityLanes(root.pendingLanes);\n }\n function getLanesToRetrySynchronouslyOnError(root) {\n var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n if (everythingButOffscreen !== NoLanes) {\n return everythingButOffscreen;\n }\n if (everythingButOffscreen & OffscreenLane) {\n return OffscreenLane;\n }\n return NoLanes;\n }\n function includesSyncLane(lanes) {\n return (lanes & SyncLane) !== NoLanes;\n }\n function includesNonIdleWork(lanes) {\n return (lanes & NonIdleLanes) !== NoLanes;\n }\n function includesOnlyRetries(lanes) {\n return (lanes & RetryLanes) === lanes;\n }\n function includesOnlyNonUrgentLanes(lanes) {\n var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;\n return (lanes & UrgentLanes) === NoLanes;\n }\n function includesOnlyTransitions(lanes) {\n return (lanes & TransitionLanes) === lanes;\n }\n function includesBlockingLane(root, lanes) {\n var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;\n return (lanes & SyncDefaultLanes) !== NoLanes;\n }\n function includesExpiredLane(root, lanes) {\n // This is a separate check from includesBlockingLane because a lane can\n // expire after a render has already started.\n return (lanes & root.expiredLanes) !== NoLanes;\n }\n function isTransitionLane(lane) {\n return (lane & TransitionLanes) !== NoLanes;\n }\n function claimNextTransitionLane() {\n // Cycle through the lanes, assigning each new transition to the next lane.\n // In most cases, this means every transition gets its own lane, until we\n // run out of lanes and cycle back to the beginning.\n var lane = nextTransitionLane;\n nextTransitionLane <<= 1;\n if ((nextTransitionLane & TransitionLanes) === NoLanes) {\n nextTransitionLane = TransitionLane1;\n }\n return lane;\n }\n function claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n if ((nextRetryLane & RetryLanes) === NoLanes) {\n nextRetryLane = RetryLane1;\n }\n return lane;\n }\n function getHighestPriorityLane(lanes) {\n return lanes & -lanes;\n }\n function pickArbitraryLane(lanes) {\n // This wrapper function gets inlined. Only exists so to communicate that it\n // doesn't matter which bit is selected; you can pick any bit without\n // affecting the algorithms where its used. Here I'm using\n // getHighestPriorityLane because it requires the fewest operations.\n return getHighestPriorityLane(lanes);\n }\n function pickArbitraryLaneIndex(lanes) {\n return 31 - clz32(lanes);\n }\n function laneToIndex(lane) {\n return pickArbitraryLaneIndex(lane);\n }\n function includesSomeLane(a, b) {\n return (a & b) !== NoLanes;\n }\n function isSubsetOfLanes(set, subset) {\n return (set & subset) === subset;\n }\n function mergeLanes(a, b) {\n return a | b;\n }\n function removeLanes(set, subset) {\n return set & ~subset;\n }\n function intersectLanes(a, b) {\n return a & b;\n } // Seems redundant, but it changes the type from a single lane (used for\n // updates) to a group of lanes (used for flushing work).\n\n function laneToLanes(lane) {\n return lane;\n }\n function higherPriorityLane(a, b) {\n // This works because the bit ranges decrease in priority as you go left.\n return a !== NoLane && a < b ? a : b;\n }\n function createLaneMap(initial) {\n // Intentionally pushing one by one.\n // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n var laneMap = [];\n for (var i = 0; i < TotalLanes; i++) {\n laneMap.push(initial);\n }\n return laneMap;\n }\n function markRootUpdated(root, updateLane, eventTime) {\n root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update\n // could unblock them. Clear the suspended lanes so that we can try rendering\n // them again.\n //\n // TODO: We really only need to unsuspend only lanes that are in the\n // `subtreeLanes` of the updated fiber, or the update lanes of the return\n // path. This would exclude suspended updates in an unrelated sibling tree,\n // since there's no way for this update to unblock it.\n //\n // We don't do this if the incoming update is idle, because we never process\n // idle updates until after all the regular updates have finished; there's no\n // way it could unblock a transition.\n\n if (updateLane !== IdleLane) {\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n }\n var eventTimes = root.eventTimes;\n var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most\n // recent event, and we assume time is monotonically increasing.\n\n eventTimes[index] = eventTime;\n }\n function markRootSuspended(root, suspendedLanes) {\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n var expirationTimes = root.expirationTimes;\n var lanes = suspendedLanes;\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n }\n function markRootPinged(root, pingedLanes, eventTime) {\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n }\n function markRootFinished(root, remainingLanes) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes; // Let's try everything again\n\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n root.expiredLanes &= remainingLanes;\n root.mutableReadLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n var entanglements = root.entanglements;\n var eventTimes = root.eventTimes;\n var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work\n\n var lanes = noLongerPendingLanes;\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] = NoLanes;\n eventTimes[index] = NoTimestamp;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n }\n function markRootEntangled(root, entangledLanes) {\n // In addition to entangling each of the given lanes with each other, we also\n // have to consider _transitive_ entanglements. For each lane that is already\n // entangled with *any* of the given lanes, that lane is now transitively\n // entangled with *all* the given lanes.\n //\n // Translated: If C is entangled with A, then entangling A with B also\n // entangles C with B.\n //\n // If this is hard to grasp, it might help to intentionally break this\n // function and look at the tests that fail in ReactTransition-test.js. Try\n // commenting out one of the conditions below.\n var rootEntangledLanes = root.entangledLanes |= entangledLanes;\n var entanglements = root.entanglements;\n var lanes = rootEntangledLanes;\n while (lanes) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n if (\n // Is this one of the newly entangled lanes?\n lane & entangledLanes |\n // Is this lane transitively entangled with the newly entangled lanes?\n entanglements[index] & entangledLanes) {\n entanglements[index] |= entangledLanes;\n }\n lanes &= ~lane;\n }\n }\n function getBumpedLaneForHydration(root, renderLanes) {\n var renderLane = getHighestPriorityLane(renderLanes);\n var lane;\n switch (renderLane) {\n case InputContinuousLane:\n lane = InputContinuousHydrationLane;\n break;\n case DefaultLane:\n lane = DefaultHydrationLane;\n break;\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n lane = TransitionHydrationLane;\n break;\n case IdleLane:\n lane = IdleHydrationLane;\n break;\n default:\n // Everything else is already either a hydration lane, or shouldn't\n // be retried at a hydration lane.\n lane = NoLane;\n break;\n } // Check if the lane we chose is suspended. If so, that indicates that we\n // already attempted and failed to hydrate at that level. Also check if we're\n // already rendering that lane, which is rare but could happen.\n\n if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {\n // Give up trying to hydrate and fall back to client render.\n return NoLane;\n }\n return lane;\n }\n function addFiberToLanesMap(root, fiber, lanes) {\n if (!isDevToolsPresent) {\n return;\n }\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n updaters.add(fiber);\n lanes &= ~lane;\n }\n }\n function movePendingFibersToMemoized(root, lanes) {\n if (!isDevToolsPresent) {\n return;\n }\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n var memoizedUpdaters = root.memoizedUpdaters;\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n if (updaters.size > 0) {\n updaters.forEach(function (fiber) {\n var alternate = fiber.alternate;\n if (alternate === null || !memoizedUpdaters.has(alternate)) {\n memoizedUpdaters.add(fiber);\n }\n });\n updaters.clear();\n }\n lanes &= ~lane;\n }\n }\n function getTransitionsForLanes(root, lanes) {\n {\n return null;\n }\n }\n var DiscreteEventPriority = SyncLane;\n var ContinuousEventPriority = InputContinuousLane;\n var DefaultEventPriority = DefaultLane;\n var IdleEventPriority = IdleLane;\n var currentUpdatePriority = NoLane;\n function getCurrentUpdatePriority() {\n return currentUpdatePriority;\n }\n function setCurrentUpdatePriority(newPriority) {\n currentUpdatePriority = newPriority;\n }\n function runWithPriority(priority, fn) {\n var previousPriority = currentUpdatePriority;\n try {\n currentUpdatePriority = priority;\n return fn();\n } finally {\n currentUpdatePriority = previousPriority;\n }\n }\n function higherEventPriority(a, b) {\n return a !== 0 && a < b ? a : b;\n }\n function lowerEventPriority(a, b) {\n return a === 0 || a > b ? a : b;\n }\n function isHigherEventPriority(a, b) {\n return a !== 0 && a < b;\n }\n function lanesToEventPriority(lanes) {\n var lane = getHighestPriorityLane(lanes);\n if (!isHigherEventPriority(DiscreteEventPriority, lane)) {\n return DiscreteEventPriority;\n }\n if (!isHigherEventPriority(ContinuousEventPriority, lane)) {\n return ContinuousEventPriority;\n }\n if (includesNonIdleWork(lane)) {\n return DefaultEventPriority;\n }\n return IdleEventPriority;\n }\n\n // This is imported by the event replaying implementation in React DOM. It's\n // in a separate file to break a circular dependency between the renderer and\n // the reconciler.\n function isRootDehydrated(root) {\n var currentState = root.current.memoizedState;\n return currentState.isDehydrated;\n }\n var _attemptSynchronousHydration;\n function setAttemptSynchronousHydration(fn) {\n _attemptSynchronousHydration = fn;\n }\n function attemptSynchronousHydration(fiber) {\n _attemptSynchronousHydration(fiber);\n }\n var attemptContinuousHydration;\n function setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n }\n var attemptHydrationAtCurrentPriority;\n function setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n }\n var getCurrentUpdatePriority$1;\n function setGetCurrentUpdatePriority(fn) {\n getCurrentUpdatePriority$1 = fn;\n }\n var attemptHydrationAtPriority;\n function setAttemptHydrationAtPriority(fn) {\n attemptHydrationAtPriority = fn;\n } // TODO: Upgrade this definition once we're on a newer version of Flow that\n // has this definition built-in.\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 var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput',\n // Intentionally camelCase\n 'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];\n function isDiscreteEventThatRequiresHydration(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n }\n function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n return {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n };\n }\n function clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'focusin':\n case 'focusout':\n queuedFocus = null;\n break;\n case 'dragenter':\n case 'dragleave':\n queuedDrag = null;\n break;\n case 'mouseover':\n case 'mouseout':\n queuedMouse = null;\n break;\n case 'pointerover':\n case 'pointerout':\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n case 'gotpointercapture':\n case 'lostpointercapture':\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n }\n function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode(blockedOn);\n if (_fiber2 !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(_fiber2);\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 the targetContainers, and\n // store a single event to be replayed.\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n var targetContainers = existingQueuedEvent.targetContainers;\n if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n targetContainers.push(targetContainer);\n }\n return existingQueuedEvent;\n }\n function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, 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 (domEventName) {\n case 'focusin':\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n return true;\n }\n case 'dragenter':\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n return true;\n }\n case 'mouseover':\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n return true;\n }\n case 'pointerover':\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n return true;\n }\n case 'gotpointercapture':\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n return true;\n }\n }\n return false;\n } // Check if this target is unblocked. Returns true if it's unblocked.\n\n function attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with findInstanceBlockingEvent.\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 if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n attemptHydrationAtPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n if (isRootDehydrated(root)) {\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 queuedTarget.blockedOn = null;\n }\n function queueExplicitHydrationTarget(target) {\n // TODO: This will read the priority if it's dispatched by the React\n // event system but not native events. Should read window.event.type, like\n // we do for updates (getCurrentEventPriority).\n var updatePriority = getCurrentUpdatePriority$1();\n var queuedTarget = {\n blockedOn: null,\n target: target,\n priority: updatePriority\n };\n var i = 0;\n for (; i < queuedExplicitHydrationTargets.length; i++) {\n // Stop once we hit the first target with lower priority than\n if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {\n break;\n }\n }\n queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);\n if (i === 0) {\n attemptExplicitHydrationTarget(queuedTarget);\n }\n }\n function attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n var targetContainers = queuedEvent.targetContainers;\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);\n if (nextBlockedOn === null) {\n {\n var nativeEvent = queuedEvent.nativeEvent;\n var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n setReplayingEvent(nativeEventClone);\n nativeEvent.target.dispatchEvent(nativeEventClone);\n resetReplayingEvent();\n }\n } else {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode(nextBlockedOn);\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n } // This target container was successfully dispatched. Try the next.\n\n targetContainers.shift();\n }\n return true;\n }\n function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n }\n function replayUnblockedEvents() {\n hasScheduledReplayAttempt = false;\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n }\n function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\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 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 if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n }\n }\n }\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n var queuedTarget = queuedExplicitHydrationTargets[_i];\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n }\n var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?\n\n var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n // We'd like to remove this but it's not clear if this is safe.\n\n function setEnabled(enabled) {\n _enabled = !!enabled;\n }\n function isEnabled() {\n return _enabled;\n }\n function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n var eventPriority = getEventPriority(domEventName);\n var listenerWrapper;\n switch (eventPriority) {\n case DiscreteEventPriority:\n listenerWrapper = dispatchDiscreteEvent;\n break;\n case ContinuousEventPriority:\n listenerWrapper = dispatchContinuousEvent;\n break;\n case DefaultEventPriority:\n default:\n listenerWrapper = dispatchEvent;\n break;\n }\n return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n }\n function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n try {\n setCurrentUpdatePriority(DiscreteEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n }\n function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n try {\n setCurrentUpdatePriority(ContinuousEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n }\n function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (!_enabled) {\n return;\n }\n {\n dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n }\n }\n function dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n if (blockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n clearIfContinuousEvent(domEventName, nativeEvent);\n return;\n }\n if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n nativeEvent.stopPropagation();\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accumulative.\n\n clearIfContinuousEvent(domEventName, nativeEvent);\n if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {\n while (blockedOn !== null) {\n var fiber = getInstanceFromNode(blockedOn);\n if (fiber !== null) {\n attemptSynchronousHydration(fiber);\n }\n var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n if (nextBlockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n }\n if (nextBlockedOn === blockedOn) {\n break;\n }\n blockedOn = nextBlockedOn;\n }\n if (blockedOn !== null) {\n nativeEvent.stopPropagation();\n }\n return;\n } // 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 dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n }\n var return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.\n // The return_targetInst field above is conceptually part of the return value.\n\n function findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // TODO: Warn if _enabled is false.\n return_targetInst = null;\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\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 if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\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 targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n if (isRootDehydrated(root)) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\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 return_targetInst = targetInst; // We're not blocked on anything.\n\n return null;\n }\n function getEventPriority(domEventName) {\n switch (domEventName) {\n // Used by SimpleEventPlugin:\n case 'cancel':\n case 'click':\n case 'close':\n case 'contextmenu':\n case 'copy':\n case 'cut':\n case 'auxclick':\n case 'dblclick':\n case 'dragend':\n case 'dragstart':\n case 'drop':\n case 'focusin':\n case 'focusout':\n case 'input':\n case 'invalid':\n case 'keydown':\n case 'keypress':\n case 'keyup':\n case 'mousedown':\n case 'mouseup':\n case 'paste':\n case 'pause':\n case 'play':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointerup':\n case 'ratechange':\n case 'reset':\n case 'resize':\n case 'seeked':\n case 'submit':\n case 'touchcancel':\n case 'touchend':\n case 'touchstart':\n case 'volumechange': // Used by polyfills:\n // eslint-disable-next-line no-fallthrough\n\n case 'change':\n case 'selectionchange':\n case 'textInput':\n case 'compositionstart':\n case 'compositionend':\n case 'compositionupdate': // Only enableCreateEventHandleAPI:\n // eslint-disable-next-line no-fallthrough\n\n case 'beforeblur':\n case 'afterblur': // Not used by React but could be by user code:\n // eslint-disable-next-line no-fallthrough\n\n case 'beforeinput':\n case 'blur':\n case 'fullscreenchange':\n case 'focus':\n case 'hashchange':\n case 'popstate':\n case 'select':\n case 'selectstart':\n return DiscreteEventPriority;\n case 'drag':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'mousemove':\n case 'mouseout':\n case 'mouseover':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'scroll':\n case 'toggle':\n case 'touchmove':\n case 'wheel': // Not used by React but could be by user code:\n // eslint-disable-next-line no-fallthrough\n\n case 'mouseenter':\n case 'mouseleave':\n case 'pointerenter':\n case 'pointerleave':\n return ContinuousEventPriority;\n case 'message':\n {\n // We might be in the Scheduler callback.\n // Eventually this mechanism will be replaced by a check\n // of the current priority on the native scheduler.\n var schedulerPriority = getCurrentPriorityLevel();\n switch (schedulerPriority) {\n case ImmediatePriority:\n return DiscreteEventPriority;\n case UserBlockingPriority:\n return ContinuousEventPriority;\n case NormalPriority:\n case LowPriority:\n // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n return DefaultEventPriority;\n case IdlePriority:\n return IdleEventPriority;\n default:\n return DefaultEventPriority;\n }\n }\n default:\n return DefaultEventPriority;\n }\n }\n function addEventBubbleListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, false);\n return listener;\n }\n function addEventCaptureListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, true);\n return listener;\n }\n function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n capture: true,\n passive: passive\n });\n return listener;\n }\n function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n passive: passive\n });\n return listener;\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 */\n var root = null;\n var startText = null;\n var fallbackText = null;\n function initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n }\n function reset() {\n root = null;\n startText = null;\n fallbackText = null;\n }\n function getData() {\n if (fallbackText) {\n return fallbackText;\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 for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n var minEnd = startLength - start;\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n }\n function getText() {\n if ('value' in root) {\n return root.value;\n }\n return root.textContent;\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 */\n function getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\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 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 if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n return 0;\n }\n function functionThatReturnsTrue() {\n return true;\n }\n function functionThatReturnsFalse() {\n return false;\n } // This is intentionally a factory so that we have different returned constructors.\n // If we had a single constructor, it would be megamorphic and engines would deopt.\n\n function createSyntheticEvent(Interface) {\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 function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n for (var _propName in Interface) {\n if (!Interface.hasOwnProperty(_propName)) {\n continue;\n }\n var normalize = Interface[_propName];\n if (normalize) {\n this[_propName] = normalize(nativeEvent);\n } else {\n this[_propName] = nativeEvent[_propName];\n }\n }\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n if (event.preventDefault) {\n event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n if (event.stopPropagation) {\n event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\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 this.isPropagationStopped = functionThatReturnsTrue;\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 () {// Modern event system doesn't use pooling.\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: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n }\n /**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n };\n var SyntheticEvent = createSyntheticEvent(EventInterface);\n var UIEventInterface = assign({}, EventInterface, {\n view: 0,\n detail: 0\n });\n var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\n var lastMovementX;\n var lastMovementY;\n var lastMouseEvent;\n function updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n lastMovementX = event.screenX - lastMouseEvent.screenX;\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n lastMouseEvent = event;\n }\n }\n /**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n return lastMovementY;\n }\n });\n var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n /**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var DragEventInterface = assign({}, MouseEventInterface, {\n dataTransfer: 0\n });\n var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n /**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var FocusEventInterface = assign({}, UIEventInterface, {\n relatedTarget: 0\n });\n var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\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 AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n });\n var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\n var ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n });\n var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\n var CompositionEventInterface = assign({}, EventInterface, {\n data: 0\n });\n var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n // Happens to share the same list for now.\n\n var SyntheticInputEvent = SyntheticCompositionEvent;\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 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 if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\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 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 return '';\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 if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n }\n function getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n }\n /**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var KeyboardEventInterface = assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\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 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 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 if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n }\n });\n var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n /**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\n var PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n });\n var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n /**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\n var TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n });\n var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\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 TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n });\n var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n /**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var WheelEventInterface = assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX :\n // 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 :\n // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY :\n // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: 0,\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: 0\n });\n var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\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 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 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);\n function registerEvents() {\n registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\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) &&\n // 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\n function getCompositionEventType(domEventName) {\n switch (domEventName) {\n case 'compositionstart':\n return 'onCompositionStart';\n case 'compositionend':\n return 'onCompositionEnd';\n case 'compositionupdate':\n return 'onCompositionUpdate';\n }\n }\n /**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n function isFallbackCompositionStart(domEventName, nativeEvent) {\n return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n }\n /**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n function isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'keyup':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n case 'keydown':\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 case 'keypress':\n case 'mousedown':\n case 'focusout':\n // Events are not possible without cancelling IME.\n return true;\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 function getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\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 function isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n } // Track the current IME composition status, if any.\n\n var isComposing = false;\n /**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\n function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(domEventName);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n eventType = 'onCompositionStart';\n }\n } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n eventType = 'onCompositionEnd';\n }\n if (!eventType) {\n return null;\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 === 'onCompositionStart') {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === 'onCompositionEnd') {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n if (listeners.length > 0) {\n var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\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 if (customData !== null) {\n event.data = customData;\n }\n }\n }\n }\n function getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'compositionend':\n return getDataFromCustomEvent(nativeEvent);\n case 'keypress':\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 if (which !== SPACEBAR_CODE) {\n return null;\n }\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n case 'textInput':\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 return chars;\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\n function getFallbackBeforeInputChars(domEventName, 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 (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n return null;\n }\n switch (domEventName) {\n case '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 case 'keypress':\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 return null;\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\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 function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n if (!chars) {\n return null;\n }\n var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n if (listeners.length > 0) {\n var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.data = chars;\n }\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 function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\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 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 function isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n if (nodeName === 'textarea') {\n return true;\n }\n return false;\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\n function isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n return isSupported;\n }\n function registerEvents$1() {\n registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n }\n function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n }\n /**\n * For IE shims\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 function manualDispatchChangeEvent(nativeEvent) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(dispatchQueue, 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, dispatchQueue);\n }\n function runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n }\n function getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n }\n function getTargetInstForChangeEvent(domEventName, targetInst) {\n if (domEventName === 'change') {\n return targetInst;\n }\n }\n /**\n * SECTION: handle `input` event\n */\n\n var isInputEventSupported = false;\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 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 function stopWatchingForValueChange() {\n if (!activeElement) {\n return;\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 function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }\n function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n if (domEventName === 'focusin') {\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 (domEventName === 'focusout') {\n stopWatchingForValueChange();\n }\n } // For IE8 and IE9.\n\n function getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\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 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 function getTargetInstForClickEvent(domEventName, targetInst) {\n if (domEventName === 'click') {\n return getInstIfValueChanged(targetInst);\n }\n }\n function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (domEventName === 'input' || domEventName === 'change') {\n return getInstIfValueChanged(targetInst);\n }\n }\n function handleControlledInputBlur(node) {\n var state = node._wrapperState;\n if (!state || !state.controlled || node.type !== 'number') {\n return;\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 function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\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 if (getTargetInstFunc) {\n var inst = getTargetInstFunc(domEventName, targetInst);\n if (inst) {\n createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n return;\n }\n }\n if (handleEventFunc) {\n handleEventFunc(domEventName, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n if (domEventName === 'focusout') {\n handleControlledInputBlur(targetNode);\n }\n }\n function registerEvents$2() {\n registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\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\n function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n if (isOverEvent && !isReplayingEvent(nativeEvent)) {\n // If this is an over event with a target, we might have 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 var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n if (related) {\n // If the related node is managed by React, we can assume that we have\n // already dispatched the corresponding events during its mouseout.\n if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n return;\n }\n }\n }\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return;\n }\n var win; // TODO: why is this nullable in the types but we read from it?\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 if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n var from;\n var to;\n if (isOutEvent) {\n var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n from = targetInst;\n to = _related ? getClosestInstanceFromNode(_related) : null;\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\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 if (from === to) {\n // Nothing pertains to our managed components.\n return;\n }\n var SyntheticEventCtor = SyntheticMouseEvent;\n var leaveEventType = 'onMouseLeave';\n var enterEventType = 'onMouseEnter';\n var eventTypePrefix = 'mouse';\n if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n SyntheticEventCtor = SyntheticPointerEvent;\n leaveEventType = 'onPointerLeave';\n enterEventType = 'onPointerEnter';\n eventTypePrefix = 'pointer';\n }\n var fromNode = from == null ? win : getNodeFromInstance(from);\n var toNode = to == null ? win : getNodeFromInstance(to);\n var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = null; // We should only process this nativeEvent if we are processing\n // the first ancestor. Next time, we will ignore the event.\n\n var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n if (nativeTargetInst === targetInst) {\n var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n enterEvent.target = toNode;\n enterEvent.relatedTarget = fromNode;\n enter = enterEvent;\n }\n accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\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 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 var objectIs = typeof Object.is === 'function' ? Object.is : is;\n\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 if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n for (var i = 0; i < keysA.length; i++) {\n var currentKey = keysA[i];\n if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {\n return false;\n }\n }\n return true;\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 function getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\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 function getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\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 function getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n nodeStart = nodeEnd;\n }\n node = getLeafNode(getSiblingNode(node));\n }\n }\n\n /**\n * @param {DOMElement} outerNode\n * @return {?object}\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 if (!selection || selection.rangeCount === 0) {\n return null;\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 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 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 outer: while (true) {\n var next = null;\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n parentNode = node;\n node = next;\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 if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n if ((next = node.nextSibling) !== null) {\n break;\n }\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n node = next;\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 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 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 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 var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\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 var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\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 function isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\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 function isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\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 function getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n element = getActiveElement(win.document);\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 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 function getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\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 function restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\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 var ancestors = [];\n var ancestor = priorFocusedElem;\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 if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\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 function getSelection(input) {\n var selection;\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 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 function setSelection(input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n if (end === undefined) {\n end = start;\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 var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n function registerEvents$3() {\n registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\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\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\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 function constructSelectEvent(dispatchQueue, 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 if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n return;\n } // Only fire when selection has actually changed.\n\n var currentSelection = getSelection$1(activeElement$1);\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.target = activeElement$1;\n }\n }\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 function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n switch (domEventName) {\n // Track the input node that has focus.\n case 'focusin':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n break;\n case 'focusout':\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 'mousedown':\n mouseDown = true;\n break;\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\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 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\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\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 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 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 function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n var prefixMap = vendorPrefixes[eventName];\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n return eventName;\n }\n var ANIMATION_END = getVendorPrefixedEventName('animationend');\n var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\n var ANIMATION_START = getVendorPrefixedEventName('animationstart');\n var TRANSITION_END = getVendorPrefixedEventName('transitionend');\n var topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!\n //\n // E.g. it needs \"pointerDown\", not \"pointerdown\".\n // This is because we derive both React name (\"onPointerDown\")\n // and DOM name (\"pointerdown\") from the same list.\n //\n // Exceptions that don't match this convention are listed separately.\n //\n // prettier-ignore\n\n var simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel'];\n function registerSimpleEvent(domEventName, reactName) {\n topLevelEventsToReactNames.set(domEventName, reactName);\n registerTwoPhaseEvent(reactName, [domEventName]);\n }\n function registerSimpleEvents() {\n for (var i = 0; i < simpleEventPluginEvents.length; i++) {\n var eventName = simpleEventPluginEvents[i];\n var domEventName = eventName.toLowerCase();\n var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);\n registerSimpleEvent(domEventName, 'on' + capitalizedEvent);\n } // Special cases where event names don't match.\n\n registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');\n registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');\n registerSimpleEvent(ANIMATION_START, 'onAnimationStart');\n registerSimpleEvent('dblclick', 'onDoubleClick');\n registerSimpleEvent('focusin', 'onFocus');\n registerSimpleEvent('focusout', 'onBlur');\n registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');\n }\n function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n if (reactName === undefined) {\n return;\n }\n var SyntheticEventCtor = SyntheticEvent;\n var reactEventType = domEventName;\n switch (domEventName) {\n case 'keypress':\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;\n }\n\n /* falls through */\n\n case 'keydown':\n case 'keyup':\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n case 'focusin':\n reactEventType = 'focus';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case 'focusout':\n reactEventType = 'blur';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case 'beforeblur':\n case 'afterblur':\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case '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;\n }\n\n /* falls through */\n\n case 'auxclick':\n case 'dblclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case 'mouseout':\n case 'mouseover':\n case 'contextmenu':\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n case 'drag':\n case 'dragend':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'dragstart':\n case 'drop':\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n case 'touchcancel':\n case 'touchend':\n case 'touchmove':\n case 'touchstart':\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n case 'scroll':\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n case 'wheel':\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n case 'copy':\n case 'cut':\n case 'paste':\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n case 'gotpointercapture':\n case 'lostpointercapture':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'pointerup':\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n }\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n {\n // Some events don't bubble in the browser.\n // In the past, React has always bubbled them, but this can be surprising.\n // We're going to try aligning closer to the browser behavior by not bubbling\n // them in React either. We'll start by not bubbling onScroll, and then expand.\n var accumulateTargetOnly = !inCapturePhase &&\n // TODO: ideally, we'd eventually add all events from\n // nonDelegatedEvents list in DOMPluginEventSystem.\n // Then we can remove this special list.\n // This is a breaking change that can wait until React 18.\n domEventName === 'scroll';\n var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n if (_listeners.length > 0) {\n // Intentionally create event lazily.\n var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: _event,\n listeners: _listeners\n });\n }\n }\n }\n\n // TODO: remove top-level side effect.\n registerSimpleEvents();\n registerEvents$2();\n registerEvents$1();\n registerEvents$3();\n registerEvents();\n function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n // This is the basic functionality of the event system. All\n // the other plugins are essentially polyfills. So the plugin\n // should probably be inlined somewhere and have its logic\n // be core the to event system. This would potentially allow\n // us to ship builds of React without the polyfilled plugins below.\n extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n // event's native \"bubble\" phase, which means that we're\n // not in the capture phase. That's because we emulate\n // the capture phase here still. This is a trade-off,\n // because in an ideal world we would not emulate and use\n // the phases properly, like we do with the SimpleEvent\n // plugin. However, the plugins below either expect\n // emulation (EnterLeave) or use state localized to that\n // plugin (BeforeInput, Change, Select). The state in\n // these modules complicates things, as you'll essentially\n // get the case where the capture phase event might change\n // state, only for the following bubble event to come in\n // later and not trigger anything as the state now\n // invalidates the heuristics of the event plugin. We\n // could alter all these plugins to work in such ways, but\n // that might cause other unknown side-effects that we\n // can't foresee right now.\n\n if (shouldProcessPolyfillPlugins) {\n extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n } // List of events that need to be individually attached to media elements.\n\n var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather\n // set them on the actual target element itself. This is primarily\n // because these events do not consistently bubble in the DOM.\n\n var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n function executeDispatch(event, listener, currentTarget) {\n var type = event.type || 'unknown-event';\n event.currentTarget = currentTarget;\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n }\n function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n var previousInstance;\n if (inCapturePhase) {\n for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n var _dispatchListeners$i = dispatchListeners[i],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget,\n listener = _dispatchListeners$i.listener;\n if (instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n executeDispatch(event, listener, currentTarget);\n previousInstance = instance;\n }\n } else {\n for (var _i = 0; _i < dispatchListeners.length; _i++) {\n var _dispatchListeners$_i = dispatchListeners[_i],\n _instance = _dispatchListeners$_i.instance,\n _currentTarget = _dispatchListeners$_i.currentTarget,\n _listener = _dispatchListeners$_i.listener;\n if (_instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n executeDispatch(event, _listener, _currentTarget);\n previousInstance = _instance;\n }\n }\n }\n function processDispatchQueue(dispatchQueue, eventSystemFlags) {\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event,\n listeners = _dispatchQueue$i.listeners;\n processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n rethrowCaughtError();\n }\n function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n var dispatchQueue = [];\n extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n }\n function listenToNonDelegatedEvent(domEventName, targetElement) {\n {\n if (!nonDelegatedEvents.has(domEventName)) {\n error('Did not expect a listenToNonDelegatedEvent() call for \"%s\". ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n var isCapturePhaseListener = false;\n var listenerSet = getEventListenerSet(targetElement);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n if (!listenerSet.has(listenerSetKey)) {\n addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n }\n function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n {\n if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {\n error('Did not expect a listenToNativeEvent() call for \"%s\" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n var eventSystemFlags = 0;\n if (isCapturePhaseListener) {\n eventSystemFlags |= IS_CAPTURE_PHASE;\n }\n addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n } // This is only used by createEventHandle when the\n var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\n function listenToAllSupportedEvents(rootContainerElement) {\n if (!rootContainerElement[listeningMarker]) {\n rootContainerElement[listeningMarker] = true;\n allNativeEvents.forEach(function (domEventName) {\n // We handle selectionchange separately because it\n // doesn't bubble and needs to be on the document.\n if (domEventName !== 'selectionchange') {\n if (!nonDelegatedEvents.has(domEventName)) {\n listenToNativeEvent(domEventName, false, rootContainerElement);\n }\n listenToNativeEvent(domEventName, true, rootContainerElement);\n }\n });\n var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n if (ownerDocument !== null) {\n // The selectionchange event also needs deduplication\n // but it is attached to the document.\n if (!ownerDocument[listeningMarker]) {\n ownerDocument[listeningMarker] = true;\n listenToNativeEvent('selectionchange', false, ownerDocument);\n }\n }\n }\n }\n function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n // active and not passive.\n\n var isPassiveListener = undefined;\n if (passiveBrowserEventsSupported) {\n // Browsers introduced an intervention, making these events\n // passive by default on document. React doesn't bind them\n // to document anymore, but changing this now would undo\n // the performance wins from the change. So we emulate\n // the existing behavior manually on the roots now.\n // https://github.com/facebook/react/issues/19651\n if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n isPassiveListener = true;\n }\n }\n targetContainer = targetContainer;\n var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we\n\n if (isCapturePhaseListener) {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);\n }\n } else {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);\n }\n }\n }\n function isMatchingRootContainer(grandContainer, targetContainer) {\n return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n }\n function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var ancestorInst = targetInst;\n if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n if (targetInst !== null) {\n // The below logic attempts to work out if we need to change\n // the target fiber to a different ancestor. We had similar logic\n // in the legacy event system, except the big difference between\n // systems is that the modern event system now has an event listener\n // attached to each React Root and React Portal Root. Together,\n // the DOM nodes representing these roots are the \"rootContainer\".\n // To figure out which ancestor instance we should use, we traverse\n // up the fiber tree from the target instance and attempt to find\n // root boundaries that match that of our current \"rootContainer\".\n // If we find that \"rootContainer\", we find the parent fiber\n // sub-tree for that root and make that our ancestor instance.\n var node = targetInst;\n mainLoop: while (true) {\n if (node === null) {\n return;\n }\n var nodeTag = node.tag;\n if (nodeTag === HostRoot || nodeTag === HostPortal) {\n var container = node.stateNode.containerInfo;\n if (isMatchingRootContainer(container, targetContainerNode)) {\n break;\n }\n if (nodeTag === HostPortal) {\n // The target is a portal, but it's not the rootContainer we're looking for.\n // Normally portals handle their own events all the way down to the root.\n // So we should be able to stop now. However, we don't know if this portal\n // was part of *our* root.\n var grandNode = node.return;\n while (grandNode !== null) {\n var grandTag = grandNode.tag;\n if (grandTag === HostRoot || grandTag === HostPortal) {\n var grandContainer = grandNode.stateNode.containerInfo;\n if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n // This is the rootContainer we're looking for and we found it as\n // a parent of the Portal. That means we can ignore it because the\n // Portal will bubble through to us.\n return;\n }\n }\n grandNode = grandNode.return;\n }\n } // Now we need to find it's corresponding host fiber in the other\n // tree. To do this we can use getClosestInstanceFromNode, but we\n // need to validate that the fiber is a host instance, otherwise\n // we need to traverse up through the DOM till we find the correct\n // node that is from the other tree.\n\n while (container !== null) {\n var parentNode = getClosestInstanceFromNode(container);\n if (parentNode === null) {\n return;\n }\n var parentTag = parentNode.tag;\n if (parentTag === HostComponent || parentTag === HostText) {\n node = ancestorInst = parentNode;\n continue mainLoop;\n }\n container = container.parentNode;\n }\n }\n node = node.return;\n }\n }\n }\n batchedUpdates(function () {\n return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n });\n }\n function createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n }\n function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {\n var captureName = reactName !== null ? reactName + 'Capture' : null;\n var reactEventName = inCapturePhase ? captureName : reactName;\n var listeners = [];\n var instance = targetFiber;\n var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance2 = instance,\n stateNode = _instance2.stateNode,\n tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n lastHostComponent = stateNode; // createEventHandle listeners\n\n if (reactEventName !== null) {\n var listener = getListener(instance, reactEventName);\n if (listener != null) {\n listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n }\n }\n } // If we are only accumulating events for the target, then we don't\n // continue to propagate through the React fiber tree to find other\n // listeners.\n\n if (accumulateTargetOnly) {\n break;\n } // If we are processing the onBeforeBlur event, then we need to take\n\n instance = instance.return;\n }\n return listeners;\n } // We should only use this function for:\n // - BeforeInputEventPlugin\n // - ChangeEventPlugin\n // - SelectEventPlugin\n // This is because we only process these plugins\n // in the bubble phase, so we need to accumulate two\n // phase event listeners (via emulation).\n\n function accumulateTwoPhaseListeners(targetFiber, reactName) {\n var captureName = reactName + 'Capture';\n var listeners = [];\n var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance3 = instance,\n stateNode = _instance3.stateNode,\n tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n var captureListener = getListener(instance, captureName);\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n var bubbleListener = getListener(instance, reactName);\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n instance = instance.return;\n }\n return listeners;\n }\n function getParent(inst) {\n if (inst === null) {\n return null;\n }\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 if (inst) {\n return inst;\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 function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n var depth = depthA;\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n return null;\n }\n function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n var registrationName = event._reactName;\n var listeners = [];\n var instance = target;\n while (instance !== null) {\n if (instance === common) {\n break;\n }\n var _instance4 = instance,\n alternate = _instance4.alternate,\n stateNode = _instance4.stateNode,\n tag = _instance4.tag;\n if (alternate !== null && alternate === common) {\n break;\n }\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n if (inCapturePhase) {\n var captureListener = getListener(instance, registrationName);\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n } else if (!inCapturePhase) {\n var bubbleListener = getListener(instance, registrationName);\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n }\n instance = instance.return;\n }\n if (listeners.length !== 0) {\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n } // We should only use this function for:\n // - EnterLeaveEventPlugin\n // This is because we only process this plugin\n // in the bubble phase, so we need to accumulate two\n // phase event listeners.\n\n function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n if (from !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n }\n if (to !== null && enterEvent !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n }\n }\n function getListenerSetKey(domEventName, capture) {\n return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\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 warnedUnknownTags;\n var validatePropertiesInDevelopment;\n var warnForPropDifference;\n var warnForExtraAttributes;\n var warnForInvalidEventListener;\n var canDiffStyleForHydrationWarning;\n var normalizeHTML;\n {\n warnedUnknownTags = {\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 validatePropertiesInDevelopment = function (type, props) {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props, {\n registrationNameDependencies: registrationNameDependencies,\n possibleRegistrationNames: possibleRegistrationNames\n });\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 canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;\n warnForPropDifference = function (propName, serverValue, clientValue) {\n if (didWarnInvalidHydration) {\n return;\n }\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n didWarnInvalidHydration = true;\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n };\n warnForExtraAttributes = function (attributeNames) {\n if (didWarnInvalidHydration) {\n return;\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 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 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 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n } // 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 function normalizeMarkupForTextOrAttribute(markup) {\n {\n checkHtmlStringCoercion(markup);\n }\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n }\n function checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n if (shouldWarnDev) {\n {\n if (!didWarnInvalidHydration) {\n didWarnInvalidHydration = true;\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n }\n }\n }\n if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent roots, we throw when there's a text mismatch and revert to\n // client rendering, up to the nearest Suspense boundary.\n throw new Error('Text content does not match server-rendered HTML.');\n }\n }\n function getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n }\n function noop() {}\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 // https://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 function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n for (var propKey in nextProps) {\n if (!nextProps.hasOwnProperty(propKey)) {\n continue;\n }\n var nextProp = nextProps[propKey];\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 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 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 (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if (nextProp != null) {\n setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\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 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 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 if (namespaceURI === HTML_NAMESPACE) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n if (namespaceURI === HTML_NAMESPACE) {\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 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 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 if (namespaceURI === HTML_NAMESPACE) {\n if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !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 function createTextNode(text, rootContainerElement) {\n return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\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 switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n props = rawProps;\n break;\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n props = rawProps;\n break;\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n props = rawProps;\n break;\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n props = rawProps;\n break;\n case 'input':\n initWrapperState(domElement, rawProps);\n props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n case 'option':\n validateProps(domElement, rawProps);\n props = rawProps;\n break;\n case 'select':\n initWrapperState$1(domElement, rawProps);\n props = getHostProps$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n default:\n props = rawProps;\n }\n assertValidProps(tag, props);\n setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\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 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 case 'option':\n postMountWrapper$1(domElement, rawProps);\n break;\n case 'select':\n postMountWrapper$2(domElement, rawProps);\n break;\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 break;\n }\n } // Calculate the diff between the two objects.\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 switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'select':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n case 'textarea':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\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 break;\n }\n assertValidProps(tag, nextProps);\n var propKey;\n var styleName;\n var styleUpdates = null;\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\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 (registrationNameDependencies.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 allowed property list in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\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 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 styleUpdates[styleName] = '';\n }\n } // Update styles that changed since `lastProp`.\n\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\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 updatePayload.push(propKey, styleUpdates);\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 if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, nextHtml);\n }\n }\n } else if (propKey === CHILDREN) {\n if (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 (registrationNameDependencies.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 if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\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 allowed property list during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n }\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n return updatePayload;\n } // Apply the diff.\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 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 case 'textarea':\n updateWrapper$1(domElement, nextRawProps);\n break;\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n postUpdateWrapper(domElement, nextRawProps);\n break;\n }\n }\n function getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n return possibleStandardNames[lowerCasedName] || null;\n }\n }\n function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement, isConcurrentMode, shouldWarnDev) {\n var isCustomComponentTag;\n var extraAttributeNames;\n {\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 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n break;\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n break;\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n case 'input':\n initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n case 'option':\n validateProps(domElement, rawProps);\n break;\n case 'select':\n initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n case 'textarea':\n initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n }\n assertValidProps(tag, rawProps);\n {\n extraAttributeNames = new Set();\n var attributes = domElement.attributes;\n for (var _i = 0; _i < attributes.length; _i++) {\n var name = attributes[_i].name.toLowerCase();\n switch (name) {\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n case 'value':\n break;\n case 'checked':\n break;\n case 'selected':\n break;\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 for (var propKey in rawProps) {\n if (!rawProps.hasOwnProperty(propKey)) {\n continue;\n }\n var nextProp = rawProps[propKey];\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 (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n }\n updatePayload = [CHILDREN, nextProp];\n }\n } else if (typeof nextProp === 'number') {\n if (domElement.textContent !== '' + nextProp) {\n if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n }\n updatePayload = [CHILDREN, '' + nextProp];\n }\n }\n } else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if (shouldWarnDev && true &&\n // 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 = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey);\n if (rawProps[SUPPRESS_HYDRATION_WARNING] === true) ;else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING ||\n // 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 if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n if (expectedHTML !== serverHTML) {\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n }\n } else if (propKey === STYLE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey);\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(nextProp);\n serverValue = domElement.getAttribute('style');\n if (expectedStyle !== serverValue) {\n warnForPropDifference(propKey, serverValue, expectedStyle);\n }\n }\n } else if (isCustomComponentTag && !enableCustomElementPropertySupport) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\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 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 if (ownNamespace === HTML_NAMESPACE) {\n ownNamespace = getIntrinsicNamespace(tag);\n }\n if (ownNamespace === HTML_NAMESPACE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\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 extraAttributeNames.delete(propKey);\n }\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n }\n var dontWarnCustomElement = enableCustomElementPropertySupport;\n if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n }\n }\n }\n {\n if (shouldWarnDev) {\n if (\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\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 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 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 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 break;\n }\n return updatePayload;\n }\n function diffHydratedText(textNode, text, isConcurrentMode) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n }\n function warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\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 function warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\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 function warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n didWarnInvalidHydration = true;\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\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 if (didWarnInvalidHydration) {\n return;\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 function restoreControlledState$3(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledState(domElement, props);\n return;\n case 'textarea':\n restoreControlledState$2(domElement, props);\n return;\n case 'select':\n restoreControlledState$1(domElement, props);\n return;\n }\n }\n var validateDOMNesting = function () {};\n var updatedAncestorInfo = function () {};\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',\n // 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 updatedAncestorInfo = function (oldInfo, tag) {\n var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo);\n var info = {\n tag: tag\n };\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\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 if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n ancestorInfo.current = info;\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n return ancestorInfo;\n };\n /**\n * Returns whether\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 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 case 'frameset':\n return tag === 'frame';\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 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 case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\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 return true;\n };\n /**\n * Returns whether\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 case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n case 'button':\n return ancestorInfo.buttonTagInScope;\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 case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n return null;\n };\n var didWarn$1 = {};\n validateDOMNesting = function (childTag, childText, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n if (childText != null) {\n if (childTag != null) {\n error('validateDOMNesting: when childText is passed, childTag should be null');\n }\n childTag = '#text';\n }\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n if (!invalidParentOrAncestor) {\n return;\n }\n var ancestorTag = invalidParentOrAncestor.tag;\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;\n if (didWarn$1[warnKey]) {\n return;\n }\n didWarn$1[warnKey] = true;\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\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 if (invalidParent) {\n var info = '';\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 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 = 'suppressHydrationWarning';\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 function getRootHostContext(rootContainerInstance) {\n var type;\n var namespace;\n var nodeType = rootContainerInstance.nodeType;\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 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 var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\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 function getPublicInstance(instance) {\n return instance;\n }\n function prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n var activeInstance = null;\n setEnabled(false);\n return activeInstance;\n }\n function resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n selectionInformation = null;\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 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 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 function appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n }\n function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n setInitialProperties(domElement, type, props, rootContainerInstance);\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n case 'img':\n return true;\n default:\n return false;\n }\n }\n function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n {\n var hostContextDev = hostContext;\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);\n }\n function shouldSetTextContent(type, props) {\n return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\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 }\n function getCurrentEventPriority() {\n var currentEvent = window.event;\n if (currentEvent === undefined) {\n return DefaultEventPriority;\n }\n return getEventPriority(currentEvent.type);\n }\n // if a component just imports ReactDOM (e.g. for findDOMNode).\n // Some environments might not have setTimeout or clearTimeout.\n\n var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\n var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\n var noTimeout = -1;\n var localPromise = typeof Promise === 'function' ? Promise : undefined; // -------------------\n var scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {\n return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);\n } : scheduleTimeout; // TODO: Determine the best fallback here.\n\n function handleErrorInNextTick(error) {\n setTimeout(function () {\n throw error;\n });\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 switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n if (newProps.autoFocus) {\n domElement.focus();\n }\n return;\n case 'img':\n {\n if (newProps.src) {\n domElement.src = newProps.src;\n }\n return;\n }\n }\n }\n function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Apply the diff to the DOM node.\n updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n\n updateFiberProps(domElement, newProps);\n }\n function resetTextContent(domElement) {\n setTextContent(domElement, '');\n }\n function commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n }\n function appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n }\n function appendChildToContainer(container, child) {\n var parentNode;\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 var reactRootContainer = container._reactRootContainer;\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 function insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\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 function removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\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 function clearSuspenseBoundary(parentInstance, suspenseInstance) {\n var node = suspenseInstance; // Delete 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 do {\n var nextNode = node.nextSibling;\n parentInstance.removeChild(node);\n if (nextNode && nextNode.nodeType === COMMENT_NODE) {\n var data = nextNode.data;\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.\n\n retryIfBlockedOn(suspenseInstance);\n return;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {\n depth++;\n }\n }\n node = nextNode;\n } while (node); // TODO: Warn, we didn't find the end comment boundary.\n // Retry if any event replaying was blocked on this.\n\n retryIfBlockedOn(suspenseInstance);\n }\n function clearSuspenseBoundaryFromContainer(container, suspenseInstance) {\n if (container.nodeType === COMMENT_NODE) {\n clearSuspenseBoundary(container.parentNode, suspenseInstance);\n } else if (container.nodeType === ELEMENT_NODE) {\n clearSuspenseBoundary(container, suspenseInstance);\n } // Retry if any event replaying was blocked on this.\n\n retryIfBlockedOn(container);\n }\n function hideInstance(instance) {\n // TODO: Does this work for all element types? What about MathML? Should we\n // pass host context to this method?\n instance = instance;\n var style = instance.style;\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n }\n function hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\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 function unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n }\n function clearContainer(container) {\n if (container.nodeType === ELEMENT_NODE) {\n container.textContent = '';\n } else if (container.nodeType === DOCUMENT_NODE) {\n if (container.documentElement) {\n container.removeChild(container.documentElement);\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 return instance;\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 return instance;\n }\n function canHydrateSuspenseInstance(instance) {\n if (instance.nodeType !== COMMENT_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 suspense node.\n\n return instance;\n }\n function isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n }\n function isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n }\n function getSuspenseInstanceFallbackErrorDetails(instance) {\n var dataset = instance.nextSibling && instance.nextSibling.dataset;\n var digest, message, stack;\n if (dataset) {\n digest = dataset.dgst;\n {\n message = dataset.msg;\n stack = dataset.stck;\n }\n }\n {\n return {\n message: message,\n digest: digest,\n stack: stack\n };\n } // let value = {message: undefined, hash: undefined};\n // const nextSibling = instance.nextSibling;\n // if (nextSibling) {\n // const dataset = ((nextSibling: any): HTMLTemplateElement).dataset;\n // value.message = dataset.msg;\n // value.hash = dataset.hash;\n // if (true) {\n // value.stack = dataset.stack;\n // }\n // }\n // return value;\n }\n function registerSuspenseInstanceRetry(instance, callback) {\n instance._reactRetry = callback;\n }\n function getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n if (nodeType === COMMENT_NODE) {\n var nodeData = node.data;\n if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {\n break;\n }\n if (nodeData === SUSPENSE_END_DATA) {\n return null;\n }\n }\n }\n return node;\n }\n function getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n }\n function getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n }\n function getFirstHydratableChildWithinContainer(parentContainer) {\n return getNextHydratable(parentContainer.firstChild);\n }\n function getFirstHydratableChildWithinSuspenseInstance(parentInstance) {\n return getNextHydratable(parentInstance.nextSibling);\n }\n function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) {\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 } // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n // when the legacy root API is removed.\n\n var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev);\n }\n function hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {\n precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n // when the legacy root API is removed.\n\n var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n return diffHydratedText(textInstance, text);\n }\n function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, suspenseInstance);\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 while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\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 node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\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 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 while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\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 node = node.previousSibling;\n }\n return null;\n }\n function commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n }\n function commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n }\n function shouldDeleteUnhydratedTailInstances(parentType) {\n return parentType !== 'head' && parentType !== 'body';\n }\n function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) {\n var shouldWarnDev = true;\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n }\n function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n var shouldWarnDev = true;\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n }\n }\n function didNotHydrateInstanceWithinContainer(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 function didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentNode, instance);\n } else if (instance.nodeType === COMMENT_NODE) ;else {\n warnForDeletedHydratableText(parentNode, instance);\n }\n }\n }\n }\n function didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {\n {\n if (isConcurrentMode || 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 didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n }\n function didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n }\n function didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);\n }\n }\n function didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);\n }\n }\n function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n }\n }\n function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n }\n }\n function errorHydratingContainer(parentContainer) {\n {\n // TODO: This gets logged by onRecoverableError, too, so we should be\n // able to remove it.\n error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());\n }\n }\n function preparePortalMount(portalInstance) {\n listenToAllSupportedEvents(portalInstance);\n }\n var randomKey = Math.random().toString(36).slice(2);\n var internalInstanceKey = '__reactFiber$' + randomKey;\n var internalPropsKey = '__reactProps$' + randomKey;\n var internalContainerInstanceKey = '__reactContainer$' + randomKey;\n var internalEventHandlersKey = '__reactEvents$' + randomKey;\n var internalEventHandlerListenersKey = '__reactListeners$' + randomKey;\n var internalEventHandlesSetKey = '__reactHandles$' + randomKey;\n function detachDeletedInstance(node) {\n // TODO: This function is only called on host components. I don't think all of\n // these fields are relevant.\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n }\n function precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n }\n function markContainerAsRoot(hostRoot, node) {\n node[internalContainerInstanceKey] = hostRoot;\n }\n function unmarkContainerAsRoot(node) {\n node[internalContainerInstanceKey] = null;\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 function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\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 var parentNode = targetNode.parentNode;\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 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 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 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 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 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 return targetInst;\n }\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\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 function getInstanceFromNode(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\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 return null;\n }\n /**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\n function getNodeFromInstance(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 throw new Error('getNodeFromInstance: Invalid argument.');\n }\n function getFiberCurrentPropsFromNode(node) {\n return node[internalPropsKey] || null;\n }\n function updateFiberProps(node, props) {\n node[internalPropsKey] = props;\n }\n function getEventListenerSet(node) {\n var elementListenerSet = node[internalEventHandlersKey];\n if (elementListenerSet === undefined) {\n elementListenerSet = node[internalEventHandlersKey] = new Set();\n }\n return elementListenerSet;\n }\n var loggedTypeFailures = {};\n var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n function setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n }\n function checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n setCurrentlyValidatingElement(null);\n }\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n error('Failed %s type: %s', location, error$1.message);\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n }\n var valueStack = [];\n var fiberStack;\n {\n fiberStack = [];\n }\n var index = -1;\n function createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n }\n function pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n return;\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 function push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n {\n fiberStack[index] = fiber;\n }\n cursor.current = value;\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 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 return contextStackCursor.current;\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 function getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\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 var instance = workInProgress.stateNode;\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n var context = {};\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n {\n var name = getComponentNameFromFiber(workInProgress) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\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 return context;\n }\n }\n function hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n }\n function isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n }\n function popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n }\n function popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n }\n function pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (contextStackCursor.current !== emptyContextObject) {\n throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\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 = getComponentNameFromFiber(fiber) || 'Unknown';\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 var childContext = instance.getChildContext();\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n {\n var name = getComponentNameFromFiber(fiber) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\n }\n return assign({}, parentContext, childContext);\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 function invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n if (!instance) {\n throw new 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 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 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 throw new 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 var node = fiber;\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n case ClassComponent:\n {\n var Component = node.type;\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n break;\n }\n }\n node = node.return;\n } while (node !== null);\n throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n var LegacyRoot = 0;\n var ConcurrentRoot = 1;\n var syncQueue = null;\n var includesLegacySyncCallbacks = false;\n var isFlushingSyncQueue = false;\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];\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 function scheduleLegacySyncCallback(callback) {\n includesLegacySyncCallbacks = true;\n scheduleSyncCallback(callback);\n }\n function flushSyncCallbacksOnlyInLegacyMode() {\n // Only flushes the queue if there's a legacy sync callback scheduled.\n // TODO: There's only a single type of callback: performSyncOnWorkOnRoot. So\n // it might make more sense for the queue to be a list of roots instead of a\n // list of generic callbacks. Then we can have two: one for legacy roots, one\n // for concurrent roots. And this method would only flush the legacy ones.\n if (includesLegacySyncCallbacks) {\n flushSyncCallbacks();\n }\n }\n function flushSyncCallbacks() {\n if (!isFlushingSyncQueue && syncQueue !== null) {\n // Prevent re-entrance.\n isFlushingSyncQueue = true;\n var i = 0;\n var previousUpdatePriority = getCurrentUpdatePriority();\n try {\n var isSync = true;\n var queue = syncQueue; // TODO: Is this necessary anymore? The only user code that runs in this\n // queue is in the render or commit phases.\n\n setCurrentUpdatePriority(DiscreteEventPriority);\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n callback = callback(isSync);\n } while (callback !== null);\n }\n syncQueue = null;\n includesLegacySyncCallbacks = false;\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 scheduleCallback(ImmediatePriority, flushSyncCallbacks);\n throw error;\n } finally {\n setCurrentUpdatePriority(previousUpdatePriority);\n isFlushingSyncQueue = false;\n }\n }\n return null;\n }\n\n // TODO: Use the unified fiber stack module instead of this local one?\n // Intentionally not using it yet to derisk the initial implementation, because\n // the way we push/pop these values is a bit unusual. If there's a mistake, I'd\n // rather the ids be wrong than crash the whole reconciler.\n var forkStack = [];\n var forkStackIndex = 0;\n var treeForkProvider = null;\n var treeForkCount = 0;\n var idStack = [];\n var idStackIndex = 0;\n var treeContextProvider = null;\n var treeContextId = 1;\n var treeContextOverflow = '';\n function isForkedChild(workInProgress) {\n warnIfNotHydrating();\n return (workInProgress.flags & Forked) !== NoFlags;\n }\n function getForksAtLevel(workInProgress) {\n warnIfNotHydrating();\n return treeForkCount;\n }\n function getTreeId() {\n var overflow = treeContextOverflow;\n var idWithLeadingBit = treeContextId;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n }\n function pushTreeFork(workInProgress, totalChildren) {\n // This is called right after we reconcile an array (or iterator) of child\n // fibers, because that's the only place where we know how many children in\n // the whole set without doing extra work later, or storing addtional\n // information on the fiber.\n //\n // That's why this function is separate from pushTreeId — it's called during\n // the render phase of the fork parent, not the child, which is where we push\n // the other context values.\n //\n // In the Fizz implementation this is much simpler because the child is\n // rendered in the same callstack as the parent.\n //\n // It might be better to just add a `forks` field to the Fiber type. It would\n // make this module simpler.\n warnIfNotHydrating();\n forkStack[forkStackIndex++] = treeForkCount;\n forkStack[forkStackIndex++] = treeForkProvider;\n treeForkProvider = workInProgress;\n treeForkCount = totalChildren;\n }\n function pushTreeId(workInProgress, totalChildren, index) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextProvider = workInProgress;\n var baseIdWithLeadingBit = treeContextId;\n var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n treeContextId = 1 << restOfLength | id;\n treeContextOverflow = overflow;\n } else {\n // Normal path\n var newBits = slot << baseLength;\n var _id = newBits | baseId;\n var _overflow = baseOverflow;\n treeContextId = 1 << length | _id;\n treeContextOverflow = _overflow;\n }\n }\n function pushMaterializedTreeId(workInProgress) {\n warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear\n // in its children.\n\n var returnFiber = workInProgress.return;\n if (returnFiber !== null) {\n var numberOfForks = 1;\n var slotIndex = 0;\n pushTreeFork(workInProgress, numberOfForks);\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\n }\n function getBitLength(number) {\n return 32 - clz32(number);\n }\n function getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n }\n function popTreeContext(workInProgress) {\n // Restore the previous values.\n // This is a bit more complicated than other context-like modules in Fiber\n // because the same Fiber may appear on the stack multiple times and for\n // different reasons. We have to keep popping until the work-in-progress is\n // no longer at the top of the stack.\n while (workInProgress === treeForkProvider) {\n treeForkProvider = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n treeForkCount = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n }\n while (workInProgress === treeContextProvider) {\n treeContextProvider = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextOverflow = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextId = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n }\n }\n function getSuspendedTreeContext() {\n warnIfNotHydrating();\n if (treeContextProvider !== null) {\n return {\n id: treeContextId,\n overflow: treeContextOverflow\n };\n } else {\n return null;\n }\n }\n function restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextId = suspendedContext.id;\n treeContextOverflow = suspendedContext.overflow;\n treeContextProvider = workInProgress;\n }\n function warnIfNotHydrating() {\n {\n if (!getIsHydrating()) {\n error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');\n }\n }\n }\n\n // This may have been an insertion or a hydration.\n\n var hydrationParentFiber = null;\n var nextHydratableInstance = null;\n var isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches\n // due to earlier mismatches or a suspended fiber.\n\n var didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary\n\n var hydrationErrors = null;\n function warnIfHydrating() {\n {\n if (isHydrating) {\n error('We should not be hydrating here. This is a bug in React. Please file a bug.');\n }\n }\n }\n function markDidThrowWhileHydratingDEV() {\n {\n didSuspendOrErrorDEV = true;\n }\n }\n function didSuspendOrErrorWhileHydratingDEV() {\n {\n return didSuspendOrErrorDEV;\n }\n }\n function enterHydrationState(fiber) {\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n return true;\n }\n function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {\n nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n if (treeContext !== null) {\n restoreSuspendedTreeContext(fiber, treeContext);\n }\n return true;\n }\n function warnUnhydratedInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);\n break;\n }\n case HostComponent:\n {\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance,\n // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);\n break;\n }\n }\n }\n }\n function deleteHydratableInstance(returnFiber, instance) {\n warnUnhydratedInstance(returnFiber, instance);\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n var deletions = returnFiber.deletions;\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\n }\n function warnNonhydratedInstance(returnFiber, fiber) {\n {\n if (didSuspendOrErrorDEV) {\n // Inside a boundary that already suspended. We're currently rendering the\n // siblings of a suspended node. The mismatch may be due to the missing\n // data, so it's probably a false positive.\n return;\n }\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n switch (fiber.tag) {\n case HostComponent:\n var type = fiber.type;\n var props = fiber.pendingProps;\n didNotFindHydratableInstanceWithinContainer(parentContainer, type);\n break;\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);\n break;\n }\n break;\n }\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n switch (fiber.tag) {\n case HostComponent:\n {\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props,\n // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n case HostText:\n {\n var _text = fiber.pendingProps;\n var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text,\n // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode);\n break;\n }\n }\n break;\n }\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n var _parentInstance = suspenseState.dehydrated;\n if (_parentInstance !== null) switch (fiber.tag) {\n case HostComponent:\n var _type2 = fiber.type;\n var _props2 = fiber.pendingProps;\n didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);\n break;\n case HostText:\n var _text2 = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);\n break;\n }\n break;\n }\n default:\n return;\n }\n }\n }\n function insertNonHydratedInstance(returnFiber, fiber) {\n fiber.flags = fiber.flags & ~Hydrating | Placement;\n warnNonhydratedInstance(returnFiber, fiber);\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 if (instance !== null) {\n fiber.stateNode = instance;\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(instance);\n return true;\n }\n return false;\n }\n case HostText:\n {\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text);\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.\n\n nextHydratableInstance = null;\n return true;\n }\n return false;\n }\n case SuspenseComponent:\n {\n var suspenseInstance = canHydrateSuspenseInstance(nextInstance);\n if (suspenseInstance !== null) {\n var suspenseState = {\n dehydrated: suspenseInstance,\n treeContext: getSuspendedTreeContext(),\n retryLane: OffscreenLane\n };\n fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.\n // This simplifies the code for getHostSibling and deleting nodes,\n // since it doesn't have to consider all Suspense boundaries and\n // check if they're dehydrated ones or not.\n\n var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);\n dehydratedFragment.return = fiber;\n fiber.child = dehydratedFragment;\n hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into\n // it during the first pass. Instead, we'll reenter it later.\n\n nextHydratableInstance = null;\n return true;\n }\n return false;\n }\n default:\n return false;\n }\n }\n function shouldClientRenderOnMismatch(fiber) {\n return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags;\n }\n function throwOnHydrationMismatch(fiber) {\n throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');\n }\n function tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n var nextInstance = nextHydratableInstance;\n if (!nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n var firstAttemptedInstance = nextInstance;\n if (!tryHydrate(fiber, nextInstance)) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\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\n nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\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 deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n }\n }\n function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n var instance = fiber.stateNode;\n var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev); // 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 return false;\n }\n function prepareToHydrateHostTextInstance(fiber) {\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\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 if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent,\n // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent,\n // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode2);\n break;\n }\n }\n }\n }\n return shouldUpdate;\n }\n function prepareToHydrateHostSuspenseInstance(fiber) {\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n if (!suspenseInstance) {\n throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n hydrateSuspenseInstance(suspenseInstance, fiber);\n }\n function skipPastDehydratedSuspenseInstance(fiber) {\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n if (!suspenseInstance) {\n throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n }\n function popToNextHostParent(fiber) {\n var parent = fiber.return;\n while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n parent = parent.return;\n }\n hydrationParentFiber = parent;\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 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 } // 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. We also don't delete anything inside the root container.\n\n if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) {\n var nextInstance = nextHydratableInstance;\n if (nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnIfUnhydratedTailNodes(fiber);\n throwOnHydrationMismatch();\n } else {\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n }\n }\n popToNextHostParent(fiber);\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n return true;\n }\n function hasUnhydratedTailNodes() {\n return isHydrating && nextHydratableInstance !== null;\n }\n function warnIfUnhydratedTailNodes(fiber) {\n var nextInstance = nextHydratableInstance;\n while (nextInstance) {\n warnUnhydratedInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n function resetHydrationState() {\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n didSuspendOrErrorDEV = false;\n }\n function upgradeHydrationErrorsToRecoverable() {\n if (hydrationErrors !== null) {\n // Successfully completed a forced client render. The errors that occurred\n // during the hydration attempt are now recovered. We will log them in\n // commit phase, once the entire tree has finished.\n queueRecoverableErrors(hydrationErrors);\n hydrationErrors = null;\n }\n }\n function getIsHydrating() {\n return isHydrating;\n }\n function queueHydrationError(error) {\n if (hydrationErrors === null) {\n hydrationErrors = [error];\n } else {\n hydrationErrors.push(error);\n }\n }\n var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\n var NoTransition = null;\n function requestCurrentTransition() {\n return ReactCurrentBatchConfig$1.transition;\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 while (node !== null) {\n if (node.mode & StrictLegacyMode) {\n maybeStrictRoot = node;\n }\n node = node.return;\n }\n return maybeStrictRoot;\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 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 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedupe strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n if (typeof instance.componentWillMount === 'function' &&\n // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n var UNSAFE_componentWillMountUniqueNames = new Set();\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n var componentWillReceivePropsUniqueNames = new Set();\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n var componentWillUpdateUniqueNames = new Set();\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || '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 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://reactjs.org/link/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 if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/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://reactjs.org/link/derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n }\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/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 if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/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 18.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 if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/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://reactjs.org/link/derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.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 if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/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 18.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 var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\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 if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\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 warningsForRoot.push(fiber);\n }\n };\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n try {\n setCurrentFiber(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://reactjs.org/link/legacy-context', sortedNames);\n } finally {\n resetCurrentFiber();\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 didWarnAboutMaps;\n var didWarnAboutGenerators;\n var didWarnAboutStringRefs;\n var ownerHasKeyUseWarning;\n var ownerHasFunctionTypeWarning;\n var warnForMissingKey = function (child, returnFiber) {};\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 warnForMissingKey = function (child, returnFiber) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n if (typeof child._store !== 'object') {\n throw new 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 child._store.validated = true;\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n if (ownerHasKeyUseWarning[componentName]) {\n return;\n }\n ownerHasKeyUseWarning[componentName] = true;\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n };\n }\n function isReactClass(type) {\n return type.prototype && type.prototype.isReactComponent;\n }\n function coerceRef(returnFiber, current, element) {\n var mixedRef = element.ref;\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 & StrictLegacyMode || warnAboutStringRefs) &&\n // 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 // Will already throw with \"Function components cannot have string refs\"\n !(element._owner && element._owner.tag !== ClassComponent) &&\n // Will already warn with \"Function components cannot be given refs\"\n !(typeof element.type === 'function' && !isReactClass(element.type)) &&\n // Will already throw with \"Element ref was specified as a string (someStringRef) but no owner was set\"\n element._owner) {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n if (!didWarnAboutStringRefs[componentName]) {\n {\n error('Component \"%s\" contains the string ref \"%s\". Support for string refs ' + 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, mixedRef);\n }\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n if (element._owner) {\n var owner = element._owner;\n var inst;\n if (owner) {\n var ownerFiber = owner;\n if (ownerFiber.tag !== ClassComponent) {\n throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref');\n }\n inst = ownerFiber.stateNode;\n }\n if (!inst) {\n throw new Error(\"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a \" + 'bug in React. Please file an issue.');\n } // Assigning this to a const so Flow knows it won't change in the closure\n\n var resolvedInst = inst;\n {\n checkPropStringCoercion(mixedRef, 'ref');\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 var ref = function (value) {\n var refs = resolvedInst.refs;\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n ref._stringRef = stringRef;\n return ref;\n } else {\n if (typeof mixedRef !== 'string') {\n throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.');\n }\n if (!element._owner) {\n throw new Error(\"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of\" + ' the following reasons:\\n' + '1. You may be adding a ref to a function component\\n' + \"2. You may be adding a ref to a component that was not created inside a component's render method\\n\" + '3. You have multiple copies of React loaded\\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.');\n }\n }\n }\n return mixedRef;\n }\n function throwOnInvalidObjectType(returnFiber, newChild) {\n var childString = Object.prototype.toString.call(newChild);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n }\n function warnOnFunctionType(returnFiber) {\n {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n if (ownerHasFunctionTypeWarning[componentName]) {\n return;\n }\n ownerHasFunctionTypeWarning[componentName] = 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 }\n function resolveLazy(lazyType) {\n var payload = lazyType._payload;\n var init = lazyType._init;\n return init(payload);\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 function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n var deletions = returnFiber.deletions;\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\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 var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\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 while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\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 function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // During hydration, the useId algorithm needs to know which fibers are\n // part of a list of children (arrays, iterators).\n newFiber.flags |= Forked;\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags |= 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.flags |= Placement;\n return lastPlacedIndex;\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.flags |= Placement;\n }\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\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 function updateElement(returnFiber, current, element, lanes) {\n var elementType = element.type;\n if (elementType === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, current, element.props.children, lanes, element.key);\n }\n if (current !== null) {\n if (current.elementType === elementType ||\n // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) ||\n // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {\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 var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n function updatePortal(returnFiber, current, portal, lanes) {\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, lanes);\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 function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, 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 function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' && newChild !== '' || 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, lanes);\n created.return = returnFiber;\n return created;\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, lanes);\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n _created2.return = returnFiber;\n return _created2;\n }\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return createChild(returnFiber, init(payload), lanes);\n }\n }\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n _created3.return = returnFiber;\n return _created3;\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n if (typeof newChild === 'string' && newChild !== '' || 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 return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return updateSlot(returnFiber, oldFiber, init(payload), lanes);\n }\n }\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' && newChild !== '' || 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, lanes);\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 return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init;\n return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);\n }\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\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 case REACT_LAZY_TYPE:\n var payload = child._payload;\n var init = child._init;\n warnOnInvalidKey(init(payload), knownKeys, returnFiber);\n break;\n }\n }\n return knownKeys;\n }\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\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 for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\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 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 var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\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 break;\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 lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\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 previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\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 if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n return resultingFirstChild;\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], lanes);\n if (_newFiber === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\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 previousNewFiber = _newFiber;\n }\n if (getIsHydrating()) {\n var _numberOfForks = newIdx;\n pushTreeFork(returnFiber, _numberOfForks);\n }\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\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], lanes);\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 lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\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 if (getIsHydrating()) {\n var _numberOfForks2 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks2);\n }\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n if (typeof iteratorFn !== 'function') {\n throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.');\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' &&\n // $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 didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n if (newChildren == null) {\n throw new Error('An iterable object provided no iterator.');\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 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 var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\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 break;\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 lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\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 previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\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 if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n return resultingFirstChild;\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, lanes);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\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 previousNewFiber = _newFiber3;\n }\n if (getIsHydrating()) {\n var _numberOfForks3 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks3);\n }\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\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, lanes);\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 lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\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 if (getIsHydrating()) {\n var _numberOfForks4 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks4);\n }\n return resultingFirstChild;\n }\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\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 deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\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 var elementType = element.type;\n if (elementType === REACT_FRAGMENT_TYPE) {\n if (child.tag === Fragment) {\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 } else {\n if (child.elementType === elementType ||\n // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) ||\n // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var _existing = useFiber(child, element.props);\n _existing.ref = coerceRef(returnFiber, child, element);\n _existing.return = returnFiber;\n {\n _existing._debugSource = element._source;\n _existing._debugOwner = element._owner;\n }\n return _existing;\n }\n } // Didn't match.\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\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 child = child.sibling;\n }\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\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 function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\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 if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init; // TODO: This function is supposed to be non-recursive.\n\n return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes);\n }\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n } // Remaining cases are all treated as empty.\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return reconcileChildFibers;\n }\n var reconcileChildFibers = ChildReconciler(true);\n var mountChildFibers = ChildReconciler(false);\n function cloneChildFibers(current, workInProgress) {\n if (current !== null && workInProgress.child !== current.child) {\n throw new Error('Resuming work not yet implemented.');\n }\n if (workInProgress.child === null) {\n return;\n }\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n newChild.sibling = null;\n } // Reset a workInProgress child set to prepare it for a second pass.\n\n function resetChildFibers(workInProgress, lanes) {\n var child = workInProgress.child;\n while (child !== null) {\n resetWorkInProgress(child, lanes);\n child = child.sibling;\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 lastFullyObservedContext = null;\n var isDisallowedContextReadInDEV = false;\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 lastFullyObservedContext = null;\n {\n isDisallowedContextReadInDEV = false;\n }\n }\n function enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n }\n function exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n }\n function pushProvider(providerFiber, context, nextValue) {\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 context._currentRenderer = rendererSigil;\n }\n }\n }\n function popProvider(context, providerFiber) {\n var currentValue = valueCursor.current;\n pop(valueCursor, providerFiber);\n {\n {\n context._currentValue = currentValue;\n }\n }\n }\n function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n // Update the child lanes of all the ancestors, including the alternates.\n var node = parent;\n while (node !== null) {\n var alternate = node.alternate;\n if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n node.childLanes = mergeLanes(node.childLanes, renderLanes);\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n if (node === propagationRoot) {\n break;\n }\n node = node.return;\n }\n {\n if (node !== propagationRoot) {\n error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n }\n function propagateContextChange(workInProgress, context, renderLanes) {\n {\n propagateContextChange_eager(workInProgress, context, renderLanes);\n }\n }\n function propagateContextChange_eager(workInProgress, context, renderLanes) {\n var fiber = workInProgress.child;\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context) {\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 lane = pickArbitraryLane(renderLanes);\n var update = createUpdate(NoTimestamp, lane);\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 // Inlined `enqueueUpdate` to remove interleaved update check\n\n var updateQueue = fiber.updateQueue;\n if (updateQueue === null) ;else {\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\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 sharedQueue.pending = update;\n }\n }\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.\n\n list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n // dependency list.\n\n break;\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 if (fiber.tag === DehydratedFragment) {\n // If a dehydrated suspense boundary is in this subtree, we don't know\n // if it will have any context consumers in it. The best we can do is\n // mark it as having updates.\n var parentSuspense = fiber.return;\n if (parentSuspense === null) {\n throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');\n }\n parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);\n var _alternate = parentSuspense.alternate;\n if (_alternate !== null) {\n _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);\n } // This is intentionally passing this fiber as the parent\n // because we want to schedule this fiber as having work\n // on its children. We'll use the childLanes on\n // this fiber to indicate that a context has changed.\n\n scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);\n nextFiber = fiber.sibling;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\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 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 var sibling = nextFiber.sibling;\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 nextFiber = nextFiber.return;\n }\n }\n fiber = nextFiber;\n }\n }\n function prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastFullyObservedContext = null;\n var dependencies = workInProgress.dependencies;\n if (dependencies !== null) {\n {\n var firstContext = dependencies.firstContext;\n if (firstContext !== null) {\n if (includesSomeLane(dependencies.lanes, renderLanes)) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n dependencies.firstContext = null;\n }\n }\n }\n }\n function readContext(context) {\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 var value = context._currentValue;\n if (lastFullyObservedContext === context) ;else {\n var contextItem = {\n context: context,\n memoizedValue: value,\n next: null\n };\n if (lastContextDependency === null) {\n if (currentlyRenderingFiber === null) {\n throw new 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 } // This is the first dependency for this component. Create a new list.\n\n lastContextDependency = contextItem;\n currentlyRenderingFiber.dependencies = {\n lanes: NoLanes,\n firstContext: contextItem\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n return value;\n }\n\n // render. When this render exits, either because it finishes or because it is\n // interrupted, the interleaved updates will be transferred onto the main part\n // of the queue.\n\n var concurrentQueues = null;\n function pushConcurrentUpdateQueue(queue) {\n if (concurrentQueues === null) {\n concurrentQueues = [queue];\n } else {\n concurrentQueues.push(queue);\n }\n }\n function finishQueueingConcurrentUpdates() {\n // Transfer the interleaved updates onto the main queue. Each queue has a\n // `pending` field and an `interleaved` field. When they are not null, they\n // point to the last node in a circular linked list. We need to append the\n // interleaved list to the end of the pending list by joining them into a\n // single, circular list.\n if (concurrentQueues !== null) {\n for (var i = 0; i < concurrentQueues.length; i++) {\n var queue = concurrentQueues[i];\n var lastInterleavedUpdate = queue.interleaved;\n if (lastInterleavedUpdate !== null) {\n queue.interleaved = null;\n var firstInterleavedUpdate = lastInterleavedUpdate.next;\n var lastPendingUpdate = queue.pending;\n if (lastPendingUpdate !== null) {\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = firstInterleavedUpdate;\n lastInterleavedUpdate.next = firstPendingUpdate;\n }\n queue.pending = lastInterleavedUpdate;\n }\n }\n concurrentQueues = null;\n }\n }\n function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n queue.interleaved = update;\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n }\n function enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n queue.interleaved = update;\n }\n function enqueueConcurrentClassUpdate(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n queue.interleaved = update;\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n }\n function enqueueConcurrentRenderForLane(fiber, lane) {\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n } // Calling this function outside this module should only be done for backwards\n // compatibility and should always be accompanied by a warning.\n\n var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;\n function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n // Update the source fiber's lanes\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n var alternate = sourceFiber.alternate;\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n }\n {\n if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n } // Walk the parent path to the root and update the child lanes.\n\n var node = sourceFiber;\n var parent = sourceFiber.return;\n while (parent !== null) {\n parent.childLanes = mergeLanes(parent.childLanes, lane);\n alternate = parent.alternate;\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n } else {\n {\n if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n }\n }\n node = parent;\n parent = parent.return;\n }\n if (node.tag === HostRoot) {\n var root = node.stateNode;\n return root;\n } else {\n return null;\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 function initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null,\n interleaved: null,\n lanes: NoLanes\n },\n effects: null\n };\n fiber.updateQueue = queue;\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 if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: currentQueue.firstBaseUpdate,\n lastBaseUpdate: currentQueue.lastBaseUpdate,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = clone;\n }\n }\n function createUpdate(eventTime, lane) {\n var update = {\n eventTime: eventTime,\n lane: lane,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n return update;\n }\n function enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return null;\n }\n var sharedQueue = updateQueue.shared;\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 if (isUnsafeClassRenderPhaseUpdate()) {\n // This is an unsafe render phase update. Add directly to the update\n // queue so we can process it immediately during the current render.\n var pending = sharedQueue.pending;\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 sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering\n // this fiber. This is for backwards compatibility in the case where you\n // update a different component during render phase than the one that is\n // currently renderings (a pattern that is accompanied by a warning).\n\n return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);\n } else {\n return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);\n }\n }\n function entangleTransitions(root, fiber, lane) {\n var updateQueue = fiber.updateQueue;\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n var sharedQueue = updateQueue.shared;\n if (isTransitionLane(lane)) {\n var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must\n // have finished. We can remove them from the shared queue, which represents\n // a superset of the actually pending lanes. In some cases we may entangle\n // more than we need to, but that's OK. In fact it's worse if we *don't*\n // entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n }\n function enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n // Captured updates are updates that are thrown by a child during the render\n // phase. They should be discarded if the render is aborted. Therefore,\n // we should only put them on the work-in-progress queue, not the current one.\n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n var current = workInProgress.alternate;\n if (current !== null) {\n var currentQueue = current.updateQueue;\n if (queue === currentQueue) {\n // The work-in-progress queue is the same as current. This happens when\n // we bail out on a parent fiber that then captures an error thrown by\n // a child. Since we want to append the update only to the work-in\n // -progress queue, we need to clone the updates. We usually clone during\n // processUpdateQueue, but that didn't happen in this case because we\n // skipped over the parent when we bailed out.\n var newFirst = null;\n var newLast = null;\n var firstBaseUpdate = queue.firstBaseUpdate;\n if (firstBaseUpdate !== null) {\n // Loop through the updates and clone them.\n var update = firstBaseUpdate;\n do {\n var clone = {\n eventTime: update.eventTime,\n lane: update.lane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n if (newLast === null) {\n newFirst = newLast = clone;\n } else {\n newLast.next = clone;\n newLast = clone;\n }\n update = update.next;\n } while (update !== null); // Append the captured update the end of the cloned list.\n\n if (newLast === null) {\n newFirst = newLast = capturedUpdate;\n } else {\n newLast.next = capturedUpdate;\n newLast = capturedUpdate;\n }\n } else {\n // There are no base updates.\n newFirst = newLast = capturedUpdate;\n }\n queue = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = queue;\n return;\n }\n } // Append the update to the end of the list.\n\n var lastBaseUpdate = queue.lastBaseUpdate;\n if (lastBaseUpdate === null) {\n queue.firstBaseUpdate = capturedUpdate;\n } else {\n lastBaseUpdate.next = capturedUpdate;\n }\n queue.lastBaseUpdate = capturedUpdate;\n }\n function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n var nextState = payload.call(instance, prevState, nextProps);\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n exitDisallowedContextReadInDEV();\n }\n return nextState;\n } // State object\n\n return payload;\n }\n case CaptureUpdate:\n {\n workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n partialState = _payload.call(instance, prevState, nextProps);\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n _payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\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 return assign({}, prevState, partialState);\n }\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n return prevState;\n }\n function processUpdateQueue(workInProgress, props, instance, renderLanes) {\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 }\n var firstBaseUpdate = queue.firstBaseUpdate;\n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n var pendingQueue = queue.shared.pending;\n if (pendingQueue !== null) {\n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n // and last so that it's non-circular.\n\n var lastPendingUpdate = pendingQueue;\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null; // Append pending updates to base queue\n\n if (lastBaseUpdate === null) {\n firstBaseUpdate = firstPendingUpdate;\n } else {\n lastBaseUpdate.next = firstPendingUpdate;\n }\n lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n // we need to transfer the updates to that queue, too. Because the base\n // queue is a singly-linked list with no cycles, we can append to both\n // lists and take advantage of structural sharing.\n // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n if (current !== null) {\n // This is always non-null on a ClassComponent or HostRoot\n var currentQueue = current.updateQueue;\n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n if (currentLastBaseUpdate !== lastBaseUpdate) {\n if (currentLastBaseUpdate === null) {\n currentQueue.firstBaseUpdate = firstPendingUpdate;\n } else {\n currentLastBaseUpdate.next = firstPendingUpdate;\n }\n currentQueue.lastBaseUpdate = lastPendingUpdate;\n }\n }\n } // These values may change as we process the queue.\n\n if (firstBaseUpdate !== null) {\n // Iterate through the list of updates to compute the result.\n var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n // from the original lanes.\n\n var newLanes = NoLanes;\n var newBaseState = null;\n var newFirstBaseUpdate = null;\n var newLastBaseUpdate = null;\n var update = firstBaseUpdate;\n do {\n var updateLane = update.lane;\n var updateEventTime = update.eventTime;\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\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 eventTime: updateEventTime,\n lane: updateLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n if (newLastBaseUpdate === null) {\n newFirstBaseUpdate = newLastBaseUpdate = clone;\n newBaseState = newState;\n } else {\n newLastBaseUpdate = newLastBaseUpdate.next = clone;\n } // Update the remaining priority in the queue.\n\n newLanes = mergeLanes(newLanes, updateLane);\n } else {\n // This update does have sufficient priority.\n if (newLastBaseUpdate !== null) {\n var _clone = {\n eventTime: updateEventTime,\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n } // Process this update.\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n if (callback !== null &&\n // If the update was already committed, we should not queue its\n // callback again.\n update.lane !== NoLane) {\n workInProgress.flags |= Callback;\n var effects = queue.effects;\n if (effects === null) {\n queue.effects = [update];\n } else {\n effects.push(update);\n }\n }\n }\n update = update.next;\n if (update === null) {\n pendingQueue = queue.shared.pending;\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 var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n // unravel them when transferring them to the base queue.\n\n var _firstPendingUpdate = _lastPendingUpdate.next;\n _lastPendingUpdate.next = null;\n update = _firstPendingUpdate;\n queue.lastBaseUpdate = _lastPendingUpdate;\n queue.shared.pending = null;\n }\n }\n } while (true);\n if (newLastBaseUpdate === null) {\n newBaseState = newState;\n }\n queue.baseState = newBaseState;\n queue.firstBaseUpdate = newFirstBaseUpdate;\n queue.lastBaseUpdate = newLastBaseUpdate; // Interleaved updates are stored on a separate queue. We aren't going to\n // process them during this render, but we do need to track which lanes\n // are remaining.\n\n var lastInterleaved = queue.shared.interleaved;\n if (lastInterleaved !== null) {\n var interleaved = lastInterleaved;\n do {\n newLanes = mergeLanes(newLanes, interleaved.lane);\n interleaved = interleaved.next;\n } while (interleaved !== lastInterleaved);\n } else if (firstBaseUpdate === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.shared.lanes = NoLanes;\n } // 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 markSkippedUpdateLanes(newLanes);\n workInProgress.lanes = newLanes;\n workInProgress.memoizedState = newState;\n }\n {\n currentlyProcessingQueue = null;\n }\n }\n function callCallback(callback, context) {\n if (typeof callback !== 'function') {\n throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + (\"received: \" + callback));\n }\n callback.call(context);\n }\n function resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n }\n function checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n }\n function commitUpdateQueue(finishedWork, finishedQueue, instance) {\n // Commit the effects\n var effects = finishedQueue.effects;\n finishedQueue.effects = null;\n if (effects !== null) {\n for (var i = 0; i < effects.length; i++) {\n var effect = effects[i];\n var callback = effect.callback;\n if (callback !== null) {\n effect.callback = null;\n callCallback(callback, instance);\n }\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 function requiredContext(c) {\n if (c === NO_CONTEXT) {\n throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n return c;\n }\n function getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\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 function popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n }\n function getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\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 push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\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 pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\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 function hasSuspenseContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n }\n function setDefaultShallowSuspenseContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n }\n function setShallowSuspenseContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n }\n function addSubtreeSuspenseContext(parentContext, subtreeContext) {\n return parentContext | subtreeContext;\n }\n function pushSuspenseContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n }\n function popSuspenseContext(fiber) {\n pop(suspenseStackCursor, fiber);\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 if (nextState !== null) {\n if (nextState.dehydrated !== null) {\n // A dehydrated boundary always captures.\n return true;\n }\n return false;\n }\n var props = workInProgress.memoizedProps; // Regular boundaries always capture.\n\n {\n return true;\n } // If it's a boundary we should avoid, then we prefer to bubble up to the\n }\n function findFirstSuspended(row) {\n var node = row;\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n if (state !== null) {\n var dehydrated = state.dehydrated;\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent &&\n // 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.flags & DidCapture) !== NoFlags;\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 if (node === row) {\n return null;\n }\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n return null;\n }\n var NoFlags$1 = /* */\n 0; // Represents whether effect should fire.\n\n var HasEffect = /* */\n 1; // Represents the phase in which the effect (not the clean-up) fires.\n\n var Insertion = /* */\n 2;\n var Layout = /* */\n 4;\n var Passive$1 = /* */\n 8;\n\n // and should be reset before starting a new render.\n // This tracks which mutable sources need to be reset after a render.\n\n var workInProgressSources = [];\n function resetWorkInProgressVersions() {\n for (var i = 0; i < workInProgressSources.length; i++) {\n var mutableSource = workInProgressSources[i];\n {\n mutableSource._workInProgressVersionPrimary = null;\n }\n }\n workInProgressSources.length = 0;\n }\n // This ensures that the version used for server rendering matches the one\n // that is eventually read during hydration.\n // If they don't match there's a potential tear and a full deopt render is required.\n\n function registerMutableSourceForHydration(root, mutableSource) {\n var getVersion = mutableSource._getVersion;\n var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n // Retaining it forever may interfere with GC.\n\n if (root.mutableSourceEagerHydrationData == null) {\n root.mutableSourceEagerHydrationData = [mutableSource, version];\n } else {\n root.mutableSourceEagerHydrationData.push(mutableSource, version);\n }\n }\n var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;\n var didWarnAboutMismatchedHooksForComponent;\n var didWarnUncachedGetSnapshot;\n {\n didWarnAboutMismatchedHooksForComponent = new Set();\n }\n\n // These are set right before calling the component.\n var renderLanes = NoLanes; // 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; // Where an update was scheduled only during the current render pass. This\n // gets reset after each attempt.\n // TODO: Maybe there's some way to consolidate this with\n // `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\n var didScheduleRenderPhaseUpdateDuringThisPass = false; // Counts the number of useId hooks in this component.\n\n var localIdCounter = 0; // Used for ids that are generated completely client-side (i.e. not during\n // hydration). This counter is global, so client ids are not stable across\n // render attempts.\n\n var globalClientIdCounter = 0;\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 function mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n }\n function updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n }\n function checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !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 function warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\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 row += newHookName + '\\n';\n table += row;\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://reactjs.org/link/rules-of-hooks\\n\\n' + ' Previous render Next render\\n' + ' ------------------------------------------------------\\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n }\n }\n }\n }\n function throwInvalidHookError() {\n throw new 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:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\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 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 // 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 for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n return false;\n }\n return true;\n }\n function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n renderLanes = nextRenderLanes;\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.lanes = NoLanes; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // localIdCounter = 0;\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$1.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$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n }\n var children = Component(props, secondArg); // Check if there was a render phase update\n\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\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 do {\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n localIdCounter = 0;\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\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$1.current = HooksDispatcherOnRerenderInDEV;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\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-entrance.\n\n ReactCurrentDispatcher$1.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 renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last\n // render. If this fires, it suggests that we incorrectly reset the static\n // flags in some other part of the codebase. This has happened before, for\n // example, in the SuspenseList implementation.\n\n if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) &&\n // Disable this warning in legacy mode, because legacy Suspense is weird\n // and creates false positives. To make this work in legacy mode, we'd\n // need to mark fibers that commit in an incomplete state, somehow. For\n // now I'll disable the warning that most of the bugs that would trigger\n // it are either exclusive to concurrent mode or exist in both.\n (current.mode & ConcurrentMode) !== NoMode) {\n error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');\n }\n }\n didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook\n // localIdCounter = 0;\n\n if (didRenderTooFewHooks) {\n throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');\n }\n return children;\n }\n function checkDidRenderIdHook() {\n // This should be called immediately after every renderWithHooks call.\n // Conceptually, it's part of the return value of renderWithHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n localIdCounter = 0;\n return didRenderIdHook;\n }\n function bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the\n // complete phase (bubbleProperties).\n\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update);\n } else {\n workInProgress.flags &= ~(Passive | Update);\n }\n current.lanes = removeLanes(current.lanes, lanes);\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-entrance.\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\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 while (hook !== null) {\n var queue = hook.queue;\n if (queue !== null) {\n queue.pending = null;\n }\n hook = hook.next;\n }\n didScheduleRenderPhaseUpdate = false;\n }\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n isUpdatingOpaqueValueInRenderPhase = false;\n }\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n localIdCounter = 0;\n }\n function mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\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 return workInProgressHook;\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 if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n var nextWorkInProgressHook;\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\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 throw new Error('Rendered more hooks than during the previous render.');\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 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 return workInProgressHook;\n }\n function createFunctionComponentUpdateQueue() {\n return {\n lastEffect: null,\n stores: null\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 function mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n if (init !== undefined) {\n initialState = init(initialArg);\n } else {\n initialState = initialArg;\n }\n hook.memoizedState = hook.baseState = initialState;\n var queue = {\n pending: null,\n interleaved: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n }\n function updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n if (queue === null) {\n throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\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 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 if (current.baseQueue !== baseQueue) {\n // Internal invariant that should never happen, but feasibly could in\n // the future if we implement resuming, or some form of that.\n error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n }\n }\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\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 do {\n var updateLane = update.lane;\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\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 lane: updateLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\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 // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n markSkippedUpdateLanes(updateLane);\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Process this update.\n\n if (update.hasEagerState) {\n // If this update is a state update (not a reducer) and was processed eagerly,\n // 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 update = update.next;\n } while (update !== null && update !== first);\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 if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n } // Interleaved updates are stored on a separate queue. We aren't going to\n // process them during this render, but we do need to track which lanes\n // are remaining.\n\n var lastInterleaved = queue.interleaved;\n if (lastInterleaved !== null) {\n var interleaved = lastInterleaved;\n do {\n var interleavedLane = interleaved.lane;\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane);\n markSkippedUpdateLanes(interleavedLane);\n interleaved = interleaved.next;\n } while (interleaved !== lastInterleaved);\n } else if (baseQueue === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.lanes = NoLanes;\n }\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n }\n function rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n if (queue === null) {\n throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\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 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 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 if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\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 queue.lastRenderedState = newState;\n }\n return [newState, dispatch];\n }\n function mountMutableSource(source, getSnapshot, subscribe) {\n {\n return undefined;\n }\n }\n function updateMutableSource(source, getSnapshot, subscribe) {\n {\n return undefined;\n }\n }\n function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = mountWorkInProgressHook();\n var nextSnapshot;\n var isHydrating = getIsHydrating();\n if (isHydrating) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n nextSnapshot = getServerSnapshot();\n {\n if (!didWarnUncachedGetSnapshot) {\n if (nextSnapshot !== getServerSnapshot()) {\n error('The result of getServerSnapshot should be cached to avoid an infinite loop');\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n } else {\n nextSnapshot = getSnapshot();\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n //\n // We won't do this if we're hydrating server-rendered content, because if\n // the content is stale, it's already visible anyway. Instead we'll patch\n // it up in a passive effect.\n\n var root = getWorkInProgressRoot();\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n if (!includesBlockingLane(root, renderLanes)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n } // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n hook.memoizedState = nextSnapshot;\n var inst = {\n value: nextSnapshot,\n getSnapshot: getSnapshot\n };\n hook.queue = inst; // Schedule an effect to subscribe to the store.\n\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update\n // this whenever subscribe, getSnapshot, or value changes. Because there's no\n // clean-up function, and we track the deps correctly, we can call pushEffect\n // directly, without storing any additional state. For the same reason, we\n // don't need to set a static flag, either.\n // TODO: We can move this to the passive phase once we add a pre-commit\n // consistency check. See the next comment.\n\n fiber.flags |= Passive;\n pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null);\n return nextSnapshot;\n }\n function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n var nextSnapshot = getSnapshot();\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n var prevSnapshot = hook.memoizedState;\n var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);\n if (snapshotChanged) {\n hook.memoizedState = nextSnapshot;\n markWorkInProgressReceivedUpdate();\n }\n var inst = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (inst.getSnapshot !== getSnapshot || snapshotChanged ||\n // Check if the susbcribe function changed. We can save some memory by\n // checking whether we scheduled a subscription effect above.\n workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {\n fiber.flags |= Passive;\n pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n\n var root = getWorkInProgressRoot();\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n if (!includesBlockingLane(root, renderLanes)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n }\n return nextSnapshot;\n }\n function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= StoreConsistency;\n var check = {\n getSnapshot: getSnapshot,\n value: renderedSnapshot\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.stores = [check];\n } else {\n var stores = componentUpdateQueue.stores;\n if (stores === null) {\n componentUpdateQueue.stores = [check];\n } else {\n stores.push(check);\n }\n }\n }\n function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n // These are updated in the passive phase\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could\n // have been in an event that fired before the passive effects, or it could\n // have been in a layout effect. In that case, we would have used the old\n // snapsho and getSnapshot values to bail out. We need to check one more time.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n }\n function subscribeToStore(fiber, inst, subscribe) {\n var handleStoreChange = function () {\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n }; // Subscribe to the store and return a clean-up function.\n\n return subscribe(handleStoreChange);\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n }\n function forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n function mountState(initialState) {\n var hook = mountWorkInProgressHook();\n if (typeof initialState === 'function') {\n // $FlowFixMe: Flow doesn't like mixed types\n initialState = initialState();\n }\n hook.memoizedState = hook.baseState = initialState;\n var queue = {\n pending: null,\n interleaved: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n var dispatch = queue.dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n }\n function updateState(initialState) {\n return updateReducer(basicStateReducer);\n }\n function rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\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 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 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 return effect;\n }\n function mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n {\n var _ref2 = {\n current: initialValue\n };\n hook.memoizedState = _ref2;\n return _ref2;\n }\n }\n function updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n }\n function mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);\n }\n function updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var destroy = undefined;\n if (currentHook !== null) {\n var prevEffect = currentHook.memoizedState;\n destroy = prevEffect.destroy;\n if (nextDeps !== null) {\n var prevDeps = prevEffect.deps;\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps);\n return;\n }\n }\n }\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);\n }\n function mountEffect(create, deps) {\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps);\n } else {\n return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps);\n }\n }\n function updateEffect(create, deps) {\n return updateEffectImpl(Passive, Passive$1, create, deps);\n }\n function mountInsertionEffect(create, deps) {\n return mountEffectImpl(Update, Insertion, create, deps);\n }\n function updateInsertionEffect(create, deps) {\n return updateEffectImpl(Update, Insertion, create, deps);\n }\n function mountLayoutEffect(create, deps) {\n var fiberFlags = Update;\n {\n fiberFlags |= LayoutStatic;\n }\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n return mountEffectImpl(fiberFlags, Layout, create, deps);\n }\n function updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n }\n function imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n var _inst = create();\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 var _inst2 = create();\n refObject.current = _inst2;\n return function () {\n refObject.current = null;\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 var fiberFlags = Update;\n {\n fiberFlags |= LayoutStatic;\n }\n if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\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 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 var updateDebugValue = mountDebugValue;\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 function updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n hook.memoizedState = [callback, nextDeps];\n return callback;\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 function updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\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 if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n }\n function mountDeferredValue(value) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = value;\n return value;\n }\n function updateDeferredValue(value) {\n var hook = updateWorkInProgressHook();\n var resolvedCurrentHook = currentHook;\n var prevValue = resolvedCurrentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n }\n function rerenderDeferredValue(value) {\n var hook = updateWorkInProgressHook();\n if (currentHook === null) {\n // This is a rerender during a mount.\n hook.memoizedState = value;\n return value;\n } else {\n // This is a rerender during an update.\n var prevValue = currentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n }\n }\n function updateDeferredValueImpl(hook, prevValue, value) {\n var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);\n if (shouldDeferValue) {\n // This is an urgent update. If the value has changed, keep using the\n // previous value and spawn a deferred render to update it later.\n if (!objectIs(value, prevValue)) {\n // Schedule a deferred render\n var deferredLane = claimNextTransitionLane();\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);\n markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent\n // from the latest value. The name \"baseState\" doesn't really match how we\n // use it because we're reusing a state hook field instead of creating a\n // new one.\n\n hook.baseState = true;\n } // Reuse the previous value\n\n return prevValue;\n } else {\n // This is not an urgent update, so we can use the latest value regardless\n // of what it is. No need to defer it.\n // However, if we're currently inside a spawned render, then we need to mark\n // this as an update to prevent the fiber from bailing out.\n //\n // `baseState` is true when the current value is different from the rendered\n // value. The name doesn't really match how we use it because we're reusing\n // a state hook field instead of creating a new one.\n if (hook.baseState) {\n // Flip this back to false.\n hook.baseState = false;\n markWorkInProgressReceivedUpdate();\n }\n hook.memoizedState = value;\n return value;\n }\n }\n function startTransition(setPending, callback, options) {\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));\n setPending(true);\n var prevTransition = ReactCurrentBatchConfig$2.transition;\n ReactCurrentBatchConfig$2.transition = {};\n var currentTransition = ReactCurrentBatchConfig$2.transition;\n {\n ReactCurrentBatchConfig$2.transition._updatedFibers = new Set();\n }\n try {\n setPending(false);\n callback();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$2.transition = prevTransition;\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n currentTransition._updatedFibers.clear();\n }\n }\n }\n }\n function mountTransition() {\n var _mountState = mountState(false),\n isPending = _mountState[0],\n setPending = _mountState[1]; // The `start` method never changes.\n\n var start = startTransition.bind(null, setPending);\n var hook = mountWorkInProgressHook();\n hook.memoizedState = start;\n return [isPending, start];\n }\n function updateTransition() {\n var _updateState = updateState(),\n isPending = _updateState[0];\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n return [isPending, start];\n }\n function rerenderTransition() {\n var _rerenderState = rerenderState(),\n isPending = _rerenderState[0];\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n return [isPending, start];\n }\n var isUpdatingOpaqueValueInRenderPhase = false;\n function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {\n {\n return isUpdatingOpaqueValueInRenderPhase;\n }\n }\n function mountId() {\n var hook = mountWorkInProgressHook();\n var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we\n // should do this in Fiber, too? Deferring this decision for now because\n // there's no other place to store the prefix except for an internal field on\n // the public createRoot object, which the fiber tree does not currently have\n // a reference to.\n\n var identifierPrefix = root.identifierPrefix;\n var id;\n if (getIsHydrating()) {\n var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.\n\n id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n var localId = localIdCounter++;\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n id += ':';\n } else {\n // Use a lowercase r prefix for client-generated ids.\n var globalClientId = globalClientIdCounter++;\n id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';\n }\n hook.memoizedState = id;\n return id;\n }\n function updateId() {\n var hook = updateWorkInProgressHook();\n var id = hook.memoizedState;\n return id;\n }\n function dispatchReducerAction(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 lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n markUpdateInDevTools(fiber, lane);\n }\n function dispatchSetState(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 lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var alternate = fiber.alternate;\n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\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 if (lastRenderedReducer !== null) {\n var prevDispatcher;\n {\n prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\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.hasEagerState = true;\n update.eagerState = eagerState;\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 // TODO: Do we still need to entangle transitions in this case?\n enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane);\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n }\n }\n }\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n markUpdateInDevTools(fiber, lane);\n }\n function isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;\n }\n function enqueueRenderPhaseUpdate(queue, update) {\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 didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n var pending = queue.pending;\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 queue.pending = update;\n } // TODO: Move to ReactFiberConcurrentUpdates?\n\n function entangleTransitionUpdate(root, queue, lane) {\n if (isTransitionLane(lane)) {\n var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they\n // must have finished. We can remove them from the shared queue, which\n // represents a superset of the actually pending lanes. In some cases we\n // may entangle more than we need to, but that's OK. In fact it's worse if\n // we *don't* entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n }\n function markUpdateInDevTools(fiber, lane, action) {\n {\n markStateUpdateScheduled(fiber, lane);\n }\n }\n var ContextOnlyDispatcher = {\n readContext: readContext,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useMutableSource: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError,\n unstable_isNewReconciler: enableNewReconciler\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 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://reactjs.org/link/rules-of-hooks');\n };\n HooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n mountHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n mountHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return mountInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n }\n var now$1 = Scheduler.unstable_now;\n var commitTime = 0;\n var layoutEffectStartTime = -1;\n var profilerStartTime = -1;\n var passiveEffectStartTime = -1;\n /**\n * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).\n *\n * The overall sequence is:\n * 1. render\n * 2. commit (and call `onRender`, `onCommit`)\n * 3. check for nested updates\n * 4. flush passive effects (and call `onPostCommit`)\n *\n * Nested updates are identified in step 3 above,\n * but step 4 still applies to the work that was just committed.\n * We use two flags to track nested updates then:\n * one tracks whether the upcoming update is a nested update,\n * and the other tracks whether the current update was a nested update.\n * The first value gets synced to the second at the start of the render phase.\n */\n\n var currentUpdateIsNested = false;\n var nestedUpdateScheduled = false;\n function isCurrentUpdateNested() {\n return currentUpdateIsNested;\n }\n function markNestedUpdateScheduled() {\n {\n nestedUpdateScheduled = true;\n }\n }\n function resetNestedUpdateFlag() {\n {\n currentUpdateIsNested = false;\n nestedUpdateScheduled = false;\n }\n }\n function syncNestedUpdateFlag() {\n {\n currentUpdateIsNested = nestedUpdateScheduled;\n nestedUpdateScheduled = false;\n }\n }\n function getCommitTime() {\n return commitTime;\n }\n function recordCommitTime() {\n commitTime = now$1();\n }\n function startProfilerTimer(fiber) {\n profilerStartTime = now$1();\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now$1();\n }\n }\n function stopProfilerTimerIfRunning(fiber) {\n profilerStartTime = -1;\n }\n function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n if (profilerStartTime >= 0) {\n var elapsedTime = now$1() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n profilerStartTime = -1;\n }\n }\n function recordLayoutEffectDuration(fiber) {\n if (layoutEffectStartTime >= 0) {\n var elapsedTime = now$1() - layoutEffectStartTime;\n layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += elapsedTime;\n return;\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += elapsedTime;\n return;\n }\n parentFiber = parentFiber.return;\n }\n }\n }\n function recordPassiveEffectDuration(fiber) {\n if (passiveEffectStartTime >= 0) {\n var elapsedTime = now$1() - passiveEffectStartTime;\n passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n if (root !== null) {\n root.passiveEffectDuration += elapsedTime;\n }\n return;\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n if (parentStateNode !== null) {\n // Detached fibers have their state node cleared out.\n // In this case, the return pointer is also cleared out,\n // so we won't be able to report the time spent in this Profiler's subtree.\n parentStateNode.passiveEffectDuration += elapsedTime;\n }\n return;\n }\n parentFiber = parentFiber.return;\n }\n }\n }\n function startLayoutEffectTimer() {\n layoutEffectStartTime = now$1();\n }\n function startPassiveEffectTimer() {\n passiveEffectStartTime = now$1();\n }\n function transferActualDuration(fiber) {\n // Transfer time spent rendering these children so we don't lose it\n // after we rerender. This is used as a helper in special cases\n // where we should count the work of multiple passes.\n var child = fiber.child;\n while (child) {\n fiber.actualDuration += child.actualDuration;\n child = child.sibling;\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 var defaultProps = Component.defaultProps;\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n return props;\n }\n return baseProps;\n }\n var fakeInternalInstance = {};\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 var didWarnAboutLegacyContext$1;\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 didWarnAboutLegacyContext$1 = new Set();\n var didWarnOnInvalidCallback = new Set();\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n var key = callerName + '_' + callback;\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 warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentNameFromType(type) || 'Component';\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 Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n throw new 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 Object.freeze(fakeInternalInstance);\n }\n function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n // Invoke the function an extra time to help detect side-effects.\n partialState = getDerivedStateFromProps(nextProps, prevState);\n } finally {\n setIsStrictModeForDevtools(false);\n }\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.lanes === NoLanes) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n }\n var classComponentUpdater = {\n isMounted: isMounted,\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.payload = payload;\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'setState');\n }\n update.callback = callback;\n }\n var root = enqueueUpdate(fiber, update, lane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ReplaceState;\n update.payload = payload;\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'replaceState');\n }\n update.callback = callback;\n }\n var root = enqueueUpdate(fiber, update, lane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ForceUpdate;\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'forceUpdate');\n }\n update.callback = callback;\n }\n var root = enqueueUpdate(fiber, update, lane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n {\n markForceUpdateScheduled(fiber, lane);\n }\n }\n };\n function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n if (typeof instance.shouldComponentUpdate === 'function') {\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n // Invoke the function an extra time to help detect side-effects.\n shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component');\n }\n }\n return shouldUpdate;\n }\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n return true;\n }\n function checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n {\n var name = getComponentNameFromType(ctor) || 'Component';\n var renderPresent = instance.render;\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 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 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 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 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 if (ctor.childContextTypes && !didWarnAboutLegacyContext$1.has(ctor) &&\n // Strict Mode has its own warning for legacy context, so we can skip\n // this one.\n (workInProgress.mode & StrictLegacyMode) === NoMode) {\n didWarnAboutLegacyContext$1.add(ctor);\n error('%s uses the legacy childContextTypes API which is no longer ' + 'supported and will be removed in the next major release. Use ' + 'React.createContext() instead\\n\\n.' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);\n }\n if (ctor.contextTypes && !didWarnAboutLegacyContext$1.has(ctor) &&\n // Strict Mode has its own warning for legacy context, so we can skip\n // this one.\n (workInProgress.mode & StrictLegacyMode) === NoMode) {\n didWarnAboutLegacyContext$1.add(ctor);\n error('%s uses the legacy contextTypes API which is no longer supported ' + 'and will be removed in the next major release. Use ' + 'React.createContext() with static contextType instead.\\n\\n' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);\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 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 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 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.', getComponentNameFromType(ctor) || 'A pure component');\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 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 if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\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 var hasMutatedProps = instance.props !== newProps;\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 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 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.', getComponentNameFromType(ctor));\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 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 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 var _state = instance.state;\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\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 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 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 =\n // 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 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 error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\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 }\n var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.\n\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n instance = new ctor(props, context); // eslint-disable-line no-new\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n }\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 = getComponentNameFromType(ctor) || 'Component';\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 if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\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 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 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 if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentNameFromType(ctor) || 'Component';\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\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://reactjs.org/link/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 return instance;\n }\n function callComponentWillMount(workInProgress, instance) {\n var oldState = instance.state;\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\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.', getComponentNameFromFiber(workInProgress) || 'Component');\n }\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n }\n function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n if (instance.state !== oldState) {\n {\n var componentName = getComponentNameFromFiber(workInProgress) || 'Component';\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 function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = {};\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\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 if (instance.state === newProps) {\n var componentName = getComponentNameFromType(ctor) || 'Component';\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 if (workInProgress.mode & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n {\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n }\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\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 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, renderLanes);\n instance.state = workInProgress.memoizedState;\n }\n if (typeof instance.componentDidMount === 'function') {\n var fiberFlags = Update;\n {\n fiberFlags |= LayoutStatic;\n }\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n workInProgress.flags |= fiberFlags;\n }\n }\n function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\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 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 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 resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\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 var fiberFlags = Update;\n {\n fiberFlags |= LayoutStatic;\n }\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n workInProgress.flags |= fiberFlags;\n }\n return false;\n }\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\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 if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n }\n if (typeof instance.componentDidMount === 'function') {\n var _fiberFlags = Update;\n {\n _fiberFlags |= LayoutStatic;\n }\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n _fiberFlags |= MountLayoutDev;\n }\n workInProgress.flags |= _fiberFlags;\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 var _fiberFlags2 = Update;\n {\n _fiberFlags2 |= LayoutStatic;\n }\n if ((workInProgress.mode & StrictEffectsMode) !== NoMode) {\n _fiberFlags2 |= MountLayoutDev;\n }\n workInProgress.flags |= _fiberFlags2;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\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 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 function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var unresolvedOldProps = workInProgress.memoizedProps;\n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n instance.props = oldProps;\n var unresolvedNewProps = workInProgress.pendingProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\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 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 (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !enableLazyContextPropagation) {\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 (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n }\n return false;\n }\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) ||\n // TODO: In some cases, we'll end up checking if context has changed twice,\n // both before and after `shouldComponentUpdate` has been called. Not ideal,\n // but I'm loath to refactor this function. This only happens for memoized\n // components so it's not that common.\n enableLazyContextPropagation;\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 if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n }\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.flags |= Update;\n }\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.flags |= 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 (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= 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 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 instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n }\n function createCapturedValueAtFiber(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 digest: null\n };\n }\n function createCapturedValue(value, digest, stack) {\n return {\n value: value,\n source: null,\n stack: stack != null ? stack : null,\n digest: digest != null ? digest : null\n };\n }\n\n // This module is forked in different environments.\n // By default, return `true` to log errors to the console.\n // Forks can return `false` if this isn't desirable.\n function showErrorDialog(boundary, errorInfo) {\n return true;\n }\n function logCapturedError(boundary, errorInfo) {\n try {\n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n\n if (logError === false) {\n return;\n }\n var error = errorInfo.value;\n if (true) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n var componentStack = stack !== null ? stack : ''; // 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 (boundary.tag === ClassComponent) {\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 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 var componentName = source ? getComponentNameFromFiber(source) : null;\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;\n if (boundary.tag === HostRoot) {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';\n } else {\n var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n }\n var combinedMessage = componentNameMessage + \"\\n\" + 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 } else {\n // In production, we print the error directly.\n // This will include the message, the JS stack, and anything the browser wants to show.\n // We pass the error object instead of custom message so that the browser displays the error natively.\n console['error'](error); // Don't transform to our wrapper\n }\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 var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n function createRootErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane); // 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 update.callback = function () {\n onUncaughtError(error);\n logCapturedError(fiber, errorInfo);\n };\n return update;\n }\n function createClassErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n update.payload = function () {\n return getDerivedStateFromError(error$1);\n };\n update.callback = function () {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n logCapturedError(fiber, errorInfo);\n };\n }\n var inst = fiber.stateNode;\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n logCapturedError(fiber, errorInfo);\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);\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 (!includesSomeLane(fiber.lanes, SyncLane)) {\n error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');\n }\n }\n }\n };\n }\n return update;\n }\n function attachPingListener(root, wakeable, lanes) {\n // Attach a ping listener\n //\n // The data might resolve before we have a chance to commit the fallback. Or,\n // in the case of a refresh, we'll never commit a fallback. So we need to\n // attach a listener now. When it resolves (\"pings\"), we can decide whether to\n // try rendering the tree again.\n //\n // Only attach a listener if one does not already exist for the lanes\n // we're currently rendering (which acts like a \"thread ID\" here).\n //\n // We only need to do this in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\n var pingCache = root.pingCache;\n var threadIDs;\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap$1();\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else {\n threadIDs = pingCache.get(wakeable);\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n }\n }\n if (!threadIDs.has(lanes)) {\n // Memoize using the thread ID to prevent redundant listeners.\n threadIDs.add(lanes);\n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, lanes);\n }\n }\n wakeable.then(ping, ping);\n }\n }\n function attachRetryListener(suspenseBoundary, root, wakeable, lanes) {\n // Retry listener\n //\n // If the fallback does commit, we need to attach a different type of\n // listener. This one schedules an update on the Suspense boundary to turn\n // the fallback state off.\n //\n // Stash the wakeable on the boundary fiber so we can access it in the\n // commit phase.\n //\n // When the wakeable resolves, we'll attempt to render the boundary\n // again (\"retry\").\n var wakeables = suspenseBoundary.updateQueue;\n if (wakeables === null) {\n var updateQueue = new Set();\n updateQueue.add(wakeable);\n suspenseBoundary.updateQueue = updateQueue;\n } else {\n wakeables.add(wakeable);\n }\n }\n function resetSuspendedComponent(sourceFiber, rootRenderLanes) {\n // A legacy mode Suspense quirk, only relevant to hook components.\n\n var tag = sourceFiber.tag;\n if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {\n var currentSource = sourceFiber.alternate;\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.lanes = currentSource.lanes;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n }\n function getNearestSuspenseBoundaryToCapture(returnFiber) {\n var node = returnFiber;\n do {\n if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) {\n return node;\n } // This boundary already captured during this render. Continue to the next\n // boundary.\n\n node = node.return;\n } while (node !== null);\n return null;\n }\n function markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {\n // This marks a Suspense boundary so that when we're unwinding the stack,\n // it captures the suspended \"exception\" and does a second (fallback) pass.\n if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {\n // Legacy Mode Suspense\n //\n // If the boundary is in legacy mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. When the Suspense boundary completes,\n // we'll do a second pass to render the fallback.\n if (suspenseBoundary === returnFiber) {\n // Special case where we suspended while reconciling the children of\n // a Suspense boundary's inner Offscreen wrapper fiber. This happens\n // when a React.lazy component is a direct child of a\n // Suspense boundary.\n //\n // Suspense boundaries are implemented as multiple fibers, but they\n // are a single conceptual unit. The legacy mode behavior where we\n // pretend the suspended fiber committed as `null` won't work,\n // because in this case the \"suspended\" fiber is the inner\n // Offscreen wrapper.\n //\n // Because the contents of the boundary haven't started rendering\n // yet (i.e. nothing in the tree has partially rendered) we can\n // switch to the regular, concurrent mode behavior: mark the\n // boundary with ShouldCapture and enter the unwind phase.\n suspenseBoundary.flags |= ShouldCapture;\n } else {\n suspenseBoundary.flags |= DidCapture;\n sourceFiber.flags |= ForceUpdateForLegacySuspense; // 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.flags &= ~(LifecycleEffectMask | Incomplete);\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\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(NoTimestamp, SyncLane);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update, SyncLane);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);\n }\n return suspenseBoundary;\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. Transitions apply\n // to 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 suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in\n // the begin phase to prevent an early bailout.\n\n suspenseBoundary.lanes = rootRenderLanes;\n return suspenseBoundary;\n }\n function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n // The source fiber did not complete.\n sourceFiber.flags |= Incomplete;\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, rootRenderLanes);\n }\n }\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a wakeable. The component suspended.\n var wakeable = value;\n resetSuspendedComponent(sourceFiber);\n {\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n }\n }\n var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);\n if (suspenseBoundary !== null) {\n suspenseBoundary.flags &= ~ForceClientRender;\n markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // We only attach ping listeners in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\n\n if (suspenseBoundary.mode & ConcurrentMode) {\n attachPingListener(root, wakeable, rootRenderLanes);\n }\n attachRetryListener(suspenseBoundary, root, wakeable);\n return;\n } else {\n // No boundary was found. Unless this is a sync update, this is OK.\n // We can suspend and wait for more data to arrive.\n if (!includesSyncLane(rootRenderLanes)) {\n // This is not a sync update. Suspend. Since we're not activating a\n // Suspense boundary, this will unwind all the way to the root without\n // performing a second pass to render a fallback. (This is arguably how\n // refresh transitions should work, too, since we're not going to commit\n // the fallbacks anyway.)\n //\n // This case also applies to initial hydration.\n attachPingListener(root, wakeable, rootRenderLanes);\n renderDidSuspendDelayIfPossible();\n return;\n } // This is a sync/discrete update. We treat this case like an error\n // because discrete renders are expected to produce a complete tree\n // synchronously to maintain consistency with external state.\n\n var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.'); // If we're outside a transition, fall through to the regular error path.\n // The error will be caught by the nearest suspense boundary.\n\n value = uncaughtSuspenseError;\n }\n } else {\n // This is a regular error, not a Suspense wakeable.\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); // If the error was thrown during hydration, we may be able to recover by\n // discarding the dehydrated content and switching to a client render.\n // Instead of surfacing the error, find the nearest Suspense boundary\n // and render it again without hydration.\n\n if (_suspenseBoundary !== null) {\n if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) {\n // Set a flag to indicate that we should try rendering the normal\n // children again, not the fallback.\n _suspenseBoundary.flags |= ForceClientRender;\n }\n markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should\n // still log it so it can be fixed.\n\n queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));\n return;\n }\n }\n }\n value = createCapturedValueAtFiber(value, sourceFiber);\n renderDidError(value); // 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 var workInProgress = returnFiber;\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.flags |= ShouldCapture;\n var lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n enqueueCapturedUpdate(workInProgress, update);\n return;\n }\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.flags |= ShouldCapture;\n var _lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n break;\n }\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n }\n function getSuspendedCache() {\n {\n return null;\n } // This function is called when a Suspense boundary suspends. It returns the\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 var didWarnAboutDefaultPropsOnFunctionComponent;\n {\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n didWarnAboutDefaultPropsOnFunctionComponent = {};\n }\n function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\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, renderLanes);\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, renderLanes);\n }\n }\n function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\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, renderLanes); // 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, renderLanes);\n }\n function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\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 if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps,\n // Resolved props\n 'prop', getComponentNameFromType(Component));\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 var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n {\n markComponentRenderStarted(workInProgress);\n }\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n hasId = checkDidRenderIdHook();\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n setIsRendering(false);\n }\n {\n markComponentRenderStopped();\n }\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n function updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n if (current === null) {\n var type = Component.type;\n if (isSimpleFunctionComponent(type) && Component.compare === null &&\n // 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, renderLanes);\n }\n {\n var innerPropTypes = type.propTypes;\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,\n // Resolved props\n 'prop', getComponentNameFromType(type));\n }\n if (Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from memo components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n }\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n {\n var _type = Component.type;\n var _innerPropTypes = _type.propTypes;\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,\n // Resolved props\n 'prop', getComponentNameFromType(_type));\n }\n }\n var currentChild = current.child; // This is always exactly one child\n\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n if (!hasScheduledUpdateOrContext) {\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 if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } // React DevTools reads this flag.\n\n workInProgress.flags |= 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 function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\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 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 var lazyComponent = outerMemoType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n try {\n outerMemoType = init(payload);\n } catch (x) {\n outerMemoType = null;\n } // Inner propTypes will be validated in the function component path.\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps,\n // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentNameFromType(outerMemoType));\n }\n }\n }\n }\n if (current !== null) {\n var prevProps = current.memoizedProps;\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref &&\n // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type) {\n didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we\n // would during a normal fiber bailout.\n //\n // We don't have strong guarantees that the props object is referentially\n // equal during updates where we can't bail out anyway — like if the props\n // are shallowly equal, but there's a local state or context update in the\n // same batch.\n //\n // However, as a principle, we should aim to make the behavior consistent\n // across different ways of memoizing a component. For example, React.memo\n // has a different internal Fiber layout if you pass a normal function\n // component (SimpleMemoComponent) versus if you pass a different type\n // like forwardRef (MemoComponent). But this is an implementation detail.\n // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't\n // affect whether the props object is reused during a bailout.\n\n workInProgress.pendingProps = nextProps = prevProps;\n if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n // The pending lanes were cleared at the beginning of beginWork. We're\n // about to bail out, but there might be other lanes that weren't\n // included in the current render. Usually, the priority level of the\n // remaining updates is accumulated 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.lanes = current.lanes;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n }\n }\n }\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n }\n function updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n var prevState = current !== null ? current.memoizedState : null;\n if (nextProps.mode === 'hidden' || enableLegacyHidden) {\n // Rendering a hidden tree.\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy sync mode, don't defer the subtree. Render it now.\n // TODO: Consider how Offscreen should work with transitions in the future\n var nextState = {\n baseLanes: NoLanes,\n cachePool: null,\n transitions: null\n };\n workInProgress.memoizedState = nextState;\n pushRenderLanes(workInProgress, renderLanes);\n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n var spawnedCachePool = null; // We're hidden, and we're not rendering at Offscreen. We will bail out\n // and resume this tree later.\n\n var nextBaseLanes;\n if (prevState !== null) {\n var prevBaseLanes = prevState.baseLanes;\n nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);\n } else {\n nextBaseLanes = renderLanes;\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);\n var _nextState = {\n baseLanes: nextBaseLanes,\n cachePool: spawnedCachePool,\n transitions: null\n };\n workInProgress.memoizedState = _nextState;\n workInProgress.updateQueue = null;\n // to avoid a push/pop misalignment.\n\n pushRenderLanes(workInProgress, nextBaseLanes);\n return null;\n } else {\n // This is the second render. The surrounding visible content has already\n // committed. Now we resume rendering the hidden tree.\n // Rendering at offscreen, so we can clear the base lanes.\n var _nextState2 = {\n baseLanes: NoLanes,\n cachePool: null,\n transitions: null\n };\n workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.\n\n var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;\n pushRenderLanes(workInProgress, subtreeRenderLanes);\n }\n } else {\n // Rendering a visible tree.\n var _subtreeRenderLanes;\n if (prevState !== null) {\n // We're going from hidden -> visible.\n _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes);\n workInProgress.memoizedState = null;\n } else {\n // We weren't previously hidden, and we still aren't, so there's nothing\n // special to do. Need to push to the stack regardless, though, to avoid\n // a push/pop misalignment.\n _subtreeRenderLanes = renderLanes;\n }\n pushRenderLanes(workInProgress, _subtreeRenderLanes);\n }\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n } // Note: These happen to have identical begin phases, for now. We shouldn't hold\n\n function updateFragment(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n function updateMode(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n function updateProfiler(current, workInProgress, renderLanes) {\n {\n workInProgress.flags |= Update;\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n function markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n if (current === null && ref !== null || current !== null && current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.flags |= Ref;\n {\n workInProgress.flags |= RefStatic;\n }\n }\n }\n function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\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 if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps,\n // Resolved props\n 'prop', getComponentNameFromType(Component));\n }\n }\n }\n var context;\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n var nextChildren;\n var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n {\n markComponentRenderStarted(workInProgress);\n }\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n hasId = checkDidRenderIdHook();\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n setIsRendering(false);\n }\n {\n markComponentRenderStopped();\n }\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n // This is used by DevTools to force a boundary to error.\n switch (shouldError(workInProgress)) {\n case false:\n {\n var _instance = workInProgress.stateNode;\n var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.\n // Is there a better way to do this?\n\n var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);\n var state = tempInstance.state;\n _instance.updater.enqueueSetState(_instance, state, null);\n break;\n }\n case true:\n {\n workInProgress.flags |= DidCapture;\n workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes\n\n var error$1 = new Error('Simulated error coming from DevTools');\n var lane = pickArbitraryLane(renderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state\n\n var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane);\n enqueueCapturedUpdate(workInProgress, update);\n break;\n }\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 if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps,\n // Resolved props\n 'prop', getComponentNameFromType(Component));\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 if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n prepareToReadContext(workInProgress, renderLanes);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n if (instance === null) {\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance.\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\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, renderLanes);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n }\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n {\n var inst = workInProgress.stateNode;\n if (shouldUpdate && 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.', getComponentNameFromFiber(workInProgress) || 'a component');\n }\n didWarnAboutReassigningProps = true;\n }\n }\n return nextUnitOfWork;\n }\n function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$1.current = workInProgress;\n var nextChildren;\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 markComponentRenderStarted(workInProgress);\n }\n {\n setIsRendering(true);\n nextChildren = instance.render();\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n instance.render();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n setIsRendering(false);\n }\n {\n markComponentRenderStopped();\n }\n } // React DevTools reads this flag.\n\n workInProgress.flags |= PerformedWork;\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, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\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 return workInProgress.child;\n }\n function pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\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 pushHostContainer(workInProgress, root.containerInfo);\n }\n function updateHostRoot(current, workInProgress, renderLanes) {\n pushHostRootContext(workInProgress);\n if (current === null) {\n throw new Error('Should have a current fiber. This is a bug in React.');\n }\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n var nextState = workInProgress.memoizedState;\n var root = workInProgress.stateNode;\n // being called \"element\".\n\n var nextChildren = nextState.element;\n if (prevState.isDehydrated) {\n // This is a hydration root whose shell has not yet hydrated. We should\n // attempt to hydrate.\n // Flip isDehydrated to false to indicate that when this render\n // finishes, the root will no longer be dehydrated.\n var overrideState = {\n element: nextChildren,\n isDehydrated: false,\n cache: nextState.cache,\n pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,\n transitions: nextState.transitions\n };\n var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't\n // have reducer functions so it doesn't need rebasing.\n\n updateQueue.baseState = overrideState;\n workInProgress.memoizedState = overrideState;\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during a previous attempt to hydrate the shell, so we\n // forced a client render.\n var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress);\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);\n } else if (nextChildren !== prevChildren) {\n var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress);\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);\n } else {\n // The outermost shell has not hydrated yet. Start hydrating.\n enterHydrationState(workInProgress);\n var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n workInProgress.child = child;\n var node = child;\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.flags = node.flags & ~Placement | Hydrating;\n node = node.sibling;\n }\n }\n } else {\n // Root is not dehydrated. Either this is a client-only root, or it\n // already hydrated.\n resetHydrationState();\n if (nextChildren === prevChildren) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n return workInProgress.child;\n }\n function mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {\n // Revert to client rendering.\n resetHydrationState();\n queueHydrationError(recoverableError);\n workInProgress.flags |= ForceClientRender;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n function updateHostComponent(current, workInProgress, renderLanes) {\n pushHostContext(workInProgress);\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\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 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.flags |= ContentReset;\n }\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\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 return null;\n }\n function mountLazyComponent(_current, workInProgress, elementType, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n var props = workInProgress.pendingProps;\n var lazyComponent = elementType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\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, renderLanes);\n return child;\n }\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n case MemoComponent:\n {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = Component.propTypes;\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, resolvedProps,\n // Resolved for outer only\n 'prop', getComponentNameFromType(Component));\n }\n }\n }\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps),\n // The inner type can have defaults too\n renderLanes);\n return child;\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 throw new 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 function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.\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 if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n prepareToReadContext(workInProgress, renderLanes);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n }\n function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\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, renderLanes);\n var value;\n var hasId;\n {\n markComponentRenderStarted(workInProgress);\n }\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\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 if (workInProgress.mode & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n setIsRendering(true);\n ReactCurrentOwner$1.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n workInProgress.flags |= PerformedWork;\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(Component) || 'Unknown';\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 }\n }\n if (\n // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\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.', _componentName2, _componentName2, _componentName2);\n didWarnAboutModulePatternComponent[_componentName2] = 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 if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n {\n if (workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n try {\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n }\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n }\n reconcileChildren(null, workInProgress, value, renderLanes);\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n return workInProgress.child;\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 if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n var warningKey = ownerName || '';\n var debugSource = workInProgress._debugSource;\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\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 if (Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n }\n var SUSPENDED_MARKER = {\n dehydrated: null,\n treeContext: null,\n retryLane: NoLane\n };\n function mountSuspenseOffscreenState(renderLanes) {\n return {\n baseLanes: renderLanes,\n cachePool: getSuspendedCache(),\n transitions: null\n };\n }\n function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n var cachePool = null;\n return {\n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),\n cachePool: cachePool,\n transitions: prevOffscreenState.transitions\n };\n } // TODO: Probably should inline this back\n\n function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {\n // If we're already showing a fallback, there are cases where we need to\n // remain on that fallback regardless of whether the content has resolved.\n // For example, SuspenseList coordinates when nested content appears.\n if (current !== null) {\n var suspenseState = current.memoizedState;\n if (suspenseState === null) {\n // Currently showing content. Don't hide it, even if ForceSuspenseFallback\n // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n // Note: This is a factoring smell. Can't remain on a fallback if there's\n // no fallback to remain on.\n return false;\n }\n } // Not currently showing content. Consult the Suspense context.\n\n return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n }\n function getRemainingWorkInPrimaryTree(current, renderLanes) {\n // TODO: Should not remove render lanes that were pinged during this render\n return removeLanes(current.childLanes, renderLanes);\n }\n function updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.flags |= DidCapture;\n }\n }\n var suspenseContext = suspenseStackCursor.current;\n var showFallback = false;\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;\n if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n showFallback = true;\n workInProgress.flags &= ~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 // Avoided boundaries are not considered since they cannot handle preferred fallback states.\n {\n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n }\n }\n }\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense\n // boundary's children. This involves some custom reconciliation logic. Two\n // main reasons this is so complicated.\n //\n // First, Legacy Mode has different semantics for backwards compatibility. The\n // primary tree will commit in an inconsistent state, so when we do the\n // second pass to render the fallback, we do some exceedingly, uh, clever\n // hacks to make that not totally break. Like transferring effects and\n // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n // because we bailout on the primary tree completely and leave it in its old\n // state, no effects. Same as what we do for Offscreen (except that\n // Offscreen doesn't have the first render pass).\n //\n // Second is hydration. During hydration, the Suspense fiber has a slightly\n // different layout, where the child points to a dehydrated fragment, which\n // contains the DOM rendered by the server.\n //\n // Third, even if you set all that aside, Suspense is like error boundaries in\n // that we first we try to render one tree, and if that fails, we render again\n // and switch to a different tree. Like a try/catch block. So we have to track\n // which branch we're currently rendering. Ideally we would model this using\n // a stack.\n\n if (current === null) {\n // Initial mount\n // Special path for hydration\n // If we're currently hydrating, try to hydrate this boundary.\n tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n\n var suspenseState = workInProgress.memoizedState;\n if (suspenseState !== null) {\n var dehydrated = suspenseState.dehydrated;\n if (dehydrated !== null) {\n return mountDehydratedSuspenseComponent(workInProgress, dehydrated);\n }\n }\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n if (showFallback) {\n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var primaryChildFragment = workInProgress.child;\n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackFragment;\n } else {\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n }\n } else {\n // This is an update.\n // Special path for hydration\n var prevState = current.memoizedState;\n if (prevState !== null) {\n var _dehydrated = prevState.dehydrated;\n if (_dehydrated !== null) {\n return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, _dehydrated, prevState, renderLanes);\n }\n }\n if (showFallback) {\n var _nextFallbackChildren = nextProps.fallback;\n var _nextPrimaryChildren = nextProps.children;\n var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);\n var _primaryChildFragment2 = workInProgress.child;\n var prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n _primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n } else {\n var _nextPrimaryChildren2 = nextProps.children;\n var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes);\n workInProgress.memoizedState = null;\n return _primaryChildFragment3;\n }\n }\n }\n function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n var mode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n primaryChildFragment.return = workInProgress;\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n }\n function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n var fallbackChildFragment;\n if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n if (workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = 0;\n primaryChildFragment.treeBaseDuration = 0;\n }\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n } else {\n primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n }\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n }\n function mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {\n // The props argument to `createFiberFromOffscreen` is `any` typed, so we use\n // this wrapper function to constrain it.\n return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);\n }\n function updateWorkInProgressOffscreenFiber(current, offscreenProps) {\n // The props argument to `createWorkInProgress` is `any` typed, so we use this\n // wrapper function to constrain it.\n return createWorkInProgress(current, offscreenProps);\n }\n function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n mode: 'visible',\n children: primaryChildren\n });\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n primaryChildFragment.lanes = renderLanes;\n }\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = null;\n if (currentFallbackChildFragment !== null) {\n // Delete the fallback child fragment\n var deletions = workInProgress.deletions;\n if (deletions === null) {\n workInProgress.deletions = [currentFallbackChildFragment];\n workInProgress.flags |= ChildDeletion;\n } else {\n deletions.push(currentFallbackChildFragment);\n }\n }\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n }\n function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n if (\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n (mode & ConcurrentMode) === NoMode &&\n // Make sure we're on the second pass, i.e. the primary child fragment was\n // already cloned. In legacy mode, the only case where this isn't true is\n // when DevTools forces us to display a fallback; we skip the first render\n // pass entirely and go straight to rendering the fallback. (In Concurrent\n // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n // only codepath.)\n workInProgress.child !== currentPrimaryChildFragment) {\n var progressedPrimaryFragment = workInProgress.child;\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n if (workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n } // The fallback fiber was added as a deletion during the first pass.\n // However, since we're going to remain on the fallback, we no longer want\n // to delete it.\n\n workInProgress.deletions = null;\n } else {\n primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too.\n // (We don't do this in legacy mode, because in legacy mode we don't re-use\n // the current tree; see previous branch.)\n\n primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;\n }\n var fallbackChildFragment;\n if (currentFallbackChildFragment !== null) {\n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n } else {\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n }\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n }\n function retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {\n // Falling back to client rendering. Because this has performance\n // implications, it's considered a recoverable error, even though the user\n // likely won't observe anything wrong with the UI.\n //\n // The error is passed in as an argument to enforce that every caller provide\n // a custom message, or explicitly opt out (currently the only path that opts\n // out is legacy mode; every concurrent path provides an error).\n if (recoverableError !== null) {\n queueHydrationError(recoverableError);\n } // This will add the old fiber to the deletion list\n\n reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.\n\n var nextProps = workInProgress.pendingProps;\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n primaryChildFragment.flags |= Placement;\n workInProgress.memoizedState = null;\n return primaryChildFragment;\n }\n function mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var fiberMode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);\n var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense\n // boundary) already mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n // We will have dropped the effect list which contains the\n // deletion. We need to reconcile to delete the current child.\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n }\n return fallbackChildFragment;\n }\n function mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {\n // During the first pass, we'll bail out and not drill into the children.\n // Instead, we'll leave the content in place and try to hydrate it later.\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n {\n error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');\n }\n workInProgress.lanes = laneToLanes(SyncLane);\n } else if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This is a client-only boundary. Since we won't get any content from the server\n // for this, we need to schedule that at a higher priority based on when it would\n // have timed out. In theory we could render it in this pass but it would have the\n // wrong priority associated with it and will prevent hydration of parent path.\n // Instead, we'll leave work left on it to render it in a separate commit.\n // TODO This time should be the time at which the server rendered response that is\n // a parent to this boundary was displayed. However, since we currently don't have\n // a protocol to transfer that time, we'll just estimate it by using the current\n // time. This will mean that Suspense timeouts are slightly shifted to later than\n // they should be.\n // Schedule a normal pri update to render this content.\n workInProgress.lanes = laneToLanes(DefaultHydrationLane);\n } else {\n // We'll continue hydrating the rest at offscreen priority since we'll already\n // be showing the right content coming from the server, it is no rush.\n workInProgress.lanes = laneToLanes(OffscreenLane);\n }\n return null;\n }\n function updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes) {\n if (!didSuspend) {\n // This is the first render pass. Attempt to hydrate.\n // We should never be hydrating at this point because it is the first pass,\n // but after we've already committed once.\n warnIfHydrating();\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes,\n // TODO: When we delete legacy mode, we should make this error argument\n // required — every concurrent mode path that causes hydration to\n // de-opt to client rendering should have an error message.\n null);\n }\n if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This boundary is in a permanent fallback state. In this case, we'll never\n // get an update and we'll never be able to hydrate the final content. Let's just try the\n // client side render instead.\n var digest, message, stack;\n {\n var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);\n digest = _getSuspenseInstanceF.digest;\n message = _getSuspenseInstanceF.message;\n stack = _getSuspenseInstanceF.stack;\n }\n var error;\n if (message) {\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(message);\n } else {\n error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.');\n }\n var capturedValue = createCapturedValue(error, digest, stack);\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue);\n }\n // any context has changed, we need to treat is as if the input might have changed.\n\n var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);\n if (didReceiveUpdate || hasContextChanged) {\n // This boundary has changed since the first render. This means that we are now unable to\n // hydrate it. We might still be able to hydrate it using a higher priority lane.\n var root = getWorkInProgressRoot();\n if (root !== null) {\n var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);\n if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {\n // Intentionally mutating since this render will get interrupted. This\n // is one of the very rare times where we mutate the current tree\n // during the render phase.\n suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render\n\n var eventTime = NoTimestamp;\n enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);\n scheduleUpdateOnFiber(root, current, attemptHydrationAtLane, eventTime);\n }\n } // If we have scheduled higher pri work above, this will probably just abort the render\n // since we now have higher priority work, but in case it doesn't, we need to prepare to\n // render something, if we time out. Even if that requires us to delete everything and\n // skip hydration.\n // Delay having to do this as long as the suspense timeout allows us.\n\n renderDidSuspendDelayIfPossible();\n var _capturedValue = createCapturedValue(new Error('This Suspense boundary received an update before it finished ' + 'hydrating. This caused the boundary to switch to client rendering. ' + 'The usual way to fix this is to wrap the original update ' + 'in startTransition.'));\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue);\n } else if (isSuspenseInstancePending(suspenseInstance)) {\n // This component is still pending more data from the server, so we can't hydrate its\n // content. We treat it as if this component suspended itself. It might seem as if\n // we could just try to render it client-side instead. However, this will perform a\n // lot of unnecessary work and is unlikely to complete since it often will suspend\n // on missing data anyway. Additionally, the server might be able to render more\n // than we can on the client yet. In that case we'd end up with more fallback states\n // on the client than if we just leave it alone. If the server times out or errors\n // these should update this boundary to the permanent Fallback state instead.\n // Mark it as having captured (i.e. suspended).\n workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.\n\n workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.\n\n var retry = retryDehydratedSuspenseBoundary.bind(null, current);\n registerSuspenseInstanceRetry(suspenseInstance, retry);\n return null;\n } else {\n // This is the first attempt.\n reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children 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\n primaryChildFragment.flags |= Hydrating;\n return primaryChildFragment;\n }\n } else {\n // This is the second render pass. We already attempted to hydrated, but\n // something either suspended or errored.\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during hydration. Try again without hydrating.\n workInProgress.flags &= ~ForceClientRender;\n var _capturedValue2 = createCapturedValue(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue2);\n } else if (workInProgress.memoizedState !== null) {\n // Something suspended and we should still be in dehydrated mode.\n // Leave the existing child in place.\n workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there\n // but the normal suspense pass doesn't.\n\n workInProgress.flags |= DidCapture;\n return null;\n } else {\n // Suspended but we should no longer be in dehydrated mode.\n // Therefore we now have to render the fallback.\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var _primaryChildFragment4 = workInProgress.child;\n _primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n }\n }\n }\n function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n }\n function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\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 while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n if (state !== null) {\n scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\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 scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === workInProgress) {\n return;\n }\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\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 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 row = row.sibling;\n }\n return lastContentRow;\n }\n function validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\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 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 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 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 function validateSuspenseListNestedChild(childSlot, index) {\n {\n var isAnArray = isArray(childSlot);\n var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';\n if (isAnArray || isIterable) {\n var type = isAnArray ? '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 function validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (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 if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\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 function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {\n var renderState = workInProgress.memoizedState;\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode\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.tailMode = tailMode;\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 function updateSuspenseListComponent(current, workInProgress, renderLanes) {\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, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\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, renderLanes);\n }\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n pushSuspenseContext(workInProgress, suspenseContext);\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy 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 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 initSuspenseListRenderState(workInProgress, false,\n // isBackwards\n tail, lastContentRow, tailMode);\n break;\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 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 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 initSuspenseListRenderState(workInProgress, true,\n // isBackwards\n _tail, null,\n // last\n tailMode);\n break;\n }\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false,\n // isBackwards\n null,\n // tail\n null,\n // last\n undefined);\n break;\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 return workInProgress.child;\n }\n function updatePortalComponent(current, workInProgress, renderLanes) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\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, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n return workInProgress.child;\n }\n var hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n function updateContextProvider(current, workInProgress, renderLanes) {\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 if (!('value' in newProps)) {\n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n }\n }\n var providerPropTypes = workInProgress.type.propTypes;\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n }\n }\n pushProvider(workInProgress, context, newValue);\n {\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n if (objectIs(oldValue, newValue)) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, renderLanes);\n }\n }\n }\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n }\n var hasWarnedAboutUsingContextAsConsumer = false;\n function updateContextConsumer(current, workInProgress, renderLanes) {\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, renderLanes);\n var newValue = readContext(context);\n {\n markComponentRenderStarted(workInProgress);\n }\n var newChildren;\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n }\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n }\n function markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n }\n function resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\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.flags |= Placement;\n }\n }\n }\n function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\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 {\n return null;\n }\n } // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n }\n function remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n if (returnFiber === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\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 if (prevSibling === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Expected parent to have a child.');\n }\n while (prevSibling.sibling !== oldWorkInProgress) {\n prevSibling = prevSibling.sibling;\n if (prevSibling === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\n throw new Error('Expected to find the previous sibling.');\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 var deletions = returnFiber.deletions;\n if (deletions === null) {\n returnFiber.deletions = [current];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(current);\n }\n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n }\n function checkScheduledUpdateOrContext(current, renderLanes) {\n // Before performing an early bailout, we must check if there are pending\n // updates or context.\n var updateLanes = current.lanes;\n if (includesSomeLane(updateLanes, renderLanes)) {\n return true;\n } // No pending update, but because context is propagated lazily, we need\n\n return false;\n }\n function attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {\n // 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 switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n var root = workInProgress.stateNode;\n resetHydrationState();\n break;\n case HostComponent:\n pushHostContext(workInProgress);\n break;\n case ClassComponent:\n {\n var Component = workInProgress.type;\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n break;\n }\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n var context = workInProgress.type._context;\n pushProvider(workInProgress, context, newValue);\n break;\n }\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n if (hasChildWork) {\n workInProgress.flags |= Update;\n }\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n break;\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n if (state !== null) {\n if (state.dehydrated !== null) {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // We know that this component will suspend again because if it has\n // been unsuspended it has committed as a resolved Suspense component.\n // If it needs to be retried, it should have work scheduled on it.\n\n workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we\n // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.\n\n return null;\n } // If this boundary is currently timed out, we need to decide\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 var primaryChildFragment = workInProgress.child;\n var primaryChildLanes = primaryChildFragment.childLanes;\n if (includesSomeLane(renderLanes, primaryChildLanes)) {\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, renderLanes);\n } else {\n // The primary child fragment does not have pending work marked\n // on it\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, renderLanes);\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 // Note: We can return `null` here because we already checked\n // whether there were nested context consumers, via the call to\n // `bailoutOnAlreadyFinishedWork` above.\n return null;\n }\n }\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n }\n break;\n }\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;\n var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\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, renderLanes);\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 workInProgress.flags |= 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 var renderState = workInProgress.memoizedState;\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 renderState.lastEffect = null;\n }\n pushSuspenseContext(workInProgress, suspenseStackCursor.current);\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 case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n // Need to check if the tree still needs to be deferred. This is\n // almost identical to the logic used in the normal update path,\n // so we'll just enter that. The only difference is we'll bail out\n // at the next level instead of this one, because the child props\n // have not changed. Which is fine.\n // TODO: Probably should refactor `beginWork` to split the bailout\n // path from the normal path. I'm tempted to do a labeled break here\n // but I won't :)\n workInProgress.lanes = NoLanes;\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n function beginWork(current, workInProgress, renderLanes) {\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.lanes));\n }\n }\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n if (oldProps !== newProps || hasContextChanged() ||\n // 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 {\n // Neither props nor legacy context changes. Check if there's a pending\n // update or context change.\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n if (!hasScheduledUpdateOrContext &&\n // If this is the second pass of an error or suspense boundary, there\n // may not be work scheduled on `current`, so we check for this flag.\n (workInProgress.flags & DidCapture) === NoFlags) {\n // No pending updates or context. Bail out now.\n didReceiveUpdate = false;\n return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);\n }\n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\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 }\n } else {\n didReceiveUpdate = false;\n if (getIsHydrating() && isForkedChild(workInProgress)) {\n // Check if this child belongs to a list of muliple children in\n // its parent.\n //\n // In a true multi-threaded implementation, we would render children on\n // parallel threads. This would represent the beginning of a new render\n // thread for this subtree.\n //\n // We only use this for id generation during hydration, which is why the\n // logic is located in this special branch.\n var slotIndex = workInProgress.index;\n var numberOfForks = getForksAtLevel();\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\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 workInProgress.lanes = NoLanes;\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n }\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, renderLanes);\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, renderLanes);\n }\n case ClassComponent:\n {\n var _Component = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);\n }\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderLanes);\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderLanes);\n case HostText:\n return updateHostText(current, workInProgress);\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderLanes);\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n }\n case Fragment:\n return updateFragment(current, workInProgress, renderLanes);\n case Mode:\n return updateMode(current, workInProgress, renderLanes);\n case Profiler:\n return updateProfiler(current, workInProgress, renderLanes);\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderLanes);\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderLanes);\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 if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = _type2.propTypes;\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, _resolvedProps3,\n // Resolved for outer only\n 'prop', getComponentNameFromType(_type2));\n }\n }\n }\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes);\n }\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);\n }\n case IncompleteClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);\n return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);\n }\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n }\n case ScopeComponent:\n {\n break;\n }\n case OffscreenComponent:\n {\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n }\n function markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.flags |= Update;\n }\n function markRef$1(workInProgress) {\n workInProgress.flags |= Ref;\n {\n workInProgress.flags |= RefStatic;\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 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 if (node === workInProgress) {\n return;\n }\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n };\n updateHostContainer = function (current, workInProgress) {// Noop\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 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 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 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 function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (getIsHydrating()) {\n // If we're hydrating, we should consume as many items as we can\n // so we don't leave any behind.\n return;\n }\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 while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\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 break;\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 while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\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 break;\n }\n }\n }\n function bubbleProperties(completedWork) {\n var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;\n var newChildLanes = NoLanes;\n var subtreeFlags = NoFlags;\n if (!didBailout) {\n // Bubble up the earliest expiration time.\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;\n var child = completedWork.child;\n while (child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n subtreeFlags |= child.subtreeFlags;\n subtreeFlags |= child.flags; // 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 actualDuration += child.actualDuration;\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n while (_child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n subtreeFlags |= _child.subtreeFlags;\n subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child.return = completedWork;\n _child = _child.sibling;\n }\n }\n completedWork.subtreeFlags |= subtreeFlags;\n } else {\n // Bubble up the earliest expiration time.\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var _treeBaseDuration = completedWork.selfBaseDuration;\n var _child2 = completedWork.child;\n while (_child2 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child2.subtreeFlags & StaticMask;\n subtreeFlags |= _child2.flags & StaticMask;\n _treeBaseDuration += _child2.treeBaseDuration;\n _child2 = _child2.sibling;\n }\n completedWork.treeBaseDuration = _treeBaseDuration;\n } else {\n var _child3 = completedWork.child;\n while (_child3 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child3.subtreeFlags & StaticMask;\n subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child3.return = completedWork;\n _child3 = _child3.sibling;\n }\n }\n completedWork.subtreeFlags |= subtreeFlags;\n }\n completedWork.childLanes = newChildLanes;\n return didBailout;\n }\n function completeDehydratedSuspenseBoundary(current, workInProgress, nextState) {\n if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags) {\n warnIfUnhydratedTailNodes(workInProgress);\n resetHydrationState();\n workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture;\n return false;\n }\n var wasHydrated = popHydrationState(workInProgress);\n if (nextState !== null && nextState.dehydrated !== null) {\n // We might be inside a hydration state the first time we're picking up this\n // Suspense boundary, and also after we've reentered it for further hydration.\n if (current === null) {\n if (!wasHydrated) {\n throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');\n }\n prepareToHydrateHostSuspenseInstance(workInProgress);\n bubbleProperties(workInProgress);\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var isTimedOutSuspense = nextState !== null;\n if (isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n if (primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n return false;\n } else {\n // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration\n // state since we're now exiting out of it. popHydrationState doesn't do that for us.\n resetHydrationState();\n if ((workInProgress.flags & DidCapture) === NoFlags) {\n // This boundary did not suspend so it's now hydrated and unsuspended.\n workInProgress.memoizedState = null;\n } // If nothing suspended, we need to schedule an effect to mark this boundary\n // as having hydrated so events know that they're free to be invoked.\n // It's also a signal to replay events and the suspense callback.\n // If something suspended, schedule an effect to attach retry listeners.\n // So we might as well always mark this.\n\n workInProgress.flags |= Update;\n bubbleProperties(workInProgress);\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var _isTimedOutSuspense = nextState !== null;\n if (_isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var _primaryChildFragment = workInProgress.child;\n if (_primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n return false;\n }\n } else {\n // Successfully completed this tree. If this was a forced client render,\n // there may have been recoverable errors during first hydration\n // attempt. If so, add them to a queue so we can log them in the\n // commit phase.\n upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path\n\n return true;\n }\n }\n function completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n\n popTreeContext(workInProgress);\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 bubbleProperties(workInProgress);\n return null;\n case ClassComponent:\n {\n var Component = workInProgress.type;\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n bubbleProperties(workInProgress);\n return null;\n }\n case HostRoot:\n {\n var fiberRoot = workInProgress.stateNode;\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\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 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 } else {\n if (current !== null) {\n var prevState = current.memoizedState;\n if (\n // Check if this is a client root\n !prevState.isDehydrated ||\n // Check if we reverted to client rendering (e.g. due to an error)\n (workInProgress.flags & ForceClientRender) !== NoFlags) {\n // Schedule an effect to clear this container at the start of the\n // next commit. This handles the case of React rendering into a\n // container with previous children. It's also safe to do for\n // updates too, because current.child would only be null if the\n // previous render was null (so the container would already\n // be empty).\n workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been\n // recoverable errors during first hydration attempt. If so, add\n // them to a queue so we can log them in the commit phase.\n\n upgradeHydrationErrorsToRecoverable();\n }\n }\n }\n }\n updateHostContainer(current, workInProgress);\n bubbleProperties(workInProgress);\n return null;\n }\n case HostComponent:\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var type = workInProgress.type;\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);\n if (current.ref !== workInProgress.ref) {\n markRef$1(workInProgress);\n }\n } else {\n if (!newProps) {\n if (workInProgress.stateNode === null) {\n throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n bubbleProperties(workInProgress);\n return null;\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 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);\n workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.\n // (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 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 bubbleProperties(workInProgress);\n return null;\n }\n case HostText:\n {\n var newText = newProps;\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 throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n }\n var _rootContainerInstance = getRootHostContainer();\n var _currentHostContext = getHostContext();\n var _wasHydrated2 = popHydrationState(workInProgress);\n if (_wasHydrated2) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n }\n }\n bubbleProperties(workInProgress);\n return null;\n }\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this\n // to its own fiber type so that we can add other kinds of hydration\n // boundaries that aren't associated with a Suspense tree. In anticipation\n // of such a refactor, all the hydration logic is contained in\n // this branch.\n\n if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {\n var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState);\n if (!fallthroughToNormalSuspensePath) {\n if (workInProgress.flags & ShouldCapture) {\n // Special case. There were remaining unhydrated nodes. We treat\n // this as a mismatch. Revert to client rendering.\n return workInProgress;\n } else {\n // Did not finish hydrating, either because this is the initial\n // render or because something suspended.\n return null;\n }\n } // Continue with the normal Suspense path.\n }\n if ((workInProgress.flags & DidCapture) !== NoFlags) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n } // Don't bubble properties in this case.\n\n return workInProgress;\n }\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = current !== null && current.memoizedState !== null;\n // a passive effect, which is when we process the transitions\n\n if (nextDidTimeout !== prevDidTimeout) {\n // an effect to toggle the subtree's visibility. When we switch from\n // fallback -> primary, the inner Offscreen fiber schedules this effect\n // as part of its normal complete phase. But when we switch from\n // primary -> fallback, the inner Offscreen fiber does not have a complete\n // phase. So we need to schedule its effect here.\n //\n // We also use this flag to connect/disconnect the effects, but the same\n // logic applies: when re-connecting, the Offscreen fiber's complete\n // phase will handle scheduling the effect. It's only when the fallback\n // is active that we have to do anything special.\n\n if (nextDidTimeout) {\n var _offscreenFiber2 = workInProgress.child;\n _offscreenFiber2.flags |= Visibility; // 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\n if ((workInProgress.mode & ConcurrentMode) !== 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 || !enableSuspenseAvoidThisFallback);\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 var wakeables = workInProgress.updateQueue;\n if (wakeables !== null) {\n // Schedule an effect to attach a retry listener to the promise.\n // TODO: Move to passive phase\n workInProgress.flags |= Update;\n }\n bubbleProperties(workInProgress);\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n if (nextDidTimeout) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n if (primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n return null;\n }\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(current, workInProgress);\n if (current === null) {\n preparePortalMount(workInProgress.stateNode.containerInfo);\n }\n bubbleProperties(workInProgress);\n return null;\n case ContextProvider:\n // Pop provider fiber\n var context = workInProgress.type._context;\n popProvider(context, workInProgress);\n bubbleProperties(workInProgress);\n return null;\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 if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n bubbleProperties(workInProgress);\n return null;\n }\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n bubbleProperties(workInProgress);\n return null;\n }\n var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;\n var renderedTail = renderState.rendering;\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.flags & DidCapture) === NoFlags);\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.flags |= 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 thenables. Instead, we'll transfer its thenables 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 newThenables = suspended.updateQueue;\n if (newThenables !== null) {\n workInProgress.updateQueue = newThenables;\n workInProgress.flags |= Update;\n } // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect flags before doing the second pass since that's now invalid.\n // Reset the child fibers to their original state.\n\n workInProgress.subtreeFlags = NoFlags;\n resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately\n // rerender the children.\n\n pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.\n\n return workInProgress.child;\n }\n row = row.sibling;\n }\n }\n if (renderState.tail !== null && now() > getRenderTargetTime()) {\n // We have already passed our CPU deadline but we still have rows\n // left in the tail. We'll just give up further attempts to render\n // the main content and only render fallbacks.\n workInProgress.flags |= 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. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n if (_suspended !== null) {\n workInProgress.flags |= 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 _newThenables = _suspended.updateQueue;\n if (_newThenables !== null) {\n workInProgress.updateQueue = _newThenables;\n workInProgress.flags |= Update;\n }\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n ) {\n // We're done.\n bubbleProperties(workInProgress);\n return null;\n }\n } else if (\n // The time it took to render last row is greater than the remaining\n // time we have to render. So rendering one more row would likely\n // exceed it.\n now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\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.flags |= 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. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\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 if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n renderState.last = renderedTail;\n }\n }\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n // Pop a row.\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\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 if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n // Don't bubble properties in this case.\n\n return next;\n }\n bubbleProperties(workInProgress);\n return null;\n }\n case ScopeComponent:\n {\n break;\n }\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popRenderLanes(workInProgress);\n var _nextState = workInProgress.memoizedState;\n var nextIsHidden = _nextState !== null;\n if (current !== null) {\n var _prevState = current.memoizedState;\n var prevIsHidden = _prevState !== null;\n if (prevIsHidden !== nextIsHidden &&\n // LegacyHidden doesn't do any hiding — it only pre-renders.\n !enableLegacyHidden) {\n workInProgress.flags |= Visibility;\n }\n }\n if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {\n bubbleProperties(workInProgress);\n } else {\n // Don't bubble properties for hidden children unless we're rendering\n // at offscreen priority.\n if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) {\n bubbleProperties(workInProgress);\n {\n // Check if there was an insertion or update in the hidden subtree.\n // If so, we need to hide those nodes in the commit phase, so\n // schedule a visibility effect.\n if (workInProgress.subtreeFlags & (Placement | Update)) {\n workInProgress.flags |= Visibility;\n }\n }\n }\n }\n return null;\n }\n case CacheComponent:\n {\n return null;\n }\n case TracingMarkerComponent:\n {\n return null;\n }\n }\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n }\n function unwindWork(current, workInProgress, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(workInProgress);\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n var flags = workInProgress.flags;\n if (flags & ShouldCapture) {\n workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n return workInProgress;\n }\n return null;\n }\n case HostRoot:\n {\n var root = workInProgress.stateNode;\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var _flags = workInProgress.flags;\n if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {\n // There was an error during render that wasn't captured by a suspense\n // boundary. Do a second pass on the root to unmount the children.\n workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n return workInProgress;\n } // We unwound to the root without completing it. Exit.\n\n return null;\n }\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var suspenseState = workInProgress.memoizedState;\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n if (workInProgress.alternate === null) {\n throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');\n }\n resetHydrationState();\n }\n var _flags2 = workInProgress.flags;\n if (_flags2 & ShouldCapture) {\n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n return workInProgress;\n }\n return null;\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 case HostPortal:\n popHostContainer(workInProgress);\n return null;\n case ContextProvider:\n var context = workInProgress.type._context;\n popProvider(context, workInProgress);\n return null;\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(workInProgress);\n return null;\n case CacheComponent:\n return null;\n default:\n return null;\n }\n }\n function unwindInterruptedWork(current, interruptedWork, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(interruptedWork);\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n break;\n }\n case HostRoot:\n {\n var root = interruptedWork.stateNode;\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n resetWorkInProgressVersions();\n break;\n }\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n case SuspenseComponent:\n popSuspenseContext(interruptedWork);\n break;\n case SuspenseListComponent:\n popSuspenseContext(interruptedWork);\n break;\n case ContextProvider:\n var context = interruptedWork.type._context;\n popProvider(context, interruptedWork);\n break;\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(interruptedWork);\n break;\n }\n }\n var didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n {\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n } // Used during the commit phase to track the state of the Offscreen component stack.\n // Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.\n // Only used when enableSuspenseLayoutEffectSemantics is enabled.\n\n var offscreenSubtreeIsHidden = false;\n var offscreenSubtreeWasHidden = false;\n var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\n var nextEffect = null; // Used for Profiling builds to track updaters.\n\n var inProgressLanes = null;\n var inProgressRoot = null;\n function reportUncaughtErrorInDEV(error) {\n // Wrapping each small part of the commit phase into a guarded\n // callback is a bit too slow (https://github.com/facebook/react/pull/21666).\n // But we rely on it to surface errors to DEV tools like overlays\n // (https://github.com/facebook/react/issues/21712).\n // As a compromise, rethrow only caught errors in a guard.\n {\n invokeGuardedCallback(null, function () {\n throw error;\n });\n clearCaughtError();\n }\n }\n var callComponentWillUnmountWithTimer = function (current, instance) {\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n if (current.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentWillUnmount();\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n instance.componentWillUnmount();\n }\n }; // Capture errors so they don't interrupt mounting.\n\n function safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) {\n try {\n commitHookEffectListMount(Layout, current);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n } // Capture errors so they don't interrupt unmounting.\n\n function safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {\n try {\n callComponentWillUnmountWithTimer(current, instance);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n } // Capture errors so they don't interrupt mounting.\n\n function safelyCallComponentDidMount(current, nearestMountedAncestor, instance) {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n } // Capture errors so they don't interrupt mounting.\n\n function safelyAttachRef(current, nearestMountedAncestor) {\n try {\n commitAttachRef(current);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n }\n function safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref;\n if (ref !== null) {\n if (typeof ref === 'function') {\n var retVal;\n try {\n if (enableProfilerTimer && enableProfilerCommitHooks && current.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n retVal = ref(null);\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n retVal = ref(null);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n {\n if (typeof retVal === 'function') {\n error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));\n }\n }\n } else {\n ref.current = null;\n }\n }\n }\n function safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n try {\n destroy();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n }\n var focusedInstanceHandle = null;\n var shouldFireAfterActiveInstanceBlur = false;\n function commitBeforeMutationEffects(root, firstChild) {\n focusedInstanceHandle = prepareForCommit(root.containerInfo);\n nextEffect = firstChild;\n commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber\n\n var shouldFire = shouldFireAfterActiveInstanceBlur;\n shouldFireAfterActiveInstanceBlur = false;\n focusedInstanceHandle = null;\n return shouldFire;\n }\n function commitBeforeMutationEffects_begin() {\n while (nextEffect !== null) {\n var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.\n\n var child = fiber.child;\n if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitBeforeMutationEffects_complete();\n }\n }\n }\n function commitBeforeMutationEffects_complete() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n setCurrentFiber(fiber);\n try {\n commitBeforeMutationEffectsOnFiber(fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n resetCurrentFiber();\n var sibling = fiber.sibling;\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n nextEffect = fiber.return;\n }\n }\n function commitBeforeMutationEffectsOnFiber(finishedWork) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags;\n if ((flags & Snapshot) !== NoFlags) {\n setCurrentFiber(finishedWork);\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n break;\n }\n case ClassComponent:\n {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\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.', getComponentNameFromFiber(finishedWork) || 'instance');\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.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || '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 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.', getComponentNameFromFiber(finishedWork));\n }\n }\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n break;\n }\n case HostRoot:\n {\n {\n var root = finishedWork.stateNode;\n clearContainer(root.containerInfo);\n }\n break;\n }\n case HostComponent:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n break;\n default:\n {\n throw new 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 resetCurrentFiber();\n }\n }\n function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n do {\n if ((effect.tag & flags) === flags) {\n // Unmount\n var destroy = effect.destroy;\n effect.destroy = undefined;\n if (destroy !== undefined) {\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectUnmountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectUnmountStarted(finishedWork);\n }\n }\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(true);\n }\n }\n safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(false);\n }\n }\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectUnmountStopped();\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n }\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n function commitHookEffectListMount(flags, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n do {\n if ((effect.tag & flags) === flags) {\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectMountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectMountStarted(finishedWork);\n }\n } // Mount\n\n var create = effect.create;\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(true);\n }\n }\n effect.destroy = create();\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(false);\n }\n }\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectMountStopped();\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectMountStopped();\n }\n }\n {\n var destroy = effect.destroy;\n if (destroy !== undefined && typeof destroy !== 'function') {\n var hookName = void 0;\n if ((effect.tag & Layout) !== NoFlags) {\n hookName = 'useLayoutEffect';\n } else if ((effect.tag & Insertion) !== NoFlags) {\n hookName = 'useInsertionEffect';\n } else {\n hookName = 'useEffect';\n }\n var addendum = void 0;\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 ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + hookName + '(() => {\\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://reactjs.org/link/hooks-data-fetching';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);\n }\n }\n }\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n function commitPassiveEffectDurations(finishedRoot, finishedWork) {\n {\n // Only Profilers with work in their subtree will have an Update effect scheduled.\n if ((finishedWork.flags & Update) !== NoFlags) {\n switch (finishedWork.tag) {\n case Profiler:\n {\n var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;\n var _finishedWork$memoize = finishedWork.memoizedProps,\n id = _finishedWork$memoize.id,\n onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.\n // It does not get reset until the start of the next commit phase.\n\n var commitTime = getCommitTime();\n var phase = finishedWork.alternate === null ? 'mount' : 'update';\n {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n if (typeof onPostCommit === 'function') {\n onPostCommit(id, phase, passiveEffectDuration, commitTime);\n } // Bubble times to the next nearest ancestor Profiler.\n // After we process that Profiler, we'll bubble further up.\n\n var parentFiber = finishedWork.return;\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.passiveEffectDuration += passiveEffectDuration;\n break outer;\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.passiveEffectDuration += passiveEffectDuration;\n break outer;\n }\n parentFiber = parentFiber.return;\n }\n break;\n }\n }\n }\n }\n }\n function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {\n if ((finishedWork.flags & LayoutMask) !== NoFlags) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if (!offscreenSubtreeWasHidden) {\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 if (finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n }\n }\n break;\n }\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n if (finishedWork.flags & Update) {\n if (!offscreenSubtreeWasHidden) {\n if (current === null) {\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 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.', getComponentNameFromFiber(finishedWork) || 'instance');\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.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n if (finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentDidMount();\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n instance.componentDidMount();\n }\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState; // 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.', getComponentNameFromFiber(finishedWork) || 'instance');\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.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n if (finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n }\n }\n }\n } // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n\n var updateQueue = finishedWork.updateQueue;\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.', getComponentNameFromFiber(finishedWork) || 'instance');\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.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || '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 break;\n }\n case HostRoot:\n {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var _updateQueue = finishedWork.updateQueue;\n if (_updateQueue !== null) {\n var _instance = null;\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostComponent:\n _instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n case ClassComponent:\n _instance = finishedWork.child.stateNode;\n break;\n }\n }\n commitUpdateQueue(finishedWork, _updateQueue, _instance);\n }\n break;\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.flags & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props);\n }\n break;\n }\n case HostText:\n {\n // We have no life-cycles associated with text.\n break;\n }\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n break;\n }\n case Profiler:\n {\n {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n onCommit = _finishedWork$memoize2.onCommit,\n onRender = _finishedWork$memoize2.onRender;\n var effectDuration = finishedWork.stateNode.effectDuration;\n var commitTime = getCommitTime();\n var phase = current === null ? 'mount' : 'update';\n {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n if (typeof onRender === 'function') {\n onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);\n }\n {\n if (typeof onCommit === 'function') {\n onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);\n } // Schedule a passive effect for this Profiler to call onPostCommit hooks.\n // This effect should be scheduled even if there is no onPostCommit callback for this Profiler,\n // because the effect is also where times bubble to parent Profilers.\n\n enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.\n // Do not reset these values until the next render so DevTools has a chance to read them first.\n\n var parentFiber = finishedWork.return;\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += effectDuration;\n break outer;\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += effectDuration;\n break outer;\n }\n parentFiber = parentFiber.return;\n }\n }\n }\n break;\n }\n case SuspenseComponent:\n {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n break;\n }\n case SuspenseListComponent:\n case IncompleteClassComponent:\n case ScopeComponent:\n case OffscreenComponent:\n case LegacyHiddenComponent:\n case TracingMarkerComponent:\n {\n break;\n }\n default:\n throw new 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 if (!offscreenSubtreeWasHidden) {\n {\n if (finishedWork.flags & Ref) {\n commitAttachRef(finishedWork);\n }\n }\n }\n }\n function reappearLayoutEffectsOnFiber(node) {\n // Turn on layout effects in a tree that previously disappeared.\n // TODO (Offscreen) Check: flags & LayoutStatic\n switch (node.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if (node.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n safelyCallCommitHookLayoutEffectListMount(node, node.return);\n } finally {\n recordLayoutEffectDuration(node);\n }\n } else {\n safelyCallCommitHookLayoutEffectListMount(node, node.return);\n }\n break;\n }\n case ClassComponent:\n {\n var instance = node.stateNode;\n if (typeof instance.componentDidMount === 'function') {\n safelyCallComponentDidMount(node, node.return, instance);\n }\n safelyAttachRef(node, node.return);\n break;\n }\n case HostComponent:\n {\n safelyAttachRef(node, node.return);\n break;\n }\n }\n }\n function hideOrUnhideAllChildren(finishedWork, isHidden) {\n // Only hide or unhide the top-most host nodes.\n var hostSubtreeRoot = null;\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 while (true) {\n if (node.tag === HostComponent) {\n if (hostSubtreeRoot === null) {\n hostSubtreeRoot = node;\n try {\n var instance = node.stateNode;\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if (node.tag === HostText) {\n if (hostSubtreeRoot === null) {\n try {\n var _instance3 = node.stateNode;\n if (isHidden) {\n hideTextInstance(_instance3);\n } else {\n unhideTextInstance(_instance3, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ;else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === finishedWork) {\n return;\n }\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n node = node.return;\n }\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n }\n function commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n switch (finishedWork.tag) {\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n if (typeof ref === 'function') {\n var retVal;\n if (finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n retVal = ref(instanceToUse);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n retVal = ref(instanceToUse);\n }\n {\n if (typeof retVal === 'function') {\n error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(finishedWork));\n }\n }\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().', getComponentNameFromFiber(finishedWork));\n }\n }\n ref.current = instanceToUse;\n }\n }\n }\n function detachFiberMutation(fiber) {\n // Cut off the return pointer to disconnect it from the tree.\n // This enables us to detect and warn against state updates on an unmounted component.\n // It also prevents events from bubbling from within disconnected components.\n //\n // Ideally, we should also 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.\n // This child itself will be GC:ed when the parent updates the next time.\n //\n // Note that we can't clear child or sibling pointers yet.\n // They're needed for passive effects and for findDOMNode.\n // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).\n //\n // Don't reset the alternate yet, either. We need that so we can detach the\n // alternate's fields in the passive phase. Clearing the return pointer is\n // sufficient for findDOMNode semantics.\n var alternate = fiber.alternate;\n if (alternate !== null) {\n alternate.return = null;\n }\n fiber.return = null;\n }\n function detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n if (alternate !== null) {\n fiber.alternate = null;\n detachFiberAfterEffects(alternate);\n } // Note: Defensively using negation instead of < in case\n // `deletedTreeCleanUpLevel` is undefined.\n\n {\n // Clear cyclical Fiber fields. This level alone is designed to roughly\n // approximate the planned Fiber refactor. In that world, `setState` will be\n // bound to a special \"instance\" object instead of a Fiber. The Instance\n // object will not have any of these fields. It will only be connected to\n // the fiber tree via a single link at the root. So if this level alone is\n // sufficient to fix memory issues, that bodes well for our plans.\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host\n // tree, which has its own pointers to children, parents, and siblings.\n // The other host nodes also point back to fibers, so we should detach that\n // one, too.\n\n if (fiber.tag === HostComponent) {\n var hostInstance = fiber.stateNode;\n if (hostInstance !== null) {\n detachDeletedInstance(hostInstance);\n }\n }\n fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We\n // already disconnect the `return` pointer at the root of the deleted\n // subtree (in `detachFiberMutation`). Besides, `return` by itself is not\n // cyclical — it's only cyclical when combined with `child`, `sibling`, and\n // `alternate`. But we'll clear it in the next level anyway, just in case.\n\n {\n fiber._debugOwner = null;\n }\n {\n // Theoretically, nothing in here should be necessary, because we already\n // disconnected the fiber from the tree. So even if something leaks this\n // particular fiber, it won't leak anything else\n //\n // The purpose of this branch is to be super aggressive so we can measure\n // if there's any difference in memory impact. If there is, that could\n // indicate a React leak we don't know about.\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.\n\n fiber.updateQueue = null;\n }\n }\n }\n function getHostParentFiber(fiber) {\n var parent = fiber.return;\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n parent = parent.return;\n }\n throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n function isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\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 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 node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\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.flags & 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 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 if (!(node.flags & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n }\n function commitPlacement(finishedWork) {\n var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n switch (parentFiber.tag) {\n case HostComponent:\n {\n var parent = parentFiber.stateNode;\n if (parentFiber.flags & 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.flags &= ~ContentReset;\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 insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n }\n case HostRoot:\n case HostPortal:\n {\n var _parent = parentFiber.stateNode.containerInfo;\n var _before = getHostSibling(finishedWork);\n insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);\n break;\n }\n // eslint-disable-next-line-no-fallthrough\n\n default:\n throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n }\n function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n if (isHost) {\n var stateNode = node.stateNode;\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 if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n }\n function insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n if (isHost) {\n var stateNode = node.stateNode;\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 if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n } // These are tracked on the stack as we recursively traverse a\n // deleted subtree.\n // TODO: Update these during the whole mutation phase, not just during\n // a deletion.\n\n var hostParent = null;\n var hostParentIsContainer = false;\n function commitDeletionEffects(root, returnFiber, deletedFiber) {\n {\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 // Recursively delete all host nodes from the parent, detach refs, clean\n // up mounted layout effects, and call componentWillUnmount.\n // We only need to remove the topmost host child in each branch. But then we\n // still need to keep traversing to unmount effects, refs, and cWU. TODO: We\n // could split this into two separate traversals functions, where the second\n // one doesn't include any removeChild logic. This is maybe the same\n // function as \"disappearLayoutEffects\" (or whatever that turns into after\n // the layout phase is refactored to use recursion).\n // Before starting, find the nearest host parent on the stack so we know\n // which instance/container to remove the children from.\n // TODO: Instead of searching up the fiber return path on every deletion, we\n // can track the nearest host component on the JS stack as we traverse the\n // tree during the commit phase. This would make insertions faster, too.\n var parent = returnFiber;\n findParent: while (parent !== null) {\n switch (parent.tag) {\n case HostComponent:\n {\n hostParent = parent.stateNode;\n hostParentIsContainer = false;\n break findParent;\n }\n case HostRoot:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n case HostPortal:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n }\n parent = parent.return;\n }\n if (hostParent === null) {\n throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n }\n commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);\n hostParent = null;\n hostParentIsContainer = false;\n }\n detachFiberMutation(deletedFiber);\n }\n function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {\n // TODO: Use a static flag to skip trees that don't have unmount effects\n var child = parent.child;\n while (child !== null) {\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);\n child = child.sibling;\n }\n }\n function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {\n onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse\n // into their subtree. There are simpler cases in the inner switch\n // that don't modify the stack.\n\n switch (deletedFiber.tag) {\n case HostComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n } // Intentional fallthrough to next branch\n }\n // eslint-disable-next-line-no-fallthrough\n\n case HostText:\n {\n // We only need to remove the nearest host child. Set the host parent\n // to `null` on the stack to indicate that nested children don't\n // need to be removed.\n {\n var prevHostParent = hostParent;\n var prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n if (hostParent !== null) {\n // Now that all the child effects have unmounted, we can remove the\n // node from the tree.\n if (hostParentIsContainer) {\n removeChildFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n removeChild(hostParent, deletedFiber.stateNode);\n }\n }\n }\n return;\n }\n case DehydratedFragment:\n {\n // Delete the dehydrated suspense boundary and all of its content.\n\n {\n if (hostParent !== null) {\n if (hostParentIsContainer) {\n clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n clearSuspenseBoundary(hostParent, deletedFiber.stateNode);\n }\n }\n }\n return;\n }\n case HostPortal:\n {\n {\n // When we go into a portal, it becomes the parent to remove from.\n var _prevHostParent = hostParent;\n var _prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = true;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = _prevHostParent;\n hostParentIsContainer = _prevHostParentIsContainer;\n }\n return;\n }\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n var updateQueue = deletedFiber.updateQueue;\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n do {\n var _effect = effect,\n destroy = _effect.destroy,\n tag = _effect.tag;\n if (destroy !== undefined) {\n if ((tag & Insertion) !== NoFlags$1) {\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n } else if ((tag & Layout) !== NoFlags$1) {\n {\n markComponentLayoutEffectUnmountStarted(deletedFiber);\n }\n if (deletedFiber.mode & ProfileMode) {\n startLayoutEffectTimer();\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n recordLayoutEffectDuration(deletedFiber);\n } else {\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n }\n {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n }\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n case ClassComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n var instance = deletedFiber.stateNode;\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);\n }\n }\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n case ScopeComponent:\n {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n case OffscreenComponent:\n {\n if (\n // TODO: Remove this dead flag\n deletedFiber.mode & ConcurrentMode) {\n // If this offscreen component is hidden, we already unmounted it. Before\n // deleting the children, track that it's already unmounted so that we\n // don't attempt to unmount the effects again.\n // TODO: If the tree is hidden, in most cases we should be able to skip\n // over the nested children entirely. An exception is we haven't yet found\n // the topmost host node to delete, which we already track on the stack.\n // But the other case is portals, which need to be detached no matter how\n // deeply they are nested. We should use a subtree flag to track whether a\n // subtree includes a nested portal.\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n } else {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n }\n break;\n }\n default:\n {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n }\n }\n function commitSuspenseCallback(finishedWork) {\n // TODO: Move this to passive phase\n var newState = finishedWork.memoizedState;\n }\n function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n var newState = finishedWork.memoizedState;\n if (newState === null) {\n var current = finishedWork.alternate;\n if (current !== null) {\n var prevState = current.memoizedState;\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n if (suspenseInstance !== null) {\n commitHydratedSuspenseInstance(suspenseInstance);\n }\n }\n }\n }\n }\n function attachSuspenseRetryListeners(finishedWork) {\n // If this boundary just timed out, then it will have a set of wakeables.\n // For each wakeable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var wakeables = finishedWork.updateQueue;\n if (wakeables !== null) {\n finishedWork.updateQueue = null;\n var retryCache = finishedWork.stateNode;\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n wakeables.forEach(function (wakeable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n if (!retryCache.has(wakeable)) {\n retryCache.add(wakeable);\n {\n if (isDevToolsPresent) {\n if (inProgressLanes !== null && inProgressRoot !== null) {\n // If we have pending work still, associate the original updaters with it.\n restorePendingUpdaters(inProgressRoot, inProgressLanes);\n } else {\n throw Error('Expected finished root and lanes to be set. This is a bug in React.');\n }\n }\n }\n wakeable.then(retry, retry);\n }\n });\n }\n } // This function detects when a Suspense boundary goes from visible to hidden.\n function commitMutationEffects(root, finishedWork, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n setCurrentFiber(finishedWork);\n commitMutationEffectsOnFiber(finishedWork, root);\n setCurrentFiber(finishedWork);\n inProgressLanes = null;\n inProgressRoot = null;\n }\n function recursivelyTraverseMutationEffects(root, parentFiber, lanes) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects hae fired.\n var deletions = parentFiber.deletions;\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n try {\n commitDeletionEffects(root, parentFiber, childToDelete);\n } catch (error) {\n captureCommitPhaseError(childToDelete, parentFiber, error);\n }\n }\n }\n var prevDebugFiber = getCurrentFiber();\n if (parentFiber.subtreeFlags & MutationMask) {\n var child = parentFiber.child;\n while (child !== null) {\n setCurrentFiber(child);\n commitMutationEffectsOnFiber(child, root);\n child = child.sibling;\n }\n }\n setCurrentFiber(prevDebugFiber);\n }\n function commitMutationEffectsOnFiber(finishedWork, root, lanes) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,\n // because the fiber tag is more specific. An exception is any flag related\n // to reconcilation, because those can be set on all fiber types.\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & Update) {\n try {\n commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);\n commitHookEffectListMount(Insertion | HasEffect, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\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\n if (finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n return;\n }\n case ClassComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n return;\n }\n case HostComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n {\n // TODO: ContentReset gets cleared by the children during the commit\n // phase. This is a refactor hazard because it means we must read\n // flags the flags after `commitReconciliationEffects` has already run;\n // the order matters. We should refactor so that ContentReset does not\n // rely on mutating the flag during commit. Like by setting a flag\n // during the render phase instead.\n if (finishedWork.flags & ContentReset) {\n var instance = finishedWork.stateNode;\n try {\n resetTextContent(instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n if (flags & Update) {\n var _instance4 = finishedWork.stateNode;\n if (_instance4 != 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 if (updatePayload !== null) {\n try {\n commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n return;\n }\n case HostText:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & Update) {\n {\n if (finishedWork.stateNode === null) {\n throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.');\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 try {\n commitTextUpdate(textInstance, oldText, newText);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n return;\n }\n case HostRoot:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & Update) {\n {\n if (current !== null) {\n var prevRootState = current.memoizedState;\n if (prevRootState.isDehydrated) {\n try {\n commitHydratedContainer(root.containerInfo);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n return;\n }\n case HostPortal:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n return;\n }\n case SuspenseComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n var offscreenFiber = finishedWork.child;\n if (offscreenFiber.flags & Visibility) {\n var offscreenInstance = offscreenFiber.stateNode;\n var newState = offscreenFiber.memoizedState;\n var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can\n // read it during an event\n\n offscreenInstance.isHidden = isHidden;\n if (isHidden) {\n var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;\n if (!wasHidden) {\n // TODO: Move to passive phase\n markCommitTimeOfFallback();\n }\n }\n }\n if (flags & Update) {\n try {\n commitSuspenseCallback(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n attachSuspenseRetryListeners(finishedWork);\n }\n return;\n }\n case OffscreenComponent:\n {\n var _wasHidden = current !== null && current.memoizedState !== null;\n if (\n // TODO: Remove this dead flag\n finishedWork.mode & ConcurrentMode) {\n // Before committing the children, track on the stack whether this\n // offscreen subtree was already hidden, so that we don't unmount the\n // effects again.\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n } else {\n recursivelyTraverseMutationEffects(root, finishedWork);\n }\n commitReconciliationEffects(finishedWork);\n if (flags & Visibility) {\n var _offscreenInstance = finishedWork.stateNode;\n var _newState = finishedWork.memoizedState;\n var _isHidden = _newState !== null;\n var offscreenBoundary = finishedWork; // Track the current state on the Offscreen instance so we can\n // read it during an event\n\n _offscreenInstance.isHidden = _isHidden;\n {\n if (_isHidden) {\n if (!_wasHidden) {\n if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {\n nextEffect = offscreenBoundary;\n var offscreenChild = offscreenBoundary.child;\n while (offscreenChild !== null) {\n nextEffect = offscreenChild;\n disappearLayoutEffects_begin(offscreenChild);\n offscreenChild = offscreenChild.sibling;\n }\n }\n }\n }\n }\n {\n // TODO: This needs to run whenever there's an insertion or update\n // inside a hidden Offscreen tree.\n hideOrUnhideAllChildren(offscreenBoundary, _isHidden);\n }\n }\n return;\n }\n case SuspenseListComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & Update) {\n attachSuspenseRetryListeners(finishedWork);\n }\n return;\n }\n case ScopeComponent:\n {\n return;\n }\n default:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n return;\n }\n }\n }\n function commitReconciliationEffects(finishedWork) {\n // Placement effects (insertions, reorders) can be scheduled on any fiber\n // type. They needs to happen after the children effects have fired, but\n // before the effects on this fiber have fired.\n var flags = finishedWork.flags;\n if (flags & Placement) {\n try {\n commitPlacement(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n } // 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 finishedWork.flags &= ~Placement;\n }\n if (flags & Hydrating) {\n finishedWork.flags &= ~Hydrating;\n }\n }\n function commitLayoutEffects(finishedWork, root, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n nextEffect = finishedWork;\n commitLayoutEffects_begin(finishedWork, root, committedLanes);\n inProgressLanes = null;\n inProgressRoot = null;\n }\n function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {\n // Suspense layout effects semantics don't change for legacy roots.\n var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n if (fiber.tag === OffscreenComponent && isModernRoot) {\n // Keep track of the current Offscreen stack's state.\n var isHidden = fiber.memoizedState !== null;\n var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;\n if (newOffscreenSubtreeIsHidden) {\n // The Offscreen tree is hidden. Skip over its layout effects.\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n continue;\n } else {\n // TODO (Offscreen) Also check: subtreeFlags & LayoutMask\n var current = fiber.alternate;\n var wasHidden = current !== null && current.memoizedState !== null;\n var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root.\n\n offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;\n if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {\n // This is the root of a reappearing boundary. Turn its layout effects\n // back on.\n nextEffect = fiber;\n reappearLayoutEffects_begin(fiber);\n }\n var child = firstChild;\n while (child !== null) {\n nextEffect = child;\n commitLayoutEffects_begin(child,\n // New root; bubble back up to here and stop.\n root, committedLanes);\n child = child.sibling;\n } // Restore Offscreen state and resume in our-progress traversal.\n\n nextEffect = fiber;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n continue;\n }\n }\n if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n }\n }\n }\n function commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n if ((fiber.flags & LayoutMask) !== NoFlags) {\n var current = fiber.alternate;\n setCurrentFiber(fiber);\n try {\n commitLayoutEffectOnFiber(root, current, fiber, committedLanes);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n resetCurrentFiber();\n }\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n var sibling = fiber.sibling;\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n nextEffect = fiber.return;\n }\n }\n function disappearLayoutEffects_begin(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if (fiber.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout, fiber, fiber.return);\n } finally {\n recordLayoutEffectDuration(fiber);\n }\n } else {\n commitHookEffectListUnmount(Layout, fiber, fiber.return);\n }\n break;\n }\n case ClassComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(fiber, fiber.return);\n var instance = fiber.stateNode;\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n }\n break;\n }\n case HostComponent:\n {\n safelyDetachRef(fiber, fiber.return);\n break;\n }\n case OffscreenComponent:\n {\n // Check if this is a\n var isHidden = fiber.memoizedState !== null;\n if (isHidden) {\n // Nested Offscreen tree is already hidden. Don't disappear\n // its effects.\n disappearLayoutEffects_complete(subtreeRoot);\n continue;\n }\n break;\n }\n } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n if (firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n disappearLayoutEffects_complete(subtreeRoot);\n }\n }\n }\n function disappearLayoutEffects_complete(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n var sibling = fiber.sibling;\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n nextEffect = fiber.return;\n }\n }\n function reappearLayoutEffects_begin(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n if (fiber.tag === OffscreenComponent) {\n var isHidden = fiber.memoizedState !== null;\n if (isHidden) {\n // Nested Offscreen tree is still hidden. Don't re-appear its effects.\n reappearLayoutEffects_complete(subtreeRoot);\n continue;\n }\n } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n if (firstChild !== null) {\n // This node may have been reused from a previous render, so we can't\n // assume its return pointer is correct.\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n reappearLayoutEffects_complete(subtreeRoot);\n }\n }\n }\n function reappearLayoutEffects_complete(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic\n\n setCurrentFiber(fiber);\n try {\n reappearLayoutEffectsOnFiber(fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n resetCurrentFiber();\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n var sibling = fiber.sibling;\n if (sibling !== null) {\n // This node may have been reused from a previous render, so we can't\n // assume its return pointer is correct.\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n nextEffect = fiber.return;\n }\n }\n function commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {\n nextEffect = finishedWork;\n commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions);\n }\n function commitPassiveMountEffects_begin(subtreeRoot, root, committedLanes, committedTransitions) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions);\n }\n }\n }\n function commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n if ((fiber.flags & Passive) !== NoFlags) {\n setCurrentFiber(fiber);\n try {\n commitPassiveMountOnFiber(root, fiber, committedLanes, committedTransitions);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n resetCurrentFiber();\n }\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n var sibling = fiber.sibling;\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n nextEffect = fiber.return;\n }\n }\n function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if (finishedWork.mode & ProfileMode) {\n startPassiveEffectTimer();\n try {\n commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n } finally {\n recordPassiveEffectDuration(finishedWork);\n }\n } else {\n commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n }\n break;\n }\n }\n }\n function commitPassiveUnmountEffects(firstChild) {\n nextEffect = firstChild;\n commitPassiveUnmountEffects_begin();\n }\n function commitPassiveUnmountEffects_begin() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var child = fiber.child;\n if ((nextEffect.flags & ChildDeletion) !== NoFlags) {\n var deletions = fiber.deletions;\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var fiberToDelete = deletions[i];\n nextEffect = fiberToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);\n }\n {\n // A fiber was deleted from this parent fiber, but it's still part of\n // the previous (alternate) parent fiber's list of children. Because\n // children are a linked list, an earlier sibling that's still alive\n // will be connected to the deleted fiber via its `alternate`:\n //\n // live fiber\n // --alternate--> previous live fiber\n // --sibling--> deleted fiber\n //\n // We can't disconnect `alternate` on nodes that haven't been deleted\n // yet, but we can disconnect the `sibling` and `child` pointers.\n var previousFiber = fiber.alternate;\n if (previousFiber !== null) {\n var detachedChild = previousFiber.child;\n if (detachedChild !== null) {\n previousFiber.child = null;\n do {\n var detachedSibling = detachedChild.sibling;\n detachedChild.sibling = null;\n detachedChild = detachedSibling;\n } while (detachedChild !== null);\n }\n }\n }\n nextEffect = fiber;\n }\n }\n if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitPassiveUnmountEffects_complete();\n }\n }\n }\n function commitPassiveUnmountEffects_complete() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n if ((fiber.flags & Passive) !== NoFlags) {\n setCurrentFiber(fiber);\n commitPassiveUnmountOnFiber(fiber);\n resetCurrentFiber();\n }\n var sibling = fiber.sibling;\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n nextEffect = fiber.return;\n }\n }\n function commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if (finishedWork.mode & ProfileMode) {\n startPassiveEffectTimer();\n commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n recordPassiveEffectDuration(finishedWork);\n } else {\n commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n }\n break;\n }\n }\n }\n function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {\n while (nextEffect !== null) {\n var fiber = nextEffect; // Deletion effects fire in parent -> child order\n // TODO: Check if fiber has a PassiveStatic flag\n\n setCurrentFiber(fiber);\n commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);\n resetCurrentFiber();\n var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we\n // do this, still need to handle `deletedTreeCleanUpLevel` correctly.)\n\n if (child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);\n }\n }\n }\n function commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var sibling = fiber.sibling;\n var returnFiber = fiber.return;\n {\n // Recursively traverse the entire deleted tree and clean up fiber fields.\n // This is more aggressive than ideal, and the long term goal is to only\n // have to detach the deleted tree at the root.\n detachFiberAfterEffects(fiber);\n if (fiber === deletedSubtreeRoot) {\n nextEffect = null;\n return;\n }\n }\n if (sibling !== null) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n return;\n }\n nextEffect = returnFiber;\n }\n }\n function commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if (current.mode & ProfileMode) {\n startPassiveEffectTimer();\n commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n recordPassiveEffectDuration(current);\n } else {\n commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n }\n break;\n }\n }\n } // TODO: Reuse reappearLayoutEffects traversal here?\n\n function invokeLayoutEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Layout | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n break;\n }\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n break;\n }\n }\n }\n }\n function invokePassiveEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Passive$1 | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n break;\n }\n }\n }\n }\n function invokeLayoutEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n break;\n }\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n }\n break;\n }\n }\n }\n }\n function invokePassiveEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n }\n }\n }\n }\n var COMPONENT_TYPE = 0;\n var HAS_PSEUDO_CLASS_TYPE = 1;\n var ROLE_TYPE = 2;\n var TEST_NAME_TYPE = 3;\n var TEXT_TYPE = 4;\n if (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n COMPONENT_TYPE = symbolFor('selector.component');\n HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class');\n ROLE_TYPE = symbolFor('selector.role');\n TEST_NAME_TYPE = symbolFor('selector.test_id');\n TEXT_TYPE = symbolFor('selector.text');\n }\n var commitHooks = [];\n function onCommitRoot$1() {\n {\n commitHooks.forEach(function (commitHook) {\n return commitHook();\n });\n }\n }\n var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;\n function isLegacyActEnvironment(fiber) {\n {\n // Legacy mode. We preserve the behavior of React 17's act. It assumes an\n // act environment whenever `jest` is defined, but you can still turn off\n // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly\n // to false.\n var isReactActEnvironmentGlobal =\n // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowExpectedError - Flow doesn't know about jest\n\n var jestIsDefined = typeof jest !== 'undefined';\n return jestIsDefined && isReactActEnvironmentGlobal !== false;\n }\n }\n function isConcurrentActEnvironment() {\n {\n var isReactActEnvironmentGlobal =\n // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined;\n if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) {\n // TODO: Include link to relevant documentation page.\n error('The current testing environment is not configured to support ' + 'act(...)');\n }\n return isReactActEnvironmentGlobal;\n }\n }\n var ceil = Math.ceil;\n var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig,\n ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;\n var NoContext = /* */\n 0;\n var BatchedContext = /* */\n 1;\n var RenderContext = /* */\n 2;\n var CommitContext = /* */\n 4;\n var RootInProgress = 0;\n var RootFatalErrored = 1;\n var RootErrored = 2;\n var RootSuspended = 3;\n var RootSuspendedWithDelay = 4;\n var RootCompleted = 5;\n var RootDidNotComplete = 6; // 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 lanes we're rendering\n\n var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree\n // This is a superset of the lanes we started working on at the root. The only\n // case where it's different from `workInProgressRootRenderLanes` is when we\n // enter a subtree that is hidden and needs to be unhidden: Suspense and\n // Offscreen component.\n //\n // Most things in the work loop should deal with workInProgressRootRenderLanes.\n // Most things in begin/complete phases should deal with subtreeRenderLanes.\n\n var subtreeRenderLanes = NoLanes;\n var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.\n\n var workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown\n\n var workInProgressRootFatalError = null; // \"Included\" lanes refer to lanes that were worked on during this render. It's\n // slightly different than `renderLanes` because `renderLanes` can change as you\n // enter and exit an Offscreen tree. This value is the combination of all render\n // lanes for the entire render phase.\n\n var workInProgressRootIncludedLanes = NoLanes; // 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 workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\n var workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).\n\n var workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase.\n\n var workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.\n // We will log them once the tree commits.\n\n var workInProgressRootRecoverableErrors = null; // 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; // The absolute time for when we should start giving up on rendering\n // more and prefer CPU suspense heuristics instead.\n\n var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n // suspense heuristics and opt out of rendering more content.\n\n var RENDER_TIMEOUT_MS = 500;\n var workInProgressTransitions = null;\n function resetRenderTimer() {\n workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;\n }\n function getRenderTargetTime() {\n return workInProgressRootRenderTargetTime;\n }\n var hasUncaughtError = false;\n var firstUncaughtError = null;\n var legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;\n var rootDoesHavePassiveEffects = false;\n var rootWithPendingPassiveEffects = null;\n var pendingPassiveEffectsLanes = NoLanes;\n var pendingPassiveProfilerEffects = [];\n var pendingPassiveTransitions = 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 isFlushingPassiveEffects = false;\n var didScheduleUpdateDuringPassiveEffects = false;\n var NESTED_PASSIVE_UPDATE_LIMIT = 50;\n var nestedPassiveUpdateCount = 0;\n var rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their\n // event times as simultaneous, even if the actual clock time has advanced\n // between the first and second call.\n\n var currentEventTime = NoTimestamp;\n var currentEventTransitionLane = NoLanes;\n var isRunningInsertionEffect = false;\n function getWorkInProgressRoot() {\n return workInProgressRoot;\n }\n function requestEventTime() {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // We're inside React, so it's fine to read the actual time.\n return now();\n } // We're not inside React, so we may be in the middle of a browser event.\n\n if (currentEventTime !== NoTimestamp) {\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 currentEventTime = now();\n return currentEventTime;\n }\n function requestUpdateLane(fiber) {\n // Special cases\n var mode = fiber.mode;\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n } else if ((executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {\n // This is a render phase update. These are not officially supported. The\n // old behavior is to give this the same \"thread\" (lanes) as\n // whatever is currently rendering. So if you call `setState` on a component\n // that happens later in the same render, it will flush. Ideally, we want to\n // remove the special case and treat them as if they came from an\n // interleaved event. Regardless, this pattern is not officially supported.\n // This behavior is only a fallback. The flag only exists until we can roll\n // out the setState warning, since existing code might accidentally rely on\n // the current behavior.\n return pickArbitraryLane(workInProgressRootRenderLanes);\n }\n var isTransition = requestCurrentTransition() !== NoTransition;\n if (isTransition) {\n if (ReactCurrentBatchConfig$3.transition !== null) {\n var transition = ReactCurrentBatchConfig$3.transition;\n if (!transition._updatedFibers) {\n transition._updatedFibers = new Set();\n }\n transition._updatedFibers.add(fiber);\n } // The algorithm for assigning an update to a lane should be stable for all\n // updates at the same priority within the same event. To do this, the\n // inputs to the algorithm must be the same.\n //\n // The trick we use is to cache the first of each of these inputs within an\n // event. Then reset the cached values once we can be sure the event is\n // over. Our heuristic for that is whenever we enter a concurrent work loop.\n\n if (currentEventTransitionLane === NoLane) {\n // All transitions within the same event are assigned the same lane.\n currentEventTransitionLane = claimNextTransitionLane();\n }\n return currentEventTransitionLane;\n } // Updates originating inside certain React methods, like flushSync, have\n // their priority set by tracking it with a context variable.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n var updateLane = getCurrentUpdatePriority();\n if (updateLane !== NoLane) {\n return updateLane;\n } // This update originated outside React. Ask the host environment for an\n // appropriate priority, based on the type of event.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n var eventLane = getCurrentEventPriority();\n return eventLane;\n }\n function requestRetryLane(fiber) {\n // This is a fork of `requestUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n // Special cases\n var mode = fiber.mode;\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n }\n return claimNextRetryLane();\n }\n function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {\n checkForNestedUpdates();\n {\n if (isRunningInsertionEffect) {\n error('useInsertionEffect must not schedule updates.');\n }\n }\n {\n if (isFlushingPassiveEffects) {\n didScheduleUpdateDuringPassiveEffects = true;\n }\n } // Mark that the root has a pending update.\n\n markRootUpdated(root, lane, eventTime);\n if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {\n // This update was dispatched during the render phase. This is a mistake\n // if the update originates from user space (with the exception of local\n // hook updates, which are handled differently and don't reach this\n // function), but there are some internal React features that use this as\n // an implementation detail, like selective hydration.\n warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase\n } else {\n // This is a normal update, scheduled from outside the render phase. For\n // example, during an input event.\n {\n if (isDevToolsPresent) {\n addFiberToLanesMap(root, fiber, lane);\n }\n }\n warnIfUpdatesNotWrappedWithActDEV(fiber);\n if (root === workInProgressRoot) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that there was an interleaved update work on this root. Unless the\n // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render\n // phase update. In that case, we don't treat render phase updates as if\n // they were interleaved, for backwards compat reasons.\n if ((executionContext & RenderContext) === NoContext) {\n workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);\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: Make sure this doesn't override pings that happen while we've\n // already started rendering.\n markRootSuspended$1(root, workInProgressRootRenderLanes);\n }\n }\n ensureRootIsScheduled(root, eventTime);\n if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode &&\n // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n !ReactCurrentActQueue$1.isBatchingLegacy) {\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 resetRenderTimer();\n flushSyncCallbacksOnlyInLegacyMode();\n }\n }\n }\n function scheduleInitialHydrationOnRoot(root, lane, eventTime) {\n // This is a special fork of scheduleUpdateOnFiber that is only used to\n // schedule the initial hydration of a root that has just been created. Most\n // of the stuff in scheduleUpdateOnFiber can be skipped.\n //\n // The main reason for this separate path, though, is to distinguish the\n // initial children from subsequent updates. In fully client-rendered roots\n // (createRoot instead of hydrateRoot), all top-level renders are modeled as\n // updates, but hydration roots are special because the initial render must\n // match what was rendered on the server.\n var current = root.current;\n current.lanes = lane;\n markRootUpdated(root, lane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n function isUnsafeClassRenderPhaseUpdate(fiber) {\n // Check if this is a render phase update. Only called by class components,\n // which special (deprecated) behavior for UNSAFE_componentWillReceive props.\n return (\n // TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We\n // decided not to enable it.\n (executionContext & RenderContext) !== NoContext\n );\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 priority\n // of the existing task is the same as the priority of the next level that the\n // root has work on. This function is called on every update, and right before\n // exiting a task.\n\n function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback$1(existingCallbackNode);\n }\n root.callbackNode = null;\n root.callbackPriority = NoLane;\n return;\n } // We use the highest priority lane to represent the priority of the callback.\n\n var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it.\n\n var existingCallbackPriority = root.callbackPriority;\n if (existingCallbackPriority === newCallbackPriority &&\n // Special case related to `act`. If the currently scheduled task is a\n // Scheduler task, rather than an `act` task, cancel it and re-scheduled\n // on the `act` queue.\n !(ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) {\n {\n // If we're going to re-use an existing task, it needs to exist.\n // Assume that discrete update microtasks are non-cancellable and null.\n // TODO: Temporary until we confirm this warning is not fired.\n if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) {\n error('Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.');\n }\n } // The priority hasn't changed. We can reuse the existing task. Exit.\n\n return;\n }\n if (existingCallbackNode != null) {\n // Cancel the existing callback. We'll schedule a new one below.\n cancelCallback$1(existingCallbackNode);\n } // Schedule a new callback.\n\n var newCallbackNode;\n if (newCallbackPriority === SyncLane) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n if (root.tag === LegacyRoot) {\n if (ReactCurrentActQueue$1.isBatchingLegacy !== null) {\n ReactCurrentActQueue$1.didScheduleLegacyUpdate = true;\n }\n scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n }\n {\n // Flush the queue in a microtask.\n if (ReactCurrentActQueue$1.current !== null) {\n // Inside `act`, use our internal `act` queue so that these get flushed\n // at the end of the current scope even when using the sync version\n // of `act`.\n ReactCurrentActQueue$1.current.push(flushSyncCallbacks);\n } else {\n scheduleMicrotask(function () {\n // In Safari, appending an iframe forces microtasks to run.\n // https://github.com/facebook/react/issues/22459\n // We don't support running callbacks in the middle of render\n // or commit so we need to check against that.\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n // Note that this would still prematurely flush the callbacks\n // if this happens outside render or commit phase (e.g. in an event).\n flushSyncCallbacks();\n }\n });\n }\n }\n newCallbackNode = null;\n } else {\n var schedulerPriorityLevel;\n switch (lanesToEventPriority(nextLanes)) {\n case DiscreteEventPriority:\n schedulerPriorityLevel = ImmediatePriority;\n break;\n case ContinuousEventPriority:\n schedulerPriorityLevel = UserBlockingPriority;\n break;\n case DefaultEventPriority:\n schedulerPriorityLevel = NormalPriority;\n break;\n case IdleEventPriority:\n schedulerPriorityLevel = IdlePriority;\n break;\n default:\n schedulerPriorityLevel = NormalPriority;\n break;\n }\n newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that\n // goes through Scheduler.\n\n function performConcurrentWorkOnRoot(root, didTimeout) {\n {\n resetNestedUpdateFlag();\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\n currentEventTime = NoTimestamp;\n currentEventTransitionLane = NoLanes;\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n } // Flush any pending passive effects before deciding which lanes to work on,\n // in case they schedule additional work.\n\n var originalCallbackNode = root.callbackNode;\n var didFlushPassiveEffects = flushPassiveEffects();\n if (didFlushPassiveEffects) {\n // Something in the passive effect phase may have canceled the current task.\n // Check if the task node for this root was changed.\n if (root.callbackNode !== originalCallbackNode) {\n // The current task was canceled. Exit. We don't need to call\n // `ensureRootIsScheduled` because the check above implies either that\n // there's a new task, or that there's no remaining work on this root.\n return null;\n }\n } // Determine the next lanes to work on, using the fields stored\n // on the root.\n\n var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n if (lanes === NoLanes) {\n // Defensive coding. This is never expected to happen.\n return null;\n } // We disable time-slicing in some cases: if the work has been CPU-bound\n // for too long (\"expired\" work, to prevent starvation), or we're in\n // sync-updates-by-default mode.\n // TODO: We only check `didTimeout` defensively, to account for a Scheduler\n // bug we're still investigating. Once the bug in Scheduler is fixed,\n // we can remove this, since we track expiration ourselves.\n\n var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && !didTimeout;\n var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);\n if (exitStatus !== RootInProgress) {\n if (exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll\n // render synchronously to block concurrent data mutations, and we'll\n // includes all pending updates are included. If it still fails after\n // the second attempt, we'll give up and commit the resulting tree.\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n }\n }\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n }\n if (exitStatus === RootDidNotComplete) {\n // The render unwound without completing the tree. This happens in special\n // cases where need to exit the current render without producing a\n // consistent tree or committing.\n //\n // This should only happen during a concurrent render, not a discrete or\n // synchronous update. We should have already checked for this when we\n // unwound the stack.\n markRootSuspended$1(root, lanes);\n } else {\n // The render completed.\n // Check if this render may have yielded to a concurrent event, and if so,\n // confirm that any newly rendered stores are consistent.\n // TODO: It's possible that even a concurrent render may never have yielded\n // to the main thread, if it was fast enough, or if it expired. We could\n // skip the consistency check in that case, too.\n var renderWasConcurrent = !includesBlockingLane(root, lanes);\n var finishedWork = root.current.alternate;\n if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {\n // A store was mutated in an interleaved event. Render again,\n // synchronously, to block further mutations.\n exitStatus = renderRootSync(root, lanes); // We need to check again if something threw\n\n if (exitStatus === RootErrored) {\n var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n if (_errorRetryLanes !== NoLanes) {\n lanes = _errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any\n // concurrent events.\n }\n }\n if (exitStatus === RootFatalErrored) {\n var _fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw _fatalError;\n }\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\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n finishConcurrentRender(root, exitStatus, lanes);\n }\n }\n ensureRootIsScheduled(root, now());\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 return null;\n }\n function recoverFromConcurrentError(root, errorRetryLanes) {\n // If an error occurred during hydration, discard server response and fall\n // back to client side render.\n // Before rendering again, save the errors from the previous attempt.\n var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;\n if (isRootDehydrated(root)) {\n // The shell failed to hydrate. Set a flag to force a client rendering\n // during the next attempt. To do this, we call prepareFreshStack now\n // to create the root work-in-progress fiber. This is a bit weird in terms\n // of factoring, because it relies on renderRootSync not calling\n // prepareFreshStack again in the call below, which happens because the\n // root and lanes haven't changed.\n //\n // TODO: I think what we should do is set ForceClientRender inside\n // throwException, like we do for nested Suspense boundaries. The reason\n // it's here instead is so we can switch to the synchronous work loop, too.\n // Something to consider for a future refactor.\n var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);\n rootWorkInProgress.flags |= ForceClientRender;\n {\n errorHydratingContainer(root.containerInfo);\n }\n }\n var exitStatus = renderRootSync(root, errorRetryLanes);\n if (exitStatus !== RootErrored) {\n // Successfully finished rendering on retry\n // The errors from the failed first attempt have been recovered. Add\n // them to the collection of recoverable errors. We'll log them in the\n // commit phase.\n var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors\n // from the first attempt, to preserve the causal sequence.\n\n if (errorsFromSecondAttempt !== null) {\n queueRecoverableErrors(errorsFromSecondAttempt);\n }\n }\n return exitStatus;\n }\n function queueRecoverableErrors(errors) {\n if (workInProgressRootRecoverableErrors === null) {\n workInProgressRootRecoverableErrors = errors;\n } else {\n workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);\n }\n }\n function finishConcurrentRender(root, exitStatus, lanes) {\n switch (exitStatus) {\n case RootInProgress:\n case RootFatalErrored:\n {\n throw new Error('Root did not complete. This is a bug in React.');\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 // We should have already attempted to retry this tree. If we reached\n // this point, it errored again. Commit it.\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n case RootSuspended:\n {\n markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we\n // should immediately commit it or wait a bit.\n\n if (includesOnlyRetries(lanes) &&\n // do not delay if we're inside an act() scope\n !shouldForceFlushFallbacksInDEV()) {\n // This render only included retries, no updates. Throttle committing\n // retries so that we don't show too many 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 var nextLanes = getNextLanes(root, NoLanes);\n if (nextLanes !== NoLanes) {\n // There's additional work on this root.\n break;\n }\n var suspendedLanes = root.suspendedLanes;\n if (!isSubsetOfLanes(suspendedLanes, lanes)) {\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 // FIXME: What if the suspended lanes are Idle? Should not restart.\n var eventTime = requestEventTime();\n markRootPinged(root, suspendedLanes);\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 root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n case RootSuspendedWithDelay:\n {\n markRootSuspended$1(root, lanes);\n if (includesOnlyTransitions(lanes)) {\n // This is a transition, so we should exit without committing a\n // placeholder and without scheduling a timeout. Delay indefinitely\n // until we receive more data.\n break;\n }\n if (!shouldForceFlushFallbacksInDEV()) {\n // This is not a transition, but we did trigger an avoided state.\n // Schedule a placeholder to display after a short delay, using the Just\n // Noticeable Difference.\n // TODO: Is the JND optimization worth the added complexity? If this is\n // the only reason we track the event time, then probably not.\n // Consider removing.\n var mostRecentEventTime = getMostRecentEventTime(root, lanes);\n var eventTimeMs = mostRecentEventTime;\n var timeElapsedMs = now() - eventTimeMs;\n var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.\n\n if (_msUntilTimeout > 10) {\n // Instead of committing the fallback immediately, wait for more data\n // to arrive.\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);\n break;\n }\n } // Commit the placeholder.\n\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n case RootCompleted:\n {\n // The work completed. Ready to commit.\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n default:\n {\n throw new Error('Unknown root exit status.');\n }\n }\n }\n function isRenderConsistentWithExternalStores(finishedWork) {\n // Search the rendered tree for external store reads, and check whether the\n // stores were mutated in a concurrent event. Intentionally using an iterative\n // loop instead of recursion so we can exit early.\n var node = finishedWork;\n while (true) {\n if (node.flags & StoreConsistency) {\n var updateQueue = node.updateQueue;\n if (updateQueue !== null) {\n var checks = updateQueue.stores;\n if (checks !== null) {\n for (var i = 0; i < checks.length; i++) {\n var check = checks[i];\n var getSnapshot = check.getSnapshot;\n var renderedValue = check.value;\n try {\n if (!objectIs(getSnapshot(), renderedValue)) {\n // Found an inconsistent store.\n return false;\n }\n } catch (error) {\n // If `getSnapshot` throws, return `false`. This will schedule\n // a re-render, and the error will be rethrown during render.\n return false;\n }\n }\n }\n }\n }\n var child = node.child;\n if (node.subtreeFlags & StoreConsistency && child !== null) {\n child.return = node;\n node = child;\n continue;\n }\n if (node === finishedWork) {\n return true;\n }\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return true;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow doesn't know this is unreachable, but eslint does\n // eslint-disable-next-line no-unreachable\n\n return true;\n }\n function markRootSuspended$1(root, suspendedLanes) {\n // When suspending, we should always exclude lanes that were pinged or (more\n // rarely, since we try to avoid it) updated during the render phase.\n // TODO: Lol maybe there's a better way to factor this besides this\n // obnoxiously named function :)\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);\n markRootSuspended(root, suspendedLanes);\n } // This is the entry point for synchronous tasks that don't go\n // through Scheduler\n\n function performSyncWorkOnRoot(root) {\n {\n syncNestedUpdateFlag();\n }\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n flushPassiveEffects();\n var lanes = getNextLanes(root, NoLanes);\n if (!includesSomeLane(lanes, SyncLane)) {\n // There's no remaining sync work left.\n ensureRootIsScheduled(root, now());\n return null;\n }\n var exitStatus = renderRootSync(root, lanes);\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n }\n }\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n }\n if (exitStatus === RootDidNotComplete) {\n throw new Error('Root did not complete. This is a bug in React.');\n } // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n ensureRootIsScheduled(root, now());\n return null;\n }\n function flushRoot(root, lanes) {\n if (lanes !== NoLanes) {\n markRootEntangled(root, mergeLanes(lanes, SyncLane));\n ensureRootIsScheduled(root, now());\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n resetRenderTimer();\n flushSyncCallbacks();\n }\n }\n }\n function batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer\n // most batchedUpdates-like method.\n\n if (executionContext === NoContext &&\n // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n !ReactCurrentActQueue$1.isBatchingLegacy) {\n resetRenderTimer();\n flushSyncCallbacksOnlyInLegacyMode();\n }\n }\n }\n function discreteUpdates(fn, a, b, c, d) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n return fn(a, b, c, d);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\n if (executionContext === NoContext) {\n resetRenderTimer();\n }\n }\n } // Overload the definition to the two valid signatures.\n // Warning, this opts-out of checking the function body.\n\n // eslint-disable-next-line no-redeclare\n function flushSync(fn) {\n // In legacy mode, we flush pending passive effects at the beginning of the\n // next event, not at the end of the previous one.\n if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushPassiveEffects();\n }\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n var previousPriority = getCurrentUpdatePriority();\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n if (fn) {\n return fn();\n } else {\n return undefined;\n }\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\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 if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushSyncCallbacks();\n }\n }\n }\n function isAlreadyRendering() {\n // Used by the renderer to print a warning if certain APIs are called from\n // the wrong context.\n return (executionContext & (RenderContext | CommitContext)) !== NoContext;\n }\n function pushRenderLanes(fiber, lanes) {\n push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);\n subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);\n workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);\n }\n function popRenderLanes(fiber) {\n subtreeRenderLanes = subtreeRenderLanesCursor.current;\n pop(subtreeRenderLanesCursor, fiber);\n }\n function prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n var timeoutHandle = root.timeoutHandle;\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 if (workInProgress !== null) {\n var interruptedWork = workInProgress.return;\n while (interruptedWork !== null) {\n var current = interruptedWork.alternate;\n unwindInterruptedWork(current, interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n }\n workInProgressRoot = root;\n var rootWorkInProgress = createWorkInProgress(root.current, null);\n workInProgress = rootWorkInProgress;\n workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;\n workInProgressRootExitStatus = RootInProgress;\n workInProgressRootFatalError = null;\n workInProgressRootSkippedLanes = NoLanes;\n workInProgressRootInterleavedUpdatedLanes = NoLanes;\n workInProgressRootPingedLanes = NoLanes;\n workInProgressRootConcurrentErrors = null;\n workInProgressRootRecoverableErrors = null;\n finishQueueingConcurrentUpdates();\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n return rootWorkInProgress;\n }\n function handleError(root, thrownValue) {\n do {\n var erroredWork = workInProgress;\n try {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksAfterThrow();\n resetCurrentFiber(); // TODO: I found and added this missing line while investigating a\n // separate issue. Write a regression test using string refs.\n\n ReactCurrentOwner$2.current = null;\n if (erroredWork === null || erroredWork.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 // intentionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return;\n }\n if (enableProfilerTimer && erroredWork.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(erroredWork, true);\n }\n if (enableSchedulingProfiler) {\n markComponentRenderStopped();\n if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {\n var wakeable = thrownValue;\n markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);\n } else {\n markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);\n }\n }\n throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);\n completeUnitOfWork(erroredWork);\n } catch (yetAnotherThrownValue) {\n // Something in the return path also threw.\n thrownValue = yetAnotherThrownValue;\n if (workInProgress === erroredWork && erroredWork !== null) {\n // If this boundary has already errored, then we had trouble processing\n // the error. Bubble it to the next boundary.\n erroredWork = erroredWork.return;\n workInProgress = erroredWork;\n } else {\n erroredWork = workInProgress;\n }\n continue;\n } // Return to the normal work loop.\n\n return;\n } while (true);\n }\n function pushDispatcher() {\n var prevDispatcher = ReactCurrentDispatcher$2.current;\n ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;\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 function popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher$2.current = prevDispatcher;\n }\n function markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now();\n }\n function markSkippedUpdateLanes(lane) {\n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n }\n function renderDidSuspend() {\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootSuspended;\n }\n }\n function renderDidSuspendDelayIfPossible() {\n if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) {\n workInProgressRootExitStatus = RootSuspendedWithDelay;\n } // Check if there are updates that we skipped tree that might have unblocked\n // this render.\n\n if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {\n // Mark the current render as suspended so that we switch to working on\n // the updates that were skipped. Usually we only suspend at the end of\n // the render phase.\n // TODO: We should probably always mark the root as suspended immediately\n // (inside this function), since by suspending at the end of the render\n // phase introduces a potential mistake where we suspend lanes that were\n // pinged or updated while we were rendering.\n markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);\n }\n }\n function renderDidError(error) {\n if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {\n workInProgressRootExitStatus = RootErrored;\n }\n if (workInProgressRootConcurrentErrors === null) {\n workInProgressRootConcurrentErrors = [error];\n } else {\n workInProgressRootConcurrentErrors.push(error);\n }\n } // Called during render to determine if anything has suspended.\n // Returns false if we're not sure.\n\n function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootInProgress;\n }\n function renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n workInProgressTransitions = getTransitionsForLanes();\n prepareFreshStack(root, lanes);\n }\n {\n markRenderStarted(lanes);\n }\n do {\n try {\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n resetContextDependencies();\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');\n }\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes;\n return workInProgressRootExitStatus;\n } // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n /** @noinline */\n\n function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n }\n function renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n workInProgressTransitions = getTransitionsForLanes();\n resetRenderTimer();\n prepareFreshStack(root, lanes);\n }\n {\n markRenderStarted(lanes);\n }\n do {\n try {\n workLoopConcurrent();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n resetContextDependencies();\n popDispatcher(prevDispatcher);\n executionContext = prevExecutionContext;\n if (workInProgress !== null) {\n // Still work remaining.\n {\n markRenderYielded();\n }\n return RootInProgress;\n } else {\n // Completed the tree.\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // Return the final exit status.\n\n return workInProgressRootExitStatus;\n }\n }\n /** @noinline */\n\n function workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n performUnitOfWork(workInProgress);\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 setCurrentFiber(unitOfWork);\n var next;\n if ((unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n }\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n ReactCurrentOwner$2.current = null;\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 var completedWork = unitOfWork;\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 = completedWork.alternate;\n var returnFiber = completedWork.return; // Check if the work completed or if something threw.\n\n if ((completedWork.flags & Incomplete) === NoFlags) {\n setCurrentFiber(completedWork);\n var next = void 0;\n if ((completedWork.mode & ProfileMode) === NoMode) {\n next = completeWork(current, completedWork, subtreeRenderLanes);\n } else {\n startProfilerTimer(completedWork);\n next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n }\n resetCurrentFiber();\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n workInProgress = next;\n return;\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(current, completedWork); // Because this fiber did not complete, don't reset its lanes.\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 _next.flags &= HostEffectMask;\n workInProgress = _next;\n return;\n }\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = completedWork.actualDuration;\n var child = completedWork.child;\n while (child !== null) {\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n completedWork.actualDuration = actualDuration;\n }\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its subtree flags.\n returnFiber.flags |= Incomplete;\n returnFiber.subtreeFlags = NoFlags;\n returnFiber.deletions = null;\n } else {\n // We've unwound all the way to the root.\n workInProgressRootExitStatus = RootDidNotComplete;\n workInProgress = null;\n return;\n }\n }\n var siblingFiber = completedWork.sibling;\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n workInProgress = siblingFiber;\n return;\n } // Otherwise, return to the parent\n\n completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = completedWork;\n } while (completedWork !== null); // We've reached the root.\n\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootCompleted;\n }\n }\n function commitRoot(root, recoverableErrors, transitions) {\n // TODO: This no longer makes any sense. We already wrap the mutation and\n // layout phases. Should be able to remove.\n var previousUpdateLanePriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority);\n } finally {\n ReactCurrentBatchConfig$3.transition = prevTransition;\n setCurrentUpdatePriority(previousUpdateLanePriority);\n }\n return null;\n }\n function commitRootImpl(root, recoverableErrors, transitions, 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 flushRenderPhaseStrictModeWarningsInDEV();\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n var finishedWork = root.finishedWork;\n var lanes = root.finishedLanes;\n {\n markCommitStarted(lanes);\n }\n if (finishedWork === null) {\n {\n markCommitStopped();\n }\n return null;\n } else {\n {\n if (lanes === NoLanes) {\n error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');\n }\n }\n }\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n if (finishedWork === root.current) {\n throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');\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 root.callbackNode = null;\n root.callbackPriority = NoLane; // 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 remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);\n markRootFinished(root, remainingLanes);\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n workInProgressRootRenderLanes = NoLanes;\n } // If there are pending passive effects, schedule a callback to process them.\n // Do this as early as possible, so it is queued before anything else that\n // might get scheduled in the commit phase. (See #16714.)\n // TODO: Delete all other places that schedule the passive effect callback\n // They're redundant.\n\n if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) {\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n // to store it in pendingPassiveTransitions until they get processed\n // We need to pass this through as an argument to commitRoot\n // because workInProgressTransitions might have changed between\n // the previous render and commit if we throttle the commit\n // with setTimeout\n\n pendingPassiveTransitions = transitions;\n scheduleCallback$1(NormalPriority, function () {\n flushPassiveEffects(); // This render triggered passive effects: release the root cache pool\n // *after* passive effects fire to avoid freeing a cache pool that may\n // be referenced by a node in the tree (HostRoot, Cache boundary etc)\n\n return null;\n });\n }\n } // Check if there are any effects in the whole tree.\n // TODO: This is left over from the effect list implementation, where we had\n // to check for the existence of `firstEffect` to satisfy Flow. I think the\n // only other reason this optimization exists is because it affects profiling.\n // Reconsider whether this is necessary.\n\n var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n if (subtreeHasEffects || rootHasEffect) {\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n ReactCurrentBatchConfig$3.transition = null;\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(DiscreteEventPriority);\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext; // 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 var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(root, finishedWork);\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 }\n commitMutationEffects(root, finishedWork, lanes);\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\n {\n markLayoutEffectsStarted(lanes);\n }\n commitLayoutEffects(finishedWork, root, lanes);\n {\n markLayoutEffectsStopped();\n }\n // opportunity to paint.\n\n requestPaint();\n executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.\n\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\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 {\n recordCommitTime();\n }\n }\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\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 pendingPassiveEffectsLanes = lanes;\n } else {\n {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\n }\n } // Read this again, since an effect might have updated it\n\n remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n // TODO: This is part of the `componentDidCatch` implementation. Its purpose\n // is to detect whether something might have called setState inside\n // `componentDidCatch`. The mechanism is known to be flawed because `setState`\n // inside `componentDidCatch` is itself flawed — that's why we recommend\n // `getDerivedStateFromError` instead. However, it could be improved by\n // checking if remainingLanes includes Sync work, instead of whether there's\n // any work remaining at all (which would also include stuff like Suspense\n // retries or transitions). It's been like this for a while, though, so fixing\n // it probably isn't that urgent.\n\n if (remainingLanes === NoLanes) {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n {\n if (!rootDidHavePassiveEffects) {\n commitDoubleInvokeEffectsInDEV(root.current, false);\n }\n }\n onCommitRoot(finishedWork.stateNode, renderPriorityLevel);\n {\n if (isDevToolsPresent) {\n root.memoizedUpdaters.clear();\n }\n }\n {\n onCommitRoot$1();\n } // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n ensureRootIsScheduled(root, now());\n if (recoverableErrors !== null) {\n // There were errors during this render, but recovered from them without\n // needing to surface it to the UI. We log them here.\n var onRecoverableError = root.onRecoverableError;\n for (var i = 0; i < recoverableErrors.length; i++) {\n var recoverableError = recoverableErrors[i];\n var componentStack = recoverableError.stack;\n var digest = recoverableError.digest;\n onRecoverableError(recoverableError.value, {\n componentStack: componentStack,\n digest: digest\n });\n }\n }\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var error$1 = firstUncaughtError;\n firstUncaughtError = null;\n throw error$1;\n } // If the passive effects are the result of a discrete render, flush them\n // synchronously at the end of the current task so that the result is\n // immediately observable. Otherwise, we assume that they are not\n // order-dependent and do not need to be observed by external systems, so we\n // can wait until after paint.\n // TODO: We can optimize this by not scheduling the callback earlier. Since we\n // currently schedule the callback in multiple places, will wait until those\n // are consolidated.\n\n if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root.tag !== LegacyRoot) {\n flushPassiveEffects();\n } // Read this again, since a passive effect might have updated it\n\n remainingLanes = root.pendingLanes;\n if (includesSomeLane(remainingLanes, SyncLane)) {\n {\n markNestedUpdateScheduled();\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\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n } // If layout work was scheduled, flush it now.\n\n flushSyncCallbacks();\n {\n markCommitStopped();\n }\n return null;\n }\n function flushPassiveEffects() {\n // Returns whether passive effects were flushed.\n // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should\n // probably just combine the two functions. I believe they were only separate\n // in the first place because we used to wrap it with\n // `Scheduler.runWithPriority`, which accepts a function. But now we track the\n // priority within React itself, so we can mutate the variable directly.\n if (rootWithPendingPassiveEffects !== null) {\n var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);\n var priority = lowerEventPriority(DefaultEventPriority, renderPriority);\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n var previousPriority = getCurrentUpdatePriority();\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(priority);\n return flushPassiveEffectsImpl();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition; // Once passive effects have run for the tree - giving components a\n }\n }\n return false;\n }\n function enqueuePendingPassiveProfilerEffect(fiber) {\n {\n pendingPassiveProfilerEffects.push(fiber);\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback$1(NormalPriority, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n }\n function flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n } // Cache and clear the transitions flag\n\n var transitions = pendingPassiveTransitions;\n pendingPassiveTransitions = null;\n var root = rootWithPendingPassiveEffects;\n var lanes = pendingPassiveEffectsLanes;\n rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.\n // Figure out why and fix it. It's not causing any known issues (probably\n // because it's only used for profiling), but it's a refactor hazard.\n\n pendingPassiveEffectsLanes = NoLanes;\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Cannot flush passive effects while already rendering.');\n }\n {\n isFlushingPassiveEffects = true;\n didScheduleUpdateDuringPassiveEffects = false;\n }\n {\n markPassiveEffectsStarted(lanes);\n }\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n commitPassiveUnmountEffects(root.current);\n commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects\n\n {\n var profilerEffects = pendingPassiveProfilerEffects;\n pendingPassiveProfilerEffects = [];\n for (var i = 0; i < profilerEffects.length; i++) {\n var _fiber = profilerEffects[i];\n commitPassiveEffectDurations(root, _fiber);\n }\n }\n {\n markPassiveEffectsStopped();\n }\n {\n commitDoubleInvokeEffectsInDEV(root.current, true);\n }\n executionContext = prevExecutionContext;\n flushSyncCallbacks();\n {\n // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n if (didScheduleUpdateDuringPassiveEffects) {\n if (root === rootWithPassiveNestedUpdates) {\n nestedPassiveUpdateCount++;\n } else {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = root;\n }\n } else {\n nestedPassiveUpdateCount = 0;\n }\n isFlushingPassiveEffects = false;\n didScheduleUpdateDuringPassiveEffects = false;\n } // TODO: Move to commitPassiveMountEffects\n\n onPostCommitRoot(root);\n {\n var stateNode = root.current.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n return true;\n }\n function isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n }\n function markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n }\n function prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n }\n var onUncaughtError = prepareToThrowUncaughtError;\n function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValueAtFiber(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n var root = enqueueUpdate(rootFiber, update, SyncLane);\n var eventTime = requestEventTime();\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n }\n function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {\n {\n reportUncaughtErrorInDEV(error$1);\n setIsRunningInsertionEffect(false);\n }\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$1);\n return;\n }\n var fiber = null;\n {\n fiber = nearestMountedAncestor;\n }\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n var root = enqueueUpdate(fiber, update, SyncLane);\n var eventTime = requestEventTime();\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n return;\n }\n }\n fiber = fiber.return;\n }\n {\n // TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning\n // will fire for errors that are thrown by destroy functions inside deleted\n // trees. What it should instead do is propagate the error to the parent of\n // the deleted tree. In the meantime, do not add this warning to the\n // allowlist; this is only for our internal use.\n error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Likely ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\\n\\n' + 'Error message:\\n\\n%s', error$1);\n }\n }\n function pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n if (pingCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(wakeable);\n }\n var eventTime = requestEventTime();\n markRootPinged(root, pingedLanes);\n warnIfSuspenseResolutionNotWrappedWithActDEV(root);\n if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\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, or if it's a retry, we'll always suspend\n // so we can always restart.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Restart from the root.\n prepareFreshStack(root, NoLanes);\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 workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n }\n }\n ensureRootIsScheduled(root, eventTime);\n }\n function retryTimedOutBoundary(boundaryFiber, retryLane) {\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 lanes.\n if (retryLane === NoLane) {\n // TODO: Assign this to `suspenseState.retryLane`? to avoid\n // unnecessary entanglement?\n retryLane = requestRetryLane(boundaryFiber);\n } // TODO: Special case idle priority?\n\n var eventTime = requestEventTime();\n var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n if (root !== null) {\n markRootUpdated(root, retryLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n }\n function retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState;\n var retryLane = NoLane;\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n retryTimedOutBoundary(boundaryFiber, retryLane);\n }\n function resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = NoLane; // Default\n\n var retryCache;\n switch (boundaryFiber.tag) {\n case SuspenseComponent:\n retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n break;\n case SuspenseListComponent:\n retryCache = boundaryFiber.stateNode;\n break;\n default:\n throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');\n }\n if (retryCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(wakeable);\n }\n retryTimedOutBoundary(boundaryFiber, retryLane);\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 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 function checkForNestedUpdates() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = null;\n throw new 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 if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\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 function flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n {\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n }\n }\n function commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {\n {\n // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects\n // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.\n // Maybe not a big deal since this is DEV only behavior.\n setCurrentFiber(fiber);\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);\n }\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);\n }\n resetCurrentFiber();\n }\n }\n function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n var current = firstChild;\n var subtreeRoot = null;\n while (current !== null) {\n var primarySubtreeFlag = current.subtreeFlags & fiberFlags;\n if (current !== subtreeRoot && current.child !== null && primarySubtreeFlag !== NoFlags) {\n current = current.child;\n } else {\n if ((current.flags & fiberFlags) !== NoFlags) {\n invokeEffectFn(current);\n }\n if (current.sibling !== null) {\n current = current.sibling;\n } else {\n current = subtreeRoot = current.return;\n }\n }\n }\n }\n }\n var didWarnStateUpdateForNotYetMountedComponent = null;\n function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n // We let the other warning about render phase updates deal with this one.\n return;\n }\n if (!(fiber.mode & ConcurrentMode)) {\n return;\n }\n var tag = fiber.tag;\n if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';\n if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n return;\n }\n didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n }\n var previousFiber = current;\n try {\n setCurrentFiber(fiber);\n error(\"Can't perform a React state update on a component that hasn't mounted yet. \" + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n var beginWork$1;\n {\n var dummyFiber = null;\n beginWork$1 = function (current, unitOfWork, lanes) {\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 try {\n return beginWork(current, unitOfWork, lanes);\n } catch (originalError) {\n if (didSuspendOrErrorWhileHydratingDEV() || originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises.\n // Don't replay errors if we are hydrating and have already suspended or handled an error\n throw originalError;\n } // Keep this code in sync with handleError; any changes here must have\n // corresponding changes there.\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(current, unitOfWork); // Restore the original properties of the fiber.\n\n assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n if (unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n } // Run beginWork again.\n\n invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);\n if (hasCaughtError()) {\n var replayError = clearCaughtError();\n if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) {\n // If suppressed, let the flag carry over to the original error which is the one we'll rethrow.\n originalError._suppressLogging = true;\n }\n } // We always throw the original error in case the second render pass is not idempotent.\n // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.\n\n throw originalError;\n }\n };\n }\n var didWarnAboutUpdateInRender = false;\n var didWarnAboutUpdateInRenderForAnotherComponent;\n {\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n }\n function warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentNameFromFiber(fiber) || '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://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n }\n break;\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 break;\n }\n }\n }\n }\n }\n function restorePendingUpdaters(root, lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n memoizedUpdaters.forEach(function (schedulingFiber) {\n addFiberToLanesMap(root, schedulingFiber, lanes);\n }); // This function intentionally does not clear memoized updaters.\n // Those may still be relevant to the current commit\n // and a future one (e.g. Suspense).\n }\n }\n }\n var fakeActCallbackNode = {};\n function scheduleCallback$1(priorityLevel, callback) {\n {\n // If we're currently inside an `act` scope, bypass Scheduler and push to\n // the `act` queue instead.\n var actQueue = ReactCurrentActQueue$1.current;\n if (actQueue !== null) {\n actQueue.push(callback);\n return fakeActCallbackNode;\n } else {\n return scheduleCallback(priorityLevel, callback);\n }\n }\n }\n function cancelCallback$1(callbackNode) {\n if (callbackNode === fakeActCallbackNode) {\n return;\n } // In production, always call Scheduler. This function will be stripped out.\n\n return cancelCallback(callbackNode);\n }\n function shouldForceFlushFallbacksInDEV() {\n // Never force flush in production. This function should get stripped out.\n return ReactCurrentActQueue$1.current !== null;\n }\n function warnIfUpdatesNotWrappedWithActDEV(fiber) {\n {\n if (fiber.mode & ConcurrentMode) {\n if (!isConcurrentActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n } else {\n // Legacy mode has additional cases where we suppress a warning.\n if (!isLegacyActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n if (executionContext !== NoContext) {\n // Legacy mode doesn't warn if the update is batched, i.e.\n // batchedUpdates or flushSync.\n return;\n }\n if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {\n // For backwards compatibility with pre-hooks code, legacy mode only\n // warns for updates that originate from a hook.\n return;\n }\n }\n if (ReactCurrentActQueue$1.current === null) {\n var previousFiber = current;\n try {\n setCurrentFiber(fiber);\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://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n }\n function warnIfSuspenseResolutionNotWrappedWithActDEV(root) {\n {\n if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {\n error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\\n\\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\\n\\n' + 'act(() => {\\n' + ' /* finish loading suspended data */\\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://reactjs.org/link/wrap-tests-with-act');\n }\n }\n }\n function setIsRunningInsertionEffect(isRunning) {\n {\n isRunningInsertionEffect = isRunning;\n }\n }\n\n /* eslint-disable react-internal/prod-error-codes */\n var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\n var failedBoundaries = null;\n var setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n };\n function resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n var family = resolveFamily(type);\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n return family.current;\n }\n }\n function resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n }\n function resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n var family = resolveFamily(type);\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 if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n return syntheticType;\n }\n }\n return type;\n } // Use the latest known implementation.\n\n return family.current;\n }\n }\n function isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\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 switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n break;\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 break;\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 break;\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 break;\n }\n default:\n return false;\n } // Check if both types have a family and it's the same one.\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 if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n return false;\n }\n }\n function markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n if (typeof WeakSet !== 'function') {\n return;\n }\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n failedBoundaries.add(fiber);\n }\n }\n var scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\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 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 flushPassiveEffects();\n flushSync(function () {\n updateContainer(element, root, null, null);\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 switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n var needsRender = false;\n var needsRemount = false;\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\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 if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n if (needsRemount || needsRender) {\n var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (_root !== null) {\n scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);\n }\n }\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\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 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 switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n var didMatch = false;\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\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 if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n }\n function findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n var node = fiber;\n while (true) {\n switch (node.tag) {\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n node = node.return;\n }\n }\n }\n function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\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 if (node === fiber) {\n return foundHostInstances;\n }\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n return false;\n }\n var hasBadMapPolyfill;\n {\n hasBadMapPolyfill = false;\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n\n new Map([[nonExtensibleObject, null]]);\n new Set([nonExtensibleObject]);\n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\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.flags = NoFlags;\n this.subtreeFlags = NoFlags;\n this.deletions = null;\n this.lanes = NoLanes;\n this.childLanes = NoLanes;\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 }\n {\n // This isn't directly used but is handy for debugging internals:\n this._debugSource = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\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 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 function shouldConstruct$1(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n }\n function isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;\n }\n function resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n return IndeterminateComponent;\n } // This is used to create an alternate fiber to do work on.\n\n function createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\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 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; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.flags = NoFlags; // The effects are no longer valid.\n\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.deletions = 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 } // Reset all effects except static ones.\n // Static effects are not specific to a render.\n\n workInProgress.flags = current.flags & StaticMask;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\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 lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\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 switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\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 function resetWorkInProgress(workInProgress, renderLanes) {\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 flags but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.\n\n var current = workInProgress.alternate;\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childLanes = NoLanes;\n workInProgress.lanes = renderLanes;\n workInProgress.child = null;\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n workInProgress.stateNode = 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.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.deletions = null;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // 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 lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\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 return workInProgress;\n }\n function createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {\n var mode;\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode;\n if (isStrictMode === true) {\n mode |= StrictLegacyMode;\n {\n mode |= StrictEffectsMode;\n }\n }\n } else {\n mode = NoMode;\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 return createFiber(HostRoot, null, null, mode);\n }\n function createFiberFromTypeAndProps(type,\n // React$ElementType\n key, pendingProps, owner, mode, lanes) {\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 if (typeof type === 'function') {\n if (shouldConstruct$1(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, lanes, key);\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictLegacyMode;\n if ((mode & ConcurrentMode) !== NoMode) {\n // Strict effects should never run on legacy roots\n mode |= StrictEffectsMode;\n }\n break;\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, lanes, key);\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, lanes, key);\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n case REACT_LEGACY_HIDDEN_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_SCOPE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_CACHE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_TRACING_MARKER_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_DEBUG_TRACING_MODE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\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 case REACT_CONTEXT_TYPE:\n // This is a consumer\n fiberTag = ContextConsumer;\n break getTag;\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n break getTag;\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\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 var ownerName = owner ? getComponentNameFromFiber(owner) : null;\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n throw new 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 var fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.lanes = lanes;\n {\n fiber._debugOwner = owner;\n }\n return fiber;\n }\n function createFiberFromElement(element, mode, lanes) {\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, lanes);\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n return fiber;\n }\n function createFiberFromFragment(elements, mode, lanes, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.lanes = lanes;\n return fiber;\n }\n function createFiberFromProfiler(pendingProps, mode, lanes, key) {\n {\n if (typeof pendingProps.id !== 'string') {\n error('Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);\n }\n }\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.lanes = lanes;\n {\n fiber.stateNode = {\n effectDuration: 0,\n passiveEffectDuration: 0\n };\n }\n return fiber;\n }\n function createFiberFromSuspense(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n }\n function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.lanes = lanes;\n return fiber;\n }\n function createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);\n fiber.elementType = REACT_OFFSCREEN_TYPE;\n fiber.lanes = lanes;\n var primaryChildInstance = {\n isHidden: false\n };\n fiber.stateNode = primaryChildInstance;\n return fiber;\n }\n function createFiberFromText(content, mode, lanes) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.lanes = lanes;\n return fiber;\n }\n function createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode);\n fiber.elementType = 'DELETED';\n return fiber;\n }\n function createFiberFromDehydratedFragment(dehydratedNode) {\n var fiber = createFiber(DehydratedFragment, null, null, NoMode);\n fiber.stateNode = dehydratedNode;\n return fiber;\n }\n function createFiberFromPortal(portal, mode, lanes) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.lanes = lanes;\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 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 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.flags = source.flags;\n target.subtreeFlags = source.subtreeFlags;\n target.deletions = source.deletions;\n target.lanes = source.lanes;\n target.childLanes = source.childLanes;\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 target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n }\n function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.current = null;\n this.pingCache = null;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.context = null;\n this.pendingContext = null;\n this.callbackNode = null;\n this.callbackPriority = NoLane;\n this.eventTimes = createLaneMap(NoLanes);\n this.expirationTimes = createLaneMap(NoTimestamp);\n this.pendingLanes = NoLanes;\n this.suspendedLanes = NoLanes;\n this.pingedLanes = NoLanes;\n this.expiredLanes = NoLanes;\n this.mutableReadLanes = NoLanes;\n this.finishedLanes = NoLanes;\n this.entangledLanes = NoLanes;\n this.entanglements = createLaneMap(NoLanes);\n this.identifierPrefix = identifierPrefix;\n this.onRecoverableError = onRecoverableError;\n {\n this.mutableSourceEagerHydrationData = null;\n }\n {\n this.effectDuration = 0;\n this.passiveEffectDuration = 0;\n }\n {\n this.memoizedUpdaters = new Set();\n var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];\n for (var _i = 0; _i < TotalLanes; _i++) {\n pendingUpdatersLaneMap.push(new Set());\n }\n }\n {\n switch (tag) {\n case ConcurrentRoot:\n this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';\n break;\n case LegacyRoot:\n this._debugRootType = hydrate ? 'hydrate()' : 'render()';\n break;\n }\n }\n }\n function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride,\n // TODO: We have several of these arguments that are conceptually part of the\n // host config, but because they are passed in at runtime, we have to thread\n // them through the root constructor. Perhaps we should put them all into a\n // single type, like a DynamicHostConfig that is defined by the renderer.\n identifierPrefix, onRecoverableError, transitionCallbacks) {\n var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError);\n // stateNode is any.\n\n var uninitializedFiber = createHostRootFiber(tag, isStrictMode);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n {\n var _initialState = {\n element: initialChildren,\n isDehydrated: hydrate,\n cache: null,\n // not enabled yet\n transitions: null,\n pendingSuspenseBoundaries: null\n };\n uninitializedFiber.memoizedState = _initialState;\n }\n initializeUpdateQueue(uninitializedFiber);\n return root;\n }\n var ReactVersion = '18.3.1';\n function createPortal(children, containerInfo,\n // TODO: figure out the API for cross-renderer implementation.\n implementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n {\n checkKeyStringCoercion(key);\n }\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 var didWarnAboutNestedUpdates;\n var didWarnAboutFindNodeInStrictMode;\n {\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n }\n function getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n return parentContext;\n }\n function findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n throw new Error('Unable to find node on an unmounted component.');\n } else {\n var keys = Object.keys(component).join(',');\n throw new Error(\"Argument appears to not be a ReactComponent. Keys: \" + keys);\n }\n }\n var hostFiber = findCurrentHostFiber(fiber);\n if (hostFiber === null) {\n return null;\n }\n if (hostFiber.mode & StrictLegacyMode) {\n var componentName = getComponentNameFromFiber(fiber) || 'Component';\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n var previousFiber = current;\n try {\n setCurrentFiber(hostFiber);\n if (fiber.mode & StrictLegacyMode) {\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://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\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://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n }\n } finally {\n // Ideally this should reset to previous but this shouldn't be called in\n // render and there's another warning for that anyway.\n if (previousFiber) {\n setCurrentFiber(previousFiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n return hostFiber.stateNode;\n }\n }\n function createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = false;\n var initialChildren = null;\n return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n }\n function createHydrationContainer(initialChildren,\n // TODO: Remove `callback` when we delete legacy mode.\n callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = true;\n var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor\n\n root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from\n // a regular update because the initial render must match was was rendered\n // on the server.\n // NOTE: This update intentionally doesn't have a payload. We're only using\n // the update to schedule work on the root fiber (and, for legacy roots, to\n // enqueue the callback if one is provided).\n\n var current = root.current;\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(current);\n var update = createUpdate(eventTime, lane);\n update.callback = callback !== undefined && callback !== null ? callback : null;\n enqueueUpdate(current, update, lane);\n scheduleInitialHydrationOnRoot(root, lane, eventTime);\n return root;\n }\n function updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n var current$1 = container.current;\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(current$1);\n {\n markRenderScheduled(lane);\n }\n var context = getContextForSubtree(parentComponent);\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\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.', getComponentNameFromFiber(current) || 'Unknown');\n }\n }\n var update = createUpdate(eventTime, lane); // 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 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 var root = enqueueUpdate(current$1, update, lane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, current$1, lane, eventTime);\n entangleTransitions(root, current$1, lane);\n }\n return lane;\n }\n function getPublicRootInstance(container) {\n var containerFiber = container.current;\n if (!containerFiber.child) {\n return null;\n }\n switch (containerFiber.child.tag) {\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n default:\n return containerFiber.child.stateNode;\n }\n }\n function attemptSynchronousHydration$1(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n {\n var root = fiber.stateNode;\n if (isRootDehydrated(root)) {\n // Flush the first scheduled \"update\".\n var lanes = getHighestPriorityPendingLanes(root);\n flushRoot(root, lanes);\n }\n break;\n }\n case SuspenseComponent:\n {\n flushSync(function () {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, SyncLane, eventTime);\n }\n }); // If we're still blocked after this, we need to increase\n // the priority of any promises resolving within this\n // boundary so that they next attempt also has higher pri.\n\n var retryLane = SyncLane;\n markRetryLaneIfNotHydrated(fiber, retryLane);\n break;\n }\n }\n }\n function markRetryLaneImpl(fiber, retryLane) {\n var suspenseState = fiber.memoizedState;\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n }\n } // Increases the priority of thenables when they resolve within this boundary.\n\n function markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n var alternate = fiber.alternate;\n if (alternate) {\n markRetryLaneImpl(alternate, retryLane);\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 var lane = SelectiveHydrationLane;\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n }\n markRetryLaneIfNotHydrated(fiber, lane);\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 var lane = requestUpdateLane(fiber);\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n }\n markRetryLaneIfNotHydrated(fiber, lane);\n }\n function findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n if (hostFiber === null) {\n return null;\n }\n return hostFiber.stateNode;\n }\n var shouldErrorImpl = function (fiber) {\n return null;\n };\n function shouldError(fiber) {\n return shouldErrorImpl(fiber);\n }\n var shouldSuspendImpl = function (fiber) {\n return false;\n };\n function shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n }\n var overrideHookState = null;\n var overrideHookStateDeletePath = null;\n var overrideHookStateRenamePath = null;\n var overrideProps = null;\n var overridePropsDeletePath = null;\n var overridePropsRenamePath = null;\n var scheduleUpdate = null;\n var setErrorHandler = null;\n var setSuspenseHandler = null;\n {\n var copyWithDeleteImpl = function (obj, path, index) {\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n if (index + 1 === path.length) {\n if (isArray(updated)) {\n updated.splice(key, 1);\n } else {\n delete updated[key];\n }\n return updated;\n } // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n return updated;\n };\n var copyWithDelete = function (obj, path) {\n return copyWithDeleteImpl(obj, path, 0);\n };\n var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n var oldKey = oldPath[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n if (index + 1 === oldPath.length) {\n var newKey = newPath[index]; // $FlowFixMe number or string is fine here\n\n updated[newKey] = updated[oldKey];\n if (isArray(updated)) {\n updated.splice(oldKey, 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe number or string is fine here\n updated[oldKey] = copyWithRenameImpl(\n // $FlowFixMe number or string is fine here\n obj[oldKey], oldPath, newPath, index + 1);\n }\n return updated;\n };\n var copyWithRename = function (obj, oldPath, newPath) {\n if (oldPath.length !== newPath.length) {\n warn('copyWithRename() expects paths of the same length');\n return;\n } else {\n for (var i = 0; i < newPath.length - 1; i++) {\n if (oldPath[i] !== newPath[i]) {\n warn('copyWithRename() expects paths to be the same except for the deepest key');\n return;\n }\n }\n }\n return copyWithRenameImpl(obj, oldPath, newPath, 0);\n };\n var copyWithSetImpl = function (obj, path, index, value) {\n if (index >= path.length) {\n return value;\n }\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n return updated;\n };\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n };\n var findHook = function (fiber, id) {\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 while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n return currentHook;\n }; // Support DevTools editable values for useState and useReducer.\n\n overrideHookState = function (fiber, id, path, value) {\n var hook = findHook(fiber, id);\n if (hook !== null) {\n var newState = copyWithSet(hook.memoizedState, path, value);\n hook.memoizedState = newState;\n hook.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 var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n };\n overrideHookStateDeletePath = function (fiber, id, path) {\n var hook = findHook(fiber, id);\n if (hook !== null) {\n var newState = copyWithDelete(hook.memoizedState, path);\n hook.memoizedState = newState;\n hook.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 var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n };\n overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n var hook = findHook(fiber, id);\n if (hook !== null) {\n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n hook.memoizedState = newState;\n hook.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 var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n overridePropsDeletePath = function (fiber, path) {\n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n overridePropsRenamePath = function (fiber, oldPath, newPath) {\n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n scheduleUpdate = function (fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n setErrorHandler = function (newShouldErrorImpl) {\n shouldErrorImpl = newShouldErrorImpl;\n };\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n }\n function findHostInstanceByFiber(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n if (hostFiber === null) {\n return null;\n }\n return hostFiber.stateNode;\n }\n function emptyFindFiberByHostInstance(instance) {\n return null;\n }\n function getCurrentFiberForDevTools() {\n return current;\n }\n function injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals({\n bundleType: devToolsConfig.bundleType,\n version: devToolsConfig.version,\n rendererPackageName: devToolsConfig.rendererPackageName,\n rendererConfig: devToolsConfig.rendererConfig,\n overrideHookState: overrideHookState,\n overrideHookStateDeletePath: overrideHookStateDeletePath,\n overrideHookStateRenamePath: overrideHookStateRenamePath,\n overrideProps: overrideProps,\n overridePropsDeletePath: overridePropsDeletePath,\n overridePropsRenamePath: overridePropsRenamePath,\n setErrorHandler: setErrorHandler,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: findHostInstanceByFiber,\n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\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: getCurrentFiberForDevTools,\n // Enables DevTools to detect reconciler version rather than renderer version\n // which may not match for third party renderers.\n reconcilerVersion: ReactVersion\n });\n }\n\n /* global reportError */\n\n var defaultOnRecoverableError = typeof reportError === 'function' ?\n // In modern browsers, reportError will dispatch an error event,\n // emulating an uncaught JavaScript error.\n reportError : function (error) {\n // In older browsers and test environments, fallback to console.error.\n // eslint-disable-next-line react-internal/no-production-logging\n console['error'](error);\n };\n function ReactDOMRoot(internalRoot) {\n this._internalRoot = internalRoot;\n }\n ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) {\n var root = this._internalRoot;\n if (root === null) {\n throw new Error('Cannot update an unmounted root.');\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 } else if (isValidContainer(arguments[1])) {\n error('You passed a container to the second argument of root.render(...). ' + \"You don't need to pass it again since you already passed it to create the root.\");\n } else if (typeof arguments[1] !== 'undefined') {\n error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');\n }\n var container = root.containerInfo;\n if (container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(root.current);\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 ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.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 if (root !== null) {\n this._internalRoot = null;\n var container = root.containerInfo;\n {\n if (isAlreadyRendering()) {\n error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');\n }\n }\n flushSync(function () {\n updateContainer(null, root, null, null);\n });\n unmarkContainerAsRoot(container);\n }\n };\n function createRoot(container, options) {\n if (!isValidContainer(container)) {\n throw new Error('createRoot(...): Target container is not a DOM element.');\n }\n warnIfReactDOMContainerInDEV(container);\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n var transitionCallbacks = null;\n if (options !== null && options !== undefined) {\n {\n if (options.hydrate) {\n warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');\n } else {\n if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {\n error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\\n\\n' + ' let root = createRoot(domContainer);\\n' + ' root.render(<App />);');\n }\n }\n }\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n if (options.transitionCallbacks !== undefined) {\n transitionCallbacks = options.transitionCallbacks;\n }\n }\n var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n return new ReactDOMRoot(root);\n }\n function ReactDOMHydrationRoot(internalRoot) {\n this._internalRoot = internalRoot;\n }\n function scheduleHydration(target) {\n if (target) {\n queueExplicitHydrationTarget(target);\n }\n }\n ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;\n function hydrateRoot(container, initialChildren, options) {\n if (!isValidContainer(container)) {\n throw new Error('hydrateRoot(...): Target container is not a DOM element.');\n }\n warnIfReactDOMContainerInDEV(container);\n {\n if (initialChildren === undefined) {\n error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');\n }\n } // For now we reuse the whole bag of options since they contain\n // the hydration callbacks.\n\n var hydrationCallbacks = options != null ? options : null; // TODO: Delete this option\n\n var mutableSources = options != null && options.hydratedSources || null;\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n if (options !== null && options !== undefined) {\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n }\n var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway.\n\n listenToAllSupportedEvents(container);\n if (mutableSources) {\n for (var i = 0; i < mutableSources.length; i++) {\n var mutableSource = mutableSources[i];\n registerMutableSourceForHydration(root, mutableSource);\n }\n }\n return new ReactDOMHydrationRoot(root);\n }\n function isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers));\n } // TODO: Remove this function which also includes comment nodes.\n // We only use it in places that are currently more relaxed.\n\n function isValidContainerLegacy(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 function warnIfReactDOMContainerInDEV(container) {\n {\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('createRoot(): Creating roots directly with 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 using a container element created ' + 'for your app.');\n }\n if (isContainerMarkedAsRoot(container)) {\n if (container._reactRootContainer) {\n error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');\n } else {\n error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');\n }\n }\n }\n }\n var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\n var topLevelUpdateWarnings;\n {\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);\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 var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\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 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 function getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n }\n function noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the\n // legacy API.\n }\n function legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {\n if (isHydrationContainer) {\n if (typeof callback === 'function') {\n var originalCallback = callback;\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n }\n var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null,\n // hydrationCallbacks\n false,\n // isStrictMode\n false,\n // concurrentUpdatesByDefaultOverride,\n '',\n // identifierPrefix\n noopOnRecoverableError);\n container._reactRootContainer = root;\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n flushSync();\n return root;\n } else {\n // First clear any existing content.\n var rootSibling;\n while (rootSibling = container.lastChild) {\n container.removeChild(rootSibling);\n }\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n callback = function () {\n var instance = getPublicRootInstance(_root);\n _originalCallback.call(instance);\n };\n }\n var _root = createContainer(container, LegacyRoot, null,\n // hydrationCallbacks\n false,\n // isStrictMode\n false,\n // concurrentUpdatesByDefaultOverride,\n '',\n // identifierPrefix\n noopOnRecoverableError);\n container._reactRootContainer = _root;\n markContainerAsRoot(_root.current, container);\n var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.\n\n flushSync(function () {\n updateContainer(initialChildren, _root, parentComponent, callback);\n });\n return _root;\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 function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n }\n var maybeRoot = container._reactRootContainer;\n var root;\n if (!maybeRoot) {\n // Initial mount\n root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);\n } else {\n root = maybeRoot;\n if (typeof callback === 'function') {\n var originalCallback = callback;\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n } // Update\n\n updateContainer(children, root, parentComponent, callback);\n }\n return getPublicRootInstance(root);\n }\n var didWarnAboutFindDOMNode = false;\n function findDOMNode(componentOrElement) {\n {\n if (!didWarnAboutFindDOMNode) {\n didWarnAboutFindDOMNode = true;\n error('findDOMNode is deprecated and will be removed in the next major ' + 'release. Instead, add a ref directly to the element you want ' + 'to reference. Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node');\n }\n var owner = ReactCurrentOwner$3.current;\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\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.', getComponentNameFromType(owner.type) || 'A component');\n }\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n if (componentOrElement == null) {\n return null;\n }\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n }\n function hydrate(element, container, callback) {\n {\n error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n }\n function render(element, container, callback) {\n {\n error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\n }\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.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 function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n {\n error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + \"the createRoot API, your app will behave as if it's running React \" + '17. Learn more: https://reactjs.org/link/switch-to-createroot');\n }\n if (!isValidContainerLegacy(containerNode)) {\n throw new Error('Target container is not a DOM element.');\n }\n if (parentComponent == null || !has(parentComponent)) {\n throw new Error('parentComponent must be a valid React Component');\n }\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n }\n var didWarnAboutUnmountComponentAtNode = false;\n function unmountComponentAtNode(container) {\n {\n if (!didWarnAboutUnmountComponentAtNode) {\n didWarnAboutUnmountComponentAtNode = true;\n error('unmountComponentAtNode is deprecated and will be removed in the ' + 'next major release. Switch to the createRoot API. Learn ' + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n }\n if (!isValidContainerLegacy(container)) {\n throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.');\n }\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\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 flushSync(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 var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && !!container.parentNode._reactRootContainer;\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 setAttemptSynchronousHydration(attemptSynchronousHydration$1);\n setAttemptContinuousHydration(attemptContinuousHydration$1);\n setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\n setGetCurrentUpdatePriority(getCurrentUpdatePriority);\n setAttemptHydrationAtPriority(runWithPriority);\n {\n if (typeof Map !== 'function' ||\n // $FlowIssue Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' ||\n // $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://reactjs.org/link/react-polyfills');\n }\n }\n setRestoreImplementation(restoreControlledState$3);\n setBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync);\n function createPortal$1(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n if (!isValidContainer(container)) {\n throw new Error('Target container is not a DOM element.');\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 return createPortal(children, container, null, key);\n }\n function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n }\n var Internals = {\n usingClientEntryPoint: false,\n // Keep in sync with ReactTestUtils.js.\n // This is an array for better minification.\n Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1]\n };\n function createRoot$1(container, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing createRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n return createRoot(container, options);\n }\n function hydrateRoot$1(container, initialChildren, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing hydrateRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n return hydrateRoot(container, initialChildren, options);\n } // Overload the definition to the two valid signatures.\n // Warning, this opts-out of checking the function body.\n\n // eslint-disable-next-line no-redeclare\n function flushSync$1(fn) {\n {\n if (isAlreadyRendering()) {\n error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n }\n }\n return flushSync(fn);\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://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/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.createRoot = createRoot$1;\n exports.findDOMNode = findDOMNode;\n exports.flushSync = flushSync$1;\n exports.hydrate = hydrate;\n exports.hydrateRoot = hydrateRoot$1;\n exports.render = render;\n exports.unmountComponentAtNode = unmountComponentAtNode;\n exports.unstable_batchedUpdates = batchedUpdates$1;\n exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\n exports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 'function') {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n }\n })();\n}","map":{"version":3,"names":["process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","React","require","Scheduler","ReactSharedInternals","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","suppressWarning","setSuppressWarning","newSuppressWarning","warn","format","_len","arguments","length","args","Array","_key","printWarning","error","_len2","_key2","level","ReactDebugCurrentFrame","stack","getStackAddendum","concat","argsWithFormat","map","item","String","unshift","Function","prototype","apply","call","console","FunctionComponent","ClassComponent","IndeterminateComponent","HostRoot","HostPortal","HostComponent","HostText","Fragment","Mode","ContextConsumer","ContextProvider","ForwardRef","Profiler","SuspenseComponent","MemoComponent","SimpleMemoComponent","LazyComponent","IncompleteClassComponent","DehydratedFragment","SuspenseListComponent","ScopeComponent","OffscreenComponent","LegacyHiddenComponent","CacheComponent","TracingMarkerComponent","enableClientRenderFallbackOnTextMismatch","enableNewReconciler","enableLazyContextPropagation","enableLegacyHidden","enableSuspenseAvoidThisFallback","disableCommentsAsDOMContainers","enableCustomElementPropertySupport","warnAboutStringRefs","enableSchedulingProfiler","enableProfilerTimer","enableProfilerCommitHooks","allNativeEvents","Set","registrationNameDependencies","possibleRegistrationNames","registerTwoPhaseEvent","registrationName","dependencies","registerDirectEvent","lowerCasedName","toLowerCase","ondblclick","i","add","canUseDOM","window","document","createElement","hasOwnProperty","Object","typeName","value","hasToStringTag","Symbol","toStringTag","type","constructor","name","willCoercionThrow","testStringCoercion","e","checkAttributeStringCoercion","attributeName","checkKeyStringCoercion","checkPropStringCoercion","propName","checkCSSPropertyStringCoercion","checkHtmlStringCoercion","checkFormFieldValueStringCoercion","RESERVED","STRING","BOOLEANISH_STRING","BOOLEAN","OVERLOADED_BOOLEAN","NUMERIC","POSITIVE_NUMERIC","ATTRIBUTE_NAME_START_CHAR","ATTRIBUTE_NAME_CHAR","VALID_ATTRIBUTE_NAME_REGEX","RegExp","illegalAttributeNameCache","validatedAttributeNameCache","isAttributeNameSafe","test","shouldIgnoreAttribute","propertyInfo","isCustomComponentTag","shouldRemoveAttributeWithWarning","acceptsBooleans","prefix","slice","shouldRemoveAttribute","isNaN","getPropertyInfo","properties","PropertyInfoRecord","mustUseProperty","attributeNamespace","sanitizeURL","removeEmptyString","propertyName","reservedProps","forEach","_ref","CAMELIZE","capitalize","token","toUpperCase","replace","xlinkHref","isJavaScriptProtocol","didWarn","url","JSON","stringify","getValueForProperty","node","expected","stringValue","hasAttribute","getAttribute","getValueForAttribute","undefined","setValueForProperty","_attributeName","removeAttribute","setAttribute","_type","attributeValue","toString","setAttributeNS","REACT_ELEMENT_TYPE","for","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_SCOPE_TYPE","REACT_DEBUG_TRACING_MODE_TYPE","REACT_OFFSCREEN_TYPE","REACT_LEGACY_HIDDEN_TYPE","REACT_CACHE_TYPE","REACT_TRACING_MARKER_TYPE","MAYBE_ITERATOR_SYMBOL","iterator","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","__reactDisabledLog","disableLogs","log","info","group","groupCollapsed","groupEnd","props","configurable","enumerable","writable","defineProperties","reenableLogs","ReactCurrentDispatcher","describeBuiltInComponentFrame","source","ownerFn","x","match","trim","reentry","componentFrameCache","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","construct","frame","get","control","previousPrepareStackTrace","prepareStackTrace","previousDispatcher","current","Fake","defineProperty","set","Reflect","sample","sampleLines","split","controlLines","s","c","_frame","displayName","includes","syntheticFrame","describeClassComponentFrame","ctor","describeFunctionComponentFrame","shouldConstruct","Component","isReactComponent","describeUnknownElementTypeFrameInDEV","$$typeof","render","lazyComponent","payload","_payload","init","_init","describeFiber","fiber","owner","_debugOwner","_debugSource","tag","getStackByFiberInDevAndProd","workInProgress","return","message","getWrappedName","outerType","innerType","wrapperName","functionName","getContextName","getComponentNameFromType","context","provider","_context","outerName","getWrappedName$1","getContextName$1","getComponentNameFromFiber","isRendering","getCurrentFiberOwnerNameInDevOrNull","getCurrentFiberStackInDev","resetCurrentFiber","getCurrentStack","setCurrentFiber","getCurrentFiber","setIsRendering","rendering","getToStringValue","hasReadOnlyValue","button","checkbox","image","hidden","radio","reset","submit","checkControlledValueProps","tagName","onChange","onInput","readOnly","disabled","checked","isCheckable","elem","nodeName","getTracker","_valueTracker","detachTracker","getValueFromNode","trackValueOnNode","valueField","descriptor","getOwnPropertyDescriptor","currentValue","tracker","getValue","setValue","stopTracking","track","updateValueIfChanged","lastValue","nextValue","getActiveElement","doc","activeElement","body","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","querySelectorAll","otherNode","form","otherProps","getFiberCurrentPropsFromNode","ownerDocument","didWarnSelectedSetOnOption","didWarnInvalidChild","didWarnInvalidInnerHTML","validateProps","children","Children","child","dangerouslySetInnerHTML","selected","postMountWrapper$1","isArrayImpl","isArray","a","didWarnValueDefaultValue$1","getDeclarationErrorAddendum","ownerName","valuePropNames","checkSelectPropTypes","propNameIsArray","multiple","updateOptions","propValue","setDefaultSelected","options","selectedValues","selectedValue","_i","defaultSelected","_selectedValue","_i2","getHostProps$1","initWrapperState$1","wasMultiple","postMountWrapper$2","postUpdateWrapper","restoreControlledState$1","didWarnValDefaultVal","getHostProps$2","initWrapperState$2","updateWrapper$1","newValue","postMountWrapper$3","textContent","restoreControlledState$2","HTML_NAMESPACE","MATH_NAMESPACE","SVG_NAMESPACE","getIntrinsicNamespace","getChildNamespace","parentNamespace","createMicrosoftUnsafeLocalFunction","func","MSApp","execUnsafeLocalFunction","arg0","arg1","arg2","arg3","reusableSVGContainer","setInnerHTML","html","namespaceURI","innerHTML","valueOf","svgNode","firstChild","removeChild","appendChild","ELEMENT_NODE","TEXT_NODE","COMMENT_NODE","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","setTextContent","text","lastChild","nodeType","nodeValue","shorthandToLonghand","animation","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","transition","wordWrap","isUnitlessNumber","animationIterationCount","aspectRatio","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","key","charAt","substring","prefixes","keys","prop","dangerousStyleValue","isCustomProperty","isEmpty","uppercasePattern","msPattern","hyphenateStyleName","warnValidStyle","badVendoredStyleNamePattern","msPattern$1","hyphenPattern","badStyleValueWithSemicolonPattern","warnedStyleNames","warnedStyleValues","warnedForNaNValue","warnedForInfinityValue","camelize","string","_","character","warnHyphenatedStyleName","warnBadVendoredStyleName","warnStyleValueWithSemicolon","warnStyleValueIsNaN","warnStyleValueIsInfinity","indexOf","isFinite","warnValidStyle$1","createDangerousStringForStyles","styles","serialized","delimiter","styleName","styleValue","setValueForStyles","style","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","assertValidProps","suppressContentEditableWarning","contentEditable","isCustomComponent","is","possibleStandardNames","accept","acceptcharset","accesskey","action","allowfullscreen","alt","as","async","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","autosave","capture","cellpadding","cellspacing","challenge","charset","cite","class","classid","classname","cols","colspan","content","contenteditable","contextmenu","controls","controlslist","coords","crossorigin","dangerouslysetinnerhtml","data","datetime","default","defaultchecked","defaultvalue","defer","dir","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","formmethod","formaction","formenctype","formnovalidate","formtarget","frameborder","headers","height","high","href","hreflang","htmlfor","httpequiv","icon","id","imagesizes","imagesrcset","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","scope","scoped","scrolling","seamless","shape","size","sizes","span","spellcheck","src","srcdoc","srclang","srcset","start","step","summary","tabindex","target","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","d","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","validateProperty","ariaName","correctName","standardName","warnInvalidARIAProps","invalidProps","isValid","push","unknownPropString","join","validateProperties","didWarnValueNull","validateProperties$1","validateProperty$1","warnedProperties$1","EVENT_NAME_REGEX","INVALID_EVENT_NAME_REGEX","rARIA$1","rARIACamel$1","eventRegistry","isReserved","warnUnknownProperties","unknownProps","validateProperties$2","IS_EVENT_HANDLE_NON_MANAGED_NODE","IS_NON_DELEGATED","IS_CAPTURE_PHASE","SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS","currentReplayingEvent","setReplayingEvent","event","resetReplayingEvent","isReplayingEvent","getEventTarget","nativeEvent","srcElement","correspondingUseElement","restoreImpl","restoreTarget","restoreQueue","restoreStateOfTarget","internalInstance","getInstanceFromNode","stateNode","_props","setRestoreImplementation","impl","enqueueStateRestore","needsStateRestore","restoreStateIfNeeded","queuedTargets","batchedUpdatesImpl","bookkeeping","flushSyncImpl","isInsideEventHandler","finishEventHandler","controlledComponentsHavePendingUpdates","batchedUpdates","b","setBatchingImplementation","_batchedUpdatesImpl","_discreteUpdatesImpl","_flushSyncImpl","isInteractive","shouldPreventMouseEvent","getListener","inst","listener","passiveBrowserEventsSupported","addEventListener","removeEventListener","invokeGuardedCallbackProd","f","funcArgs","onError","invokeGuardedCallbackImpl","dispatchEvent","createEvent","fakeNode","invokeGuardedCallbackDev","evt","didCall","didError","windowEvent","windowEventDescriptor","restoreAfterDispatch","evtType","callCallback","didSetError","isCrossOriginError","handleWindowError","colno","lineno","defaultPrevented","_suppressLogging","inner","initEvent","invokeGuardedCallbackImpl$1","hasError","caughtError","hasRethrowError","rethrowError","reporter","invokeGuardedCallback","invokeGuardedCallbackAndCatchFirstError","clearCaughtError","rethrowCaughtError","hasCaughtError","_reactInternals","has","NoFlags","PerformedWork","Placement","Update","ChildDeletion","ContentReset","Callback","DidCapture","ForceClientRender","Ref","Snapshot","Passive","Hydrating","Visibility","StoreConsistency","LifecycleEffectMask","HostEffectMask","Incomplete","ShouldCapture","ForceUpdateForLegacySuspense","Forked","RefStatic","LayoutStatic","PassiveStatic","MountLayoutDev","MountPassiveDev","BeforeMutationMask","MutationMask","LayoutMask","PassiveMask","StaticMask","ReactCurrentOwner","getNearestMountedFiber","nearestMounted","alternate","nextNode","flags","getSuspenseInstanceFromFiber","suspenseState","memoizedState","dehydrated","getContainerFromFiber","containerInfo","isFiberMounted","isMounted","component","ownerFiber","instance","_warnedAboutRefsInRender","assertIsMounted","findCurrentFiberUsingSlowPath","parentA","parentB","nextParent","sibling","didFindChild","_child","findCurrentHostFiber","parent","currentParent","findCurrentHostFiberImpl","findCurrentHostFiberWithNoPortals","findCurrentHostFiberWithNoPortalsImpl","scheduleCallback","unstable_scheduleCallback","cancelCallback","unstable_cancelCallback","shouldYield","unstable_shouldYield","requestPaint","unstable_requestPaint","now","unstable_now","getCurrentPriorityLevel","unstable_getCurrentPriorityLevel","ImmediatePriority","unstable_ImmediatePriority","UserBlockingPriority","unstable_UserBlockingPriority","NormalPriority","unstable_NormalPriority","LowPriority","unstable_LowPriority","IdlePriority","unstable_IdlePriority","unstable_yieldValue","unstable_setDisableYieldValue","rendererID","injectedHook","injectedProfilingHooks","hasLoggedError","isDevToolsPresent","injectInternals","internals","hook","isDisabled","supportsFiber","getLaneLabelMap","injectProfilingHooks","inject","err","checkDCE","onScheduleRoot","root","onScheduleFiberRoot","onCommitRoot","eventPriority","onCommitFiberRoot","schedulerPriority","DiscreteEventPriority","ContinuousEventPriority","DefaultEventPriority","IdleEventPriority","onPostCommitRoot","onPostCommitFiberRoot","onCommitUnmount","onCommitFiberUnmount","setIsStrictModeForDevtools","newIsStrictMode","setStrictMode","profilingHooks","lane","index","TotalLanes","getLabelForLane","markCommitStarted","lanes","markCommitStopped","markComponentRenderStarted","markComponentRenderStopped","markComponentPassiveEffectMountStarted","markComponentPassiveEffectMountStopped","markComponentPassiveEffectUnmountStarted","markComponentPassiveEffectUnmountStopped","markComponentLayoutEffectMountStarted","markComponentLayoutEffectMountStopped","markComponentLayoutEffectUnmountStarted","markComponentLayoutEffectUnmountStopped","markComponentErrored","thrownValue","markComponentSuspended","wakeable","markLayoutEffectsStarted","markLayoutEffectsStopped","markPassiveEffectsStarted","markPassiveEffectsStopped","markRenderStarted","markRenderYielded","markRenderStopped","markRenderScheduled","markForceUpdateScheduled","markStateUpdateScheduled","NoMode","ConcurrentMode","ProfileMode","StrictLegacyMode","StrictEffectsMode","clz32","Math","clz32Fallback","LN2","asUint","NoLanes","NoLane","SyncLane","InputContinuousHydrationLane","InputContinuousLane","DefaultHydrationLane","DefaultLane","TransitionHydrationLane","TransitionLanes","TransitionLane1","TransitionLane2","TransitionLane3","TransitionLane4","TransitionLane5","TransitionLane6","TransitionLane7","TransitionLane8","TransitionLane9","TransitionLane10","TransitionLane11","TransitionLane12","TransitionLane13","TransitionLane14","TransitionLane15","TransitionLane16","RetryLanes","RetryLane1","RetryLane2","RetryLane3","RetryLane4","RetryLane5","SomeRetryLane","SelectiveHydrationLane","NonIdleLanes","IdleHydrationLane","IdleLane","OffscreenLane","NoTimestamp","nextTransitionLane","nextRetryLane","getHighestPriorityLanes","getHighestPriorityLane","getNextLanes","wipLanes","pendingLanes","nextLanes","suspendedLanes","pingedLanes","nonIdlePendingLanes","nonIdleUnblockedLanes","nonIdlePingedLanes","unblockedLanes","nextLane","wipLane","entangledLanes","entanglements","pickArbitraryLaneIndex","getMostRecentEventTime","eventTimes","mostRecentEventTime","eventTime","computeExpirationTime","currentTime","markStarvedLanesAsExpired","expirationTimes","expirationTime","expiredLanes","getHighestPriorityPendingLanes","getLanesToRetrySynchronouslyOnError","everythingButOffscreen","includesSyncLane","includesNonIdleWork","includesOnlyRetries","includesOnlyNonUrgentLanes","UrgentLanes","includesOnlyTransitions","includesBlockingLane","SyncDefaultLanes","includesExpiredLane","isTransitionLane","claimNextTransitionLane","claimNextRetryLane","pickArbitraryLane","laneToIndex","includesSomeLane","isSubsetOfLanes","subset","mergeLanes","removeLanes","intersectLanes","laneToLanes","higherPriorityLane","createLaneMap","initial","laneMap","markRootUpdated","updateLane","markRootSuspended","markRootPinged","markRootFinished","remainingLanes","noLongerPendingLanes","mutableReadLanes","markRootEntangled","rootEntangledLanes","getBumpedLaneForHydration","renderLanes","renderLane","addFiberToLanesMap","pendingUpdatersLaneMap","updaters","movePendingFibersToMemoized","memoizedUpdaters","clear","getTransitionsForLanes","currentUpdatePriority","getCurrentUpdatePriority","setCurrentUpdatePriority","newPriority","runWithPriority","priority","previousPriority","higherEventPriority","lowerEventPriority","isHigherEventPriority","lanesToEventPriority","isRootDehydrated","currentState","isDehydrated","_attemptSynchronousHydration","setAttemptSynchronousHydration","attemptSynchronousHydration","attemptContinuousHydration","setAttemptContinuousHydration","attemptHydrationAtCurrentPriority","setAttemptHydrationAtCurrentPriority","getCurrentUpdatePriority$1","setGetCurrentUpdatePriority","attemptHydrationAtPriority","setAttemptHydrationAtPriority","hasScheduledReplayAttempt","queuedDiscreteEvents","queuedFocus","queuedDrag","queuedMouse","queuedPointers","queuedPointerCaptures","queuedExplicitHydrationTargets","discreteReplayableEvents","isDiscreteEventThatRequiresHydration","eventType","createQueuedReplayableEvent","blockedOn","domEventName","eventSystemFlags","targetContainer","targetContainers","clearIfContinuousEvent","pointerId","delete","_pointerId","accumulateOrCreateContinuousQueuedReplayableEvent","existingQueuedEvent","queuedEvent","_fiber2","queueIfContinuousEvent","focusEvent","dragEvent","mouseEvent","pointerEvent","_pointerEvent","_pointerId2","attemptExplicitHydrationTarget","queuedTarget","targetInst","getClosestInstanceFromNode","queueExplicitHydrationTarget","updatePriority","splice","attemptReplayContinuousQueuedEvent","nextBlockedOn","findInstanceBlockingEvent","nativeEventClone","_fiber3","shift","attemptReplayContinuousQueuedEventInMap","replayUnblockedEvents","scheduleCallbackIfUnblocked","unblocked","retryIfBlockedOn","unblock","nextExplicitTarget","ReactCurrentBatchConfig","_enabled","setEnabled","enabled","isEnabled","createEventListenerWrapperWithPriority","getEventPriority","listenerWrapper","dispatchDiscreteEvent","dispatchContinuousEvent","bind","container","prevTransition","dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay","dispatchEventForPluginEventSystem","return_targetInst","stopPropagation","nativeEventTarget","addEventBubbleListener","addEventCaptureListener","addEventCaptureListenerWithPassiveFlag","passive","addEventBubbleListenerWithPassiveFlag","startText","fallbackText","initialize","getText","getData","startValue","startLength","endValue","endLength","minEnd","sliceTail","getEventCharCode","charCode","keyCode","functionThatReturnsTrue","functionThatReturnsFalse","createSyntheticEvent","Interface","SyntheticBaseEvent","reactName","reactEventType","_reactName","_targetInst","currentTarget","_propName","normalize","returnValue","isDefaultPrevented","isPropagationStopped","preventDefault","cancelBubble","persist","isPersistent","EventInterface","eventPhase","bubbles","cancelable","timeStamp","Date","isTrusted","SyntheticEvent","UIEventInterface","view","detail","SyntheticUIEvent","lastMovementX","lastMovementY","lastMouseEvent","updateMouseMovementPolyfillState","screenX","screenY","MouseEventInterface","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","getEventModifierState","buttons","relatedTarget","fromElement","toElement","movementX","movementY","SyntheticMouseEvent","DragEventInterface","dataTransfer","SyntheticDragEvent","FocusEventInterface","SyntheticFocusEvent","AnimationEventInterface","animationName","elapsedTime","pseudoElement","SyntheticAnimationEvent","ClipboardEventInterface","clipboardData","SyntheticClipboardEvent","CompositionEventInterface","SyntheticCompositionEvent","SyntheticInputEvent","normalizeKey","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","translateToKey","getEventKey","fromCharCode","modifierKeyToProp","Alt","Control","Meta","Shift","modifierStateGetter","keyArg","syntheticEvent","keyProp","KeyboardEventInterface","code","location","repeat","locale","which","SyntheticKeyboardEvent","PointerEventInterface","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","SyntheticPointerEvent","TouchEventInterface","touches","targetTouches","changedTouches","SyntheticTouchEvent","TransitionEventInterface","SyntheticTransitionEvent","WheelEventInterface","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","SyntheticWheelEvent","END_KEYCODES","START_KEYCODE","canUseCompositionEvent","documentMode","canUseTextInputEvent","useFallbackCompositionData","SPACEBAR_CODE","SPACEBAR_CHAR","registerEvents","hasSpaceKeypress","isKeypressCommand","getCompositionEventType","isFallbackCompositionStart","isFallbackCompositionEnd","getDataFromCustomEvent","isUsingKoreanIME","isComposing","extractCompositionEvent","dispatchQueue","fallbackData","listeners","accumulateTwoPhaseListeners","customData","getNativeBeforeInputChars","chars","getFallbackBeforeInputChars","char","extractBeforeInputEvent","extractEvents","supportedInputTypes","date","email","month","number","password","range","search","tel","time","week","isTextInputElement","isEventSupported","eventNameSuffix","eventName","isSupported","registerEvents$1","createAndAccumulateChangeEvent","activeElementInst","shouldUseChangeEvent","manualDispatchChangeEvent","runEventInBatch","processDispatchQueue","getInstIfValueChanged","targetNode","getNodeFromInstance","getTargetInstForChangeEvent","isInputEventSupported","startWatchingForValueChange","attachEvent","handlePropertyChange","stopWatchingForValueChange","detachEvent","handleEventsForInputEventPolyfill","getTargetInstForInputEventPolyfill","shouldUseClickEvent","getTargetInstForClickEvent","getTargetInstForInputOrChangeEvent","handleControlledInputBlur","state","extractEvents$1","getTargetInstFunc","handleEventFunc","registerEvents$2","extractEvents$2","isOverEvent","isOutEvent","related","isContainerMarkedAsRoot","win","defaultView","parentWindow","_related","SyntheticEventCtor","leaveEventType","enterEventType","eventTypePrefix","fromNode","toNode","leave","enter","nativeTargetInst","enterEvent","accumulateEnterLeaveTwoPhaseListeners","objectIs","shallowEqual","objA","objB","keysA","keysB","currentKey","getLeafNode","getSiblingNode","nextSibling","getNodeForCharacterOffset","nodeStart","nodeEnd","getOffsets","outerNode","selection","getSelection","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","getModernOffsetsFromPoints","indexWithinAnchor","indexWithinFocus","outer","next","setOffsets","offsets","extend","temp","startMarker","endMarker","createRange","setStart","removeAllRanges","addRange","setEnd","isTextNode","containsNode","innerNode","contains","compareDocumentPosition","isInDocument","documentElement","isSameOriginFrame","iframe","contentWindow","getActiveElementDeep","HTMLIFrameElement","hasSelectionCapabilities","getSelectionInformation","focusedElem","selectionRange","restoreSelection","priorSelectionInformation","curFocusedElem","priorFocusedElem","priorSelectionRange","setSelection","ancestors","ancestor","left","scrollLeft","top","scrollTop","focus","selectionStart","selectionEnd","skipSelectionChangeEvent","registerEvents$3","activeElement$1","activeElementInst$1","lastSelection","mouseDown","getSelection$1","getEventTargetDocument","eventTarget","constructSelectEvent","currentSelection","extractEvents$3","makePrefixMap","styleProp","vendorPrefixes","animationend","animationiteration","animationstart","transitionend","prefixedEventNames","getVendorPrefixedEventName","prefixMap","ANIMATION_END","ANIMATION_ITERATION","ANIMATION_START","TRANSITION_END","topLevelEventsToReactNames","simpleEventPluginEvents","registerSimpleEvent","registerSimpleEvents","capitalizedEvent","extractEvents$4","inCapturePhase","accumulateTargetOnly","_listeners","accumulateSinglePhaseListeners","_event","extractEvents$5","shouldProcessPolyfillPlugins","mediaEventTypes","nonDelegatedEvents","executeDispatch","processDispatchQueueItemsInOrder","dispatchListeners","previousInstance","_dispatchListeners$i","_dispatchListeners$_i","_instance","_currentTarget","_listener","_dispatchQueue$i","dispatchEventsForPlugins","listenToNonDelegatedEvent","targetElement","isCapturePhaseListener","listenerSet","getEventListenerSet","listenerSetKey","getListenerSetKey","addTrappedEventListener","listenToNativeEvent","listeningMarker","random","listenToAllSupportedEvents","rootContainerElement","isDeferredListenerForLegacyFBSupport","isPassiveListener","unsubscribeListener","isMatchingRootContainer","grandContainer","ancestorInst","targetContainerNode","mainLoop","nodeTag","grandNode","grandTag","parentTag","createDispatchListener","targetFiber","nativeEventType","captureName","reactEventName","lastHostComponent","_instance2","_instance3","captureListener","bubbleListener","getParent","getLowestCommonAncestor","instA","instB","nodeA","nodeB","depthA","tempA","depthB","tempB","depth","accumulateEnterLeaveListenersForEvent","common","_instance4","leaveEvent","didWarnInvalidHydration","DANGEROUSLY_SET_INNER_HTML","SUPPRESS_CONTENT_EDITABLE_WARNING","SUPPRESS_HYDRATION_WARNING","AUTOFOCUS","CHILDREN","STYLE","HTML$1","warnedUnknownTags","validatePropertiesInDevelopment","warnForPropDifference","warnForExtraAttributes","warnForInvalidEventListener","canDiffStyleForHydrationWarning","normalizeHTML","dialog","webview","serverValue","clientValue","normalizedClientValue","normalizeMarkupForTextOrAttribute","normalizedServerValue","attributeNames","names","testElement","createElementNS","NORMALIZE_NEWLINES_REGEX","NORMALIZE_NULL_AND_REPLACEMENT_REGEX","markup","markupString","checkForUnmatchedText","serverText","clientText","isConcurrentMode","shouldWarnDev","normalizedClientText","normalizedServerText","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","attributes","serverHTML","expectedHTML","expectedStyle","isMismatchDueToBadCasing","ownNamespace","dontWarnCustomElement","diffHydratedText","textNode","isDifferent","warnForDeletedHydratableElement","warnForDeletedHydratableText","warnForInsertedHydratedElement","warnForInsertedHydratedText","restoreControlledState$3","validateDOMNesting","updatedAncestorInfo","specialTags","inScopeTags","buttonScopeTags","impliedEndTags","emptyAncestorInfo","formTag","aTagInScope","buttonTagInScope","nobrTagInScope","pTagInButtonScope","listItemTagAutoclosing","dlItemTagAutoclosing","oldInfo","ancestorInfo","isTagValidWithParent","findInvalidAncestorForTag","didWarn$1","childTag","childText","parentInfo","invalidParent","invalidAncestor","invalidParentOrAncestor","ancestorTag","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","getRootHostContext","rootContainerInstance","namespace","validatedTag","getChildHostContext","parentHostContext","parentHostContextDev","getPublicInstance","prepareForCommit","activeInstance","resetAfterCommit","createInstance","hostContext","internalInstanceHandle","hostContextDev","ownAncestorInfo","precacheFiberNode","updateFiberProps","appendInitialChild","parentInstance","finalizeInitialChildren","autoFocus","prepareUpdate","oldProps","newProps","shouldSetTextContent","__html","createTextInstance","getCurrentEventPriority","currentEvent","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","localPromise","Promise","scheduleMicrotask","queueMicrotask","callback","resolve","then","catch","handleErrorInNextTick","commitMount","commitUpdate","resetTextContent","commitTextUpdate","textInstance","oldText","newText","appendChildToContainer","insertBefore","reactRootContainer","_reactRootContainer","beforeChild","insertInContainerBefore","removeChildFromContainer","clearSuspenseBoundary","suspenseInstance","clearSuspenseBoundaryFromContainer","hideInstance","hideTextInstance","unhideInstance","unhideTextInstance","clearContainer","canHydrateInstance","canHydrateTextInstance","canHydrateSuspenseInstance","isSuspenseInstancePending","isSuspenseInstanceFallback","getSuspenseInstanceFallbackErrorDetails","dataset","digest","dgst","msg","stck","registerSuspenseInstanceRetry","_reactRetry","getNextHydratable","nodeData","getNextHydratableSibling","getFirstHydratableChild","getFirstHydratableChildWithinContainer","parentContainer","getFirstHydratableChildWithinSuspenseInstance","hydrateInstance","hydrateTextInstance","hydrateSuspenseInstance","getNextHydratableInstanceAfterSuspenseInstance","getParentSuspenseInstance","targetInstance","previousSibling","commitHydratedContainer","commitHydratedSuspenseInstance","shouldDeleteUnhydratedTailInstances","parentType","didNotMatchHydratedContainerTextInstance","didNotMatchHydratedTextInstance","parentProps","didNotHydrateInstanceWithinContainer","didNotHydrateInstanceWithinSuspenseInstance","didNotHydrateInstance","didNotFindHydratableInstanceWithinContainer","didNotFindHydratableTextInstanceWithinContainer","didNotFindHydratableInstanceWithinSuspenseInstance","didNotFindHydratableTextInstanceWithinSuspenseInstance","didNotFindHydratableInstance","didNotFindHydratableTextInstance","errorHydratingContainer","preparePortalMount","portalInstance","randomKey","internalInstanceKey","internalPropsKey","internalContainerInstanceKey","internalEventHandlersKey","internalEventHandlerListenersKey","internalEventHandlesSetKey","detachDeletedInstance","hostInst","markContainerAsRoot","hostRoot","unmarkContainerAsRoot","targetSuspenseInst","elementListenerSet","loggedTypeFailures","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement","_owner","_source","setExtraStackFrame","checkPropTypes","typeSpecs","componentName","typeSpecName","error$1","ex","valueStack","fiberStack","createCursor","pop","warnedAboutMissingGetChildContext","emptyContextObject","contextStackCursor","didPerformWorkStackCursor","previousContext","getUnmaskedContext","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","ConcurrentRoot","syncQueue","includesLegacySyncCallbacks","isFlushingSyncQueue","scheduleSyncCallback","scheduleLegacySyncCallback","flushSyncCallbacksOnlyInLegacyMode","flushSyncCallbacks","previousUpdatePriority","isSync","queue","forkStack","forkStackIndex","treeForkProvider","treeForkCount","idStack","idStackIndex","treeContextProvider","treeContextId","treeContextOverflow","isForkedChild","warnIfNotHydrating","getForksAtLevel","getTreeId","idWithLeadingBit","getLeadingBit","pushTreeFork","totalChildren","pushTreeId","baseIdWithLeadingBit","baseOverflow","baseLength","getBitLength","baseId","slot","numberOfOverflowBits","newOverflowBits","newOverflow","restOfBaseId","restOfBaseLength","restOfLength","restOfNewBits","newBits","_id","_overflow","pushMaterializedTreeId","returnFiber","numberOfForks","slotIndex","popTreeContext","getSuspendedTreeContext","restoreSuspendedTreeContext","suspendedContext","getIsHydrating","hydrationParentFiber","nextHydratableInstance","didSuspendOrErrorDEV","hydrationErrors","warnIfHydrating","markDidThrowWhileHydratingDEV","didSuspendOrErrorWhileHydratingDEV","enterHydrationState","reenterHydrationStateFromDehydratedSuspenseInstance","treeContext","warnUnhydratedInstance","memoizedProps","deleteHydratableInstance","childToDelete","createFiberFromHostInstanceForDeletion","deletions","warnNonhydratedInstance","pendingProps","_text","_isConcurrentMode","_parentInstance","_type2","_props2","_text2","insertNonHydratedInstance","tryHydrate","nextInstance","retryLane","dehydratedFragment","createFiberFromDehydratedFragment","shouldClientRenderOnMismatch","throwOnHydrationMismatch","tryToClaimNextHydratableInstance","firstAttemptedInstance","prevHydrationParentFiber","prepareToHydrateHostInstance","shouldWarnIfMismatchDev","updateQueue","prepareToHydrateHostTextInstance","shouldUpdate","_isConcurrentMode2","prepareToHydrateHostSuspenseInstance","skipPastDehydratedSuspenseInstance","popToNextHostParent","popHydrationState","warnIfUnhydratedTailNodes","hasUnhydratedTailNodes","resetHydrationState","upgradeHydrationErrorsToRecoverable","queueRecoverableErrors","queueHydrationError","ReactCurrentBatchConfig$1","NoTransition","requestCurrentTransition","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","didWarnAboutMaps","didWarnAboutGenerators","didWarnAboutStringRefs","ownerHasKeyUseWarning","ownerHasFunctionTypeWarning","warnForMissingKey","_store","validated","isReactClass","coerceRef","mixedRef","ref","_self","resolvedInst","stringRef","_stringRef","refs","throwOnInvalidObjectType","newChild","childString","warnOnFunctionType","resolveLazy","lazyType","ChildReconciler","shouldTrackSideEffects","deleteChild","deleteRemainingChildren","currentFirstChild","mapRemainingChildren","existingChildren","existingChild","useFiber","clone","createWorkInProgress","placeChild","newFiber","lastPlacedIndex","newIndex","oldIndex","placeSingleChild","updateTextNode","created","createFiberFromText","existing","updateElement","elementType","updateFragment","isCompatibleFamilyForHotReloading","createFiberFromElement","updatePortal","portal","implementation","createFiberFromPortal","fragment","createFiberFromFragment","createChild","_created","_created2","_created3","updateSlot","oldFiber","updateFromMap","newIdx","matchedFiber","_matchedFiber","_matchedFiber2","_matchedFiber3","warnOnInvalidKey","knownKeys","reconcileChildrenArray","newChildren","resultingFirstChild","previousNewFiber","nextOldFiber","_newFiber","_numberOfForks","_newFiber2","_numberOfForks2","reconcileChildrenIterator","newChildrenIterable","iteratorFn","entries","_newChildren","_step","done","_newFiber3","_numberOfForks3","_newFiber4","_numberOfForks4","reconcileSingleTextNode","reconcileSingleElement","_existing","_created4","reconcileSinglePortal","reconcileChildFibers","isUnkeyedTopLevelFragment","mountChildFibers","cloneChildFibers","currentChild","resetChildFibers","resetWorkInProgress","valueCursor","rendererSigil","currentlyRenderingFiber","lastContextDependency","lastFullyObservedContext","isDisallowedContextReadInDEV","resetContextDependencies","enterDisallowedContextReadInDEV","exitDisallowedContextReadInDEV","pushProvider","providerFiber","_currentValue","_currentRenderer","popProvider","scheduleContextWorkOnParentPath","propagationRoot","childLanes","propagateContextChange","propagateContextChange_eager","nextFiber","dependency","firstContext","update","createUpdate","ForceUpdate","sharedQueue","shared","pending","parentSuspense","_alternate","prepareToReadContext","markWorkInProgressReceivedUpdate","readContext","contextItem","memoizedValue","concurrentQueues","pushConcurrentUpdateQueue","finishQueueingConcurrentUpdates","lastInterleavedUpdate","interleaved","firstInterleavedUpdate","lastPendingUpdate","firstPendingUpdate","enqueueConcurrentHookUpdate","markUpdateLaneFromFiberToRoot","enqueueConcurrentHookUpdateAndEagerlyBailout","enqueueConcurrentClassUpdate","enqueueConcurrentRenderForLane","unsafe_markUpdateLaneFromFiberToRoot","sourceFiber","warnAboutUpdateOnNotYetMountedFiberInDEV","UpdateState","ReplaceState","CaptureUpdate","hasForceUpdate","didWarnUpdateInsideUpdate","currentlyProcessingQueue","initializeUpdateQueue","baseState","firstBaseUpdate","lastBaseUpdate","effects","cloneUpdateQueue","currentQueue","enqueueUpdate","isUnsafeClassRenderPhaseUpdate","entangleTransitions","queueLanes","newQueueLanes","enqueueCapturedUpdate","capturedUpdate","newFirst","newLast","getStateFromUpdate","prevState","nextState","partialState","processUpdateQueue","pendingQueue","currentLastBaseUpdate","newState","newLanes","newBaseState","newFirstBaseUpdate","newLastBaseUpdate","updateEventTime","_clone","_lastPendingUpdate","_firstPendingUpdate","lastInterleaved","markSkippedUpdateLanes","resetHasForceUpdateBeforeProcessing","checkHasForceUpdateAfterProcessing","commitUpdateQueue","finishedWork","finishedQueue","effect","NO_CONTEXT","contextStackCursor$1","contextFiberStackCursor","rootInstanceStackCursor","requiredContext","getRootHostContainer","rootInstance","pushHostContainer","nextRootInstance","nextRootContext","popHostContainer","getHostContext","pushHostContext","nextContext","popHostContext","DefaultSuspenseContext","SubtreeSuspenseContextMask","InvisibleParentSuspenseContext","ForceSuspenseFallback","suspenseStackCursor","hasSuspenseContext","flag","setDefaultShallowSuspenseContext","setShallowSuspenseContext","shallowContext","addSubtreeSuspenseContext","subtreeContext","pushSuspenseContext","newContext","popSuspenseContext","shouldCaptureSuspense","hasInvisibleParent","findFirstSuspended","row","revealOrder","didSuspend","NoFlags$1","HasEffect","Insertion","Layout","Passive$1","workInProgressSources","resetWorkInProgressVersions","mutableSource","_workInProgressVersionPrimary","registerMutableSourceForHydration","getVersion","_getVersion","mutableSourceEagerHydrationData","ReactCurrentDispatcher$1","ReactCurrentBatchConfig$2","didWarnAboutMismatchedHooksForComponent","didWarnUncachedGetSnapshot","currentlyRenderingFiber$1","currentHook","workInProgressHook","didScheduleRenderPhaseUpdate","didScheduleRenderPhaseUpdateDuringThisPass","localIdCounter","globalClientIdCounter","RE_RENDER_LIMIT","currentHookNameInDev","hookTypesDev","hookTypesUpdateIndexDev","ignorePreviousDependencies","mountHookTypesDev","hookName","updateHookTypesDev","warnOnHookMismatchInDev","checkDepsAreArrayDev","deps","currentHookName","table","secondColumnStart","oldHookName","newHookName","throwInvalidHookError","areHookInputsEqual","nextDeps","prevDeps","renderWithHooks","secondArg","nextRenderLanes","_debugHookTypes","HooksDispatcherOnUpdateInDEV","HooksDispatcherOnMountWithHookTypesInDEV","HooksDispatcherOnMountInDEV","numberOfReRenders","HooksDispatcherOnRerenderInDEV","ContextOnlyDispatcher","didRenderTooFewHooks","checkDidRenderIdHook","didRenderIdHook","bailoutHooks","resetHooksAfterThrow","isUpdatingOpaqueValueInRenderPhase","mountWorkInProgressHook","baseQueue","updateWorkInProgressHook","nextCurrentHook","nextWorkInProgressHook","newHook","createFunctionComponentUpdateQueue","lastEffect","stores","basicStateReducer","mountReducer","reducer","initialArg","initialState","dispatch","lastRenderedReducer","lastRenderedState","dispatchReducerAction","updateReducer","baseFirst","pendingFirst","first","newBaseQueueFirst","newBaseQueueLast","hasEagerState","eagerState","interleavedLane","rerenderReducer","lastRenderPhaseUpdate","firstRenderPhaseUpdate","mountMutableSource","getSnapshot","subscribe","updateMutableSource","mountSyncExternalStore","getServerSnapshot","nextSnapshot","cachedSnapshot","getWorkInProgressRoot","pushStoreConsistencyCheck","mountEffect","subscribeToStore","pushEffect","updateStoreInstance","updateSyncExternalStore","prevSnapshot","snapshotChanged","updateEffect","renderedSnapshot","check","componentUpdateQueue","checkIfSnapshotChanged","forceStoreRerender","handleStoreChange","latestGetSnapshot","prevValue","scheduleUpdateOnFiber","mountState","dispatchSetState","updateState","rerenderState","create","destroy","firstEffect","mountRef","_ref2","updateRef","mountEffectImpl","fiberFlags","hookFlags","updateEffectImpl","prevEffect","mountInsertionEffect","updateInsertionEffect","mountLayoutEffect","updateLayoutEffect","imperativeHandleEffect","refCallback","_inst","refObject","_inst2","mountImperativeHandle","effectDeps","updateImperativeHandle","mountDebugValue","formatterFn","updateDebugValue","mountCallback","updateCallback","mountMemo","nextCreate","updateMemo","mountDeferredValue","updateDeferredValue","resolvedCurrentHook","updateDeferredValueImpl","rerenderDeferredValue","shouldDeferValue","deferredLane","startTransition","setPending","currentTransition","_updatedFibers","updatedFibersCount","mountTransition","_mountState","isPending","updateTransition","_updateState","rerenderTransition","_rerenderState","getIsUpdatingOpaqueValueInRenderPhaseInDEV","mountId","identifierPrefix","treeId","localId","globalClientId","updateId","requestUpdateLane","isRenderPhaseUpdate","enqueueRenderPhaseUpdate","requestEventTime","entangleTransitionUpdate","markUpdateInDevTools","prevDispatcher","InvalidNestedHooksDispatcherOnUpdateInDEV","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","InvalidNestedHooksDispatcherOnMountInDEV","InvalidNestedHooksDispatcherOnRerenderInDEV","warnInvalidContextAccess","warnInvalidHookAccess","now$1","commitTime","layoutEffectStartTime","profilerStartTime","passiveEffectStartTime","currentUpdateIsNested","nestedUpdateScheduled","isCurrentUpdateNested","markNestedUpdateScheduled","resetNestedUpdateFlag","syncNestedUpdateFlag","getCommitTime","recordCommitTime","startProfilerTimer","actualStartTime","stopProfilerTimerIfRunning","stopProfilerTimerIfRunningAndRecordDelta","overrideBaseTime","actualDuration","selfBaseDuration","recordLayoutEffectDuration","parentFiber","effectDuration","parentStateNode","recordPassiveEffectDuration","passiveEffectDuration","startLayoutEffectTimer","startPassiveEffectTimer","transferActualDuration","resolveDefaultProps","baseProps","defaultProps","fakeInternalInstance","didWarnAboutStateAssignmentForComponent","didWarnAboutUninitializedState","didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate","didWarnAboutLegacyLifecyclesAndDerivedState","didWarnAboutUndefinedDerivedState","warnOnUndefinedDerivedState","warnOnInvalidCallback","didWarnAboutDirectlyAssigningPropsToState","didWarnAboutContextTypeAndContextTypes","didWarnAboutInvalidateContextType","didWarnAboutLegacyContext$1","didWarnOnInvalidCallback","callerName","applyDerivedStateFromProps","getDerivedStateFromProps","classComponentUpdater","enqueueSetState","enqueueReplaceState","enqueueForceUpdate","checkShouldComponentUpdate","oldState","shouldComponentUpdate","isPureReactComponent","checkClassInstance","renderPresent","getInitialState","isReactClassApproved","getDefaultProps","propTypes","contextType","componentShouldUpdate","componentDidUnmount","componentDidReceiveProps","componentWillRecieveProps","UNSAFE_componentWillRecieveProps","hasMutatedProps","getSnapshotBeforeUpdate","componentDidUpdate","getDerivedStateFromError","_state","adoptClassInstance","updater","_reactInternalInstance","constructClassInstance","isLegacyContextConsumer","addendum","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","_componentName","newApiName","callComponentWillMount","callComponentWillReceiveProps","mountClassInstance","componentDidMount","resumeMountClassInstance","oldContext","nextLegacyUnmaskedContext","hasNewLifecycles","_fiberFlags","_fiberFlags2","updateClassInstance","unresolvedOldProps","unresolvedNewProps","nextUnmaskedContext","createCapturedValueAtFiber","createCapturedValue","showErrorDialog","boundary","errorInfo","logCapturedError","logError","componentStack","componentNameMessage","errorBoundaryMessage","errorBoundaryName","combinedMessage","PossiblyWeakMap$1","createRootErrorUpdate","onUncaughtError","createClassErrorUpdate","markFailedErrorBoundaryForHotReloading","componentDidCatch","markLegacyErrorBoundaryAsFailed","attachPingListener","pingCache","threadIDs","ping","pingSuspendedRoot","restorePendingUpdaters","attachRetryListener","suspenseBoundary","wakeables","resetSuspendedComponent","rootRenderLanes","currentSource","getNearestSuspenseBoundaryToCapture","markSuspenseBoundaryShouldCapture","currentSourceFiber","throwException","renderDidSuspendDelayIfPossible","uncaughtSuspenseError","_suspenseBoundary","renderDidError","_errorInfo","isAlreadyFailedLegacyErrorBoundary","_lane","_update","getSuspendedCache","ReactCurrentOwner$1","didReceiveUpdate","didWarnAboutBadClass","didWarnAboutModulePatternComponent","didWarnAboutContextTypeOnFunctionComponent","didWarnAboutGetDerivedStateOnFunctionComponent","didWarnAboutFunctionRefs","didWarnAboutReassigningProps","didWarnAboutRevealOrder","didWarnAboutTailOptions","didWarnAboutDefaultPropsOnFunctionComponent","reconcileChildren","nextChildren","forceUnmountCurrentAndReconcile","updateForwardRef","innerPropTypes","hasId","bailoutOnAlreadyFinishedWork","updateMemoComponent","isSimpleFunctionComponent","compare","resolvedType","resolveFunctionForHotReloading","validateFunctionComponentInDev","updateSimpleMemoComponent","createFiberFromTypeAndProps","_innerPropTypes","hasScheduledUpdateOrContext","checkScheduledUpdateOrContext","prevProps","outerMemoType","outerPropTypes","updateFunctionComponent","updateOffscreenComponent","baseLanes","cachePool","transitions","pushRenderLanes","spawnedCachePool","nextBaseLanes","prevBaseLanes","_nextState","_nextState2","subtreeRenderLanes","_subtreeRenderLanes","updateMode","updateProfiler","markRef","updateClassComponent","shouldError","tempInstance","hasContext","resetSuspendedCurrentOnMountInLegacyMode","nextUnitOfWork","finishClassComponent","didCaptureError","pushHostRootContext","pendingContext","updateHostRoot","prevChildren","overrideState","cache","pendingSuspenseBoundaries","recoverableError","mountHostRootWithoutHydrating","_recoverableError","updateHostComponent","isDirectTextChild","updateHostText","mountLazyComponent","_current","resolvedTag","resolveLazyComponentTag","resolvedProps","resolveClassForHotReloading","resolveForwardRefForHotReloading","hint","mountIncompleteClassComponent","mountIndeterminateComponent","_componentName2","debugSource","fileName","lineNumber","_componentName3","_componentName4","SUSPENDED_MARKER","mountSuspenseOffscreenState","updateSuspenseOffscreenState","prevOffscreenState","shouldRemainOnFallback","suspenseContext","getRemainingWorkInPrimaryTree","updateSuspenseComponent","shouldSuspend","showFallback","mountDehydratedSuspenseComponent","nextPrimaryChildren","nextFallbackChildren","fallback","fallbackFragment","mountSuspenseFallbackChildren","primaryChildFragment","mountSuspensePrimaryChildren","_dehydrated","updateDehydratedSuspenseComponent","_nextFallbackChildren","_nextPrimaryChildren","fallbackChildFragment","updateSuspenseFallbackChildren","_primaryChildFragment2","_nextPrimaryChildren2","_primaryChildFragment3","updateSuspensePrimaryChildren","primaryChildren","primaryChildProps","mountWorkInProgressOffscreenFiber","fallbackChildren","progressedPrimaryFragment","treeBaseDuration","offscreenProps","createFiberFromOffscreen","updateWorkInProgressOffscreenFiber","currentPrimaryChildFragment","currentFallbackChildFragment","subtreeFlags","retrySuspenseComponentWithoutHydrating","mountSuspenseFallbackAfterRetryWithoutHydrating","fiberMode","_getSuspenseInstanceF","capturedValue","attemptHydrationAtLane","_capturedValue","retry","retryDehydratedSuspenseBoundary","_capturedValue2","_primaryChildFragment4","scheduleSuspenseWorkOnFiber","propagateSuspenseContextChange","findLastContentRow","lastContentRow","currentRow","validateRevealOrder","validateTailOptions","tailMode","validateSuspenseListNestedChild","childSlot","isAnArray","isIterable","validateSuspenseListChildren","childrenIterator","initSuspenseListRenderState","isBackwards","tail","renderState","renderingStartTime","last","updateSuspenseListComponent","shouldForceFallback","didSuspendBefore","_tail","nextRow","updatePortalComponent","hasWarnedAboutUsingNoValuePropOnContextProvider","updateContextProvider","providerType","providerPropTypes","oldValue","hasWarnedAboutUsingContextAsConsumer","updateContextConsumer","Consumer","remountFiber","oldWorkInProgress","newWorkInProgress","prevSibling","updateLanes","attemptEarlyBailoutIfNoScheduledUpdate","hasChildWork","primaryChildLanes","_hasChildWork","beginWork","_debugNeedsRemount","unresolvedProps","_Component","_unresolvedProps","_resolvedProps","_unresolvedProps2","_resolvedProps2","_unresolvedProps3","_resolvedProps3","_Component2","_unresolvedProps4","_resolvedProps4","markUpdate","markRef$1","appendAllChildren","updateHostContainer","updateHostComponent$1","updateHostText$1","needsVisibilityToggle","isHidden","currentHostContext","cutOffTailIfNeeded","hasRenderedATailFallback","tailNode","lastTailNode","_tailNode","_lastTailNode","bubbleProperties","completedWork","didBailout","newChildLanes","_treeBaseDuration","_child2","_child3","completeDehydratedSuspenseBoundary","wasHydrated","isTimedOutSuspense","_isTimedOutSuspense","_primaryChildFragment","completeWork","fiberRoot","_wasHydrated","_rootContainerInstance","_currentHostContext","_wasHydrated2","fallthroughToNormalSuspensePath","nextDidTimeout","prevDidTimeout","_offscreenFiber2","hasInvisibleChildContext","unstable_avoidThisFallback","renderDidSuspend","didSuspendAlready","renderedTail","cannotBeSuspended","renderHasNotSuspendedYet","suspended","newThenables","getRenderTargetTime","_suspended","_newThenables","popRenderLanes","nextIsHidden","_prevState","prevIsHidden","unwindWork","_flags","_flags2","unwindInterruptedWork","interruptedWork","didWarnAboutUndefinedSnapshotBeforeUpdate","offscreenSubtreeIsHidden","offscreenSubtreeWasHidden","PossiblyWeakSet","WeakSet","nextEffect","inProgressLanes","inProgressRoot","reportUncaughtErrorInDEV","callComponentWillUnmountWithTimer","componentWillUnmount","safelyCallCommitHookLayoutEffectListMount","nearestMountedAncestor","commitHookEffectListMount","captureCommitPhaseError","safelyCallComponentWillUnmount","safelyCallComponentDidMount","safelyAttachRef","commitAttachRef","safelyDetachRef","retVal","safelyCallDestroy","focusedInstanceHandle","shouldFireAfterActiveInstanceBlur","commitBeforeMutationEffects","commitBeforeMutationEffects_begin","shouldFire","commitBeforeMutationEffects_complete","commitBeforeMutationEffectsOnFiber","snapshot","didWarnSet","__reactInternalSnapshotBeforeUpdate","commitHookEffectListUnmount","setIsRunningInsertionEffect","commitPassiveEffectDurations","finishedRoot","_finishedWork$memoize","onPostCommit","phase","commitLayoutEffectOnFiber","committedLanes","_updateQueue","_finishedWork$memoize2","onCommit","onRender","enqueuePendingPassiveProfilerEffect","commitSuspenseHydrationCallbacks","reappearLayoutEffectsOnFiber","hideOrUnhideAllChildren","hostSubtreeRoot","instanceToUse","detachFiberMutation","detachFiberAfterEffects","hostInstance","getHostParentFiber","isHostParent","getHostSibling","siblings","commitPlacement","before","insertOrAppendPlacementNode","_parent","_before","insertOrAppendPlacementNodeIntoContainer","isHost","hostParent","hostParentIsContainer","commitDeletionEffects","deletedFiber","findParent","commitDeletionEffectsOnFiber","recursivelyTraverseDeletionEffects","prevHostParent","prevHostParentIsContainer","_prevHostParent","_prevHostParentIsContainer","_effect","prevOffscreenSubtreeWasHidden","commitSuspenseCallback","attachSuspenseRetryListeners","retryCache","resolveRetryWakeable","commitMutationEffects","commitMutationEffectsOnFiber","recursivelyTraverseMutationEffects","prevDebugFiber","commitReconciliationEffects","prevRootState","offscreenFiber","offscreenInstance","wasHidden","markCommitTimeOfFallback","_wasHidden","_offscreenInstance","_newState","_isHidden","offscreenBoundary","offscreenChild","disappearLayoutEffects_begin","commitLayoutEffects","commitLayoutEffects_begin","subtreeRoot","isModernRoot","newOffscreenSubtreeIsHidden","commitLayoutMountEffects_complete","newOffscreenSubtreeWasHidden","prevOffscreenSubtreeIsHidden","reappearLayoutEffects_begin","disappearLayoutEffects_complete","reappearLayoutEffects_complete","commitPassiveMountEffects","committedTransitions","commitPassiveMountEffects_begin","commitPassiveMountEffects_complete","commitPassiveMountOnFiber","commitPassiveUnmountEffects","commitPassiveUnmountEffects_begin","fiberToDelete","commitPassiveUnmountEffectsInsideOfDeletedTree_begin","previousFiber","detachedChild","detachedSibling","commitPassiveUnmountEffects_complete","commitPassiveUnmountOnFiber","deletedSubtreeRoot","commitPassiveUnmountInsideDeletedTreeOnFiber","commitPassiveUnmountEffectsInsideOfDeletedTree_complete","invokeLayoutEffectMountInDEV","invokePassiveEffectMountInDEV","invokeLayoutEffectUnmountInDEV","invokePassiveEffectUnmountInDEV","COMPONENT_TYPE","HAS_PSEUDO_CLASS_TYPE","ROLE_TYPE","TEST_NAME_TYPE","TEXT_TYPE","symbolFor","commitHooks","onCommitRoot$1","commitHook","ReactCurrentActQueue","isLegacyActEnvironment","isReactActEnvironmentGlobal","IS_REACT_ACT_ENVIRONMENT","jestIsDefined","jest","isConcurrentActEnvironment","ceil","ReactCurrentDispatcher$2","ReactCurrentOwner$2","ReactCurrentBatchConfig$3","ReactCurrentActQueue$1","NoContext","BatchedContext","RenderContext","CommitContext","RootInProgress","RootFatalErrored","RootErrored","RootSuspended","RootSuspendedWithDelay","RootCompleted","RootDidNotComplete","executionContext","workInProgressRoot","workInProgressRootRenderLanes","subtreeRenderLanesCursor","workInProgressRootExitStatus","workInProgressRootFatalError","workInProgressRootIncludedLanes","workInProgressRootSkippedLanes","workInProgressRootInterleavedUpdatedLanes","workInProgressRootPingedLanes","workInProgressRootConcurrentErrors","workInProgressRootRecoverableErrors","globalMostRecentFallbackTime","FALLBACK_THROTTLE_MS","workInProgressRootRenderTargetTime","Infinity","RENDER_TIMEOUT_MS","workInProgressTransitions","resetRenderTimer","hasUncaughtError","firstUncaughtError","legacyErrorBoundariesThatAlreadyFailed","rootDoesHavePassiveEffects","rootWithPendingPassiveEffects","pendingPassiveEffectsLanes","pendingPassiveProfilerEffects","pendingPassiveTransitions","NESTED_UPDATE_LIMIT","nestedUpdateCount","rootWithNestedUpdates","isFlushingPassiveEffects","didScheduleUpdateDuringPassiveEffects","NESTED_PASSIVE_UPDATE_LIMIT","nestedPassiveUpdateCount","rootWithPassiveNestedUpdates","currentEventTime","currentEventTransitionLane","isRunningInsertionEffect","isTransition","eventLane","requestRetryLane","checkForNestedUpdates","warnAboutRenderPhaseUpdatesInDEV","warnIfUpdatesNotWrappedWithActDEV","markRootSuspended$1","ensureRootIsScheduled","isBatchingLegacy","scheduleInitialHydrationOnRoot","existingCallbackNode","callbackNode","cancelCallback$1","callbackPriority","newCallbackPriority","existingCallbackPriority","fakeActCallbackNode","newCallbackNode","didScheduleLegacyUpdate","performSyncWorkOnRoot","schedulerPriorityLevel","scheduleCallback$1","performConcurrentWorkOnRoot","didTimeout","originalCallbackNode","didFlushPassiveEffects","flushPassiveEffects","shouldTimeSlice","exitStatus","renderRootConcurrent","renderRootSync","errorRetryLanes","recoverFromConcurrentError","fatalError","prepareFreshStack","renderWasConcurrent","isRenderConsistentWithExternalStores","_errorRetryLanes","_fatalError","finishedLanes","finishConcurrentRender","errorsFromFirstAttempt","rootWorkInProgress","errorsFromSecondAttempt","errors","commitRoot","shouldForceFlushFallbacksInDEV","msUntilTimeout","timeoutHandle","eventTimeMs","timeElapsedMs","_msUntilTimeout","jnd","checks","renderedValue","flushRoot","batchedUpdates$1","prevExecutionContext","discreteUpdates","flushSync","isAlreadyRendering","handleError","erroredWork","completeUnitOfWork","yetAnotherThrownValue","pushDispatcher","popDispatcher","workLoopSync","performUnitOfWork","workLoopConcurrent","unitOfWork","beginWork$1","_next","siblingFiber","recoverableErrors","previousUpdateLanePriority","commitRootImpl","renderPriorityLevel","flushRenderPhaseStrictModeWarningsInDEV","subtreeHasEffects","rootHasEffect","rootDidHavePassiveEffects","commitDoubleInvokeEffectsInDEV","onRecoverableError","renderPriority","flushPassiveEffectsImpl","profilerEffects","_fiber","prepareToThrowUncaughtError","captureCommitPhaseErrorOnRoot","rootFiber","warnIfSuspenseResolutionNotWrappedWithActDEV","retryTimedOutBoundary","boundaryFiber","timeElapsed","hasPassiveEffects","invokeEffectsInDev","invokeEffectFn","primarySubtreeFlag","didWarnStateUpdateForNotYetMountedComponent","dummyFiber","originalWorkInProgressCopy","assignFiberPropertiesInDEV","originalError","replayError","didWarnAboutUpdateInRender","didWarnAboutUpdateInRenderForAnotherComponent","renderingComponentName","dedupeKey","setStateComponentName","schedulingFiber","priorityLevel","actQueue","isRunning","resolveFamily","failedBoundaries","setRefreshHandler","handler","family","currentRender","syntheticType","prevType","nextType","needsCompareFamilies","$$typeofNextType","prevFamily","scheduleRefresh","staleFamilies","updatedFamilies","scheduleFibersWithFamiliesRecursively","scheduleRoot","updateContainer","candidateType","needsRender","needsRemount","_root","findHostInstancesForRefresh","families","hostInstances","types","findHostInstancesForMatchingFibersRecursively","didMatch","findHostInstancesForFiberShallowly","foundHostInstances","findChildHostInstancesForFiberShallowly","hasBadMapPolyfill","nonExtensibleObject","preventExtensions","FiberNode","Number","NaN","createFiber","shouldConstruct$1","currentDependencies","createHostRootFiber","isStrictMode","concurrentUpdatesByDefaultOverride","fiberTag","getTag","createFiberFromProfiler","createFiberFromSuspense","createFiberFromSuspenseList","elements","primaryChildInstance","dehydratedNode","pendingChildren","FiberRootNode","hydrate","_debugRootType","createFiberRoot","initialChildren","hydrationCallbacks","transitionCallbacks","uninitializedFiber","_initialState","ReactVersion","createPortal","didWarnAboutNestedUpdates","didWarnAboutFindNodeInStrictMode","getContextForSubtree","parentComponent","findHostInstanceWithWarning","methodName","hostFiber","createContainer","createHydrationContainer","current$1","getPublicRootInstance","containerFiber","attemptSynchronousHydration$1","markRetryLaneIfNotHydrated","markRetryLaneImpl","attemptContinuousHydration$1","attemptHydrationAtCurrentPriority$1","findHostInstanceWithNoPortals","shouldErrorImpl","shouldSuspendImpl","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","scheduleUpdate","setErrorHandler","setSuspenseHandler","copyWithDeleteImpl","obj","path","updated","copyWithDelete","copyWithRenameImpl","oldPath","newPath","oldKey","newKey","copyWithRename","copyWithSetImpl","copyWithSet","findHook","newShouldErrorImpl","newShouldSuspendImpl","findHostInstanceByFiber","emptyFindFiberByHostInstance","getCurrentFiberForDevTools","injectIntoDevTools","devToolsConfig","findFiberByHostInstance","bundleType","rendererPackageName","rendererConfig","currentDispatcherRef","reconcilerVersion","defaultOnRecoverableError","reportError","ReactDOMRoot","internalRoot","_internalRoot","ReactDOMHydrationRoot","isValidContainer","unmount","createRoot","warnIfReactDOMContainerInDEV","unstable_strictMode","scheduleHydration","unstable_scheduleHydration","hydrateRoot","mutableSources","hydratedSources","isValidContainerLegacy","ReactCurrentOwner$3","topLevelUpdateWarnings","isRootRenderedBySomeReact","rootEl","getReactRootElementInContainer","hasNonRootReactChild","noopOnRecoverableError","legacyCreateRootFromDOMContainer","isHydrationContainer","originalCallback","rootSibling","_originalCallback","_rootContainerElement","warnOnInvalidCallback$1","legacyRenderSubtreeIntoContainer","forceHydrate","maybeRoot","didWarnAboutFindDOMNode","findDOMNode","componentOrElement","warnedAboutRefsInRender","unstable_renderSubtreeIntoContainer","containerNode","didWarnAboutUnmountComponentAtNode","unmountComponentAtNode","renderedByDifferentReact","_rootEl","isContainerReactRoot","createPortal$1","renderSubtreeIntoContainer","Internals","usingClientEntryPoint","Events","createRoot$1","hydrateRoot$1","flushSync$1","foundDevTools","self","navigator","userAgent","protocol","exports","unstable_batchedUpdates","registerInternalModuleStop"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/react-dom/cjs/react-dom.development.js"],"sourcesContent":["/**\n * @license React\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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar Scheduler = require('scheduler');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar suppressWarning = false;\nfunction setSuppressWarning(newSuppressWarning) {\n {\n suppressWarning = newSuppressWarning;\n }\n} // In DEV, calls to console.warn and console.error get replaced\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 if (!suppressWarning) {\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}\nfunction error(format) {\n {\n if (!suppressWarning) {\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\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 ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(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}\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 ScopeComponent = 21;\nvar OffscreenComponent = 22;\nvar LegacyHiddenComponent = 23;\nvar CacheComponent = 24;\nvar TracingMarkerComponent = 25;\n\n// -----------------------------------------------------------------------------\n\nvar enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing\n// the react-reconciler package.\n\nvar enableNewReconciler = false; // Support legacy Primer support on internal FB www\n\nvar enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n\nvar enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz\n// React DOM Chopping Block\n//\n// Similar to main Chopping Block but only flags related to React DOM. These are\n// grouped because we will likely batch all of them into a single major release.\n// -----------------------------------------------------------------------------\n// Disable support for comment nodes as React DOM containers. Already disabled\n// in open source, but www codebase still relies on it. Need to remove.\n\nvar disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection.\n// and client rendering, mostly to allow JSX attributes to apply to the custom\n// element's object properties instead of only HTML attributes.\n// https://github.com/facebook/react/issues/11347\n\nvar enableCustomElementPropertySupport = false; // Disables children for <textarea> elements\nvar warnAboutStringRefs = true; // -----------------------------------------------------------------------------\n// Debugging and DevTools\n// -----------------------------------------------------------------------------\n// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,\n// for an experimental timeline tool.\n\nvar enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState\n\nvar enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\nvar enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an \"update\" and a \"cascading-update\".\n\nvar allNativeEvents = new Set();\n/**\n * Mapping from registration name to event name\n */\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\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + 'Capture', dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n {\n if (registrationNameDependencies[registrationName]) {\n error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n }\n }\n\n registrationNameDependencies[registrationName] = 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 for (var i = 0; i < dependencies.length; i++) {\n allNativeEvents.add(dependencies[i]);\n }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkPropStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n {\n if (willCoercionThrow(value)) {\n error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkHtmlStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\nfunction checkFormFieldValueStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\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 filter 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 VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\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\n return false;\n }\n\n if (propertyInfo !== null) {\n\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, removeEmptyString) {\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 this.removeEmptyString = removeEmptyString;\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, // sanitizeURL\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, // sanitizeURL\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, // sanitizeURL\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, // sanitizeURL\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', 'disableRemotePlayback', '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, // sanitizeURL\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, // sanitizeURL\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, // sanitizeURL\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, // sanitizeURL\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, // sanitizeURL\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 attribute filter.\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, // sanitizeURL\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, // sanitizeURL\n 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, // sanitizeURL\n 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, // sanitizeURL\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, // sanitizeURL\nfalse);\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, // sanitizeURL\n true);\n});\n\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\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 // This check protects multiple uses of `expected`, which is why the\n // react-internal/safe-string-coercion rule is disabled in several spots\n // below.\n {\n checkAttributeStringCoercion(expected, name);\n }\n\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 // eslint-disable-next-line react-internal/safe-string-coercion\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 } // eslint-disable-next-line react-internal/safe-string-coercion\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; // eslint-disable-next-line react-internal/safe-string-coercion\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, isCustomComponentTag) {\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 {\n checkAttributeStringCoercion(expected, name);\n }\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 }\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 {\n checkAttributeStringCoercion(value, name);\n }\n\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 {\n checkAttributeStringCoercion(value, attributeName);\n }\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// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker');\nvar MAYBE_ITERATOR_SYMBOL = 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 assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nfunction describeFiber(fiber) {\n var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;\n var source = fiber._debugSource ;\n\n switch (fiber.tag) {\n case HostComponent:\n return describeBuiltInComponentFrame(fiber.type);\n\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy');\n\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(fiber.type);\n\n case ForwardRef:\n return describeFunctionComponentFrame(fiber.type.render);\n\n case ClassComponent:\n return describeClassComponentFrame(fiber.type);\n\n default:\n return '';\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\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 } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(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 getComponentNameFromType(). ' + '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\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nfunction getWrappedName$1(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n} // Keep in sync with shared/getComponentNameFromType\n\n\nfunction getContextName$1(type) {\n return type.displayName || 'Context';\n}\n\nfunction getComponentNameFromFiber(fiber) {\n var tag = fiber.tag,\n type = fiber.type;\n\n switch (tag) {\n case CacheComponent:\n return 'Cache';\n\n case ContextConsumer:\n var context = type;\n return getContextName$1(context) + '.Consumer';\n\n case ContextProvider:\n var provider = type;\n return getContextName$1(provider._context) + '.Provider';\n\n case DehydratedFragment:\n return 'DehydratedFragment';\n\n case ForwardRef:\n return getWrappedName$1(type, type.render, 'ForwardRef');\n\n case Fragment:\n return 'Fragment';\n\n case HostComponent:\n // Host component type is the display name (e.g. \"div\", \"View\")\n return type;\n\n case HostPortal:\n return 'Portal';\n\n case HostRoot:\n return 'Root';\n\n case HostText:\n return 'Text';\n\n case LazyComponent:\n // Name comes from the type in this case; we don't have a tag.\n return getComponentNameFromType(type);\n\n case Mode:\n if (type === REACT_STRICT_MODE_TYPE) {\n // Don't be less specific than shared/getComponentNameFromType\n return 'StrictMode';\n }\n\n return 'Mode';\n\n case OffscreenComponent:\n return 'Offscreen';\n\n case Profiler:\n return 'Profiler';\n\n case ScopeComponent:\n return 'Scope';\n\n case SuspenseComponent:\n return 'Suspense';\n\n case SuspenseListComponent:\n return 'SuspenseList';\n\n case TracingMarkerComponent:\n return 'TracingMarker';\n // The display name for this tags come from the user-provided type:\n\n case ClassComponent:\n case FunctionComponent:\n case IncompleteClassComponent:\n case IndeterminateComponent:\n case MemoComponent:\n case SimpleMemoComponent:\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 break;\n\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\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 getComponentNameFromFiber(owner);\n }\n }\n\n return null;\n}\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}\n\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n}\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n}\nfunction getCurrentFiber() {\n {\n return current;\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 // The coercion safety check is performed in getToStringValue().\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'string':\n case 'undefined':\n return value;\n\n case 'object':\n {\n checkFormFieldValueStringCoercion(value);\n }\n\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n 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\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n 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\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\n {\n checkFormFieldValueStringCoercion(node[valueField]);\n }\n\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 {\n checkFormFieldValueStringCoercion(value);\n }\n\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 {\n checkFormFieldValueStringCoercion(value);\n }\n\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\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\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 var hostProps = assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n return hostProps;\n}\nfunction initWrapperState(element, props) {\n {\n checkControlledValueProps('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://reactjs.org/link/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://reactjs.org/link/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 to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n didWarnUncontrolledToControlled = true;\n }\n\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\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 {\n checkAttributeStringCoercion(name, 'name');\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(otherNode);\n\n if (!otherProps) {\n throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');\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' || getActiveElement(node.ownerDocument) !== 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;\nvar didWarnInvalidInnerHTML = false;\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\nfunction validateProps(element, props) {\n {\n // If a value is not provided, then the children must be simple.\n if (props.value == null) {\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 (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n\n error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n }\n });\n } else if (props.dangerouslySetInnerHTML != null) {\n if (!didWarnInvalidInnerHTML) {\n didWarnInvalidInnerHTML = true;\n\n error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\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}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\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 checkControlledValueProps('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 propNameIsArray = isArray(props[propName]);\n\n if (props.multiple && !propNameIsArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && propNameIsArray) {\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$1(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://reactjs.org/link/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$2(element, props) {\n var node = element;\n\n if (props.dangerouslySetInnerHTML != null) {\n throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\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 checkControlledValueProps('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://reactjs.org/link/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 throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n }\n\n if (isArray(children)) {\n if (children.length > 1) {\n throw new Error('<textarea> can only have at most one child.');\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'; // 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 === SVG_NAMESPACE) {\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// 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 aspectRatio: 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 {\n checkCSSPropertyStringCoercion(value, name);\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 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 list 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';\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 throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n }\n }\n\n if (props.dangerouslySetInnerHTML != null) {\n if (props.children != null) {\n throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n }\n\n if (typeof props.dangerouslySetInnerHTML !== 'object' || !(HTML in props.dangerouslySetInnerHTML)) {\n throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\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 throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\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 list 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 allowed attribute list, 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 disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\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 imagesizes: 'imageSizes',\n imagesrcset: 'imageSrcSet',\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-description': 0,\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 + ']*$');\n\nfunction validateProperty(tagName, name) {\n {\n if (hasOwnProperty.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://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', 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 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, eventRegistry) {\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 (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.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, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], eventRegistry);\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://reactjs.org/link/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://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n }\n }\n};\n\nfunction validateProperties$2(type, props, eventRegistry) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\nvar IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\nvar IS_NON_DELEGATED = 1 << 1;\nvar IS_CAPTURE_PHASE = 1 << 2;\n// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n// we call willDeferLaterForLegacyFBSupport, thus not bailing out\n// will result in endless cycles like an infinite loop.\n// We also don't want to defer during event replaying.\n\nvar SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n// This exists to avoid circular dependency between ReactDOMEventReplaying\n// and DOMPluginEventSystem.\nvar currentReplayingEvent = null;\nfunction setReplayingEvent(event) {\n {\n if (currentReplayingEvent !== null) {\n error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n currentReplayingEvent = event;\n}\nfunction resetReplayingEvent() {\n {\n if (currentReplayingEvent === null) {\n error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n currentReplayingEvent = null;\n}\nfunction isReplayingEvent(event) {\n return event === currentReplayingEvent;\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\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 throw new 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 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\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 flushSyncImpl = function () {};\n\nvar isInsideEventHandler = 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 // TODO: Restore state in the microtask, after the discrete updates flush,\n // instead of early flushing them here.\n flushSyncImpl();\n restoreStateIfNeeded();\n }\n}\n\nfunction batchedUpdates(fn, a, b) {\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(a, b);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdatesImpl(fn, a, b);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n} // TODO: Replace with flushSync\nfunction setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n flushSyncImpl = _flushSyncImpl;\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 stateNode = inst.stateNode;\n\n if (stateNode === null) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (props === null) {\n // Work in progress.\n return null;\n }\n\n var listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (listener && typeof listener !== 'function') {\n throw new Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n }\n\n return listener;\n}\n\nvar passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\nif (canUseDOM) {\n try {\n var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value\n\n Object.defineProperty(options, 'passive', {\n get: function () {\n passiveBrowserEventsSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (e) {\n passiveBrowserEventsSupported = false;\n }\n}\n\nfunction invokeGuardedCallbackProd(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\nvar invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\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 invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(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/facebook/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (typeof document === 'undefined' || document === null) {\n throw new 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 var evt = document.createEvent('Event');\n var didCall = false; // 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');\n\n function restoreAfterDispatch() {\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 } // 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\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n function callCallback() {\n didCall = true;\n restoreAfterDispatch();\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 (didCall && didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n // eslint-disable-next-line react-internal/prod-error-codes\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 // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://reactjs.org/link/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 if (!didCall) {\n // Something went really wrong, and our event was not dispatched.\n // https://github.com/facebook/react/issues/16734\n // https://github.com/facebook/react/issues/16585\n // Fall back to the production implementation.\n restoreAfterDispatch();\n return invokeGuardedCallbackProd.apply(this, arguments);\n }\n };\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 throw new 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 * `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._reactInternals;\n}\nfunction has(key) {\n return key._reactInternals !== undefined;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoFlags =\n/* */\n0;\nvar PerformedWork =\n/* */\n1; // You can change the rest (and add more).\n\nvar Placement =\n/* */\n2;\nvar Update =\n/* */\n4;\nvar ChildDeletion =\n/* */\n16;\nvar ContentReset =\n/* */\n32;\nvar Callback =\n/* */\n64;\nvar DidCapture =\n/* */\n128;\nvar ForceClientRender =\n/* */\n256;\nvar Ref =\n/* */\n512;\nvar Snapshot =\n/* */\n1024;\nvar Passive =\n/* */\n2048;\nvar Hydrating =\n/* */\n4096;\nvar Visibility =\n/* */\n8192;\nvar StoreConsistency =\n/* */\n16384;\nvar LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)\n\nvar HostEffectMask =\n/* */\n32767; // These are not really side effects, but we still reuse this field.\n\nvar Incomplete =\n/* */\n32768;\nvar ShouldCapture =\n/* */\n65536;\nvar ForceUpdateForLegacySuspense =\n/* */\n131072;\nvar Forked =\n/* */\n1048576; // Static tags describe aspects of a fiber that are not specific to a render,\n// e.g. a fiber uses a passive effect (even if there are no updates on this particular render).\n// This enables us to defer more work in the unmount case,\n// since we can defer traversing the tree during layout to look for Passive effects,\n// and instead rely on the static flag as a signal that there may be cleanup work.\n\nvar RefStatic =\n/* */\n2097152;\nvar LayoutStatic =\n/* */\n4194304;\nvar PassiveStatic =\n/* */\n8388608; // These flags allow us to traverse to fibers that have effects on mount\n// without traversing the entire tree after every commit for\n// double invoking\n\nvar MountLayoutDev =\n/* */\n16777216;\nvar MountPassiveDev =\n/* */\n33554432; // Groups of flags that are used in the commit phase to skip over trees that\n// don't contain effects, by checking subtreeFlags.\n\nvar BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility\n// flag logic (see #20043)\nUpdate | Snapshot | ( 0);\nvar MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;\nvar LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask\n\nvar PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.\n// This allows certain concepts to persist without recalculating them,\n// e.g. whether a subtree contains passive effects or portals.\n\nvar StaticMask = LayoutStatic | PassiveStatic | RefStatic;\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.flags & (Placement | Hydrating)) !== NoFlags) {\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.', getComponentNameFromFiber(ownerFiber) || '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 throw new Error('Unable to find node on an unmounted component.');\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 throw new Error('Unable to find node on an unmounted component.');\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 throw new Error('Unable to find node on an unmounted component.');\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 throw new 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 if (a.alternate !== b) {\n throw new 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 } // 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 throw new Error('Unable to find node on an unmounted component.');\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 return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n }\n\n var child = node.child;\n\n while (child !== null) {\n var match = findCurrentHostFiberImpl(child);\n\n if (match !== null) {\n return match;\n }\n\n child = child.sibling;\n }\n\n return null;\n}\n\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberWithNoPortalsImpl(node) {\n // Next we'll drill down this component to find the first HostComponent/Text.\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n }\n\n var child = node.child;\n\n while (child !== null) {\n if (child.tag !== HostPortal) {\n var match = findCurrentHostFiberWithNoPortalsImpl(child);\n\n if (match !== null) {\n return match;\n }\n }\n\n child = child.sibling;\n }\n\n return null;\n}\n\n// This module only exists as an ESM wrapper around the external CommonJS\nvar scheduleCallback = Scheduler.unstable_scheduleCallback;\nvar cancelCallback = Scheduler.unstable_cancelCallback;\nvar shouldYield = Scheduler.unstable_shouldYield;\nvar requestPaint = Scheduler.unstable_requestPaint;\nvar now = Scheduler.unstable_now;\nvar getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;\nvar ImmediatePriority = Scheduler.unstable_ImmediatePriority;\nvar UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;\nvar NormalPriority = Scheduler.unstable_NormalPriority;\nvar LowPriority = Scheduler.unstable_LowPriority;\nvar IdlePriority = Scheduler.unstable_IdlePriority;\n// this doesn't actually exist on the scheduler, but it *does*\n// on scheduler/unstable_mock, which we'll need for internal testing\nvar unstable_yieldValue = Scheduler.unstable_yieldValue;\nvar unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;\n\nvar rendererID = null;\nvar injectedHook = null;\nvar injectedProfilingHooks = 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://reactjs.org/link/react-devtools');\n } // DevTools exists, even though it doesn't support Fiber.\n\n\n return true;\n }\n\n try {\n if (enableSchedulingProfiler) {\n // Conditionally inject these hooks only if Timeline profiler is supported by this build.\n // This gives DevTools a way to feature detect that isn't tied to version number\n // (since profiling and timeline are controlled by different feature flags).\n internals = assign({}, internals, {\n getLaneLabelMap: getLaneLabelMap,\n injectProfilingHooks: injectProfilingHooks\n });\n }\n\n rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n injectedHook = hook;\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 }\n\n if (hook.checkDCE) {\n // This is the real DevTools.\n return true;\n } else {\n // This is likely a hook installed by Fast Refresh runtime.\n return false;\n }\n}\nfunction onScheduleRoot(root, children) {\n {\n if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n try {\n injectedHook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if ( !hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitRoot(root, eventPriority) {\n if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n try {\n var didError = (root.current.flags & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n var schedulerPriority;\n\n switch (eventPriority) {\n case DiscreteEventPriority:\n schedulerPriority = ImmediatePriority;\n break;\n\n case ContinuousEventPriority:\n schedulerPriority = UserBlockingPriority;\n break;\n\n case DefaultEventPriority:\n schedulerPriority = NormalPriority;\n break;\n\n case IdleEventPriority:\n schedulerPriority = IdlePriority;\n break;\n\n default:\n schedulerPriority = NormalPriority;\n break;\n }\n\n injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);\n } else {\n injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);\n }\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onPostCommitRoot(root) {\n if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, root);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitUnmount(fiber) {\n if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n try {\n injectedHook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n {\n if (typeof unstable_yieldValue === 'function') {\n // We're in a test because Scheduler.unstable_yieldValue only exists\n // in SchedulerMock. To reduce the noise in strict mode tests,\n // suppress warnings and disable scheduler yielding during the double render\n unstable_setDisableYieldValue(newIsStrictMode);\n setSuppressWarning(newIsStrictMode);\n }\n\n if (injectedHook && typeof injectedHook.setStrictMode === 'function') {\n try {\n injectedHook.setStrictMode(rendererID, newIsStrictMode);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n} // Profiler API hooks\n\nfunction injectProfilingHooks(profilingHooks) {\n injectedProfilingHooks = profilingHooks;\n}\n\nfunction getLaneLabelMap() {\n {\n var map = new Map();\n var lane = 1;\n\n for (var index = 0; index < TotalLanes; index++) {\n var label = getLabelForLane(lane);\n map.set(lane, label);\n lane *= 2;\n }\n\n return map;\n }\n}\n\nfunction markCommitStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {\n injectedProfilingHooks.markCommitStarted(lanes);\n }\n }\n}\nfunction markCommitStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {\n injectedProfilingHooks.markCommitStopped();\n }\n }\n}\nfunction markComponentRenderStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {\n injectedProfilingHooks.markComponentRenderStarted(fiber);\n }\n }\n}\nfunction markComponentRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {\n injectedProfilingHooks.markComponentRenderStopped();\n }\n }\n}\nfunction markComponentPassiveEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);\n }\n }\n}\nfunction markComponentPassiveEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectMountStopped();\n }\n }\n}\nfunction markComponentPassiveEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);\n }\n }\n}\nfunction markComponentPassiveEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();\n }\n }\n}\nfunction markComponentLayoutEffectMountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);\n }\n }\n}\nfunction markComponentLayoutEffectMountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectMountStopped();\n }\n }\n}\nfunction markComponentLayoutEffectUnmountStarted(fiber) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);\n }\n }\n}\nfunction markComponentLayoutEffectUnmountStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {\n injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();\n }\n }\n}\nfunction markComponentErrored(fiber, thrownValue, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {\n injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);\n }\n }\n}\nfunction markComponentSuspended(fiber, wakeable, lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {\n injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);\n }\n }\n}\nfunction markLayoutEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {\n injectedProfilingHooks.markLayoutEffectsStarted(lanes);\n }\n }\n}\nfunction markLayoutEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {\n injectedProfilingHooks.markLayoutEffectsStopped();\n }\n }\n}\nfunction markPassiveEffectsStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {\n injectedProfilingHooks.markPassiveEffectsStarted(lanes);\n }\n }\n}\nfunction markPassiveEffectsStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {\n injectedProfilingHooks.markPassiveEffectsStopped();\n }\n }\n}\nfunction markRenderStarted(lanes) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {\n injectedProfilingHooks.markRenderStarted(lanes);\n }\n }\n}\nfunction markRenderYielded() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {\n injectedProfilingHooks.markRenderYielded();\n }\n }\n}\nfunction markRenderStopped() {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {\n injectedProfilingHooks.markRenderStopped();\n }\n }\n}\nfunction markRenderScheduled(lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {\n injectedProfilingHooks.markRenderScheduled(lane);\n }\n }\n}\nfunction markForceUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {\n injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);\n }\n }\n}\nfunction markStateUpdateScheduled(fiber, lane) {\n {\n if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {\n injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);\n }\n }\n}\n\nvar NoMode =\n/* */\n0; // TODO: Remove ConcurrentMode by reading from the root tag instead\n\nvar ConcurrentMode =\n/* */\n1;\nvar ProfileMode =\n/* */\n2;\nvar StrictLegacyMode =\n/* */\n8;\nvar StrictEffectsMode =\n/* */\n16;\n\n// TODO: This is pretty well supported by browsers. Maybe we can drop it.\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n var asUint = x >>> 0;\n\n if (asUint === 0) {\n return 32;\n }\n\n return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n// If those values are changed that package should be rebuilt and redeployed.\n\nvar TotalLanes = 31;\nvar NoLanes =\n/* */\n0;\nvar NoLane =\n/* */\n0;\nvar SyncLane =\n/* */\n1;\nvar InputContinuousHydrationLane =\n/* */\n2;\nvar InputContinuousLane =\n/* */\n4;\nvar DefaultHydrationLane =\n/* */\n8;\nvar DefaultLane =\n/* */\n16;\nvar TransitionHydrationLane =\n/* */\n32;\nvar TransitionLanes =\n/* */\n4194240;\nvar TransitionLane1 =\n/* */\n64;\nvar TransitionLane2 =\n/* */\n128;\nvar TransitionLane3 =\n/* */\n256;\nvar TransitionLane4 =\n/* */\n512;\nvar TransitionLane5 =\n/* */\n1024;\nvar TransitionLane6 =\n/* */\n2048;\nvar TransitionLane7 =\n/* */\n4096;\nvar TransitionLane8 =\n/* */\n8192;\nvar TransitionLane9 =\n/* */\n16384;\nvar TransitionLane10 =\n/* */\n32768;\nvar TransitionLane11 =\n/* */\n65536;\nvar TransitionLane12 =\n/* */\n131072;\nvar TransitionLane13 =\n/* */\n262144;\nvar TransitionLane14 =\n/* */\n524288;\nvar TransitionLane15 =\n/* */\n1048576;\nvar TransitionLane16 =\n/* */\n2097152;\nvar RetryLanes =\n/* */\n130023424;\nvar RetryLane1 =\n/* */\n4194304;\nvar RetryLane2 =\n/* */\n8388608;\nvar RetryLane3 =\n/* */\n16777216;\nvar RetryLane4 =\n/* */\n33554432;\nvar RetryLane5 =\n/* */\n67108864;\nvar SomeRetryLane = RetryLane1;\nvar SelectiveHydrationLane =\n/* */\n134217728;\nvar NonIdleLanes =\n/* */\n268435455;\nvar IdleHydrationLane =\n/* */\n268435456;\nvar IdleLane =\n/* */\n536870912;\nvar OffscreenLane =\n/* */\n1073741824; // This function is used for the experimental timeline (react-devtools-timeline)\n// It should be kept in sync with the Lanes values above.\n\nfunction getLabelForLane(lane) {\n {\n if (lane & SyncLane) {\n return 'Sync';\n }\n\n if (lane & InputContinuousHydrationLane) {\n return 'InputContinuousHydration';\n }\n\n if (lane & InputContinuousLane) {\n return 'InputContinuous';\n }\n\n if (lane & DefaultHydrationLane) {\n return 'DefaultHydration';\n }\n\n if (lane & DefaultLane) {\n return 'Default';\n }\n\n if (lane & TransitionHydrationLane) {\n return 'TransitionHydration';\n }\n\n if (lane & TransitionLanes) {\n return 'Transition';\n }\n\n if (lane & RetryLanes) {\n return 'Retry';\n }\n\n if (lane & SelectiveHydrationLane) {\n return 'SelectiveHydration';\n }\n\n if (lane & IdleHydrationLane) {\n return 'IdleHydration';\n }\n\n if (lane & IdleLane) {\n return 'Idle';\n }\n\n if (lane & OffscreenLane) {\n return 'Offscreen';\n }\n }\n}\nvar NoTimestamp = -1;\nvar nextTransitionLane = TransitionLane1;\nvar nextRetryLane = RetryLane1;\n\nfunction getHighestPriorityLanes(lanes) {\n switch (getHighestPriorityLane(lanes)) {\n case SyncLane:\n return SyncLane;\n\n case InputContinuousHydrationLane:\n return InputContinuousHydrationLane;\n\n case InputContinuousLane:\n return InputContinuousLane;\n\n case DefaultHydrationLane:\n return DefaultHydrationLane;\n\n case DefaultLane:\n return DefaultLane;\n\n case TransitionHydrationLane:\n return TransitionHydrationLane;\n\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n return lanes & TransitionLanes;\n\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n return lanes & RetryLanes;\n\n case SelectiveHydrationLane:\n return SelectiveHydrationLane;\n\n case IdleHydrationLane:\n return IdleHydrationLane;\n\n case IdleLane:\n return IdleLane;\n\n case OffscreenLane:\n return OffscreenLane;\n\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n\n return lanes;\n }\n}\n\nfunction getNextLanes(root, wipLanes) {\n // Early bailout if there's no pending work left.\n var pendingLanes = root.pendingLanes;\n\n if (pendingLanes === NoLanes) {\n return NoLanes;\n }\n\n var nextLanes = NoLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,\n // even if the work is suspended.\n\n var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n if (nonIdlePendingLanes !== NoLanes) {\n var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n if (nonIdleUnblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n } else {\n var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n if (nonIdlePingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n }\n }\n } else {\n // The only remaining work is Idle.\n var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n if (unblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(unblockedLanes);\n } else {\n if (pingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(pingedLanes);\n }\n }\n }\n\n if (nextLanes === NoLanes) {\n // This should only be reachable if we're suspended\n // TODO: Consider warning in this path if a fallback timer is not scheduled.\n return NoLanes;\n } // If we're already in the middle of a render, switching lanes will interrupt\n // it and we'll lose our progress. We should only do this if the new lanes are\n // higher priority.\n\n\n if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n // bother waiting until the root is complete.\n (wipLanes & suspendedLanes) === NoLanes) {\n var nextLane = getHighestPriorityLane(nextLanes);\n var wipLane = getHighestPriorityLane(wipLanes);\n\n if ( // Tests whether the next lane is equal or lower priority than the wip\n // one. This works because the bits decrease in priority as you go left.\n nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The\n // only difference between default updates and transition updates is that\n // default updates do not support refresh transitions.\n nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {\n // Keep working on the existing in-progress tree. Do not interrupt.\n return wipLanes;\n }\n }\n\n if ((nextLanes & InputContinuousLane) !== NoLanes) {\n // When updates are sync by default, we entangle continuous priority updates\n // and default updates, so they render in the same batch. The only reason\n // they use separate lanes is because continuous updates should interrupt\n // transitions, but default updates should not.\n nextLanes |= pendingLanes & DefaultLane;\n } // Check for entangled lanes and add them to the batch.\n //\n // A lane is said to be entangled with another when it's not allowed to render\n // in a batch that does not also include the other lane. Typically we do this\n // when multiple updates have the same source, and we only want to respond to\n // the most recent event from that source.\n //\n // Note that we apply entanglements *after* checking for partial work above.\n // This means that if a lane is entangled during an interleaved event while\n // it's already rendering, we won't interrupt it. This is intentional, since\n // entanglement is usually \"best effort\": we'll try our best to render the\n // lanes in the same batch, but it's not worth throwing out partially\n // completed work in order to do it.\n // TODO: Reconsider this. The counter-argument is that the partial work\n // represents an intermediate state, which we don't want to show to the user.\n // And by spending extra time finishing it, we're increasing the amount of\n // time it takes to show the final state, which is what they are actually\n // waiting for.\n //\n // For those exceptions where entanglement is semantically important, like\n // useMutableSource, we should ensure that there is no partial work at the\n // time we apply the entanglement.\n\n\n var entangledLanes = root.entangledLanes;\n\n if (entangledLanes !== NoLanes) {\n var entanglements = root.entanglements;\n var lanes = nextLanes & entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n nextLanes |= entanglements[index];\n lanes &= ~lane;\n }\n }\n\n return nextLanes;\n}\nfunction getMostRecentEventTime(root, lanes) {\n var eventTimes = root.eventTimes;\n var mostRecentEventTime = NoTimestamp;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var eventTime = eventTimes[index];\n\n if (eventTime > mostRecentEventTime) {\n mostRecentEventTime = eventTime;\n }\n\n lanes &= ~lane;\n }\n\n return mostRecentEventTime;\n}\n\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case SyncLane:\n case InputContinuousHydrationLane:\n case InputContinuousLane:\n // User interactions should expire slightly more quickly.\n //\n // NOTE: This is set to the corresponding constant as in Scheduler.js.\n // When we made it larger, a product metric in www regressed, suggesting\n // there's a user interaction that's being starved by a series of\n // synchronous updates. If that theory is correct, the proper solution is\n // to fix the starvation. However, this scenario supports the idea that\n // expiration times are an important safeguard when starvation\n // does happen.\n return currentTime + 250;\n\n case DefaultHydrationLane:\n case DefaultLane:\n case TransitionHydrationLane:\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n return currentTime + 5000;\n\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n // TODO: Retries should be allowed to expire if they are CPU bound for\n // too long, but when I made this change it caused a spike in browser\n // crashes. There must be some other underlying bug; not super urgent but\n // ideally should figure out why and fix it. Unfortunately we don't have\n // a repro for the crashes, only detected via production metrics.\n return NoTimestamp;\n\n case SelectiveHydrationLane:\n case IdleHydrationLane:\n case IdleLane:\n case OffscreenLane:\n // Anything idle priority or lower should never expire.\n return NoTimestamp;\n\n default:\n {\n error('Should have found matching lanes. This is a bug in React.');\n }\n\n return NoTimestamp;\n }\n}\n\nfunction markStarvedLanesAsExpired(root, currentTime) {\n // TODO: This gets called every time we yield. We can optimize by storing\n // the earliest expiration time on the root. Then use that to quickly bail out\n // of this function.\n var pendingLanes = root.pendingLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes;\n var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n // expiration time. If so, we'll assume the update is being starved and mark\n // it as expired to force it to finish.\n\n var lanes = pendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var expirationTime = expirationTimes[index];\n\n if (expirationTime === NoTimestamp) {\n // Found a pending lane with no expiration time. If it's not suspended, or\n // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n // using the current time.\n if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n // Assumes timestamps are monotonically increasing.\n expirationTimes[index] = computeExpirationTime(lane, currentTime);\n }\n } else if (expirationTime <= currentTime) {\n // This lane expired\n root.expiredLanes |= lane;\n }\n\n lanes &= ~lane;\n }\n} // This returns the highest priority pending lanes regardless of whether they\n// are suspended.\n\nfunction getHighestPriorityPendingLanes(root) {\n return getHighestPriorityLanes(root.pendingLanes);\n}\nfunction getLanesToRetrySynchronouslyOnError(root) {\n var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n if (everythingButOffscreen !== NoLanes) {\n return everythingButOffscreen;\n }\n\n if (everythingButOffscreen & OffscreenLane) {\n return OffscreenLane;\n }\n\n return NoLanes;\n}\nfunction includesSyncLane(lanes) {\n return (lanes & SyncLane) !== NoLanes;\n}\nfunction includesNonIdleWork(lanes) {\n return (lanes & NonIdleLanes) !== NoLanes;\n}\nfunction includesOnlyRetries(lanes) {\n return (lanes & RetryLanes) === lanes;\n}\nfunction includesOnlyNonUrgentLanes(lanes) {\n var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;\n return (lanes & UrgentLanes) === NoLanes;\n}\nfunction includesOnlyTransitions(lanes) {\n return (lanes & TransitionLanes) === lanes;\n}\nfunction includesBlockingLane(root, lanes) {\n\n var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;\n return (lanes & SyncDefaultLanes) !== NoLanes;\n}\nfunction includesExpiredLane(root, lanes) {\n // This is a separate check from includesBlockingLane because a lane can\n // expire after a render has already started.\n return (lanes & root.expiredLanes) !== NoLanes;\n}\nfunction isTransitionLane(lane) {\n return (lane & TransitionLanes) !== NoLanes;\n}\nfunction claimNextTransitionLane() {\n // Cycle through the lanes, assigning each new transition to the next lane.\n // In most cases, this means every transition gets its own lane, until we\n // run out of lanes and cycle back to the beginning.\n var lane = nextTransitionLane;\n nextTransitionLane <<= 1;\n\n if ((nextTransitionLane & TransitionLanes) === NoLanes) {\n nextTransitionLane = TransitionLane1;\n }\n\n return lane;\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n\n if ((nextRetryLane & RetryLanes) === NoLanes) {\n nextRetryLane = RetryLane1;\n }\n\n return lane;\n}\nfunction getHighestPriorityLane(lanes) {\n return lanes & -lanes;\n}\nfunction pickArbitraryLane(lanes) {\n // This wrapper function gets inlined. Only exists so to communicate that it\n // doesn't matter which bit is selected; you can pick any bit without\n // affecting the algorithms where its used. Here I'm using\n // getHighestPriorityLane because it requires the fewest operations.\n return getHighestPriorityLane(lanes);\n}\n\nfunction pickArbitraryLaneIndex(lanes) {\n return 31 - clz32(lanes);\n}\n\nfunction laneToIndex(lane) {\n return pickArbitraryLaneIndex(lane);\n}\n\nfunction includesSomeLane(a, b) {\n return (a & b) !== NoLanes;\n}\nfunction isSubsetOfLanes(set, subset) {\n return (set & subset) === subset;\n}\nfunction mergeLanes(a, b) {\n return a | b;\n}\nfunction removeLanes(set, subset) {\n return set & ~subset;\n}\nfunction intersectLanes(a, b) {\n return a & b;\n} // Seems redundant, but it changes the type from a single lane (used for\n// updates) to a group of lanes (used for flushing work).\n\nfunction laneToLanes(lane) {\n return lane;\n}\nfunction higherPriorityLane(a, b) {\n // This works because the bit ranges decrease in priority as you go left.\n return a !== NoLane && a < b ? a : b;\n}\nfunction createLaneMap(initial) {\n // Intentionally pushing one by one.\n // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n var laneMap = [];\n\n for (var i = 0; i < TotalLanes; i++) {\n laneMap.push(initial);\n }\n\n return laneMap;\n}\nfunction markRootUpdated(root, updateLane, eventTime) {\n root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update\n // could unblock them. Clear the suspended lanes so that we can try rendering\n // them again.\n //\n // TODO: We really only need to unsuspend only lanes that are in the\n // `subtreeLanes` of the updated fiber, or the update lanes of the return\n // path. This would exclude suspended updates in an unrelated sibling tree,\n // since there's no way for this update to unblock it.\n //\n // We don't do this if the incoming update is idle, because we never process\n // idle updates until after all the regular updates have finished; there's no\n // way it could unblock a transition.\n\n if (updateLane !== IdleLane) {\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n }\n\n var eventTimes = root.eventTimes;\n var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most\n // recent event, and we assume time is monotonically increasing.\n\n eventTimes[index] = eventTime;\n}\nfunction markRootSuspended(root, suspendedLanes) {\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n var expirationTimes = root.expirationTimes;\n var lanes = suspendedLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootPinged(root, pingedLanes, eventTime) {\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n}\nfunction markRootFinished(root, remainingLanes) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes; // Let's try everything again\n\n root.suspendedLanes = NoLanes;\n root.pingedLanes = NoLanes;\n root.expiredLanes &= remainingLanes;\n root.mutableReadLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n var entanglements = root.entanglements;\n var eventTimes = root.eventTimes;\n var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work\n\n var lanes = noLongerPendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] = NoLanes;\n eventTimes[index] = NoTimestamp;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootEntangled(root, entangledLanes) {\n // In addition to entangling each of the given lanes with each other, we also\n // have to consider _transitive_ entanglements. For each lane that is already\n // entangled with *any* of the given lanes, that lane is now transitively\n // entangled with *all* the given lanes.\n //\n // Translated: If C is entangled with A, then entangling A with B also\n // entangles C with B.\n //\n // If this is hard to grasp, it might help to intentionally break this\n // function and look at the tests that fail in ReactTransition-test.js. Try\n // commenting out one of the conditions below.\n var rootEntangledLanes = root.entangledLanes |= entangledLanes;\n var entanglements = root.entanglements;\n var lanes = rootEntangledLanes;\n\n while (lanes) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n\n if ( // Is this one of the newly entangled lanes?\n lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?\n entanglements[index] & entangledLanes) {\n entanglements[index] |= entangledLanes;\n }\n\n lanes &= ~lane;\n }\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n var renderLane = getHighestPriorityLane(renderLanes);\n var lane;\n\n switch (renderLane) {\n case InputContinuousLane:\n lane = InputContinuousHydrationLane;\n break;\n\n case DefaultLane:\n lane = DefaultHydrationLane;\n break;\n\n case TransitionLane1:\n case TransitionLane2:\n case TransitionLane3:\n case TransitionLane4:\n case TransitionLane5:\n case TransitionLane6:\n case TransitionLane7:\n case TransitionLane8:\n case TransitionLane9:\n case TransitionLane10:\n case TransitionLane11:\n case TransitionLane12:\n case TransitionLane13:\n case TransitionLane14:\n case TransitionLane15:\n case TransitionLane16:\n case RetryLane1:\n case RetryLane2:\n case RetryLane3:\n case RetryLane4:\n case RetryLane5:\n lane = TransitionHydrationLane;\n break;\n\n case IdleLane:\n lane = IdleHydrationLane;\n break;\n\n default:\n // Everything else is already either a hydration lane, or shouldn't\n // be retried at a hydration lane.\n lane = NoLane;\n break;\n } // Check if the lane we chose is suspended. If so, that indicates that we\n // already attempted and failed to hydrate at that level. Also check if we're\n // already rendering that lane, which is rare but could happen.\n\n\n if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {\n // Give up trying to hydrate and fall back to client render.\n return NoLane;\n }\n\n return lane;\n}\nfunction addFiberToLanesMap(root, fiber, lanes) {\n\n if (!isDevToolsPresent) {\n return;\n }\n\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n updaters.add(fiber);\n lanes &= ~lane;\n }\n}\nfunction movePendingFibersToMemoized(root, lanes) {\n\n if (!isDevToolsPresent) {\n return;\n }\n\n var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n var memoizedUpdaters = root.memoizedUpdaters;\n\n while (lanes > 0) {\n var index = laneToIndex(lanes);\n var lane = 1 << index;\n var updaters = pendingUpdatersLaneMap[index];\n\n if (updaters.size > 0) {\n updaters.forEach(function (fiber) {\n var alternate = fiber.alternate;\n\n if (alternate === null || !memoizedUpdaters.has(alternate)) {\n memoizedUpdaters.add(fiber);\n }\n });\n updaters.clear();\n }\n\n lanes &= ~lane;\n }\n}\nfunction getTransitionsForLanes(root, lanes) {\n {\n return null;\n }\n}\n\nvar DiscreteEventPriority = SyncLane;\nvar ContinuousEventPriority = InputContinuousLane;\nvar DefaultEventPriority = DefaultLane;\nvar IdleEventPriority = IdleLane;\nvar currentUpdatePriority = NoLane;\nfunction getCurrentUpdatePriority() {\n return currentUpdatePriority;\n}\nfunction setCurrentUpdatePriority(newPriority) {\n currentUpdatePriority = newPriority;\n}\nfunction runWithPriority(priority, fn) {\n var previousPriority = currentUpdatePriority;\n\n try {\n currentUpdatePriority = priority;\n return fn();\n } finally {\n currentUpdatePriority = previousPriority;\n }\n}\nfunction higherEventPriority(a, b) {\n return a !== 0 && a < b ? a : b;\n}\nfunction lowerEventPriority(a, b) {\n return a === 0 || a > b ? a : b;\n}\nfunction isHigherEventPriority(a, b) {\n return a !== 0 && a < b;\n}\nfunction lanesToEventPriority(lanes) {\n var lane = getHighestPriorityLane(lanes);\n\n if (!isHigherEventPriority(DiscreteEventPriority, lane)) {\n return DiscreteEventPriority;\n }\n\n if (!isHigherEventPriority(ContinuousEventPriority, lane)) {\n return ContinuousEventPriority;\n }\n\n if (includesNonIdleWork(lane)) {\n return DefaultEventPriority;\n }\n\n return IdleEventPriority;\n}\n\n// This is imported by the event replaying implementation in React DOM. It's\n// in a separate file to break a circular dependency between the renderer and\n// the reconciler.\nfunction isRootDehydrated(root) {\n var currentState = root.current.memoizedState;\n return currentState.isDehydrated;\n}\n\nvar _attemptSynchronousHydration;\n\nfunction setAttemptSynchronousHydration(fn) {\n _attemptSynchronousHydration = fn;\n}\nfunction attemptSynchronousHydration(fiber) {\n _attemptSynchronousHydration(fiber);\n}\nvar attemptContinuousHydration;\nfunction setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n}\nvar attemptHydrationAtCurrentPriority;\nfunction setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n}\nvar getCurrentUpdatePriority$1;\nfunction setGetCurrentUpdatePriority(fn) {\n getCurrentUpdatePriority$1 = fn;\n}\nvar attemptHydrationAtPriority;\nfunction setAttemptHydrationAtPriority(fn) {\n attemptHydrationAtPriority = fn;\n} // TODO: Upgrade this definition once we're on a newer version of Flow that\n// has this definition built-in.\n\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 = [];\nvar discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];\nfunction isDiscreteEventThatRequiresHydration(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n return {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n };\n}\n\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'focusin':\n case 'focusout':\n queuedFocus = null;\n break;\n\n case 'dragenter':\n case 'dragleave':\n queuedDrag = null;\n break;\n\n case 'mouseover':\n case 'mouseout':\n queuedMouse = null;\n break;\n\n case 'pointerover':\n case 'pointerout':\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode(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 the targetContainers, and\n // store a single event to be replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n var targetContainers = existingQueuedEvent.targetContainers;\n\n if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n targetContainers.push(targetContainer);\n }\n\n return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, 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 (domEventName) {\n case 'focusin':\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n return true;\n }\n\n case 'dragenter':\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n return true;\n }\n\n case 'mouseover':\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n return true;\n }\n\n case 'pointerover':\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n return true;\n }\n\n case 'gotpointercapture':\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _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 findInstanceBlockingEvent.\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 attemptHydrationAtPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (isRootDehydrated(root)) {\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 queueExplicitHydrationTarget(target) {\n // TODO: This will read the priority if it's dispatched by the React\n // event system but not native events. Should read window.event.type, like\n // we do for updates (getCurrentEventPriority).\n var updatePriority = getCurrentUpdatePriority$1();\n var queuedTarget = {\n blockedOn: null,\n target: target,\n priority: updatePriority\n };\n var i = 0;\n\n for (; i < queuedExplicitHydrationTargets.length; i++) {\n // Stop once we hit the first target with lower priority than\n if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {\n break;\n }\n }\n\n queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);\n\n if (i === 0) {\n attemptExplicitHydrationTarget(queuedTarget);\n }\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var targetContainers = queuedEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);\n\n if (nextBlockedOn === null) {\n {\n var nativeEvent = queuedEvent.nativeEvent;\n var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n setReplayingEvent(nativeEventClone);\n nativeEvent.target.dispatchEvent(nativeEventClone);\n resetReplayingEvent();\n }\n } else {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode(nextBlockedOn);\n\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\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;\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\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?\n\nvar _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n// We'd like to remove this but it's not clear if this is safe.\n\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\nfunction isEnabled() {\n return _enabled;\n}\nfunction createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n var eventPriority = getEventPriority(domEventName);\n var listenerWrapper;\n\n switch (eventPriority) {\n case DiscreteEventPriority:\n listenerWrapper = dispatchDiscreteEvent;\n break;\n\n case ContinuousEventPriority:\n listenerWrapper = dispatchContinuousEvent;\n break;\n\n case DefaultEventPriority:\n default:\n listenerWrapper = dispatchEvent;\n break;\n }\n\n return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n}\n\nfunction dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n\n try {\n setCurrentUpdatePriority(DiscreteEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig.transition;\n ReactCurrentBatchConfig.transition = null;\n\n try {\n setCurrentUpdatePriority(ContinuousEventPriority);\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig.transition = prevTransition;\n }\n}\n\nfunction dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n {\n dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n }\n}\n\nfunction dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n clearIfContinuousEvent(domEventName, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n nativeEvent.stopPropagation();\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accumulative.\n\n\n clearIfContinuousEvent(domEventName, nativeEvent);\n\n if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {\n while (blockedOn !== null) {\n var fiber = getInstanceFromNode(blockedOn);\n\n if (fiber !== null) {\n attemptSynchronousHydration(fiber);\n }\n\n var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (nextBlockedOn === null) {\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n }\n\n if (nextBlockedOn === blockedOn) {\n break;\n }\n\n blockedOn = nextBlockedOn;\n }\n\n if (blockedOn !== null) {\n nativeEvent.stopPropagation();\n }\n\n return;\n } // 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 dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n}\n\nvar return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.\n// The return_targetInst field above is conceptually part of the return value.\n\nfunction findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // TODO: Warn if _enabled is false.\n return_targetInst = null;\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 (isRootDehydrated(root)) {\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 return_targetInst = targetInst; // We're not blocked on anything.\n\n return null;\n}\nfunction getEventPriority(domEventName) {\n switch (domEventName) {\n // Used by SimpleEventPlugin:\n case 'cancel':\n case 'click':\n case 'close':\n case 'contextmenu':\n case 'copy':\n case 'cut':\n case 'auxclick':\n case 'dblclick':\n case 'dragend':\n case 'dragstart':\n case 'drop':\n case 'focusin':\n case 'focusout':\n case 'input':\n case 'invalid':\n case 'keydown':\n case 'keypress':\n case 'keyup':\n case 'mousedown':\n case 'mouseup':\n case 'paste':\n case 'pause':\n case 'play':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointerup':\n case 'ratechange':\n case 'reset':\n case 'resize':\n case 'seeked':\n case 'submit':\n case 'touchcancel':\n case 'touchend':\n case 'touchstart':\n case 'volumechange': // Used by polyfills:\n // eslint-disable-next-line no-fallthrough\n\n case 'change':\n case 'selectionchange':\n case 'textInput':\n case 'compositionstart':\n case 'compositionend':\n case 'compositionupdate': // Only enableCreateEventHandleAPI:\n // eslint-disable-next-line no-fallthrough\n\n case 'beforeblur':\n case 'afterblur': // Not used by React but could be by user code:\n // eslint-disable-next-line no-fallthrough\n\n case 'beforeinput':\n case 'blur':\n case 'fullscreenchange':\n case 'focus':\n case 'hashchange':\n case 'popstate':\n case 'select':\n case 'selectstart':\n return DiscreteEventPriority;\n\n case 'drag':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'mousemove':\n case 'mouseout':\n case 'mouseover':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'scroll':\n case 'toggle':\n case 'touchmove':\n case 'wheel': // Not used by React but could be by user code:\n // eslint-disable-next-line no-fallthrough\n\n case 'mouseenter':\n case 'mouseleave':\n case 'pointerenter':\n case 'pointerleave':\n return ContinuousEventPriority;\n\n case 'message':\n {\n // We might be in the Scheduler callback.\n // Eventually this mechanism will be replaced by a check\n // of the current priority on the native scheduler.\n var schedulerPriority = getCurrentPriorityLevel();\n\n switch (schedulerPriority) {\n case ImmediatePriority:\n return DiscreteEventPriority;\n\n case UserBlockingPriority:\n return ContinuousEventPriority;\n\n case NormalPriority:\n case LowPriority:\n // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n return DefaultEventPriority;\n\n case IdlePriority:\n return IdleEventPriority;\n\n default:\n return DefaultEventPriority;\n }\n }\n\n default:\n return DefaultEventPriority;\n }\n}\n\nfunction addEventBubbleListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, false);\n return listener;\n}\nfunction addEventCaptureListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, true);\n return listener;\n}\nfunction addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n capture: true,\n passive: passive\n });\n return listener;\n}\nfunction addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n passive: passive\n });\n return listener;\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\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\nfunction functionThatReturnsTrue() {\n return true;\n}\n\nfunction functionThatReturnsFalse() {\n return false;\n} // This is intentionally a factory so that we have different returned constructors.\n// If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\nfunction createSyntheticEvent(Interface) {\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 function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n\n for (var _propName in Interface) {\n if (!Interface.hasOwnProperty(_propName)) {\n continue;\n }\n\n var normalize = Interface[_propName];\n\n if (normalize) {\n this[_propName] = normalize(nativeEvent);\n } else {\n this[_propName] = nativeEvent[_propName];\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(SyntheticBaseEvent.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(); // $FlowFixMe - flow is not aware of `unknown` in IE\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(); // $FlowFixMe - flow is not aware of `unknown` in IE\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 () {// Modern event system doesn't use pooling.\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: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n}\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n};\nvar SyntheticEvent = createSyntheticEvent(EventInterface);\n\nvar UIEventInterface = assign({}, EventInterface, {\n view: 0,\n detail: 0\n});\n\nvar SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\nvar lastMovementX;\nvar lastMovementY;\nvar lastMouseEvent;\n\nfunction updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n lastMovementX = event.screenX - lastMouseEvent.screenX;\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n\n lastMouseEvent = event;\n }\n}\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n\n return lastMovementY;\n }\n});\n\nvar SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar DragEventInterface = assign({}, MouseEventInterface, {\n dataTransfer: 0\n});\n\nvar SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar FocusEventInterface = assign({}, UIEventInterface, {\n relatedTarget: 0\n});\n\nvar SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\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 AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n});\n\nvar SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar CompositionEventInterface = assign({}, EventInterface, {\n data: 0\n});\n\nvar SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n// Happens to share the same list for now.\n\nvar SyntheticInputEvent = SyntheticCompositionEvent;\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 * 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\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/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\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\nvar SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n});\n\nvar SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n});\n\nvar SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\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 TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar WheelEventInterface = assign({}, MouseEventInterface, {\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: 0,\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: 0\n});\n\nvar SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\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);\n\nfunction registerEvents() {\n registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n} // Track whether we've ever handled a keypress on the space key.\n\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\n\nfunction getCompositionEventType(domEventName) {\n switch (domEventName) {\n case 'compositionstart':\n return 'onCompositionStart';\n\n case 'compositionend':\n return 'onCompositionEnd';\n\n case 'compositionupdate':\n return 'onCompositionUpdate';\n }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\nfunction isFallbackCompositionStart(domEventName, nativeEvent) {\n return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'keyup':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case 'keydown':\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 'keypress':\n case 'mousedown':\n case 'focusout':\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(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(domEventName);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n eventType = 'onCompositionStart';\n }\n } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n eventType = 'onCompositionEnd';\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 === 'onCompositionStart') {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === 'onCompositionEnd') {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n if (listeners.length > 0) {\n var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\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}\n\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'compositionend':\n return getDataFromCustomEvent(nativeEvent);\n\n case 'keypress':\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 'textInput':\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\n\nfunction getFallbackBeforeInputChars(domEventName, 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 (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case '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 'keypress':\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 'compositionend':\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(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(domEventName, 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 listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n if (listeners.length > 0) {\n var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.data = chars;\n }\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\nfunction extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\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\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\nfunction registerEvents$1() {\n registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n}\n\nfunction createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\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 dispatchQueue = [];\n createAndAccumulateChangeEvent(dispatchQueue, 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, dispatchQueue);\n}\n\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (domEventName === '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(domEventName, target, targetInst) {\n if (domEventName === 'focusin') {\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 (domEventName === 'focusout') {\n stopWatchingForValueChange();\n }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\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(domEventName, targetInst) {\n if (domEventName === 'click') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (domEventName === 'input' || domEventName === '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\nfunction extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(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(domEventName, targetInst);\n\n if (inst) {\n createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n return;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(domEventName, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (domEventName === 'focusout') {\n handleControlledInputBlur(targetNode);\n }\n}\n\nfunction registerEvents$2() {\n registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\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\n\nfunction extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n if (isOverEvent && !isReplayingEvent(nativeEvent)) {\n // If this is an over event with a target, we might have 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 var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n if (related) {\n // If the related node is managed by React, we can assume that we have\n // already dispatched the corresponding events during its mouseout.\n if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n return;\n }\n }\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return;\n }\n\n var win; // TODO: why is this nullable in the types but we read from it?\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 var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n from = targetInst;\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;\n }\n\n var SyntheticEventCtor = SyntheticMouseEvent;\n var leaveEventType = 'onMouseLeave';\n var enterEventType = 'onMouseEnter';\n var eventTypePrefix = 'mouse';\n\n if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n SyntheticEventCtor = SyntheticPointerEvent;\n leaveEventType = 'onPointerLeave';\n enterEventType = 'onPointerEnter';\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance(from);\n var toNode = to == null ? win : getNodeFromInstance(to);\n var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = null; // We should only process this nativeEvent if we are processing\n // the first ancestor. Next time, we will ignore the event.\n\n var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (nativeTargetInst === targetInst) {\n var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n enterEvent.target = toNode;\n enterEvent.relatedTarget = fromNode;\n enter = enterEvent;\n }\n\n accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\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\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 var currentKey = keysA[i];\n\n if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {\n return false;\n }\n }\n\n return true;\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 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 var 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 skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nfunction registerEvents$3() {\n registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\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\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\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(dispatchQueue, 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;\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 listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.target = activeElement$1;\n }\n }\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\nfunction extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n switch (domEventName) {\n // Track the input node that has focus.\n case 'focusin':\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 'focusout':\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 'mousedown':\n mouseDown = true;\n break;\n\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\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 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\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\nvar ANIMATION_END = getVendorPrefixedEventName('animationend');\nvar ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\nvar ANIMATION_START = getVendorPrefixedEventName('animationstart');\nvar TRANSITION_END = getVendorPrefixedEventName('transitionend');\n\nvar topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!\n//\n// E.g. it needs \"pointerDown\", not \"pointerdown\".\n// This is because we derive both React name (\"onPointerDown\")\n// and DOM name (\"pointerdown\") from the same list.\n//\n// Exceptions that don't match this convention are listed separately.\n//\n// prettier-ignore\n\nvar simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel'];\n\nfunction registerSimpleEvent(domEventName, reactName) {\n topLevelEventsToReactNames.set(domEventName, reactName);\n registerTwoPhaseEvent(reactName, [domEventName]);\n}\n\nfunction registerSimpleEvents() {\n for (var i = 0; i < simpleEventPluginEvents.length; i++) {\n var eventName = simpleEventPluginEvents[i];\n var domEventName = eventName.toLowerCase();\n var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);\n registerSimpleEvent(domEventName, 'on' + capitalizedEvent);\n } // Special cases where event names don't match.\n\n\n registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');\n registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');\n registerSimpleEvent(ANIMATION_START, 'onAnimationStart');\n registerSimpleEvent('dblclick', 'onDoubleClick');\n registerSimpleEvent('focusin', 'onFocus');\n registerSimpleEvent('focusout', 'onBlur');\n registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');\n}\n\nfunction extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n\n if (reactName === undefined) {\n return;\n }\n\n var SyntheticEventCtor = SyntheticEvent;\n var reactEventType = domEventName;\n\n switch (domEventName) {\n case 'keypress':\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;\n }\n\n /* falls through */\n\n case 'keydown':\n case 'keyup':\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n\n case 'focusin':\n reactEventType = 'focus';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'focusout':\n reactEventType = 'blur';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'beforeblur':\n case 'afterblur':\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case '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;\n }\n\n /* falls through */\n\n case 'auxclick':\n case 'dblclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case 'mouseout':\n case 'mouseover':\n case 'contextmenu':\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n\n case 'drag':\n case 'dragend':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'dragstart':\n case 'drop':\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n\n case 'touchcancel':\n case 'touchend':\n case 'touchmove':\n case 'touchstart':\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n\n case 'scroll':\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n\n case 'wheel':\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n\n case 'copy':\n case 'cut':\n case 'paste':\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'pointerup':\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n }\n\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n {\n // Some events don't bubble in the browser.\n // In the past, React has always bubbled them, but this can be surprising.\n // We're going to try aligning closer to the browser behavior by not bubbling\n // them in React either. We'll start by not bubbling onScroll, and then expand.\n var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from\n // nonDelegatedEvents list in DOMPluginEventSystem.\n // Then we can remove this special list.\n // This is a breaking change that can wait until React 18.\n domEventName === 'scroll';\n\n var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n if (_listeners.length > 0) {\n // Intentionally create event lazily.\n var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n dispatchQueue.push({\n event: _event,\n listeners: _listeners\n });\n }\n }\n}\n\n// TODO: remove top-level side effect.\nregisterSimpleEvents();\nregisterEvents$2();\nregisterEvents$1();\nregisterEvents$3();\nregisterEvents();\n\nfunction extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n // This is the basic functionality of the event system. All\n // the other plugins are essentially polyfills. So the plugin\n // should probably be inlined somewhere and have its logic\n // be core the to event system. This would potentially allow\n // us to ship builds of React without the polyfilled plugins below.\n extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n // event's native \"bubble\" phase, which means that we're\n // not in the capture phase. That's because we emulate\n // the capture phase here still. This is a trade-off,\n // because in an ideal world we would not emulate and use\n // the phases properly, like we do with the SimpleEvent\n // plugin. However, the plugins below either expect\n // emulation (EnterLeave) or use state localized to that\n // plugin (BeforeInput, Change, Select). The state in\n // these modules complicates things, as you'll essentially\n // get the case where the capture phase event might change\n // state, only for the following bubble event to come in\n // later and not trigger anything as the state now\n // invalidates the heuristics of the event plugin. We\n // could alter all these plugins to work in such ways, but\n // that might cause other unknown side-effects that we\n // can't foresee right now.\n\n if (shouldProcessPolyfillPlugins) {\n extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n} // List of events that need to be individually attached to media elements.\n\n\nvar mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather\n// set them on the actual target element itself. This is primarily\n// because these events do not consistently bubble in the DOM.\n\nvar nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n\nfunction executeDispatch(event, listener, currentTarget) {\n var type = event.type || 'unknown-event';\n event.currentTarget = currentTarget;\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n\nfunction processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n var previousInstance;\n\n if (inCapturePhase) {\n for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n var _dispatchListeners$i = dispatchListeners[i],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget,\n listener = _dispatchListeners$i.listener;\n\n if (instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, listener, currentTarget);\n previousInstance = instance;\n }\n } else {\n for (var _i = 0; _i < dispatchListeners.length; _i++) {\n var _dispatchListeners$_i = dispatchListeners[_i],\n _instance = _dispatchListeners$_i.instance,\n _currentTarget = _dispatchListeners$_i.currentTarget,\n _listener = _dispatchListeners$_i.listener;\n\n if (_instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, _listener, _currentTarget);\n previousInstance = _instance;\n }\n }\n}\n\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event,\n listeners = _dispatchQueue$i.listeners;\n processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n}\n\nfunction dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n var dispatchQueue = [];\n extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n}\n\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n {\n if (!nonDelegatedEvents.has(domEventName)) {\n error('Did not expect a listenToNonDelegatedEvent() call for \"%s\". ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n\n var isCapturePhaseListener = false;\n var listenerSet = getEventListenerSet(targetElement);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n if (!listenerSet.has(listenerSetKey)) {\n addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n {\n if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {\n error('Did not expect a listenToNativeEvent() call for \"%s\" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);\n }\n }\n\n var eventSystemFlags = 0;\n\n if (isCapturePhaseListener) {\n eventSystemFlags |= IS_CAPTURE_PHASE;\n }\n\n addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n} // This is only used by createEventHandle when the\nvar listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n if (!rootContainerElement[listeningMarker]) {\n rootContainerElement[listeningMarker] = true;\n allNativeEvents.forEach(function (domEventName) {\n // We handle selectionchange separately because it\n // doesn't bubble and needs to be on the document.\n if (domEventName !== 'selectionchange') {\n if (!nonDelegatedEvents.has(domEventName)) {\n listenToNativeEvent(domEventName, false, rootContainerElement);\n }\n\n listenToNativeEvent(domEventName, true, rootContainerElement);\n }\n });\n var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n\n if (ownerDocument !== null) {\n // The selectionchange event also needs deduplication\n // but it is attached to the document.\n if (!ownerDocument[listeningMarker]) {\n ownerDocument[listeningMarker] = true;\n listenToNativeEvent('selectionchange', false, ownerDocument);\n }\n }\n }\n}\n\nfunction addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n // active and not passive.\n\n var isPassiveListener = undefined;\n\n if (passiveBrowserEventsSupported) {\n // Browsers introduced an intervention, making these events\n // passive by default on document. React doesn't bind them\n // to document anymore, but changing this now would undo\n // the performance wins from the change. So we emulate\n // the existing behavior manually on the roots now.\n // https://github.com/facebook/react/issues/19651\n if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n isPassiveListener = true;\n }\n }\n\n targetContainer = targetContainer;\n var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we\n\n\n if (isCapturePhaseListener) {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);\n }\n } else {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);\n }\n }\n}\n\nfunction isMatchingRootContainer(grandContainer, targetContainer) {\n return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n}\n\nfunction dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var ancestorInst = targetInst;\n\n if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n if (targetInst !== null) {\n // The below logic attempts to work out if we need to change\n // the target fiber to a different ancestor. We had similar logic\n // in the legacy event system, except the big difference between\n // systems is that the modern event system now has an event listener\n // attached to each React Root and React Portal Root. Together,\n // the DOM nodes representing these roots are the \"rootContainer\".\n // To figure out which ancestor instance we should use, we traverse\n // up the fiber tree from the target instance and attempt to find\n // root boundaries that match that of our current \"rootContainer\".\n // If we find that \"rootContainer\", we find the parent fiber\n // sub-tree for that root and make that our ancestor instance.\n var node = targetInst;\n\n mainLoop: while (true) {\n if (node === null) {\n return;\n }\n\n var nodeTag = node.tag;\n\n if (nodeTag === HostRoot || nodeTag === HostPortal) {\n var container = node.stateNode.containerInfo;\n\n if (isMatchingRootContainer(container, targetContainerNode)) {\n break;\n }\n\n if (nodeTag === HostPortal) {\n // The target is a portal, but it's not the rootContainer we're looking for.\n // Normally portals handle their own events all the way down to the root.\n // So we should be able to stop now. However, we don't know if this portal\n // was part of *our* root.\n var grandNode = node.return;\n\n while (grandNode !== null) {\n var grandTag = grandNode.tag;\n\n if (grandTag === HostRoot || grandTag === HostPortal) {\n var grandContainer = grandNode.stateNode.containerInfo;\n\n if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n // This is the rootContainer we're looking for and we found it as\n // a parent of the Portal. That means we can ignore it because the\n // Portal will bubble through to us.\n return;\n }\n }\n\n grandNode = grandNode.return;\n }\n } // Now we need to find it's corresponding host fiber in the other\n // tree. To do this we can use getClosestInstanceFromNode, but we\n // need to validate that the fiber is a host instance, otherwise\n // we need to traverse up through the DOM till we find the correct\n // node that is from the other tree.\n\n\n while (container !== null) {\n var parentNode = getClosestInstanceFromNode(container);\n\n if (parentNode === null) {\n return;\n }\n\n var parentTag = parentNode.tag;\n\n if (parentTag === HostComponent || parentTag === HostText) {\n node = ancestorInst = parentNode;\n continue mainLoop;\n }\n\n container = container.parentNode;\n }\n }\n\n node = node.return;\n }\n }\n }\n\n batchedUpdates(function () {\n return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n });\n}\n\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\n\nfunction accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {\n var captureName = reactName !== null ? reactName + 'Capture' : null;\n var reactEventName = inCapturePhase ? captureName : reactName;\n var listeners = [];\n var instance = targetFiber;\n var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance2 = instance,\n stateNode = _instance2.stateNode,\n tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n lastHostComponent = stateNode; // createEventHandle listeners\n\n\n if (reactEventName !== null) {\n var listener = getListener(instance, reactEventName);\n\n if (listener != null) {\n listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n }\n }\n } // If we are only accumulating events for the target, then we don't\n // continue to propagate through the React fiber tree to find other\n // listeners.\n\n\n if (accumulateTargetOnly) {\n break;\n } // If we are processing the onBeforeBlur event, then we need to take\n\n instance = instance.return;\n }\n\n return listeners;\n} // We should only use this function for:\n// - BeforeInputEventPlugin\n// - ChangeEventPlugin\n// - SelectEventPlugin\n// This is because we only process these plugins\n// in the bubble phase, so we need to accumulate two\n// phase event listeners (via emulation).\n\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n var captureName = reactName + 'Capture';\n var listeners = [];\n var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance3 = instance,\n stateNode = _instance3.stateNode,\n tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n var captureListener = getListener(instance, captureName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n\n var bubbleListener = getListener(instance, reactName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n\n instance = instance.return;\n }\n\n return listeners;\n}\n\nfunction getParent(inst) {\n if (inst === null) {\n return null;\n }\n\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 nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}\n\nfunction accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n var registrationName = event._reactName;\n var listeners = [];\n var instance = target;\n\n while (instance !== null) {\n if (instance === common) {\n break;\n }\n\n var _instance4 = instance,\n alternate = _instance4.alternate,\n stateNode = _instance4.stateNode,\n tag = _instance4.tag;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n\n if (inCapturePhase) {\n var captureListener = getListener(instance, registrationName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n } else if (!inCapturePhase) {\n var bubbleListener = getListener(instance, registrationName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n }\n\n instance = instance.return;\n }\n\n if (listeners.length !== 0) {\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n} // We should only use this function for:\n// - EnterLeaveEventPlugin\n// This is because we only process this plugin\n// in the bubble phase, so we need to accumulate two\n// phase event listeners.\n\n\nfunction accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n if (from !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n }\n\n if (to !== null && enterEvent !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n }\n}\nfunction getListenerSetKey(domEventName, capture) {\n return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\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 warnedUnknownTags;\nvar validatePropertiesInDevelopment;\nvar warnForPropDifference;\nvar warnForExtraAttributes;\nvar warnForInvalidEventListener;\nvar canDiffStyleForHydrationWarning;\nvar normalizeHTML;\n\n{\n warnedUnknownTags = {\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 registrationNameDependencies: registrationNameDependencies,\n possibleRegistrationNames: possibleRegistrationNames\n });\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;\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 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n} // 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\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\nvar NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\nfunction normalizeMarkupForTextOrAttribute(markup) {\n {\n checkHtmlStringCoercion(markup);\n }\n\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n}\n\nfunction checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n if (shouldWarnDev) {\n {\n if (!didWarnInvalidHydration) {\n didWarnInvalidHydration = true;\n\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n }\n }\n }\n\n if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n // In concurrent roots, we throw when there's a text mismatch and revert to\n // client rendering, up to the nearest Suspense boundary.\n throw new Error('Text content does not match server-rendered HTML.');\n }\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 // https://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 (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\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) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n\n if (namespaceURI === HTML_NAMESPACE) {\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) {\n if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !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 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n props = rawProps;\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n props = rawProps;\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n props = rawProps;\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n props = rawProps;\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n props = rawProps;\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n props = getHostProps$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\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 'select':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'textarea':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(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 (registrationNameDependencies.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 allowed property list 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 (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 (registrationNameDependencies.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 if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\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 allowed property list 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, isConcurrentMode, shouldWarnDev) {\n var isCustomComponentTag;\n var extraAttributeNames;\n\n {\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 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\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 // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\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 (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n }\n\n updatePayload = [CHILDREN, nextProp];\n }\n } else if (typeof nextProp === 'number') {\n if (domElement.textContent !== '' + nextProp) {\n if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n }\n\n updatePayload = [CHILDREN, '' + nextProp];\n }\n }\n } else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if (shouldWarnDev && true && // 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 = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey);\n\n if (rawProps[SUPPRESS_HYDRATION_WARNING] === true) ; 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\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n\n if (expectedHTML !== serverHTML) {\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\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 && !enableCustomElementPropertySupport) {\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) {\n ownNamespace = getIntrinsicNamespace(tag);\n }\n\n if (ownNamespace === HTML_NAMESPACE) {\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 var dontWarnCustomElement = enableCustomElementPropertySupport ;\n\n if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n }\n }\n }\n\n {\n if (shouldWarnDev) {\n if ( // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n // $FlowFixMe - Should be inferred as not undefined.\n warnForExtraAttributes(extraAttributeNames);\n }\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, isConcurrentMode) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\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\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 warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;\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 = 'suppressHydrationWarning';\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;\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 var activeInstance = null;\n\n setEnabled(false);\n return activeInstance;\n}\nfunction resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\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\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n\n case 'img':\n return true;\n\n default:\n return false;\n }\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);\n}\nfunction shouldSetTextContent(type, props) {\n return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\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}\nfunction getCurrentEventPriority() {\n var currentEvent = window.event;\n\n if (currentEvent === undefined) {\n return DefaultEventPriority;\n }\n\n return getEventPriority(currentEvent.type);\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;\nvar localPromise = typeof Promise === 'function' ? Promise : undefined; // -------------------\nvar scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {\n return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);\n} : scheduleTimeout; // TODO: Determine the best fallback here.\n\nfunction handleErrorInNextTick(error) {\n setTimeout(function () {\n throw error;\n });\n} // -------------------\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 switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n if (newProps.autoFocus) {\n domElement.focus();\n }\n\n return;\n\n case 'img':\n {\n if (newProps.src) {\n domElement.src = newProps.src;\n }\n\n return;\n }\n }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Apply the diff to the DOM node.\n updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n\n updateFiberProps(domElement, 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}\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}\nfunction clearSuspenseBoundary(parentInstance, suspenseInstance) {\n var node = suspenseInstance; // Delete 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 do {\n var nextNode = node.nextSibling;\n parentInstance.removeChild(node);\n\n if (nextNode && nextNode.nodeType === COMMENT_NODE) {\n var data = nextNode.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.\n\n retryIfBlockedOn(suspenseInstance);\n return;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {\n depth++;\n }\n }\n\n node = nextNode;\n } while (node); // TODO: Warn, we didn't find the end comment boundary.\n // Retry if any event replaying was blocked on this.\n\n\n retryIfBlockedOn(suspenseInstance);\n}\nfunction clearSuspenseBoundaryFromContainer(container, suspenseInstance) {\n if (container.nodeType === COMMENT_NODE) {\n clearSuspenseBoundary(container.parentNode, suspenseInstance);\n } else if (container.nodeType === ELEMENT_NODE) {\n clearSuspenseBoundary(container, suspenseInstance);\n } // Retry if any event replaying was blocked on this.\n\n\n retryIfBlockedOn(container);\n}\nfunction hideInstance(instance) {\n // TODO: Does this work for all element types? What about MathML? Should we\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}\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 clearContainer(container) {\n if (container.nodeType === ELEMENT_NODE) {\n container.textContent = '';\n } else if (container.nodeType === DOCUMENT_NODE) {\n if (container.documentElement) {\n container.removeChild(container.documentElement);\n }\n }\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 canHydrateSuspenseInstance(instance) {\n if (instance.nodeType !== COMMENT_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 suspense 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}\nfunction getSuspenseInstanceFallbackErrorDetails(instance) {\n var dataset = instance.nextSibling && instance.nextSibling.dataset;\n var digest, message, stack;\n\n if (dataset) {\n digest = dataset.dgst;\n\n {\n message = dataset.msg;\n stack = dataset.stck;\n }\n }\n\n {\n return {\n message: message,\n digest: digest,\n stack: stack\n };\n } // let value = {message: undefined, hash: undefined};\n // const nextSibling = instance.nextSibling;\n // if (nextSibling) {\n // const dataset = ((nextSibling: any): HTMLTemplateElement).dataset;\n // value.message = dataset.msg;\n // value.hash = dataset.hash;\n // if (true) {\n // value.stack = dataset.stack;\n // }\n // }\n // return value;\n\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n instance._reactRetry = callback;\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 if (nodeType === COMMENT_NODE) {\n var nodeData = node.data;\n\n if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {\n break;\n }\n\n if (nodeData === SUSPENSE_END_DATA) {\n return null;\n }\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 getFirstHydratableChildWithinContainer(parentContainer) {\n return getNextHydratable(parentContainer.firstChild);\n}\nfunction getFirstHydratableChildWithinSuspenseInstance(parentInstance) {\n return getNextHydratable(parentInstance.nextSibling);\n}\nfunction hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) {\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 } // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n // when the legacy root API is removed.\n\n\n var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev);\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {\n precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n // when the legacy root API is removed.\n\n var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n return diffHydratedText(textInstance, text);\n}\nfunction hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, suspenseInstance);\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 shouldDeleteUnhydratedTailInstances(parentType) {\n return parentType !== 'head' && parentType !== 'body';\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) {\n var shouldWarnDev = true;\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n var shouldWarnDev = true;\n checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n }\n}\nfunction didNotHydrateInstanceWithinContainer(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 didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n\n if (parentNode !== null) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentNode, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentNode, instance);\n }\n }\n }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {\n {\n if (isConcurrentMode || 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}\nfunction didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n}\nfunction didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n}\nfunction didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);\n }\n}\nfunction didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {\n {\n // $FlowFixMe: Only Element or Document can be parent nodes.\n var parentNode = parentInstance.parentNode;\n if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);\n }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {\n {\n if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n }\n}\nfunction errorHydratingContainer(parentContainer) {\n {\n // TODO: This gets logged by onRecoverableError, too, so we should be\n // able to remove it.\n error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());\n }\n}\nfunction preparePortalMount(portalInstance) {\n listenToAllSupportedEvents(portalInstance);\n}\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactFiber$' + randomKey;\nvar internalPropsKey = '__reactProps$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainer$' + randomKey;\nvar internalEventHandlersKey = '__reactEvents$' + randomKey;\nvar internalEventHandlerListenersKey = '__reactListeners$' + randomKey;\nvar internalEventHandlesSetKey = '__reactHandles$' + randomKey;\nfunction detachDeletedInstance(node) {\n // TODO: This function is only called on host components. I don't think all of\n // these fields are relevant.\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n}\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(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(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 throw new Error('getNodeFromInstance: Invalid argument.');\n}\nfunction getFiberCurrentPropsFromNode(node) {\n return node[internalPropsKey] || null;\n}\nfunction updateFiberProps(node, props) {\n node[internalPropsKey] = props;\n}\nfunction getEventListenerSet(node) {\n var elementListenerSet = node[internalEventHandlersKey];\n\n if (elementListenerSet === undefined) {\n elementListenerSet = node[internalEventHandlersKey] = new Set();\n }\n\n return elementListenerSet;\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\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 = getComponentNameFromFiber(workInProgress) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\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 throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');\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 = getComponentNameFromFiber(fiber) || '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 = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n\n {\n var name = getComponentNameFromFiber(fiber) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\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 throw new 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 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 throw new 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 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 throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n}\n\nvar LegacyRoot = 0;\nvar ConcurrentRoot = 1;\n\nvar syncQueue = null;\nvar includesLegacySyncCallbacks = false;\nvar isFlushingSyncQueue = false;\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];\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}\nfunction scheduleLegacySyncCallback(callback) {\n includesLegacySyncCallbacks = true;\n scheduleSyncCallback(callback);\n}\nfunction flushSyncCallbacksOnlyInLegacyMode() {\n // Only flushes the queue if there's a legacy sync callback scheduled.\n // TODO: There's only a single type of callback: performSyncOnWorkOnRoot. So\n // it might make more sense for the queue to be a list of roots instead of a\n // list of generic callbacks. Then we can have two: one for legacy roots, one\n // for concurrent roots. And this method would only flush the legacy ones.\n if (includesLegacySyncCallbacks) {\n flushSyncCallbacks();\n }\n}\nfunction flushSyncCallbacks() {\n if (!isFlushingSyncQueue && syncQueue !== null) {\n // Prevent re-entrance.\n isFlushingSyncQueue = true;\n var i = 0;\n var previousUpdatePriority = getCurrentUpdatePriority();\n\n try {\n var isSync = true;\n var queue = syncQueue; // TODO: Is this necessary anymore? The only user code that runs in this\n // queue is in the render or commit phases.\n\n setCurrentUpdatePriority(DiscreteEventPriority);\n\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 includesLegacySyncCallbacks = false;\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 scheduleCallback(ImmediatePriority, flushSyncCallbacks);\n throw error;\n } finally {\n setCurrentUpdatePriority(previousUpdatePriority);\n isFlushingSyncQueue = false;\n }\n }\n\n return null;\n}\n\n// TODO: Use the unified fiber stack module instead of this local one?\n// Intentionally not using it yet to derisk the initial implementation, because\n// the way we push/pop these values is a bit unusual. If there's a mistake, I'd\n// rather the ids be wrong than crash the whole reconciler.\nvar forkStack = [];\nvar forkStackIndex = 0;\nvar treeForkProvider = null;\nvar treeForkCount = 0;\nvar idStack = [];\nvar idStackIndex = 0;\nvar treeContextProvider = null;\nvar treeContextId = 1;\nvar treeContextOverflow = '';\nfunction isForkedChild(workInProgress) {\n warnIfNotHydrating();\n return (workInProgress.flags & Forked) !== NoFlags;\n}\nfunction getForksAtLevel(workInProgress) {\n warnIfNotHydrating();\n return treeForkCount;\n}\nfunction getTreeId() {\n var overflow = treeContextOverflow;\n var idWithLeadingBit = treeContextId;\n var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n return id.toString(32) + overflow;\n}\nfunction pushTreeFork(workInProgress, totalChildren) {\n // This is called right after we reconcile an array (or iterator) of child\n // fibers, because that's the only place where we know how many children in\n // the whole set without doing extra work later, or storing addtional\n // information on the fiber.\n //\n // That's why this function is separate from pushTreeId — it's called during\n // the render phase of the fork parent, not the child, which is where we push\n // the other context values.\n //\n // In the Fizz implementation this is much simpler because the child is\n // rendered in the same callstack as the parent.\n //\n // It might be better to just add a `forks` field to the Fiber type. It would\n // make this module simpler.\n warnIfNotHydrating();\n forkStack[forkStackIndex++] = treeForkCount;\n forkStack[forkStackIndex++] = treeForkProvider;\n treeForkProvider = workInProgress;\n treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextProvider = workInProgress;\n var baseIdWithLeadingBit = treeContextId;\n var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n // of the id; we use it to account for leading 0s.\n\n var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n var slot = index + 1;\n var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n // consideration the leading 1 we use to mark the end of the sequence.\n\n if (length > 30) {\n // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n // This branch assumes the length of the base id is greater than 5; it won't\n // work for smaller ids, because you need 5 bits per character.\n //\n // We encode the id in multiple steps: first the base id, then the\n // remaining digits.\n //\n // Each 5 bit sequence corresponds to a single base 32 character. So for\n // example, if the current id is 23 bits long, we can convert 20 of those\n // bits into a string of 4 characters, with 3 bits left over.\n //\n // First calculate how many bits in the base id represent a complete\n // sequence of characters.\n var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n var restOfBaseId = baseId >> numberOfOverflowBits;\n var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n // we made more room, this time it won't overflow.\n\n var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n var restOfNewBits = slot << restOfBaseLength;\n var id = restOfNewBits | restOfBaseId;\n var overflow = newOverflow + baseOverflow;\n treeContextId = 1 << restOfLength | id;\n treeContextOverflow = overflow;\n } else {\n // Normal path\n var newBits = slot << baseLength;\n\n var _id = newBits | baseId;\n\n var _overflow = baseOverflow;\n treeContextId = 1 << length | _id;\n treeContextOverflow = _overflow;\n }\n}\nfunction pushMaterializedTreeId(workInProgress) {\n warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear\n // in its children.\n\n var returnFiber = workInProgress.return;\n\n if (returnFiber !== null) {\n var numberOfForks = 1;\n var slotIndex = 0;\n pushTreeFork(workInProgress, numberOfForks);\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\n}\n\nfunction getBitLength(number) {\n return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n return 1 << getBitLength(id) - 1;\n}\n\nfunction popTreeContext(workInProgress) {\n // Restore the previous values.\n // This is a bit more complicated than other context-like modules in Fiber\n // because the same Fiber may appear on the stack multiple times and for\n // different reasons. We have to keep popping until the work-in-progress is\n // no longer at the top of the stack.\n while (workInProgress === treeForkProvider) {\n treeForkProvider = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n treeForkCount = forkStack[--forkStackIndex];\n forkStack[forkStackIndex] = null;\n }\n\n while (workInProgress === treeContextProvider) {\n treeContextProvider = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextOverflow = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n treeContextId = idStack[--idStackIndex];\n idStack[idStackIndex] = null;\n }\n}\nfunction getSuspendedTreeContext() {\n warnIfNotHydrating();\n\n if (treeContextProvider !== null) {\n return {\n id: treeContextId,\n overflow: treeContextOverflow\n };\n } else {\n return null;\n }\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n warnIfNotHydrating();\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextId = suspendedContext.id;\n treeContextOverflow = suspendedContext.overflow;\n treeContextProvider = workInProgress;\n}\n\nfunction warnIfNotHydrating() {\n {\n if (!getIsHydrating()) {\n error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');\n }\n }\n}\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches\n// due to earlier mismatches or a suspended fiber.\n\nvar didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary\n\nvar hydrationErrors = null;\n\nfunction warnIfHydrating() {\n {\n if (isHydrating) {\n error('We should not be hydrating here. This is a bug in React. Please file a bug.');\n }\n }\n}\n\nfunction markDidThrowWhileHydratingDEV() {\n {\n didSuspendOrErrorDEV = true;\n }\n}\nfunction didSuspendOrErrorWhileHydratingDEV() {\n {\n return didSuspendOrErrorDEV;\n }\n}\n\nfunction enterHydrationState(fiber) {\n\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n return true;\n}\n\nfunction reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {\n\n nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n hydrationErrors = null;\n didSuspendOrErrorDEV = false;\n\n if (treeContext !== null) {\n restoreSuspendedTreeContext(fiber, treeContext);\n }\n\n return true;\n}\n\nfunction warnUnhydratedInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);\n break;\n }\n\n case HostComponent:\n {\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);\n break;\n }\n }\n }\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n warnUnhydratedInstance(returnFiber, instance);\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\n}\n\nfunction warnNonhydratedInstance(returnFiber, fiber) {\n {\n if (didSuspendOrErrorDEV) {\n // Inside a boundary that already suspended. We're currently rendering the\n // siblings of a suspended node. The mismatch may be due to the missing\n // data, so it's probably a false positive.\n return;\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 didNotFindHydratableInstanceWithinContainer(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinContainer(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 {\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\n break;\n }\n\n case HostText:\n {\n var _text = fiber.pendingProps;\n\n var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode);\n break;\n }\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n var suspenseState = returnFiber.memoizedState;\n var _parentInstance = suspenseState.dehydrated;\n if (_parentInstance !== null) switch (fiber.tag) {\n case HostComponent:\n var _type2 = fiber.type;\n var _props2 = fiber.pendingProps;\n didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);\n break;\n\n case HostText:\n var _text2 = fiber.pendingProps;\n didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);\n break;\n }\n break;\n }\n\n default:\n return;\n }\n }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n fiber.flags = fiber.flags & ~Hydrating | Placement;\n warnNonhydratedInstance(returnFiber, fiber);\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 hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(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 hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.\n\n nextHydratableInstance = null;\n return true;\n }\n\n return false;\n }\n\n case SuspenseComponent:\n {\n var suspenseInstance = canHydrateSuspenseInstance(nextInstance);\n\n if (suspenseInstance !== null) {\n var suspenseState = {\n dehydrated: suspenseInstance,\n treeContext: getSuspendedTreeContext(),\n retryLane: OffscreenLane\n };\n fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.\n // This simplifies the code for getHostSibling and deleting nodes,\n // since it doesn't have to consider all Suspense boundaries and\n // check if they're dehydrated ones or not.\n\n var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);\n dehydratedFragment.return = fiber;\n fiber.child = dehydratedFragment;\n hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into\n // it during the first pass. Instead, we'll reenter it later.\n\n nextHydratableInstance = null;\n return true;\n }\n\n return false;\n }\n\n default:\n return false;\n }\n}\n\nfunction shouldClientRenderOnMismatch(fiber) {\n return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags;\n}\n\nfunction throwOnHydrationMismatch(fiber) {\n throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\n } // Nothing to hydrate. Make it an insertion.\n\n\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 (shouldClientRenderOnMismatch(fiber)) {\n warnNonhydratedInstance(hydrationParentFiber, fiber);\n throwOnHydrationMismatch();\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\n\n nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n var prevHydrationParentFiber = hydrationParentFiber;\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(prevHydrationParentFiber, firstAttemptedInstance);\n }\n}\n\nfunction prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n\n var instance = fiber.stateNode;\n var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev); // 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 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 var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n isConcurrentMode);\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 var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n _isConcurrentMode2);\n break;\n }\n }\n }\n }\n\n return shouldUpdate;\n}\n\nfunction prepareToHydrateHostSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n throw new 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 hydrateSuspenseInstance(suspenseInstance, fiber);\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n throw new 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 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 } // 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. We also don't delete anything inside the root container.\n\n\n if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) {\n var nextInstance = nextHydratableInstance;\n\n if (nextInstance) {\n if (shouldClientRenderOnMismatch(fiber)) {\n warnIfUnhydratedTailNodes(fiber);\n throwOnHydrationMismatch();\n } else {\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\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 hasUnhydratedTailNodes() {\n return isHydrating && nextHydratableInstance !== null;\n}\n\nfunction warnIfUnhydratedTailNodes(fiber) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n warnUnhydratedInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n}\n\nfunction resetHydrationState() {\n\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n didSuspendOrErrorDEV = false;\n}\n\nfunction upgradeHydrationErrorsToRecoverable() {\n if (hydrationErrors !== null) {\n // Successfully completed a forced client render. The errors that occurred\n // during the hydration attempt are now recovered. We will log them in\n // commit phase, once the entire tree has finished.\n queueRecoverableErrors(hydrationErrors);\n hydrationErrors = null;\n }\n}\n\nfunction getIsHydrating() {\n return isHydrating;\n}\n\nfunction queueHydrationError(error) {\n if (hydrationErrors === null) {\n hydrationErrors = [error];\n } else {\n hydrationErrors.push(error);\n }\n}\n\nvar ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar NoTransition = null;\nfunction requestCurrentTransition() {\n return ReactCurrentBatchConfig$1.transition;\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 & StrictLegacyMode) {\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 // Dedupe 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 & StrictLegacyMode && 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 & StrictLegacyMode && 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 & StrictLegacyMode && 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(getComponentNameFromFiber(fiber) || '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(getComponentNameFromFiber(fiber) || '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(getComponentNameFromFiber(fiber) || '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(getComponentNameFromFiber(fiber) || '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(getComponentNameFromFiber(fiber) || '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(getComponentNameFromFiber(fiber) || '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://reactjs.org/link/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://reactjs.org/link/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://reactjs.org/link/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://reactjs.org/link/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://reactjs.org/link/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 18.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://reactjs.org/link/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://reactjs.org/link/derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.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://reactjs.org/link/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 18.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(getComponentNameFromFiber(fiber) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n\n try {\n setCurrentFiber(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://reactjs.org/link/legacy-context', sortedNames);\n } finally {\n resetCurrentFiber();\n }\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 didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\n\nvar warnForMissingKey = function (child, returnFiber) {};\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, returnFiber) {\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 throw new 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 child._store.validated = true;\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasKeyUseWarning[componentName]) {\n return;\n }\n\n ownerHasKeyUseWarning[componentName] = true;\n\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n };\n}\n\nfunction isReactClass(type) {\n return type.prototype && type.prototype.isReactComponent;\n}\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 & StrictLegacyMode || 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) && // Will already throw with \"Function components cannot have string refs\"\n !(element._owner && element._owner.tag !== ClassComponent) && // Will already warn with \"Function components cannot be given refs\"\n !(typeof element.type === 'function' && !isReactClass(element.type)) && // Will already throw with \"Element ref was specified as a string (someStringRef) but no owner was set\"\n element._owner) {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n {\n error('Component \"%s\" contains the string ref \"%s\". Support for string refs ' + 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, mixedRef);\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 throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref');\n }\n\n inst = ownerFiber.stateNode;\n }\n\n if (!inst) {\n throw new Error(\"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a \" + 'bug in React. Please file an issue.');\n } // Assigning this to a const so Flow knows it won't change in the closure\n\n\n var resolvedInst = inst;\n\n {\n checkPropStringCoercion(mixedRef, 'ref');\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 = resolvedInst.refs;\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 throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.');\n }\n\n if (!element._owner) {\n throw new Error(\"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of\" + ' the following reasons:\\n' + '1. You may be adding a ref to a function component\\n' + \"2. You may be adding a ref to a component that was not created inside a component's render method\\n\" + '3. You have multiple copies of React loaded\\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.');\n }\n }\n }\n\n return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n var childString = Object.prototype.toString.call(newChild);\n throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n}\n\nfunction warnOnFunctionType(returnFiber) {\n {\n var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n if (ownerHasFunctionTypeWarning[componentName]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[componentName] = 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}\n\nfunction resolveLazy(lazyType) {\n var payload = lazyType._payload;\n var init = lazyType._init;\n return init(payload);\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 }\n\n var deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [childToDelete];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(childToDelete);\n }\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 // During hydration, the useId algorithm needs to know which fibers are\n // part of a list of children (arrays, iterators).\n newFiber.flags |= Forked;\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.flags |= 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.flags |= 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.flags |= Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\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, lanes) {\n var elementType = element.type;\n\n if (elementType === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, current, element.props.children, lanes, element.key);\n }\n\n if (current !== null) {\n if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {\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, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\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, lanes);\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, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, 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, lanes) {\n if (typeof newChild === 'string' && newChild !== '' || 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, lanes);\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, lanes);\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, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return createChild(returnFiber, init(payload), lanes);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, 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(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\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' && newChild !== '' || 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, lanes);\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 return updateElement(returnFiber, oldFiber, newChild, lanes);\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, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_LAZY_TYPE:\n {\n var payload = newChild._payload;\n var init = newChild._init;\n return updateSlot(returnFiber, oldFiber, init(payload), lanes);\n }\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' && newChild !== '' || 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, lanes);\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 return updateElement(returnFiber, _matchedFiber, newChild, lanes);\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, lanes);\n }\n\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init;\n return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);\n }\n\n if (isArray(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\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, returnFiber) {\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, returnFiber);\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 case REACT_LAZY_TYPE:\n var payload = child._payload;\n var init = child._init;\n warnOnInvalidKey(init(payload), knownKeys, returnFiber);\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\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, returnFiber);\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], lanes);\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\n if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n\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], lanes);\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 if (getIsHydrating()) {\n var _numberOfForks = newIdx;\n pushTreeFork(returnFiber, _numberOfForks);\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], lanes);\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 if (getIsHydrating()) {\n var _numberOfForks2 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks2);\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\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 throw new 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 // 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 not supported. ' + 'Use an array 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, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (newChildren == null) {\n throw new Error('An iterable object provided no iterator.');\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, lanes);\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\n if (getIsHydrating()) {\n var numberOfForks = newIdx;\n pushTreeFork(returnFiber, numberOfForks);\n }\n\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, lanes);\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 if (getIsHydrating()) {\n var _numberOfForks3 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks3);\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, lanes);\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 if (getIsHydrating()) {\n var _numberOfForks4 = newIdx;\n pushTreeFork(returnFiber, _numberOfForks4);\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\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, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\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 var elementType = element.type;\n\n if (elementType === REACT_FRAGMENT_TYPE) {\n if (child.tag === Fragment) {\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 } else {\n if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type.\n // We need to do this after the Hot Reloading check above,\n // because hot reloading has different semantics than prod because\n // it doesn't resuspend. So we can't let the call below suspend.\n typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing = useFiber(child, element.props);\n\n _existing.ref = coerceRef(returnFiber, child, element);\n _existing.return = returnFiber;\n\n {\n _existing._debugSource = element._source;\n _existing._debugOwner = element._owner;\n }\n\n return _existing;\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, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\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, lanes);\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, lanes) {\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 if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_LAZY_TYPE:\n var payload = newChild._payload;\n var init = newChild._init; // TODO: This function is supposed to be non-recursive.\n\n return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes);\n }\n\n if (isArray(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\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 throw new Error('Resuming work not yet implemented.');\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, lanes) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, lanes);\n child = child.sibling;\n }\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 lastFullyObservedContext = 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 lastFullyObservedContext = 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, context, nextValue) {\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(context, providerFiber) {\n var currentValue = valueCursor.current;\n pop(valueCursor, providerFiber);\n\n {\n {\n context._currentValue = currentValue;\n }\n }\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n // Update the child lanes of all the ancestors, including the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n\n if (node === propagationRoot) {\n break;\n }\n\n node = node.return;\n }\n\n {\n if (node !== propagationRoot) {\n error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n}\nfunction propagateContextChange(workInProgress, context, renderLanes) {\n {\n propagateContextChange_eager(workInProgress, context, renderLanes);\n }\n}\n\nfunction propagateContextChange_eager(workInProgress, context, renderLanes) {\n\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) {\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 lane = pickArbitraryLane(renderLanes);\n var update = createUpdate(NoTimestamp, lane);\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 // Inlined `enqueueUpdate` to remove interleaved update check\n\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) ; else {\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\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.\n\n list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n // dependency list.\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 if (fiber.tag === DehydratedFragment) {\n // If a dehydrated suspense boundary is in this subtree, we don't know\n // if it will have any context consumers in it. The best we can do is\n // mark it as having updates.\n var parentSuspense = fiber.return;\n\n if (parentSuspense === null) {\n throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');\n }\n\n parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);\n var _alternate = parentSuspense.alternate;\n\n if (_alternate !== null) {\n _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);\n } // This is intentionally passing this fiber as the parent\n // because we want to schedule this fiber as having work\n // on its children. We'll use the childLanes on\n // this fiber to indicate that a context has changed.\n\n\n scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);\n nextFiber = fiber.sibling;\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, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastFullyObservedContext = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (includesSomeLane(dependencies.lanes, renderLanes)) {\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}\nfunction readContext(context) {\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 var value = context._currentValue ;\n\n if (lastFullyObservedContext === context) ; else {\n var contextItem = {\n context: context,\n memoizedValue: value,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (currentlyRenderingFiber === null) {\n throw new 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 } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n currentlyRenderingFiber.dependencies = {\n lanes: NoLanes,\n firstContext: contextItem\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n\n return value;\n}\n\n// render. When this render exits, either because it finishes or because it is\n// interrupted, the interleaved updates will be transferred onto the main part\n// of the queue.\n\nvar concurrentQueues = null;\nfunction pushConcurrentUpdateQueue(queue) {\n if (concurrentQueues === null) {\n concurrentQueues = [queue];\n } else {\n concurrentQueues.push(queue);\n }\n}\nfunction finishQueueingConcurrentUpdates() {\n // Transfer the interleaved updates onto the main queue. Each queue has a\n // `pending` field and an `interleaved` field. When they are not null, they\n // point to the last node in a circular linked list. We need to append the\n // interleaved list to the end of the pending list by joining them into a\n // single, circular list.\n if (concurrentQueues !== null) {\n for (var i = 0; i < concurrentQueues.length; i++) {\n var queue = concurrentQueues[i];\n var lastInterleavedUpdate = queue.interleaved;\n\n if (lastInterleavedUpdate !== null) {\n queue.interleaved = null;\n var firstInterleavedUpdate = lastInterleavedUpdate.next;\n var lastPendingUpdate = queue.pending;\n\n if (lastPendingUpdate !== null) {\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = firstInterleavedUpdate;\n lastInterleavedUpdate.next = firstPendingUpdate;\n }\n\n queue.pending = lastInterleavedUpdate;\n }\n }\n\n concurrentQueues = null;\n }\n}\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n\n queue.interleaved = update;\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n}\nfunction enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n\n queue.interleaved = update;\n}\nfunction enqueueConcurrentClassUpdate(fiber, queue, update, lane) {\n var interleaved = queue.interleaved;\n\n if (interleaved === null) {\n // This is the first update. Create a circular list.\n update.next = update; // At the end of the current render, this queue's interleaved updates will\n // be transferred to the pending queue.\n\n pushConcurrentUpdateQueue(queue);\n } else {\n update.next = interleaved.next;\n interleaved.next = update;\n }\n\n queue.interleaved = update;\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n return markUpdateLaneFromFiberToRoot(fiber, lane);\n} // Calling this function outside this module should only be done for backwards\n// compatibility and should always be accompanied by a warning.\n\nvar unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;\n\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n // Update the source fiber's lanes\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n var alternate = sourceFiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n }\n\n {\n if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n } // Walk the parent path to the root and update the child lanes.\n\n\n var node = sourceFiber;\n var parent = sourceFiber.return;\n\n while (parent !== null) {\n parent.childLanes = mergeLanes(parent.childLanes, lane);\n alternate = parent.alternate;\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n } else {\n {\n if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n }\n }\n\n node = parent;\n parent = parent.return;\n }\n\n if (node.tag === HostRoot) {\n var root = node.stateNode;\n return root;\n } else {\n return null;\n }\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 firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null,\n interleaved: null,\n lanes: NoLanes\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 firstBaseUpdate: currentQueue.firstBaseUpdate,\n lastBaseUpdate: currentQueue.lastBaseUpdate,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = clone;\n }\n}\nfunction createUpdate(eventTime, lane) {\n var update = {\n eventTime: eventTime,\n lane: lane,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n return update;\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return null;\n }\n\n var sharedQueue = updateQueue.shared;\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\n if (isUnsafeClassRenderPhaseUpdate()) {\n // This is an unsafe render phase update. Add directly to the update\n // queue so we can process it immediately during the current render.\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; // Update the childLanes even though we're most likely already rendering\n // this fiber. This is for backwards compatibility in the case where you\n // update a different component during render phase than the one that is\n // currently renderings (a pattern that is accompanied by a warning).\n\n return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);\n } else {\n return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);\n }\n}\nfunction entangleTransitions(root, fiber, lane) {\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\n if (isTransitionLane(lane)) {\n var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must\n // have finished. We can remove them from the shared queue, which represents\n // a superset of the actually pending lanes. In some cases we may entangle\n // more than we need to, but that's OK. In fact it's worse if we *don't*\n // entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n // Captured updates are updates that are thrown by a child during the render\n // phase. They should be discarded if the render is aborted. Therefore,\n // we should only put them on the work-in-progress queue, not the current one.\n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n // The work-in-progress queue is the same as current. This happens when\n // we bail out on a parent fiber that then captures an error thrown by\n // a child. Since we want to append the update only to the work-in\n // -progress queue, we need to clone the updates. We usually clone during\n // processUpdateQueue, but that didn't happen in this case because we\n // skipped over the parent when we bailed out.\n var newFirst = null;\n var newLast = null;\n var firstBaseUpdate = queue.firstBaseUpdate;\n\n if (firstBaseUpdate !== null) {\n // Loop through the updates and clone them.\n var update = firstBaseUpdate;\n\n do {\n var clone = {\n eventTime: update.eventTime,\n lane: update.lane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLast === null) {\n newFirst = newLast = clone;\n } else {\n newLast.next = clone;\n newLast = clone;\n }\n\n update = update.next;\n } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n if (newLast === null) {\n newFirst = newLast = capturedUpdate;\n } else {\n newLast.next = capturedUpdate;\n newLast = capturedUpdate;\n }\n } else {\n // There are no base updates.\n newFirst = newLast = capturedUpdate;\n }\n\n queue = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = queue;\n return;\n }\n } // Append the update to the end of the list.\n\n\n var lastBaseUpdate = queue.lastBaseUpdate;\n\n if (lastBaseUpdate === null) {\n queue.firstBaseUpdate = capturedUpdate;\n } else {\n lastBaseUpdate.next = capturedUpdate;\n }\n\n queue.lastBaseUpdate = capturedUpdate;\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\n var nextState = payload.call(instance, prevState, nextProps);\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\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.flags = workInProgress.flags & ~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\n partialState = _payload.call(instance, prevState, nextProps);\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n _payload.call(instance, prevState, nextProps);\n } finally {\n setIsStrictModeForDevtools(false);\n }\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, renderLanes) {\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 }\n\n var firstBaseUpdate = queue.firstBaseUpdate;\n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n // and last so that it's non-circular.\n\n var lastPendingUpdate = pendingQueue;\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null; // Append pending updates to base queue\n\n if (lastBaseUpdate === null) {\n firstBaseUpdate = firstPendingUpdate;\n } else {\n lastBaseUpdate.next = firstPendingUpdate;\n }\n\n lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n // we need to transfer the updates to that queue, too. Because the base\n // queue is a singly-linked list with no cycles, we can append to both\n // lists and take advantage of structural sharing.\n // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // This is always non-null on a ClassComponent or HostRoot\n var currentQueue = current.updateQueue;\n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n if (currentLastBaseUpdate !== lastBaseUpdate) {\n if (currentLastBaseUpdate === null) {\n currentQueue.firstBaseUpdate = firstPendingUpdate;\n } else {\n currentLastBaseUpdate.next = firstPendingUpdate;\n }\n\n currentQueue.lastBaseUpdate = lastPendingUpdate;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (firstBaseUpdate !== null) {\n // Iterate through the list of updates to compute the result.\n var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n // from the original lanes.\n\n var newLanes = NoLanes;\n var newBaseState = null;\n var newFirstBaseUpdate = null;\n var newLastBaseUpdate = null;\n var update = firstBaseUpdate;\n\n do {\n var updateLane = update.lane;\n var updateEventTime = update.eventTime;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\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 eventTime: updateEventTime,\n lane: updateLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLastBaseUpdate === null) {\n newFirstBaseUpdate = newLastBaseUpdate = clone;\n newBaseState = newState;\n } else {\n newLastBaseUpdate = newLastBaseUpdate.next = clone;\n } // Update the remaining priority in the queue.\n\n\n newLanes = mergeLanes(newLanes, updateLane);\n } else {\n // This update does have sufficient priority.\n if (newLastBaseUpdate !== null) {\n var _clone = {\n eventTime: updateEventTime,\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n } // Process this update.\n\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null && // If the update was already committed, we should not queue its\n // callback again.\n update.lane !== NoLane) {\n workInProgress.flags |= 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) {\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 var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n // unravel them when transferring them to the base queue.\n\n var _firstPendingUpdate = _lastPendingUpdate.next;\n _lastPendingUpdate.next = null;\n update = _firstPendingUpdate;\n queue.lastBaseUpdate = _lastPendingUpdate;\n queue.shared.pending = null;\n }\n }\n } while (true);\n\n if (newLastBaseUpdate === null) {\n newBaseState = newState;\n }\n\n queue.baseState = newBaseState;\n queue.firstBaseUpdate = newFirstBaseUpdate;\n queue.lastBaseUpdate = newLastBaseUpdate; // Interleaved updates are stored on a separate queue. We aren't going to\n // process them during this render, but we do need to track which lanes\n // are remaining.\n\n var lastInterleaved = queue.shared.interleaved;\n\n if (lastInterleaved !== null) {\n var interleaved = lastInterleaved;\n\n do {\n newLanes = mergeLanes(newLanes, interleaved.lane);\n interleaved = interleaved.next;\n } while (interleaved !== lastInterleaved);\n } else if (firstBaseUpdate === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.shared.lanes = NoLanes;\n } // 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\n markSkippedUpdateLanes(newLanes);\n workInProgress.lanes = newLanes;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n}\n\nfunction callCallback(callback, context) {\n if (typeof callback !== 'function') {\n throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + (\"received: \" + callback));\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 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 throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');\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; // Regular boundaries always capture.\n\n {\n return true;\n } // If it's a boundary we should avoid, then we prefer to bubble up to the\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.flags & DidCapture) !== NoFlags;\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\nvar NoFlags$1 =\n/* */\n0; // Represents whether effect should fire.\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Insertion =\n/* */\n2;\nvar Layout =\n/* */\n4;\nvar Passive$1 =\n/* */\n8;\n\n// and should be reset before starting a new render.\n// This tracks which mutable sources need to be reset after a render.\n\nvar workInProgressSources = [];\nfunction resetWorkInProgressVersions() {\n for (var i = 0; i < workInProgressSources.length; i++) {\n var mutableSource = workInProgressSources[i];\n\n {\n mutableSource._workInProgressVersionPrimary = null;\n }\n }\n\n workInProgressSources.length = 0;\n}\n// This ensures that the version used for server rendering matches the one\n// that is eventually read during hydration.\n// If they don't match there's a potential tear and a full deopt render is required.\n\nfunction registerMutableSourceForHydration(root, mutableSource) {\n var getVersion = mutableSource._getVersion;\n var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n // Retaining it forever may interfere with GC.\n\n if (root.mutableSourceEagerHydrationData == null) {\n root.mutableSourceEagerHydrationData = [mutableSource, version];\n } else {\n root.mutableSourceEagerHydrationData.push(mutableSource, version);\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\nvar didWarnUncachedGetSnapshot;\n\n{\n didWarnAboutMismatchedHooksForComponent = new Set();\n}\n\n// These are set right before calling the component.\nvar renderLanes = NoLanes; // 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; // Where an update was scheduled only during the current render pass. This\n// gets reset after each attempt.\n// TODO: Maybe there's some way to consolidate this with\n// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\nvar didScheduleRenderPhaseUpdateDuringThisPass = false; // Counts the number of useId hooks in this component.\n\nvar localIdCounter = 0; // Used for ids that are generated completely client-side (i.e. not during\n// hydration). This counter is global, so client ids are not stable across\n// render attempts.\n\nvar globalClientIdCounter = 0;\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 && !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 = getComponentNameFromFiber(currentlyRenderingFiber$1);\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://reactjs.org/link/rules-of-hooks\\n\\n' + ' Previous render Next render\\n' + ' ------------------------------------------------------\\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n }\n }\n }\n}\n\nfunction throwInvalidHookError() {\n throw new 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:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\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, nextRenderLanes) {\n renderLanes = nextRenderLanes;\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.lanes = NoLanes; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // localIdCounter = 0;\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$1.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$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n }\n\n var children = Component(props, secondArg); // Check if there was a render phase update\n\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\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 didScheduleRenderPhaseUpdateDuringThisPass = false;\n localIdCounter = 0;\n\n if (numberOfReRenders >= RE_RENDER_LIMIT) {\n throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\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$1.current = HooksDispatcherOnRerenderInDEV ;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\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-entrance.\n\n\n ReactCurrentDispatcher$1.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 renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last\n // render. If this fires, it suggests that we incorrectly reset the static\n // flags in some other part of the codebase. This has happened before, for\n // example, in the SuspenseList implementation.\n\n if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird\n // and creates false positives. To make this work in legacy mode, we'd\n // need to mark fibers that commit in an incomplete state, somehow. For\n // now I'll disable the warning that most of the bugs that would trigger\n // it are either exclusive to concurrent mode or exist in both.\n (current.mode & ConcurrentMode) !== NoMode) {\n error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');\n }\n }\n\n didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook\n // localIdCounter = 0;\n\n if (didRenderTooFewHooks) {\n throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');\n }\n\n return children;\n}\nfunction checkDidRenderIdHook() {\n // This should be called immediately after every renderWithHooks call.\n // Conceptually, it's part of the return value of renderWithHooks; it's only a\n // separate function to avoid using an array tuple.\n var didRenderIdHook = localIdCounter !== 0;\n localIdCounter = 0;\n return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the\n // complete phase (bubbleProperties).\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update);\n } else {\n workInProgress.flags &= ~(Passive | Update);\n }\n\n current.lanes = removeLanes(current.lanes, lanes);\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-entrance.\n ReactCurrentDispatcher$1.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 didScheduleRenderPhaseUpdate = false;\n }\n\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n isUpdatingOpaqueValueInRenderPhase = false;\n }\n\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n localIdCounter = 0;\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 throw new Error('Rendered more hooks than during the previous render.');\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 stores: 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 = {\n pending: null,\n interleaved: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n var dispatch = queue.dispatch = dispatchReducerAction.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 throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\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 {\n if (current.baseQueue !== baseQueue) {\n // Internal invariant that should never happen, but feasibly could in\n // the future if we implement resuming, or some form of that.\n error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n }\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 updateLane = update.lane;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\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 lane: updateLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\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 // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n markSkippedUpdateLanes(updateLane);\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Process this update.\n\n\n if (update.hasEagerState) {\n // If this update is a state update (not a reducer) and was processed eagerly,\n // 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 } // Interleaved updates are stored on a separate queue. We aren't going to\n // process them during this render, but we do need to track which lanes\n // are remaining.\n\n\n var lastInterleaved = queue.interleaved;\n\n if (lastInterleaved !== null) {\n var interleaved = lastInterleaved;\n\n do {\n var interleavedLane = interleaved.lane;\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane);\n markSkippedUpdateLanes(interleavedLane);\n interleaved = interleaved.next;\n } while (interleaved !== lastInterleaved);\n } else if (baseQueue === null) {\n // `queue.lanes` is used for entangling transitions. We can set it back to\n // zero once the queue is empty.\n queue.lanes = NoLanes;\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 throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\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 mountMutableSource(source, getSnapshot, subscribe) {\n {\n return undefined;\n }\n}\n\nfunction updateMutableSource(source, getSnapshot, subscribe) {\n {\n return undefined;\n }\n}\n\nfunction mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = mountWorkInProgressHook();\n var nextSnapshot;\n var isHydrating = getIsHydrating();\n\n if (isHydrating) {\n if (getServerSnapshot === undefined) {\n throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n }\n\n nextSnapshot = getServerSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n if (nextSnapshot !== getServerSnapshot()) {\n error('The result of getServerSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n } else {\n nextSnapshot = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n //\n // We won't do this if we're hydrating server-rendered content, because if\n // the content is stale, it's already visible anyway. Instead we'll patch\n // it up in a passive effect.\n\n\n var root = getWorkInProgressRoot();\n\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n\n if (!includesBlockingLane(root, renderLanes)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n } // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n\n hook.memoizedState = nextSnapshot;\n var inst = {\n value: nextSnapshot,\n getSnapshot: getSnapshot\n };\n hook.queue = inst; // Schedule an effect to subscribe to the store.\n\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update\n // this whenever subscribe, getSnapshot, or value changes. Because there's no\n // clean-up function, and we track the deps correctly, we can call pushEffect\n // directly, without storing any additional state. For the same reason, we\n // don't need to set a static flag, either.\n // TODO: We can move this to the passive phase once we add a pre-commit\n // consistency check. See the next comment.\n\n fiber.flags |= Passive;\n pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null);\n return nextSnapshot;\n}\n\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber$1;\n var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the\n // normal rules of React, and only works because store updates are\n // always synchronous.\n\n var nextSnapshot = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedSnapshot = getSnapshot();\n\n if (!objectIs(nextSnapshot, cachedSnapshot)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n }\n\n var prevSnapshot = hook.memoizedState;\n var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);\n\n if (snapshotChanged) {\n hook.memoizedState = nextSnapshot;\n markWorkInProgressReceivedUpdate();\n }\n\n var inst = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by\n // checking whether we scheduled a subscription effect above.\n workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {\n fiber.flags |= Passive;\n pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); // Unless we're rendering a blocking lane, schedule a consistency check.\n // Right before committing, we will walk the tree and check if any of the\n // stores were mutated.\n\n var root = getWorkInProgressRoot();\n\n if (root === null) {\n throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n }\n\n if (!includesBlockingLane(root, renderLanes)) {\n pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n }\n }\n\n return nextSnapshot;\n}\n\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= StoreConsistency;\n var check = {\n getSnapshot: getSnapshot,\n value: renderedSnapshot\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.stores = [check];\n } else {\n var stores = componentUpdateQueue.stores;\n\n if (stores === null) {\n componentUpdateQueue.stores = [check];\n } else {\n stores.push(check);\n }\n }\n}\n\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n // These are updated in the passive phase\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could\n // have been in an event that fired before the passive effects, or it could\n // have been in a layout effect. In that case, we would have used the old\n // snapsho and getSnapshot values to bail out. We need to check one more time.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n}\n\nfunction subscribeToStore(fiber, inst, subscribe) {\n var handleStoreChange = function () {\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceStoreRerender(fiber);\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\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 = {\n pending: null,\n interleaved: null,\n lanes: NoLanes,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n hook.queue = queue;\n var dispatch = queue.dispatch = dispatchSetState.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\n {\n var _ref2 = {\n current: initialValue\n };\n hook.memoizedState = _ref2;\n return _ref2;\n }\n}\n\nfunction updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);\n}\n\nfunction updateEffectImpl(fiberFlags, hookFlags, 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 hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps);\n } else {\n return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps);\n }\n}\n\nfunction updateEffect(create, deps) {\n return updateEffectImpl(Passive, Passive$1, create, deps);\n}\n\nfunction mountInsertionEffect(create, deps) {\n return mountEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n var fiberFlags = Update;\n\n {\n fiberFlags |= LayoutStatic;\n }\n\n if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n return mountEffectImpl(fiberFlags, 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 var fiberFlags = Update;\n\n {\n fiberFlags |= LayoutStatic;\n }\n\n if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n return mountEffectImpl(fiberFlags, 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) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = value;\n return value;\n}\n\nfunction updateDeferredValue(value) {\n var hook = updateWorkInProgressHook();\n var resolvedCurrentHook = currentHook;\n var prevValue = resolvedCurrentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n}\n\nfunction rerenderDeferredValue(value) {\n var hook = updateWorkInProgressHook();\n\n if (currentHook === null) {\n // This is a rerender during a mount.\n hook.memoizedState = value;\n return value;\n } else {\n // This is a rerender during an update.\n var prevValue = currentHook.memoizedState;\n return updateDeferredValueImpl(hook, prevValue, value);\n }\n}\n\nfunction updateDeferredValueImpl(hook, prevValue, value) {\n var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);\n\n if (shouldDeferValue) {\n // This is an urgent update. If the value has changed, keep using the\n // previous value and spawn a deferred render to update it later.\n if (!objectIs(value, prevValue)) {\n // Schedule a deferred render\n var deferredLane = claimNextTransitionLane();\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);\n markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent\n // from the latest value. The name \"baseState\" doesn't really match how we\n // use it because we're reusing a state hook field instead of creating a\n // new one.\n\n hook.baseState = true;\n } // Reuse the previous value\n\n\n return prevValue;\n } else {\n // This is not an urgent update, so we can use the latest value regardless\n // of what it is. No need to defer it.\n // However, if we're currently inside a spawned render, then we need to mark\n // this as an update to prevent the fiber from bailing out.\n //\n // `baseState` is true when the current value is different from the rendered\n // value. The name doesn't really match how we use it because we're reusing\n // a state hook field instead of creating a new one.\n if (hook.baseState) {\n // Flip this back to false.\n hook.baseState = false;\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = value;\n return value;\n }\n}\n\nfunction startTransition(setPending, callback, options) {\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));\n setPending(true);\n var prevTransition = ReactCurrentBatchConfig$2.transition;\n ReactCurrentBatchConfig$2.transition = {};\n var currentTransition = ReactCurrentBatchConfig$2.transition;\n\n {\n ReactCurrentBatchConfig$2.transition._updatedFibers = new Set();\n }\n\n try {\n setPending(false);\n callback();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$2.transition = prevTransition;\n\n {\n if (prevTransition === null && currentTransition._updatedFibers) {\n var updatedFibersCount = currentTransition._updatedFibers.size;\n\n if (updatedFibersCount > 10) {\n warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n }\n\n currentTransition._updatedFibers.clear();\n }\n }\n }\n}\n\nfunction mountTransition() {\n var _mountState = mountState(false),\n isPending = _mountState[0],\n setPending = _mountState[1]; // The `start` method never changes.\n\n\n var start = startTransition.bind(null, setPending);\n var hook = mountWorkInProgressHook();\n hook.memoizedState = start;\n return [isPending, start];\n}\n\nfunction updateTransition() {\n var _updateState = updateState(),\n isPending = _updateState[0];\n\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n return [isPending, start];\n}\n\nfunction rerenderTransition() {\n var _rerenderState = rerenderState(),\n isPending = _rerenderState[0];\n\n var hook = updateWorkInProgressHook();\n var start = hook.memoizedState;\n return [isPending, start];\n}\n\nvar isUpdatingOpaqueValueInRenderPhase = false;\nfunction getIsUpdatingOpaqueValueInRenderPhaseInDEV() {\n {\n return isUpdatingOpaqueValueInRenderPhase;\n }\n}\n\nfunction mountId() {\n var hook = mountWorkInProgressHook();\n var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we\n // should do this in Fiber, too? Deferring this decision for now because\n // there's no other place to store the prefix except for an internal field on\n // the public createRoot object, which the fiber tree does not currently have\n // a reference to.\n\n var identifierPrefix = root.identifierPrefix;\n var id;\n\n if (getIsHydrating()) {\n var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.\n\n id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n // that represents the position of this useId hook among all the useId\n // hooks for this fiber.\n\n var localId = localIdCounter++;\n\n if (localId > 0) {\n id += 'H' + localId.toString(32);\n }\n\n id += ':';\n } else {\n // Use a lowercase r prefix for client-generated ids.\n var globalClientId = globalClientIdCounter++;\n id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';\n }\n\n hook.memoizedState = id;\n return id;\n}\n\nfunction updateId() {\n var hook = updateWorkInProgressHook();\n var id = hook.memoizedState;\n return id;\n}\n\nfunction dispatchReducerAction(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 lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n\n markUpdateInDevTools(fiber, lane);\n}\n\nfunction dispatchSetState(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 lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n hasEagerState: false,\n eagerState: null,\n next: null\n };\n\n if (isRenderPhaseUpdate(fiber)) {\n enqueueRenderPhaseUpdate(queue, update);\n } else {\n var alternate = fiber.alternate;\n\n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\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$1.current;\n ReactCurrentDispatcher$1.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.hasEagerState = true;\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 // TODO: Do we still need to entangle transitions in this case?\n enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane);\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n }\n }\n }\n\n var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitionUpdate(root, queue, lane);\n }\n }\n\n markUpdateInDevTools(fiber, lane);\n}\n\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;\n}\n\nfunction enqueueRenderPhaseUpdate(queue, update) {\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 didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\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} // TODO: Move to ReactFiberConcurrentUpdates?\n\n\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (isTransitionLane(lane)) {\n var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they\n // must have finished. We can remove them from the shared queue, which\n // represents a superset of the actually pending lanes. In some cases we\n // may entangle more than we need to, but that's OK. In fact it's worse if\n // we *don't* entangle when we should.\n\n queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n var newQueueLanes = mergeLanes(queueLanes, lane);\n queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n // the lane finished since the last time we entangled it. So we need to\n // entangle it again, just to be sure.\n\n markRootEntangled(root, newQueueLanes);\n }\n}\n\nfunction markUpdateInDevTools(fiber, lane, action) {\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n}\n\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useMutableSource: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError,\n unstable_isNewReconciler: enableNewReconciler\n};\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://reactjs.org/link/rules-of-hooks');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n mountHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n mountHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return mountInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n updateHookTypesDev();\n return updateInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context) {\n warnInvalidContextAccess();\n return readContext(context);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context);\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 useInsertionEffect: function (create, deps) {\n currentHookNameInDev = 'useInsertionEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateInsertionEffect(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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.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$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource();\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n currentHookNameInDev = 'useSyncExternalStore';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateSyncExternalStore(subscribe, getSnapshot);\n },\n useId: function () {\n currentHookNameInDev = 'useId';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateId();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n}\n\nvar now$1 = Scheduler.unstable_now;\nvar commitTime = 0;\nvar layoutEffectStartTime = -1;\nvar profilerStartTime = -1;\nvar passiveEffectStartTime = -1;\n/**\n * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).\n *\n * The overall sequence is:\n * 1. render\n * 2. commit (and call `onRender`, `onCommit`)\n * 3. check for nested updates\n * 4. flush passive effects (and call `onPostCommit`)\n *\n * Nested updates are identified in step 3 above,\n * but step 4 still applies to the work that was just committed.\n * We use two flags to track nested updates then:\n * one tracks whether the upcoming update is a nested update,\n * and the other tracks whether the current update was a nested update.\n * The first value gets synced to the second at the start of the render phase.\n */\n\nvar currentUpdateIsNested = false;\nvar nestedUpdateScheduled = false;\n\nfunction isCurrentUpdateNested() {\n return currentUpdateIsNested;\n}\n\nfunction markNestedUpdateScheduled() {\n {\n nestedUpdateScheduled = true;\n }\n}\n\nfunction resetNestedUpdateFlag() {\n {\n currentUpdateIsNested = false;\n nestedUpdateScheduled = false;\n }\n}\n\nfunction syncNestedUpdateFlag() {\n {\n currentUpdateIsNested = nestedUpdateScheduled;\n nestedUpdateScheduled = false;\n }\n}\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\nfunction recordLayoutEffectDuration(fiber) {\n\n if (layoutEffectStartTime >= 0) {\n var elapsedTime = now$1() - layoutEffectStartTime;\n layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += elapsedTime;\n return;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += elapsedTime;\n return;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n}\n\nfunction recordPassiveEffectDuration(fiber) {\n\n if (passiveEffectStartTime >= 0) {\n var elapsedTime = now$1() - passiveEffectStartTime;\n passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n // Or the root (for the DevTools Profiler to read)\n\n var parentFiber = fiber.return;\n\n while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n\n if (root !== null) {\n root.passiveEffectDuration += elapsedTime;\n }\n\n return;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n\n if (parentStateNode !== null) {\n // Detached fibers have their state node cleared out.\n // In this case, the return pointer is also cleared out,\n // so we won't be able to report the time spent in this Profiler's subtree.\n parentStateNode.passiveEffectDuration += elapsedTime;\n }\n\n return;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n}\n\nfunction startLayoutEffectTimer() {\n\n layoutEffectStartTime = now$1();\n}\n\nfunction startPassiveEffectTimer() {\n\n passiveEffectStartTime = now$1();\n}\n\nfunction transferActualDuration(fiber) {\n // Transfer time spent rendering these children so we don't lose it\n // after we rerender. This is used as a helper in special cases\n // where we should count the work of multiple passes.\n var child = fiber.child;\n\n while (child) {\n fiber.actualDuration += child.actualDuration;\n child = child.sibling;\n }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = assign({}, baseProps);\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\nvar fakeInternalInstance = {};\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\nvar didWarnAboutLegacyContext$1;\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 didWarnAboutLegacyContext$1 = 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 = getComponentNameFromType(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 throw new 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 Object.freeze(fakeInternalInstance);\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n partialState = getDerivedStateFromProps(nextProps, prevState);\n } finally {\n setIsStrictModeForDevtools(false);\n }\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.lanes === NoLanes) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n}\n\nvar classComponentUpdater = {\n isMounted: isMounted,\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\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 var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\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 var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markStateUpdateScheduled(fiber, lane);\n }\n },\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\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 var root = enqueueUpdate(fiber, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n entangleTransitions(root, fiber, lane);\n }\n\n {\n markForceUpdateScheduled(fiber, lane);\n }\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 var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(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 = getComponentNameFromType(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 (ctor.childContextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip\n // this one.\n (workInProgress.mode & StrictLegacyMode) === NoMode) {\n didWarnAboutLegacyContext$1.add(ctor);\n\n error('%s uses the legacy childContextTypes API which is no longer ' + 'supported and will be removed in the next major release. Use ' + 'React.createContext() instead\\n\\n.' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);\n }\n\n if (ctor.contextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip\n // this one.\n (workInProgress.mode & StrictLegacyMode) === NoMode) {\n didWarnAboutLegacyContext$1.add(ctor);\n\n error('%s uses the legacy contextTypes API which is no longer supported ' + 'and will be removed in the next major release. Use ' + 'React.createContext() with static contextType instead.\\n\\n' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);\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.', getComponentNameFromType(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.', getComponentNameFromType(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', getComponentNameFromType(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 }\n\n var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.\n\n {\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n instance = new ctor(props, context); // eslint-disable-line no-new\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n }\n\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 = getComponentNameFromType(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 = getComponentNameFromType(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://reactjs.org/link/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 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 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.', getComponentNameFromFiber(workInProgress) || '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\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 if (instance.state !== oldState) {\n {\n var componentName = getComponentNameFromFiber(workInProgress) || '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, renderLanes) {\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 = {};\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 = getComponentNameFromType(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 & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n {\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n }\n\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, renderLanes);\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n var fiberFlags = Update;\n\n {\n fiberFlags |= LayoutStatic;\n }\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n workInProgress.flags |= fiberFlags;\n }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\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, renderLanes);\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 var fiberFlags = Update;\n\n {\n fiberFlags |= LayoutStatic;\n }\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n fiberFlags |= MountLayoutDev;\n }\n\n workInProgress.flags |= fiberFlags;\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 if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n }\n\n if (typeof instance.componentDidMount === 'function') {\n var _fiberFlags = Update;\n\n {\n _fiberFlags |= LayoutStatic;\n }\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n _fiberFlags |= MountLayoutDev;\n }\n\n workInProgress.flags |= _fiberFlags;\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 var _fiberFlags2 = Update;\n\n {\n _fiberFlags2 |= LayoutStatic;\n }\n\n if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n _fiberFlags2 |= MountLayoutDev;\n }\n\n workInProgress.flags |= _fiberFlags2;\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, renderLanes) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var unresolvedOldProps = workInProgress.memoizedProps;\n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n instance.props = oldProps;\n var unresolvedNewProps = workInProgress.pendingProps;\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 (unresolvedOldProps !== unresolvedNewProps || 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, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation )) {\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 (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= 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) || // TODO: In some cases, we'll end up checking if context has changed twice,\n // both before and after `shouldComponentUpdate` has been called. Not ideal,\n // but I'm loath to refactor this function. This only happens for memoized\n // components so it's not that common.\n enableLazyContextPropagation ;\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 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\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.flags |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.flags |= 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 (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= 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\nfunction createCapturedValueAtFiber(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 digest: null\n };\n}\nfunction createCapturedValue(value, digest, stack) {\n return {\n value: value,\n source: null,\n stack: stack != null ? stack : null,\n digest: digest != null ? digest : null\n };\n}\n\n// This module is forked in different environments.\n// By default, return `true` to log errors to the console.\n// Forks can return `false` if this isn't desirable.\nfunction showErrorDialog(boundary, errorInfo) {\n return true;\n}\n\nfunction logCapturedError(boundary, errorInfo) {\n try {\n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n\n if (logError === false) {\n return;\n }\n\n var error = errorInfo.value;\n\n if (true) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n var componentStack = stack !== null ? stack : ''; // 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 (boundary.tag === ClassComponent) {\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 componentName = source ? getComponentNameFromFiber(source) : null;\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;\n\n if (boundary.tag === HostRoot) {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';\n } else {\n var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n }\n\n var combinedMessage = componentNameMessage + \"\\n\" + 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 } else {\n // In production, we print the error directly.\n // This will include the message, the JS stack, and anything the browser wants to show.\n // We pass the error object instead of custom message so that the browser displays the error natively.\n console['error'](error); // Don't transform to our wrapper\n }\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 PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane); // 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 logCapturedError(fiber, errorInfo);\n };\n\n return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane);\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 return getDerivedStateFromError(error$1);\n };\n\n update.callback = function () {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n logCapturedError(fiber, errorInfo);\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 logCapturedError(fiber, errorInfo);\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);\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 (!includesSomeLane(fiber.lanes, SyncLane)) {\n error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');\n }\n }\n }\n };\n }\n\n return update;\n}\n\nfunction attachPingListener(root, wakeable, lanes) {\n // Attach a ping listener\n //\n // The data might resolve before we have a chance to commit the fallback. Or,\n // in the case of a refresh, we'll never commit a fallback. So we need to\n // attach a listener now. When it resolves (\"pings\"), we can decide whether to\n // try rendering the tree again.\n //\n // Only attach a listener if one does not already exist for the lanes\n // we're currently rendering (which acts like a \"thread ID\" here).\n //\n // We only need to do this in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\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(wakeable, threadIDs);\n } else {\n threadIDs = pingCache.get(wakeable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n }\n }\n\n if (!threadIDs.has(lanes)) {\n // Memoize using the thread ID to prevent redundant listeners.\n threadIDs.add(lanes);\n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, lanes);\n }\n }\n\n wakeable.then(ping, ping);\n }\n}\n\nfunction attachRetryListener(suspenseBoundary, root, wakeable, lanes) {\n // Retry listener\n //\n // If the fallback does commit, we need to attach a different type of\n // listener. This one schedules an update on the Suspense boundary to turn\n // the fallback state off.\n //\n // Stash the wakeable on the boundary fiber so we can access it in the\n // commit phase.\n //\n // When the wakeable resolves, we'll attempt to render the boundary\n // again (\"retry\").\n var wakeables = suspenseBoundary.updateQueue;\n\n if (wakeables === null) {\n var updateQueue = new Set();\n updateQueue.add(wakeable);\n suspenseBoundary.updateQueue = updateQueue;\n } else {\n wakeables.add(wakeable);\n }\n}\n\nfunction resetSuspendedComponent(sourceFiber, rootRenderLanes) {\n // A legacy mode Suspense quirk, only relevant to hook components.\n\n\n var tag = sourceFiber.tag;\n\n if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.lanes = currentSource.lanes;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n}\n\nfunction getNearestSuspenseBoundaryToCapture(returnFiber) {\n var node = returnFiber;\n\n do {\n if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) {\n return node;\n } // This boundary already captured during this render. Continue to the next\n // boundary.\n\n\n node = node.return;\n } while (node !== null);\n\n return null;\n}\n\nfunction markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {\n // This marks a Suspense boundary so that when we're unwinding the stack,\n // it captures the suspended \"exception\" and does a second (fallback) pass.\n if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {\n // Legacy Mode Suspense\n //\n // If the boundary is in legacy mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. When the Suspense boundary completes,\n // we'll do a second pass to render the fallback.\n if (suspenseBoundary === returnFiber) {\n // Special case where we suspended while reconciling the children of\n // a Suspense boundary's inner Offscreen wrapper fiber. This happens\n // when a React.lazy component is a direct child of a\n // Suspense boundary.\n //\n // Suspense boundaries are implemented as multiple fibers, but they\n // are a single conceptual unit. The legacy mode behavior where we\n // pretend the suspended fiber committed as `null` won't work,\n // because in this case the \"suspended\" fiber is the inner\n // Offscreen wrapper.\n //\n // Because the contents of the boundary haven't started rendering\n // yet (i.e. nothing in the tree has partially rendered) we can\n // switch to the regular, concurrent mode behavior: mark the\n // boundary with ShouldCapture and enter the unwind phase.\n suspenseBoundary.flags |= ShouldCapture;\n } else {\n suspenseBoundary.flags |= DidCapture;\n sourceFiber.flags |= ForceUpdateForLegacySuspense; // 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.flags &= ~(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(NoTimestamp, SyncLane);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update, SyncLane);\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.lanes = mergeLanes(sourceFiber.lanes, SyncLane);\n }\n\n return suspenseBoundary;\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. Transitions apply\n // to 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 suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in\n // the begin phase to prevent an early bailout.\n\n suspenseBoundary.lanes = rootRenderLanes;\n return suspenseBoundary;\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n // The source fiber did not complete.\n sourceFiber.flags |= Incomplete;\n\n {\n if (isDevToolsPresent) {\n // If we have pending work still, restore the original updaters\n restorePendingUpdaters(root, rootRenderLanes);\n }\n }\n\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a wakeable. The component suspended.\n var wakeable = value;\n resetSuspendedComponent(sourceFiber);\n\n {\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n }\n }\n\n\n var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);\n\n if (suspenseBoundary !== null) {\n suspenseBoundary.flags &= ~ForceClientRender;\n markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // We only attach ping listeners in concurrent mode. Legacy Suspense always\n // commits fallbacks synchronously, so there are no pings.\n\n if (suspenseBoundary.mode & ConcurrentMode) {\n attachPingListener(root, wakeable, rootRenderLanes);\n }\n\n attachRetryListener(suspenseBoundary, root, wakeable);\n return;\n } else {\n // No boundary was found. Unless this is a sync update, this is OK.\n // We can suspend and wait for more data to arrive.\n if (!includesSyncLane(rootRenderLanes)) {\n // This is not a sync update. Suspend. Since we're not activating a\n // Suspense boundary, this will unwind all the way to the root without\n // performing a second pass to render a fallback. (This is arguably how\n // refresh transitions should work, too, since we're not going to commit\n // the fallbacks anyway.)\n //\n // This case also applies to initial hydration.\n attachPingListener(root, wakeable, rootRenderLanes);\n renderDidSuspendDelayIfPossible();\n return;\n } // This is a sync/discrete update. We treat this case like an error\n // because discrete renders are expected to produce a complete tree\n // synchronously to maintain consistency with external state.\n\n\n var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.'); // If we're outside a transition, fall through to the regular error path.\n // The error will be caught by the nearest suspense boundary.\n\n value = uncaughtSuspenseError;\n }\n } else {\n // This is a regular error, not a Suspense wakeable.\n if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n markDidThrowWhileHydratingDEV();\n\n var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); // If the error was thrown during hydration, we may be able to recover by\n // discarding the dehydrated content and switching to a client render.\n // Instead of surfacing the error, find the nearest Suspense boundary\n // and render it again without hydration.\n\n\n if (_suspenseBoundary !== null) {\n if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) {\n // Set a flag to indicate that we should try rendering the normal\n // children again, not the fallback.\n _suspenseBoundary.flags |= ForceClientRender;\n }\n\n markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should\n // still log it so it can be fixed.\n\n queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));\n return;\n }\n }\n }\n\n value = createCapturedValueAtFiber(value, sourceFiber);\n renderDidError(value); // 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 var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.flags |= ShouldCapture;\n var lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\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.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.flags |= ShouldCapture;\n\n var _lane = pickArbitraryLane(rootRenderLanes);\n\n workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n\n break;\n }\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n}\n\nfunction getSuspendedCache() {\n {\n return null;\n } // This function is called when a Suspense boundary suspends. It returns the\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;\nvar didWarnAboutDefaultPropsOnFunctionComponent;\n\n{\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n didWarnAboutDefaultPropsOnFunctionComponent = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\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, renderLanes);\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, renderLanes);\n }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\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, renderLanes); // 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, renderLanes);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\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', getComponentNameFromType(Component));\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 var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n hasId = checkDidRenderIdHook();\n\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\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, renderLanes);\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', getComponentNameFromType(type));\n }\n\n if ( Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(type) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from memo components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n }\n\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\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', getComponentNameFromType(_type));\n }\n }\n\n var currentChild = current.child; // This is always exactly one child\n\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n if (!hasScheduledUpdateOrContext) {\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, renderLanes);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= 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, renderLanes) {\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 var lazyComponent = outerMemoType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n outerMemoType = init(payload);\n } catch (x) {\n outerMemoType = null;\n } // Inner propTypes will be validated in the function component path.\n\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentNameFromType(outerMemoType));\n }\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; // The props are shallowly equal. Reuse the previous props object, like we\n // would during a normal fiber bailout.\n //\n // We don't have strong guarantees that the props object is referentially\n // equal during updates where we can't bail out anyway — like if the props\n // are shallowly equal, but there's a local state or context update in the\n // same batch.\n //\n // However, as a principle, we should aim to make the behavior consistent\n // across different ways of memoizing a component. For example, React.memo\n // has a different internal Fiber layout if you pass a normal function\n // component (SimpleMemoComponent) versus if you pass a different type\n // like forwardRef (MemoComponent). But this is an implementation detail.\n // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't\n // affect whether the props object is reused during a bailout.\n\n workInProgress.pendingProps = nextProps = prevProps;\n\n if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n // The pending lanes were cleared at the beginning of beginWork. We're\n // about to bail out, but there might be other lanes that weren't\n // included in the current render. Usually, the priority level of the\n // remaining updates is accumulated 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.lanes = current.lanes;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n}\n\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n var prevState = current !== null ? current.memoizedState : null;\n\n if (nextProps.mode === 'hidden' || enableLegacyHidden ) {\n // Rendering a hidden tree.\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy sync mode, don't defer the subtree. Render it now.\n // TODO: Consider how Offscreen should work with transitions in the future\n var nextState = {\n baseLanes: NoLanes,\n cachePool: null,\n transitions: null\n };\n workInProgress.memoizedState = nextState;\n\n pushRenderLanes(workInProgress, renderLanes);\n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n var spawnedCachePool = null; // We're hidden, and we're not rendering at Offscreen. We will bail out\n // and resume this tree later.\n\n var nextBaseLanes;\n\n if (prevState !== null) {\n var prevBaseLanes = prevState.baseLanes;\n nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);\n } else {\n nextBaseLanes = renderLanes;\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);\n var _nextState = {\n baseLanes: nextBaseLanes,\n cachePool: spawnedCachePool,\n transitions: null\n };\n workInProgress.memoizedState = _nextState;\n workInProgress.updateQueue = null;\n // to avoid a push/pop misalignment.\n\n\n pushRenderLanes(workInProgress, nextBaseLanes);\n\n return null;\n } else {\n // This is the second render. The surrounding visible content has already\n // committed. Now we resume rendering the hidden tree.\n // Rendering at offscreen, so we can clear the base lanes.\n var _nextState2 = {\n baseLanes: NoLanes,\n cachePool: null,\n transitions: null\n };\n workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.\n\n var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;\n\n pushRenderLanes(workInProgress, subtreeRenderLanes);\n }\n } else {\n // Rendering a visible tree.\n var _subtreeRenderLanes;\n\n if (prevState !== null) {\n // We're going from hidden -> visible.\n _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes);\n\n workInProgress.memoizedState = null;\n } else {\n // We weren't previously hidden, and we still aren't, so there's nothing\n // special to do. Need to push to the stack regardless, though, to avoid\n // a push/pop misalignment.\n _subtreeRenderLanes = renderLanes;\n }\n\n pushRenderLanes(workInProgress, _subtreeRenderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n} // Note: These happen to have identical begin phases, for now. We shouldn't hold\n\nfunction updateFragment(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderLanes) {\n {\n workInProgress.flags |= Update;\n\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\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.flags |= Ref;\n\n {\n workInProgress.flags |= RefStatic;\n }\n }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\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', getComponentNameFromType(Component));\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 var hasId;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n hasId = checkDidRenderIdHook();\n\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n // This is used by DevTools to force a boundary to error.\n switch (shouldError(workInProgress)) {\n case false:\n {\n var _instance = workInProgress.stateNode;\n var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.\n // Is there a better way to do this?\n\n var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);\n var state = tempInstance.state;\n\n _instance.updater.enqueueSetState(_instance, state, null);\n\n break;\n }\n\n case true:\n {\n workInProgress.flags |= DidCapture;\n workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes\n\n var error$1 = new Error('Simulated error coming from DevTools');\n var lane = pickArbitraryLane(renderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state\n\n var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane);\n enqueueCapturedUpdate(workInProgress, update);\n break;\n }\n }\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', getComponentNameFromType(Component));\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, renderLanes);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance.\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\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, renderLanes);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n\n {\n var inst = workInProgress.stateNode;\n\n if (shouldUpdate && 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.', getComponentNameFromFiber(workInProgress) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;\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, renderLanes);\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 markComponentRenderStarted(workInProgress);\n }\n\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n instance.render();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= 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, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\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, renderLanes) {\n pushHostRootContext(workInProgress);\n\n if (current === null) {\n throw new Error('Should have a current fiber. This is a bug in React.');\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n var nextState = workInProgress.memoizedState;\n var root = workInProgress.stateNode;\n // being called \"element\".\n\n\n var nextChildren = nextState.element;\n\n if ( prevState.isDehydrated) {\n // This is a hydration root whose shell has not yet hydrated. We should\n // attempt to hydrate.\n // Flip isDehydrated to false to indicate that when this render\n // finishes, the root will no longer be dehydrated.\n var overrideState = {\n element: nextChildren,\n isDehydrated: false,\n cache: nextState.cache,\n pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,\n transitions: nextState.transitions\n };\n var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't\n // have reducer functions so it doesn't need rebasing.\n\n updateQueue.baseState = overrideState;\n workInProgress.memoizedState = overrideState;\n\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during a previous attempt to hydrate the shell, so we\n // forced a client render.\n var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress);\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);\n } else if (nextChildren !== prevChildren) {\n var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress);\n\n return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);\n } else {\n // The outermost shell has not hydrated yet. Start hydrating.\n enterHydrationState(workInProgress);\n\n var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\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.flags = node.flags & ~Placement | Hydrating;\n node = node.sibling;\n }\n }\n } else {\n // Root is not dehydrated. Either this is a client-only root, or it\n // already hydrated.\n resetHydrationState();\n\n if (nextChildren === prevChildren) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nfunction mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {\n // Revert to client rendering.\n resetHydrationState();\n queueHydrationError(recoverableError);\n workInProgress.flags |= ForceClientRender;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostComponent(current, workInProgress, renderLanes) {\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.flags |= ContentReset;\n }\n\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\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, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n var props = workInProgress.pendingProps;\n var lazyComponent = elementType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\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, renderLanes);\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, renderLanes);\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, renderLanes);\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', getComponentNameFromType(Component));\n }\n }\n }\n\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n renderLanes);\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 throw new 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\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.\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, renderLanes);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\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, renderLanes);\n var value;\n var hasId;\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentNameFromType(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 & StrictLegacyMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$1.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n hasId = checkDidRenderIdHook();\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentNameFromType(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 }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\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.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = 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 adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n\n {\n\n if ( workInProgress.mode & StrictLegacyMode) {\n setIsStrictModeForDevtools(true);\n\n try {\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n hasId = checkDidRenderIdHook();\n } finally {\n setIsStrictModeForDevtools(false);\n }\n }\n }\n\n if (getIsHydrating() && hasId) {\n pushMaterializedTreeId(workInProgress);\n }\n\n reconcileChildren(null, workInProgress, value, renderLanes);\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 || '';\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 ( Component.defaultProps !== undefined) {\n var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n treeContext: null,\n retryLane: NoLane\n};\n\nfunction mountSuspenseOffscreenState(renderLanes) {\n return {\n baseLanes: renderLanes,\n cachePool: getSuspendedCache(),\n transitions: null\n };\n}\n\nfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n var cachePool = null;\n\n return {\n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),\n cachePool: cachePool,\n transitions: prevOffscreenState.transitions\n };\n} // TODO: Probably should inline this back\n\n\nfunction shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {\n // If we're already showing a fallback, there are cases where we need to\n // remain on that fallback regardless of whether the content has resolved.\n // For example, SuspenseList coordinates when nested content appears.\n if (current !== null) {\n var suspenseState = current.memoizedState;\n\n if (suspenseState === null) {\n // Currently showing content. Don't hide it, even if ForceSuspenseFallback\n // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n // Note: This is a factoring smell. Can't remain on a fallback if there's\n // no fallback to remain on.\n return false;\n }\n } // Not currently showing content. Consult the Suspense context.\n\n\n return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n}\n\nfunction getRemainingWorkInPrimaryTree(current, renderLanes) {\n // TODO: Should not remove render lanes that were pinged during this render\n return removeLanes(current.childLanes, renderLanes);\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.flags |= DidCapture;\n }\n }\n\n var suspenseContext = suspenseStackCursor.current;\n var showFallback = false;\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n showFallback = true;\n workInProgress.flags &= ~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 // Avoided boundaries are not considered since they cannot handle preferred fallback states.\n {\n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n }\n }\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense\n // boundary's children. This involves some custom reconciliation logic. Two\n // main reasons this is so complicated.\n //\n // First, Legacy Mode has different semantics for backwards compatibility. The\n // primary tree will commit in an inconsistent state, so when we do the\n // second pass to render the fallback, we do some exceedingly, uh, clever\n // hacks to make that not totally break. Like transferring effects and\n // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n // because we bailout on the primary tree completely and leave it in its old\n // state, no effects. Same as what we do for Offscreen (except that\n // Offscreen doesn't have the first render pass).\n //\n // Second is hydration. During hydration, the Suspense fiber has a slightly\n // different layout, where the child points to a dehydrated fragment, which\n // contains the DOM rendered by the server.\n //\n // Third, even if you set all that aside, Suspense is like error boundaries in\n // that we first we try to render one tree, and if that fails, we render again\n // and switch to a different tree. Like a try/catch block. So we have to track\n // which branch we're currently rendering. Ideally we would model this using\n // a stack.\n\n if (current === null) {\n // Initial mount\n // Special path for hydration\n // If we're currently hydrating, try to hydrate this boundary.\n tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n\n var suspenseState = workInProgress.memoizedState;\n\n if (suspenseState !== null) {\n var dehydrated = suspenseState.dehydrated;\n\n if (dehydrated !== null) {\n return mountDehydratedSuspenseComponent(workInProgress, dehydrated);\n }\n }\n\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n\n if (showFallback) {\n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var primaryChildFragment = workInProgress.child;\n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n\n return fallbackFragment;\n } else {\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n }\n } else {\n // This is an update.\n // Special path for hydration\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var _dehydrated = prevState.dehydrated;\n\n if (_dehydrated !== null) {\n return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, _dehydrated, prevState, renderLanes);\n }\n }\n\n if (showFallback) {\n var _nextFallbackChildren = nextProps.fallback;\n var _nextPrimaryChildren = nextProps.children;\n var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);\n var _primaryChildFragment2 = workInProgress.child;\n var prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n\n _primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n } else {\n var _nextPrimaryChildren2 = nextProps.children;\n\n var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment3;\n }\n }\n}\n\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n var mode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n primaryChildFragment.return = workInProgress;\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n var fallbackChildFragment;\n\n if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if ( workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = 0;\n primaryChildFragment.treeBaseDuration = 0;\n }\n\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n } else {\n primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n }\n\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {\n // The props argument to `createFiberFromOffscreen` is `any` typed, so we use\n // this wrapper function to constrain it.\n return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);\n}\n\nfunction updateWorkInProgressOffscreenFiber(current, offscreenProps) {\n // The props argument to `createWorkInProgress` is `any` typed, so we use this\n // wrapper function to constrain it.\n return createWorkInProgress(current, offscreenProps);\n}\n\nfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n mode: 'visible',\n children: primaryChildren\n });\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n primaryChildFragment.lanes = renderLanes;\n }\n\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = null;\n\n if (currentFallbackChildFragment !== null) {\n // Delete the fallback child fragment\n var deletions = workInProgress.deletions;\n\n if (deletions === null) {\n workInProgress.deletions = [currentFallbackChildFragment];\n workInProgress.flags |= ChildDeletion;\n } else {\n deletions.push(currentFallbackChildFragment);\n }\n }\n\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n\n if ( // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n (mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n // already cloned. In legacy mode, the only case where this isn't true is\n // when DevTools forces us to display a fallback; we skip the first render\n // pass entirely and go straight to rendering the fallback. (In Concurrent\n // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n // only codepath.)\n workInProgress.child !== currentPrimaryChildFragment) {\n var progressedPrimaryFragment = workInProgress.child;\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if ( workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n } // The fallback fiber was added as a deletion during the first pass.\n // However, since we're going to remain on the fallback, we no longer want\n // to delete it.\n\n\n workInProgress.deletions = null;\n } else {\n primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too.\n // (We don't do this in legacy mode, because in legacy mode we don't re-use\n // the current tree; see previous branch.)\n\n primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;\n }\n\n var fallbackChildFragment;\n\n if (currentFallbackChildFragment !== null) {\n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n } else {\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n }\n\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {\n // Falling back to client rendering. Because this has performance\n // implications, it's considered a recoverable error, even though the user\n // likely won't observe anything wrong with the UI.\n //\n // The error is passed in as an argument to enforce that every caller provide\n // a custom message, or explicitly opt out (currently the only path that opts\n // out is legacy mode; every concurrent path provides an error).\n if (recoverableError !== null) {\n queueHydrationError(recoverableError);\n } // This will add the old fiber to the deletion list\n\n\n reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.\n\n var nextProps = workInProgress.pendingProps;\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n primaryChildFragment.flags |= Placement;\n workInProgress.memoizedState = null;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var fiberMode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);\n var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense\n // boundary) already mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n\n if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n // We will have dropped the effect list which contains the\n // deletion. We need to reconcile to delete the current child.\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n }\n\n return fallbackChildFragment;\n}\n\nfunction mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {\n // During the first pass, we'll bail out and not drill into the children.\n // Instead, we'll leave the content in place and try to hydrate it later.\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n {\n error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');\n }\n\n workInProgress.lanes = laneToLanes(SyncLane);\n } else if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This is a client-only boundary. Since we won't get any content from the server\n // for this, we need to schedule that at a higher priority based on when it would\n // have timed out. In theory we could render it in this pass but it would have the\n // wrong priority associated with it and will prevent hydration of parent path.\n // Instead, we'll leave work left on it to render it in a separate commit.\n // TODO This time should be the time at which the server rendered response that is\n // a parent to this boundary was displayed. However, since we currently don't have\n // a protocol to transfer that time, we'll just estimate it by using the current\n // time. This will mean that Suspense timeouts are slightly shifted to later than\n // they should be.\n // Schedule a normal pri update to render this content.\n workInProgress.lanes = laneToLanes(DefaultHydrationLane);\n } else {\n // We'll continue hydrating the rest at offscreen priority since we'll already\n // be showing the right content coming from the server, it is no rush.\n workInProgress.lanes = laneToLanes(OffscreenLane);\n }\n\n return null;\n}\n\nfunction updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes) {\n if (!didSuspend) {\n // This is the first render pass. Attempt to hydrate.\n // We should never be hydrating at this point because it is the first pass,\n // but after we've already committed once.\n warnIfHydrating();\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, // TODO: When we delete legacy mode, we should make this error argument\n // required — every concurrent mode path that causes hydration to\n // de-opt to client rendering should have an error message.\n null);\n }\n\n if (isSuspenseInstanceFallback(suspenseInstance)) {\n // This boundary is in a permanent fallback state. In this case, we'll never\n // get an update and we'll never be able to hydrate the final content. Let's just try the\n // client side render instead.\n var digest, message, stack;\n\n {\n var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);\n\n digest = _getSuspenseInstanceF.digest;\n message = _getSuspenseInstanceF.message;\n stack = _getSuspenseInstanceF.stack;\n }\n\n var error;\n\n if (message) {\n // eslint-disable-next-line react-internal/prod-error-codes\n error = new Error(message);\n } else {\n error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.');\n }\n\n var capturedValue = createCapturedValue(error, digest, stack);\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue);\n }\n // any context has changed, we need to treat is as if the input might have changed.\n\n\n var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);\n\n if (didReceiveUpdate || hasContextChanged) {\n // This boundary has changed since the first render. This means that we are now unable to\n // hydrate it. We might still be able to hydrate it using a higher priority lane.\n var root = getWorkInProgressRoot();\n\n if (root !== null) {\n var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);\n\n if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {\n // Intentionally mutating since this render will get interrupted. This\n // is one of the very rare times where we mutate the current tree\n // during the render phase.\n suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render\n\n var eventTime = NoTimestamp;\n enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);\n scheduleUpdateOnFiber(root, current, attemptHydrationAtLane, eventTime);\n }\n } // If we have scheduled higher pri work above, this will probably just abort the render\n // since we now have higher priority work, but in case it doesn't, we need to prepare to\n // render something, if we time out. Even if that requires us to delete everything and\n // skip hydration.\n // Delay having to do this as long as the suspense timeout allows us.\n\n\n renderDidSuspendDelayIfPossible();\n\n var _capturedValue = createCapturedValue(new Error('This Suspense boundary received an update before it finished ' + 'hydrating. This caused the boundary to switch to client rendering. ' + 'The usual way to fix this is to wrap the original update ' + 'in startTransition.'));\n\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue);\n } else if (isSuspenseInstancePending(suspenseInstance)) {\n // This component is still pending more data from the server, so we can't hydrate its\n // content. We treat it as if this component suspended itself. It might seem as if\n // we could just try to render it client-side instead. However, this will perform a\n // lot of unnecessary work and is unlikely to complete since it often will suspend\n // on missing data anyway. Additionally, the server might be able to render more\n // than we can on the client yet. In that case we'd end up with more fallback states\n // on the client than if we just leave it alone. If the server times out or errors\n // these should update this boundary to the permanent Fallback state instead.\n // Mark it as having captured (i.e. suspended).\n workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.\n\n workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.\n\n var retry = retryDehydratedSuspenseBoundary.bind(null, current);\n registerSuspenseInstanceRetry(suspenseInstance, retry);\n return null;\n } else {\n // This is the first attempt.\n reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);\n var primaryChildren = nextProps.children;\n var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children 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\n primaryChildFragment.flags |= Hydrating;\n return primaryChildFragment;\n }\n } else {\n // This is the second render pass. We already attempted to hydrated, but\n // something either suspended or errored.\n if (workInProgress.flags & ForceClientRender) {\n // Something errored during hydration. Try again without hydrating.\n workInProgress.flags &= ~ForceClientRender;\n\n var _capturedValue2 = createCapturedValue(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));\n\n return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue2);\n } else if (workInProgress.memoizedState !== null) {\n // Something suspended and we should still be in dehydrated mode.\n // Leave the existing child in place.\n workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there\n // but the normal suspense pass doesn't.\n\n workInProgress.flags |= DidCapture;\n return null;\n } else {\n // Suspended but we should no longer be in dehydrated mode.\n // Therefore we now have to render the fallback.\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var _primaryChildFragment4 = workInProgress.child;\n _primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackChildFragment;\n }\n }\n}\n\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\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 scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\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 scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\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 isAnArray = isArray(childSlot);\n var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isAnArray || isIterable) {\n var type = isAnArray ? '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 (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) {\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 tailMode: tailMode\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.tailMode = tailMode;\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, renderLanes) {\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, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\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, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy 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);\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);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined);\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, renderLanes) {\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, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\nfunction updateContextProvider(current, workInProgress, renderLanes) {\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 if (!('value' in newProps)) {\n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n\n error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n }\n }\n\n var providerPropTypes = workInProgress.type.propTypes;\n\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n }\n }\n\n pushProvider(workInProgress, context, newValue);\n\n {\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n\n if (objectIs(oldValue, newValue)) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, renderLanes);\n }\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingContextAsConsumer = false;\n\nfunction updateContextConsumer(current, workInProgress, renderLanes) {\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, renderLanes);\n var newValue = readContext(context);\n\n {\n markComponentRenderStarted(workInProgress);\n }\n\n var newChildren;\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n }\n\n {\n markComponentRenderStopped();\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n}\n\nfunction resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\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.flags |= Placement;\n }\n }\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\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 markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\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 {\n return null;\n }\n } // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n\n\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n // eslint-disable-next-line react-internal/prod-error-codes\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 // eslint-disable-next-line react-internal/prod-error-codes\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 // eslint-disable-next-line react-internal/prod-error-codes\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 deletions = returnFiber.deletions;\n\n if (deletions === null) {\n returnFiber.deletions = [current];\n returnFiber.flags |= ChildDeletion;\n } else {\n deletions.push(current);\n }\n\n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n}\n\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n // Before performing an early bailout, we must check if there are pending\n // updates or context.\n var updateLanes = current.lanes;\n\n if (includesSomeLane(updateLanes, renderLanes)) {\n return true;\n } // No pending update, but because context is propagated lazily, we need\n\n return false;\n}\n\nfunction attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {\n // 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 switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n var root = workInProgress.stateNode;\n\n resetHydrationState();\n break;\n\n case HostComponent:\n pushHostContext(workInProgress);\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 var context = workInProgress.type._context;\n pushProvider(workInProgress, context, 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 = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (hasChildWork) {\n workInProgress.flags |= Update;\n }\n\n {\n // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n }\n\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n if (state.dehydrated !== null) {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // We know that this component will suspend again because if it has\n // been unsuspended it has committed as a resolved Suspense component.\n // If it needs to be retried, it should have work scheduled on it.\n\n workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we\n // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.\n\n return null;\n } // If this boundary is currently timed out, we need to decide\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 primaryChildLanes = primaryChildFragment.childLanes;\n\n if (includesSomeLane(renderLanes, primaryChildLanes)) {\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, renderLanes);\n } else {\n // The primary child fragment does not have pending work marked\n // on it\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, renderLanes);\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 // Note: We can return `null` here because we already checked\n // whether there were nested context consumers, via the call to\n // `bailoutOnAlreadyFinishedWork` above.\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.flags & DidCapture) !== NoFlags;\n\n var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\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, renderLanes);\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.flags |= 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 renderState.lastEffect = 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 case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n // Need to check if the tree still needs to be deferred. This is\n // almost identical to the logic used in the normal update path,\n // so we'll just enter that. The only difference is we'll bail out\n // at the next level instead of this one, because the child props\n // have not changed. Which is fine.\n // TODO: Probably should refactor `beginWork` to split the bailout\n // path from the normal path. I'm tempted to do a labeled break here\n // but I won't :)\n workInProgress.lanes = NoLanes;\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\n\nfunction beginWork(current, workInProgress, renderLanes) {\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.lanes));\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 {\n // Neither props nor legacy context changes. Check if there's a pending\n // update or context change.\n var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there\n // may not be work scheduled on `current`, so we check for this flag.\n (workInProgress.flags & DidCapture) === NoFlags) {\n // No pending updates or context. Bail out now.\n didReceiveUpdate = false;\n return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);\n }\n\n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\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 }\n } else {\n didReceiveUpdate = false;\n\n if (getIsHydrating() && isForkedChild(workInProgress)) {\n // Check if this child belongs to a list of muliple children in\n // its parent.\n //\n // In a true multi-threaded implementation, we would render children on\n // parallel threads. This would represent the beginning of a new render\n // thread for this subtree.\n //\n // We only use this for id generation during hydration, which is why the\n // logic is located in this special branch.\n var slotIndex = workInProgress.index;\n var numberOfForks = getForksAtLevel();\n pushTreeId(workInProgress, numberOfForks, slotIndex);\n }\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.lanes = NoLanes;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, renderLanes);\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, renderLanes);\n }\n\n case ClassComponent:\n {\n var _Component = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderLanes);\n\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderLanes);\n\n case HostText:\n return updateHostText(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderLanes);\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, renderLanes);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderLanes);\n\n case Mode:\n return updateMode(current, workInProgress, renderLanes);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderLanes);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderLanes);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderLanes);\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', getComponentNameFromType(_type2));\n }\n }\n }\n\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);\n }\n\n case IncompleteClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.flags |= Update;\n}\n\nfunction markRef$1(workInProgress) {\n workInProgress.flags |= Ref;\n\n {\n workInProgress.flags |= RefStatic;\n }\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 (current, 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 if (getIsHydrating()) {\n // If we're hydrating, we should consume as many items as we can\n // so we don't leave any behind.\n return;\n }\n\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 bubbleProperties(completedWork) {\n var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;\n var newChildLanes = NoLanes;\n var subtreeFlags = NoFlags;\n\n if (!didBailout) {\n // Bubble up the earliest expiration time.\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;\n var child = completedWork.child;\n\n while (child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n subtreeFlags |= child.subtreeFlags;\n subtreeFlags |= child.flags; // 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 actualDuration += child.actualDuration;\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 newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n subtreeFlags |= _child.subtreeFlags;\n subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child.return = completedWork;\n _child = _child.sibling;\n }\n }\n\n completedWork.subtreeFlags |= subtreeFlags;\n } else {\n // Bubble up the earliest expiration time.\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var _treeBaseDuration = completedWork.selfBaseDuration;\n var _child2 = completedWork.child;\n\n while (_child2 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child2.subtreeFlags & StaticMask;\n subtreeFlags |= _child2.flags & StaticMask;\n _treeBaseDuration += _child2.treeBaseDuration;\n _child2 = _child2.sibling;\n }\n\n completedWork.treeBaseDuration = _treeBaseDuration;\n } else {\n var _child3 = completedWork.child;\n\n while (_child3 !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n // so we should bubble those up even during a bailout. All the other\n // flags have a lifetime only of a single render + commit, so we should\n // ignore them.\n\n subtreeFlags |= _child3.subtreeFlags & StaticMask;\n subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code\n // smell because it assumes the commit phase is never concurrent with\n // the render phase. Will address during refactor to alternate model.\n\n _child3.return = completedWork;\n _child3 = _child3.sibling;\n }\n }\n\n completedWork.subtreeFlags |= subtreeFlags;\n }\n\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\n\nfunction completeDehydratedSuspenseBoundary(current, workInProgress, nextState) {\n if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags) {\n warnIfUnhydratedTailNodes(workInProgress);\n resetHydrationState();\n workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture;\n return false;\n }\n\n var wasHydrated = popHydrationState(workInProgress);\n\n if (nextState !== null && nextState.dehydrated !== null) {\n // We might be inside a hydration state the first time we're picking up this\n // Suspense boundary, and also after we've reentered it for further hydration.\n if (current === null) {\n if (!wasHydrated) {\n throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');\n }\n\n prepareToHydrateHostSuspenseInstance(workInProgress);\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var isTimedOutSuspense = nextState !== null;\n\n if (isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n\n if (primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return false;\n } else {\n // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration\n // state since we're now exiting out of it. popHydrationState doesn't do that for us.\n resetHydrationState();\n\n if ((workInProgress.flags & DidCapture) === NoFlags) {\n // This boundary did not suspend so it's now hydrated and unsuspended.\n workInProgress.memoizedState = null;\n } // If nothing suspended, we need to schedule an effect to mark this boundary\n // as having hydrated so events know that they're free to be invoked.\n // It's also a signal to replay events and the suspense callback.\n // If something suspended, schedule an effect to attach retry listeners.\n // So we might as well always mark this.\n\n\n workInProgress.flags |= Update;\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n var _isTimedOutSuspense = nextState !== null;\n\n if (_isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var _primaryChildFragment = workInProgress.child;\n\n if (_primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return false;\n }\n } else {\n // Successfully completed this tree. If this was a forced client render,\n // there may have been recoverable errors during first hydration\n // attempt. If so, add them to a queue so we can log them in the\n // commit phase.\n upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path\n\n return true;\n }\n}\n\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n\n popTreeContext(workInProgress);\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 bubbleProperties(workInProgress);\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case HostRoot:\n {\n var fiberRoot = workInProgress.stateNode;\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\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 } else {\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if ( // Check if this is a client root\n !prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)\n (workInProgress.flags & ForceClientRender) !== NoFlags) {\n // Schedule an effect to clear this container at the start of the\n // next commit. This handles the case of React rendering into a\n // container with previous children. It's also safe to do for\n // updates too, because current.child would only be null if the\n // previous render was null (so the container would already\n // be empty).\n workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been\n // recoverable errors during first hydration attempt. If so, add\n // them to a queue so we can log them in the commit phase.\n\n upgradeHydrationErrorsToRecoverable();\n }\n }\n }\n }\n\n updateHostContainer(current, workInProgress);\n bubbleProperties(workInProgress);\n\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 throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n } // This can happen when we abort work.\n\n\n bubbleProperties(workInProgress);\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);\n workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.\n // (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 bubbleProperties(workInProgress);\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 throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\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 bubbleProperties(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this\n // to its own fiber type so that we can add other kinds of hydration\n // boundaries that aren't associated with a Suspense tree. In anticipation\n // of such a refactor, all the hydration logic is contained in\n // this branch.\n\n if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {\n var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState);\n\n if (!fallthroughToNormalSuspensePath) {\n if (workInProgress.flags & ShouldCapture) {\n // Special case. There were remaining unhydrated nodes. We treat\n // this as a mismatch. Revert to client rendering.\n return workInProgress;\n } else {\n // Did not finish hydrating, either because this is the initial\n // render or because something suspended.\n return null;\n }\n } // Continue with the normal Suspense path.\n\n }\n\n if ((workInProgress.flags & DidCapture) !== NoFlags) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n } // Don't bubble properties in this case.\n\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = current !== null && current.memoizedState !== null;\n // a passive effect, which is when we process the transitions\n\n\n if (nextDidTimeout !== prevDidTimeout) {\n // an effect to toggle the subtree's visibility. When we switch from\n // fallback -> primary, the inner Offscreen fiber schedules this effect\n // as part of its normal complete phase. But when we switch from\n // primary -> fallback, the inner Offscreen fiber does not have a complete\n // phase. So we need to schedule its effect here.\n //\n // We also use this flag to connect/disconnect the effects, but the same\n // logic applies: when re-connecting, the Offscreen fiber's complete\n // phase will handle scheduling the effect. It's only when the fallback\n // is active that we have to do anything special.\n\n\n if (nextDidTimeout) {\n var _offscreenFiber2 = workInProgress.child;\n _offscreenFiber2.flags |= Visibility; // 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\n if ((workInProgress.mode & ConcurrentMode) !== 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 || !enableSuspenseAvoidThisFallback);\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 var wakeables = workInProgress.updateQueue;\n\n if (wakeables !== null) {\n // Schedule an effect to attach a retry listener to the promise.\n // TODO: Move to passive phase\n workInProgress.flags |= Update;\n }\n\n bubbleProperties(workInProgress);\n\n {\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n if (nextDidTimeout) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = workInProgress.child;\n\n if (primaryChildFragment !== null) {\n // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n }\n }\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(current, workInProgress);\n\n if (current === null) {\n preparePortalMount(workInProgress.stateNode.containerInfo);\n }\n\n bubbleProperties(workInProgress);\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n var context = workInProgress.type._context;\n popProvider(context, workInProgress);\n bubbleProperties(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 bubbleProperties(workInProgress);\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 bubbleProperties(workInProgress);\n return null;\n }\n\n var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;\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.flags & DidCapture) === NoFlags);\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.flags |= 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 thenables. Instead, we'll transfer its thenables 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 newThenables = suspended.updateQueue;\n\n if (newThenables !== null) {\n workInProgress.updateQueue = newThenables;\n workInProgress.flags |= Update;\n } // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect flags before doing the second pass since that's now invalid.\n // Reset the child fibers to their original state.\n\n\n workInProgress.subtreeFlags = NoFlags;\n resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately\n // rerender the children.\n\n pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.\n\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n\n if (renderState.tail !== null && now() > getRenderTargetTime()) {\n // We have already passed our CPU deadline but we still have rows\n // left in the tail. We'll just give up further attempts to render\n // the main content and only render fallbacks.\n workInProgress.flags |= 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. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\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.flags |= 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 _newThenables = _suspended.updateQueue;\n\n if (_newThenables !== null) {\n workInProgress.updateQueue = _newThenables;\n workInProgress.flags |= Update;\n }\n\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n ) {\n // We're done.\n bubbleProperties(workInProgress);\n return null;\n }\n } else if ( // The time it took to render last row is greater than the remaining\n // time we have to render. So rendering one more row would likely\n // exceed it.\n now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\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.flags |= 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. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\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 // Pop a row.\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\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 // Don't bubble properties in this case.\n\n return next;\n }\n\n bubbleProperties(workInProgress);\n return null;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popRenderLanes(workInProgress);\n var _nextState = workInProgress.memoizedState;\n var nextIsHidden = _nextState !== null;\n\n if (current !== null) {\n var _prevState = current.memoizedState;\n var prevIsHidden = _prevState !== null;\n\n if (prevIsHidden !== nextIsHidden && ( // LegacyHidden doesn't do any hiding — it only pre-renders.\n !enableLegacyHidden )) {\n workInProgress.flags |= Visibility;\n }\n }\n\n if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {\n bubbleProperties(workInProgress);\n } else {\n // Don't bubble properties for hidden children unless we're rendering\n // at offscreen priority.\n if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) {\n bubbleProperties(workInProgress);\n\n {\n // Check if there was an insertion or update in the hidden subtree.\n // If so, we need to hide those nodes in the commit phase, so\n // schedule a visibility effect.\n if ( workInProgress.subtreeFlags & (Placement | Update)) {\n workInProgress.flags |= Visibility;\n }\n }\n }\n }\n return null;\n }\n\n case CacheComponent:\n {\n\n return null;\n }\n\n case TracingMarkerComponent:\n {\n\n return null;\n }\n }\n\n throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction unwindWork(current, workInProgress, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(workInProgress);\n\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 flags = workInProgress.flags;\n\n if (flags & ShouldCapture) {\n workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n var root = workInProgress.stateNode;\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var _flags = workInProgress.flags;\n\n if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {\n // There was an error during render that wasn't captured by a suspense\n // boundary. Do a second pass on the root to unmount the children.\n workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n return workInProgress;\n } // We unwound to the root without completing it. Exit.\n\n\n return null;\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 suspenseState = workInProgress.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n if (workInProgress.alternate === null) {\n throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');\n }\n\n resetHydrationState();\n }\n\n var _flags2 = workInProgress.flags;\n\n if (_flags2 & ShouldCapture) {\n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\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 var context = workInProgress.type._context;\n popProvider(context, workInProgress);\n return null;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(workInProgress);\n return null;\n\n case CacheComponent:\n\n return null;\n\n default:\n return null;\n }\n}\n\nfunction unwindInterruptedWork(current, interruptedWork, renderLanes) {\n // Note: This intentionally doesn't check if we're hydrating because comparing\n // to the current tree provider fiber is just as fast and less error-prone.\n // Ideally we would have a special version of the work loop only\n // for hydration.\n popTreeContext(interruptedWork);\n\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 var root = interruptedWork.stateNode;\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n resetWorkInProgressVersions();\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 var context = interruptedWork.type._context;\n popProvider(context, interruptedWork);\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(interruptedWork);\n break;\n }\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n} // Used during the commit phase to track the state of the Offscreen component stack.\n// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.\n// Only used when enableSuspenseLayoutEffectSemantics is enabled.\n\n\nvar offscreenSubtreeIsHidden = false;\nvar offscreenSubtreeWasHidden = false;\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\nvar nextEffect = null; // Used for Profiling builds to track updaters.\n\nvar inProgressLanes = null;\nvar inProgressRoot = null;\nfunction reportUncaughtErrorInDEV(error) {\n // Wrapping each small part of the commit phase into a guarded\n // callback is a bit too slow (https://github.com/facebook/react/pull/21666).\n // But we rely on it to surface errors to DEV tools like overlays\n // (https://github.com/facebook/react/issues/21712).\n // As a compromise, rethrow only caught errors in a guard.\n {\n invokeGuardedCallback(null, function () {\n throw error;\n });\n clearCaughtError();\n }\n}\n\nvar callComponentWillUnmountWithTimer = function (current, instance) {\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n\n if ( current.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentWillUnmount();\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n instance.componentWillUnmount();\n }\n}; // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) {\n try {\n commitHookEffectListMount(Layout, current);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n} // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {\n try {\n callComponentWillUnmountWithTimer(current, instance);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyCallComponentDidMount(current, nearestMountedAncestor, instance) {\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n commitAttachRef(current);\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\n\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref;\n\n if (ref !== null) {\n if (typeof ref === 'function') {\n var retVal;\n\n try {\n if (enableProfilerTimer && enableProfilerCommitHooks && current.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n retVal = ref(null);\n } finally {\n recordLayoutEffectDuration(current);\n }\n } else {\n retVal = ref(null);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n\n {\n if (typeof retVal === 'function') {\n error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));\n }\n }\n } else {\n ref.current = null;\n }\n }\n}\n\nfunction safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n try {\n destroy();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\n\nvar focusedInstanceHandle = null;\nvar shouldFireAfterActiveInstanceBlur = false;\nfunction commitBeforeMutationEffects(root, firstChild) {\n focusedInstanceHandle = prepareForCommit(root.containerInfo);\n nextEffect = firstChild;\n commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber\n\n var shouldFire = shouldFireAfterActiveInstanceBlur;\n shouldFireAfterActiveInstanceBlur = false;\n focusedInstanceHandle = null;\n return shouldFire;\n}\n\nfunction commitBeforeMutationEffects_begin() {\n while (nextEffect !== null) {\n var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.\n\n var child = fiber.child;\n\n if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitBeforeMutationEffects_complete();\n }\n }\n}\n\nfunction commitBeforeMutationEffects_complete() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n setCurrentFiber(fiber);\n\n try {\n commitBeforeMutationEffectsOnFiber(fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitBeforeMutationEffectsOnFiber(finishedWork) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags;\n\n if ((flags & Snapshot) !== NoFlags) {\n setCurrentFiber(finishedWork);\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n break;\n }\n\n case ClassComponent:\n {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\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.', getComponentNameFromFiber(finishedWork) || '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.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || '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.', getComponentNameFromFiber(finishedWork));\n }\n }\n\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n\n break;\n }\n\n case HostRoot:\n {\n {\n var root = finishedWork.stateNode;\n clearContainer(root.containerInfo);\n }\n\n break;\n }\n\n case HostComponent:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n break;\n\n default:\n {\n throw new 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 resetCurrentFiber();\n }\n}\n\nfunction commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {\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 & flags) === flags) {\n // Unmount\n var destroy = effect.destroy;\n effect.destroy = undefined;\n\n if (destroy !== undefined) {\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectUnmountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectUnmountStarted(finishedWork);\n }\n }\n\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(true);\n }\n }\n\n safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);\n\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(false);\n }\n }\n\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectUnmountStopped();\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitHookEffectListMount(flags, 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 & flags) === flags) {\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectMountStarted(finishedWork);\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectMountStarted(finishedWork);\n }\n } // Mount\n\n\n var create = effect.create;\n\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(true);\n }\n }\n\n effect.destroy = create();\n\n {\n if ((flags & Insertion) !== NoFlags$1) {\n setIsRunningInsertionEffect(false);\n }\n }\n\n {\n if ((flags & Passive$1) !== NoFlags$1) {\n markComponentPassiveEffectMountStopped();\n } else if ((flags & Layout) !== NoFlags$1) {\n markComponentLayoutEffectMountStopped();\n }\n }\n\n {\n var destroy = effect.destroy;\n\n if (destroy !== undefined && typeof destroy !== 'function') {\n var hookName = void 0;\n\n if ((effect.tag & Layout) !== NoFlags) {\n hookName = 'useLayoutEffect';\n } else if ((effect.tag & Insertion) !== NoFlags) {\n hookName = 'useInsertionEffect';\n } else {\n hookName = 'useEffect';\n }\n\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 ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + hookName + '(() => {\\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://reactjs.org/link/hooks-data-fetching';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitPassiveEffectDurations(finishedRoot, finishedWork) {\n {\n // Only Profilers with work in their subtree will have an Update effect scheduled.\n if ((finishedWork.flags & Update) !== NoFlags) {\n switch (finishedWork.tag) {\n case Profiler:\n {\n var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;\n var _finishedWork$memoize = finishedWork.memoizedProps,\n id = _finishedWork$memoize.id,\n onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.\n // It does not get reset until the start of the next commit phase.\n\n var commitTime = getCommitTime();\n var phase = finishedWork.alternate === null ? 'mount' : 'update';\n\n {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n\n if (typeof onPostCommit === 'function') {\n onPostCommit(id, phase, passiveEffectDuration, commitTime);\n } // Bubble times to the next nearest ancestor Profiler.\n // After we process that Profiler, we'll bubble further up.\n\n\n var parentFiber = finishedWork.return;\n\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.passiveEffectDuration += passiveEffectDuration;\n break outer;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.passiveEffectDuration += passiveEffectDuration;\n break outer;\n }\n\n parentFiber = parentFiber.return;\n }\n\n break;\n }\n }\n }\n }\n}\n\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {\n if ((finishedWork.flags & LayoutMask) !== NoFlags) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( !offscreenSubtreeWasHidden) {\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 if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n }\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (finishedWork.flags & Update) {\n if (!offscreenSubtreeWasHidden) {\n if (current === null) {\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 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.', getComponentNameFromFiber(finishedWork) || '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.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentDidMount();\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n instance.componentDidMount();\n }\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState; // 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.', getComponentNameFromFiber(finishedWork) || '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.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n }\n }\n }\n\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n }\n }\n }\n } // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\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.', getComponentNameFromFiber(finishedWork) || '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.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || '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 break;\n }\n\n case HostRoot:\n {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\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 break;\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.flags & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props);\n }\n\n break;\n }\n\n case HostText:\n {\n // We have no life-cycles associated with text.\n break;\n }\n\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n break;\n }\n\n case Profiler:\n {\n {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n onCommit = _finishedWork$memoize2.onCommit,\n onRender = _finishedWork$memoize2.onRender;\n var effectDuration = finishedWork.stateNode.effectDuration;\n var commitTime = getCommitTime();\n var phase = current === null ? 'mount' : 'update';\n\n {\n if (isCurrentUpdateNested()) {\n phase = 'nested-update';\n }\n }\n\n if (typeof onRender === 'function') {\n onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);\n }\n\n {\n if (typeof onCommit === 'function') {\n onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);\n } // Schedule a passive effect for this Profiler to call onPostCommit hooks.\n // This effect should be scheduled even if there is no onPostCommit callback for this Profiler,\n // because the effect is also where times bubble to parent Profilers.\n\n\n enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.\n // Do not reset these values until the next render so DevTools has a chance to read them first.\n\n var parentFiber = finishedWork.return;\n\n outer: while (parentFiber !== null) {\n switch (parentFiber.tag) {\n case HostRoot:\n var root = parentFiber.stateNode;\n root.effectDuration += effectDuration;\n break outer;\n\n case Profiler:\n var parentStateNode = parentFiber.stateNode;\n parentStateNode.effectDuration += effectDuration;\n break outer;\n }\n\n parentFiber = parentFiber.return;\n }\n }\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n break;\n }\n\n case SuspenseListComponent:\n case IncompleteClassComponent:\n case ScopeComponent:\n case OffscreenComponent:\n case LegacyHiddenComponent:\n case TracingMarkerComponent:\n {\n break;\n }\n\n default:\n throw new 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 if ( !offscreenSubtreeWasHidden) {\n {\n if (finishedWork.flags & Ref) {\n commitAttachRef(finishedWork);\n }\n }\n }\n}\n\nfunction reappearLayoutEffectsOnFiber(node) {\n // Turn on layout effects in a tree that previously disappeared.\n // TODO (Offscreen) Check: flags & LayoutStatic\n switch (node.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( node.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n safelyCallCommitHookLayoutEffectListMount(node, node.return);\n } finally {\n recordLayoutEffectDuration(node);\n }\n } else {\n safelyCallCommitHookLayoutEffectListMount(node, node.return);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = node.stateNode;\n\n if (typeof instance.componentDidMount === 'function') {\n safelyCallComponentDidMount(node, node.return, instance);\n }\n\n safelyAttachRef(node, node.return);\n break;\n }\n\n case HostComponent:\n {\n safelyAttachRef(node, node.return);\n break;\n }\n }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n // Only hide or unhide the top-most host nodes.\n var hostSubtreeRoot = null;\n\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 if (hostSubtreeRoot === null) {\n hostSubtreeRoot = node;\n\n try {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if (node.tag === HostText) {\n if (hostSubtreeRoot === null) {\n try {\n var _instance3 = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance3);\n } else {\n unhideTextInstance(_instance3, node.memoizedProps);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; 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 if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\n }\n\n node = node.return;\n }\n\n if (hostSubtreeRoot === node) {\n hostSubtreeRoot = null;\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 var retVal;\n\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n retVal = ref(instanceToUse);\n } finally {\n recordLayoutEffectDuration(finishedWork);\n }\n } else {\n retVal = ref(instanceToUse);\n }\n\n {\n if (typeof retVal === 'function') {\n error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(finishedWork));\n }\n }\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().', getComponentNameFromFiber(finishedWork));\n }\n }\n\n ref.current = instanceToUse;\n }\n }\n}\n\nfunction detachFiberMutation(fiber) {\n // Cut off the return pointer to disconnect it from the tree.\n // This enables us to detect and warn against state updates on an unmounted component.\n // It also prevents events from bubbling from within disconnected components.\n //\n // Ideally, we should also 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.\n // This child itself will be GC:ed when the parent updates the next time.\n //\n // Note that we can't clear child or sibling pointers yet.\n // They're needed for passive effects and for findDOMNode.\n // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).\n //\n // Don't reset the alternate yet, either. We need that so we can detach the\n // alternate's fields in the passive phase. Clearing the return pointer is\n // sufficient for findDOMNode semantics.\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.return = null;\n }\n\n fiber.return = null;\n}\n\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n fiber.alternate = null;\n detachFiberAfterEffects(alternate);\n } // Note: Defensively using negation instead of < in case\n // `deletedTreeCleanUpLevel` is undefined.\n\n\n {\n // Clear cyclical Fiber fields. This level alone is designed to roughly\n // approximate the planned Fiber refactor. In that world, `setState` will be\n // bound to a special \"instance\" object instead of a Fiber. The Instance\n // object will not have any of these fields. It will only be connected to\n // the fiber tree via a single link at the root. So if this level alone is\n // sufficient to fix memory issues, that bodes well for our plans.\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host\n // tree, which has its own pointers to children, parents, and siblings.\n // The other host nodes also point back to fibers, so we should detach that\n // one, too.\n\n if (fiber.tag === HostComponent) {\n var hostInstance = fiber.stateNode;\n\n if (hostInstance !== null) {\n detachDeletedInstance(hostInstance);\n }\n }\n\n fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We\n // already disconnect the `return` pointer at the root of the deleted\n // subtree (in `detachFiberMutation`). Besides, `return` by itself is not\n // cyclical — it's only cyclical when combined with `child`, `sibling`, and\n // `alternate`. But we'll clear it in the next level anyway, just in case.\n\n {\n fiber._debugOwner = null;\n }\n\n {\n // Theoretically, nothing in here should be necessary, because we already\n // disconnected the fiber from the tree. So even if something leaks this\n // particular fiber, it won't leak anything else\n //\n // The purpose of this branch is to be super aggressive so we can measure\n // if there's any difference in memory impact. If there is, that could\n // indicate a React leak we don't know about.\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.\n\n fiber.updateQueue = null;\n }\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 throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');\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.flags & 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.flags & 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 switch (parentFiber.tag) {\n case HostComponent:\n {\n var parent = parentFiber.stateNode;\n\n if (parentFiber.flags & 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.flags &= ~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 insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n }\n\n case HostRoot:\n case HostPortal:\n {\n var _parent = parentFiber.stateNode.containerInfo;\n\n var _before = getHostSibling(finishedWork);\n\n insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);\n break;\n }\n // eslint-disable-next-line-no-fallthrough\n\n default:\n throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost) {\n var stateNode = node.stateNode;\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) {\n var stateNode = node.stateNode;\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} // These are tracked on the stack as we recursively traverse a\n// deleted subtree.\n// TODO: Update these during the whole mutation phase, not just during\n// a deletion.\n\n\nvar hostParent = null;\nvar hostParentIsContainer = false;\n\nfunction commitDeletionEffects(root, returnFiber, deletedFiber) {\n {\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 // Recursively delete all host nodes from the parent, detach refs, clean\n // up mounted layout effects, and call componentWillUnmount.\n // We only need to remove the topmost host child in each branch. But then we\n // still need to keep traversing to unmount effects, refs, and cWU. TODO: We\n // could split this into two separate traversals functions, where the second\n // one doesn't include any removeChild logic. This is maybe the same\n // function as \"disappearLayoutEffects\" (or whatever that turns into after\n // the layout phase is refactored to use recursion).\n // Before starting, find the nearest host parent on the stack so we know\n // which instance/container to remove the children from.\n // TODO: Instead of searching up the fiber return path on every deletion, we\n // can track the nearest host component on the JS stack as we traverse the\n // tree during the commit phase. This would make insertions faster, too.\n var parent = returnFiber;\n\n findParent: while (parent !== null) {\n switch (parent.tag) {\n case HostComponent:\n {\n hostParent = parent.stateNode;\n hostParentIsContainer = false;\n break findParent;\n }\n\n case HostRoot:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n\n case HostPortal:\n {\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = true;\n break findParent;\n }\n }\n\n parent = parent.return;\n }\n\n if (hostParent === null) {\n throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n }\n\n commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);\n hostParent = null;\n hostParentIsContainer = false;\n }\n\n detachFiberMutation(deletedFiber);\n}\n\nfunction recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {\n // TODO: Use a static flag to skip trees that don't have unmount effects\n var child = parent.child;\n\n while (child !== null) {\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);\n child = child.sibling;\n }\n}\n\nfunction commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {\n onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse\n // into their subtree. There are simpler cases in the inner switch\n // that don't modify the stack.\n\n switch (deletedFiber.tag) {\n case HostComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n } // Intentional fallthrough to next branch\n\n }\n // eslint-disable-next-line-no-fallthrough\n\n case HostText:\n {\n // We only need to remove the nearest host child. Set the host parent\n // to `null` on the stack to indicate that nested children don't\n // need to be removed.\n {\n var prevHostParent = hostParent;\n var prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n\n if (hostParent !== null) {\n // Now that all the child effects have unmounted, we can remove the\n // node from the tree.\n if (hostParentIsContainer) {\n removeChildFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n removeChild(hostParent, deletedFiber.stateNode);\n }\n }\n }\n\n return;\n }\n\n case DehydratedFragment:\n {\n // Delete the dehydrated suspense boundary and all of its content.\n\n\n {\n if (hostParent !== null) {\n if (hostParentIsContainer) {\n clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);\n } else {\n clearSuspenseBoundary(hostParent, deletedFiber.stateNode);\n }\n }\n }\n\n return;\n }\n\n case HostPortal:\n {\n {\n // When we go into a portal, it becomes the parent to remove from.\n var _prevHostParent = hostParent;\n var _prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = true;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n hostParent = _prevHostParent;\n hostParentIsContainer = _prevHostParentIsContainer;\n }\n\n return;\n }\n\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n var updateQueue = deletedFiber.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var _effect = effect,\n destroy = _effect.destroy,\n tag = _effect.tag;\n\n if (destroy !== undefined) {\n if ((tag & Insertion) !== NoFlags$1) {\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n } else if ((tag & Layout) !== NoFlags$1) {\n {\n markComponentLayoutEffectUnmountStarted(deletedFiber);\n }\n\n if ( deletedFiber.mode & ProfileMode) {\n startLayoutEffectTimer();\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n recordLayoutEffectDuration(deletedFiber);\n } else {\n safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n }\n\n {\n markComponentLayoutEffectUnmountStopped();\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case ClassComponent:\n {\n if (!offscreenSubtreeWasHidden) {\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n var instance = deletedFiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);\n }\n }\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case ScopeComponent:\n {\n\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n\n case OffscreenComponent:\n {\n if ( // TODO: Remove this dead flag\n deletedFiber.mode & ConcurrentMode) {\n // If this offscreen component is hidden, we already unmounted it. Before\n // deleting the children, track that it's already unmounted so that we\n // don't attempt to unmount the effects again.\n // TODO: If the tree is hidden, in most cases we should be able to skip\n // over the nested children entirely. An exception is we haven't yet found\n // the topmost host node to delete, which we already track on the stack.\n // But the other case is portals, which need to be detached no matter how\n // deeply they are nested. We should use a subtree flag to track whether a\n // subtree includes a nested portal.\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n } else {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n }\n\n break;\n }\n\n default:\n {\n recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n return;\n }\n }\n}\n\nfunction commitSuspenseCallback(finishedWork) {\n // TODO: Move this to passive phase\n var newState = finishedWork.memoizedState;\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 wakeables.\n // For each wakeable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var wakeables = finishedWork.updateQueue;\n\n if (wakeables !== null) {\n finishedWork.updateQueue = null;\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n wakeables.forEach(function (wakeable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n if (!retryCache.has(wakeable)) {\n retryCache.add(wakeable);\n\n {\n if (isDevToolsPresent) {\n if (inProgressLanes !== null && inProgressRoot !== null) {\n // If we have pending work still, associate the original updaters with it.\n restorePendingUpdaters(inProgressRoot, inProgressLanes);\n } else {\n throw Error('Expected finished root and lanes to be set. This is a bug in React.');\n }\n }\n }\n\n wakeable.then(retry, retry);\n }\n });\n }\n} // This function detects when a Suspense boundary goes from visible to hidden.\nfunction commitMutationEffects(root, finishedWork, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n setCurrentFiber(finishedWork);\n commitMutationEffectsOnFiber(finishedWork, root);\n setCurrentFiber(finishedWork);\n inProgressLanes = null;\n inProgressRoot = null;\n}\n\nfunction recursivelyTraverseMutationEffects(root, parentFiber, lanes) {\n // Deletions effects can be scheduled on any fiber type. They need to happen\n // before the children effects hae fired.\n var deletions = parentFiber.deletions;\n\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n\n try {\n commitDeletionEffects(root, parentFiber, childToDelete);\n } catch (error) {\n captureCommitPhaseError(childToDelete, parentFiber, error);\n }\n }\n }\n\n var prevDebugFiber = getCurrentFiber();\n\n if (parentFiber.subtreeFlags & MutationMask) {\n var child = parentFiber.child;\n\n while (child !== null) {\n setCurrentFiber(child);\n commitMutationEffectsOnFiber(child, root);\n child = child.sibling;\n }\n }\n\n setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitMutationEffectsOnFiber(finishedWork, root, lanes) {\n var current = finishedWork.alternate;\n var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,\n // because the fiber tag is more specific. An exception is any flag related\n // to reconcilation, because those can be set on all fiber types.\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n try {\n commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);\n commitHookEffectListMount(Insertion | HasEffect, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\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\n\n if ( finishedWork.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n recordLayoutEffectDuration(finishedWork);\n } else {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n return;\n }\n\n case HostComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Ref) {\n if (current !== null) {\n safelyDetachRef(current, current.return);\n }\n }\n\n {\n // TODO: ContentReset gets cleared by the children during the commit\n // phase. This is a refactor hazard because it means we must read\n // flags the flags after `commitReconciliationEffects` has already run;\n // the order matters. We should refactor so that ContentReset does not\n // rely on mutating the flag during commit. Like by setting a flag\n // during the render phase instead.\n if (finishedWork.flags & ContentReset) {\n var instance = finishedWork.stateNode;\n\n try {\n resetTextContent(instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n\n if (flags & Update) {\n var _instance4 = finishedWork.stateNode;\n\n if (_instance4 != 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 try {\n commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n\n return;\n }\n\n case HostText:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n {\n if (finishedWork.stateNode === null) {\n throw new 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 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\n try {\n commitTextUpdate(textInstance, oldText, newText);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n\n return;\n }\n\n case HostRoot:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n {\n if (current !== null) {\n var prevRootState = current.memoizedState;\n\n if (prevRootState.isDehydrated) {\n try {\n commitHydratedContainer(root.containerInfo);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n }\n }\n }\n\n return;\n }\n\n case HostPortal:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n return;\n }\n\n case SuspenseComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n var offscreenFiber = finishedWork.child;\n\n if (offscreenFiber.flags & Visibility) {\n var offscreenInstance = offscreenFiber.stateNode;\n var newState = offscreenFiber.memoizedState;\n var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can\n // read it during an event\n\n offscreenInstance.isHidden = isHidden;\n\n if (isHidden) {\n var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;\n\n if (!wasHidden) {\n // TODO: Move to passive phase\n markCommitTimeOfFallback();\n }\n }\n }\n\n if (flags & Update) {\n try {\n commitSuspenseCallback(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n\n attachSuspenseRetryListeners(finishedWork);\n }\n\n return;\n }\n\n case OffscreenComponent:\n {\n var _wasHidden = current !== null && current.memoizedState !== null;\n\n if ( // TODO: Remove this dead flag\n finishedWork.mode & ConcurrentMode) {\n // Before committing the children, track on the stack whether this\n // offscreen subtree was already hidden, so that we don't unmount the\n // effects again.\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n } else {\n recursivelyTraverseMutationEffects(root, finishedWork);\n }\n\n commitReconciliationEffects(finishedWork);\n\n if (flags & Visibility) {\n var _offscreenInstance = finishedWork.stateNode;\n var _newState = finishedWork.memoizedState;\n\n var _isHidden = _newState !== null;\n\n var offscreenBoundary = finishedWork; // Track the current state on the Offscreen instance so we can\n // read it during an event\n\n _offscreenInstance.isHidden = _isHidden;\n\n {\n if (_isHidden) {\n if (!_wasHidden) {\n if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {\n nextEffect = offscreenBoundary;\n var offscreenChild = offscreenBoundary.child;\n\n while (offscreenChild !== null) {\n nextEffect = offscreenChild;\n disappearLayoutEffects_begin(offscreenChild);\n offscreenChild = offscreenChild.sibling;\n }\n }\n }\n }\n }\n\n {\n // TODO: This needs to run whenever there's an insertion or update\n // inside a hidden Offscreen tree.\n hideOrUnhideAllChildren(offscreenBoundary, _isHidden);\n }\n }\n\n return;\n }\n\n case SuspenseListComponent:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n\n if (flags & Update) {\n attachSuspenseRetryListeners(finishedWork);\n }\n\n return;\n }\n\n case ScopeComponent:\n {\n\n return;\n }\n\n default:\n {\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n return;\n }\n }\n}\n\nfunction commitReconciliationEffects(finishedWork) {\n // Placement effects (insertions, reorders) can be scheduled on any fiber\n // type. They needs to happen after the children effects have fired, but\n // before the effects on this fiber have fired.\n var flags = finishedWork.flags;\n\n if (flags & Placement) {\n try {\n commitPlacement(finishedWork);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n } // 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\n finishedWork.flags &= ~Placement;\n }\n\n if (flags & Hydrating) {\n finishedWork.flags &= ~Hydrating;\n }\n}\n\nfunction commitLayoutEffects(finishedWork, root, committedLanes) {\n inProgressLanes = committedLanes;\n inProgressRoot = root;\n nextEffect = finishedWork;\n commitLayoutEffects_begin(finishedWork, root, committedLanes);\n inProgressLanes = null;\n inProgressRoot = null;\n}\n\nfunction commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {\n // Suspense layout effects semantics don't change for legacy roots.\n var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;\n\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n\n if ( fiber.tag === OffscreenComponent && isModernRoot) {\n // Keep track of the current Offscreen stack's state.\n var isHidden = fiber.memoizedState !== null;\n var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;\n\n if (newOffscreenSubtreeIsHidden) {\n // The Offscreen tree is hidden. Skip over its layout effects.\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n continue;\n } else {\n // TODO (Offscreen) Also check: subtreeFlags & LayoutMask\n var current = fiber.alternate;\n var wasHidden = current !== null && current.memoizedState !== null;\n var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;\n var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root.\n\n offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;\n\n if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {\n // This is the root of a reappearing boundary. Turn its layout effects\n // back on.\n nextEffect = fiber;\n reappearLayoutEffects_begin(fiber);\n }\n\n var child = firstChild;\n\n while (child !== null) {\n nextEffect = child;\n commitLayoutEffects_begin(child, // New root; bubble back up to here and stop.\n root, committedLanes);\n child = child.sibling;\n } // Restore Offscreen state and resume in our-progress traversal.\n\n\n nextEffect = fiber;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n continue;\n }\n }\n\n if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n }\n }\n}\n\nfunction commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n\n if ((fiber.flags & LayoutMask) !== NoFlags) {\n var current = fiber.alternate;\n setCurrentFiber(fiber);\n\n try {\n commitLayoutEffectOnFiber(root, current, fiber, committedLanes);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n }\n\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction disappearLayoutEffects_begin(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ( fiber.mode & ProfileMode) {\n try {\n startLayoutEffectTimer();\n commitHookEffectListUnmount(Layout, fiber, fiber.return);\n } finally {\n recordLayoutEffectDuration(fiber);\n }\n } else {\n commitHookEffectListUnmount(Layout, fiber, fiber.return);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n // TODO (Offscreen) Check: flags & RefStatic\n safelyDetachRef(fiber, fiber.return);\n var instance = fiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n }\n\n break;\n }\n\n case HostComponent:\n {\n safelyDetachRef(fiber, fiber.return);\n break;\n }\n\n case OffscreenComponent:\n {\n // Check if this is a\n var isHidden = fiber.memoizedState !== null;\n\n if (isHidden) {\n // Nested Offscreen tree is already hidden. Don't disappear\n // its effects.\n disappearLayoutEffects_complete(subtreeRoot);\n continue;\n }\n\n break;\n }\n } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n\n if (firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n disappearLayoutEffects_complete(subtreeRoot);\n }\n }\n}\n\nfunction disappearLayoutEffects_complete(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction reappearLayoutEffects_begin(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n\n if (fiber.tag === OffscreenComponent) {\n var isHidden = fiber.memoizedState !== null;\n\n if (isHidden) {\n // Nested Offscreen tree is still hidden. Don't re-appear its effects.\n reappearLayoutEffects_complete(subtreeRoot);\n continue;\n }\n } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n\n if (firstChild !== null) {\n // This node may have been reused from a previous render, so we can't\n // assume its return pointer is correct.\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n reappearLayoutEffects_complete(subtreeRoot);\n }\n }\n}\n\nfunction reappearLayoutEffects_complete(subtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic\n\n setCurrentFiber(fiber);\n\n try {\n reappearLayoutEffectsOnFiber(fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n // This node may have been reused from a previous render, so we can't\n // assume its return pointer is correct.\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {\n nextEffect = finishedWork;\n commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions);\n}\n\nfunction commitPassiveMountEffects_begin(subtreeRoot, root, committedLanes, committedTransitions) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var firstChild = fiber.child;\n\n if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) {\n firstChild.return = fiber;\n nextEffect = firstChild;\n } else {\n commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions);\n }\n }\n}\n\nfunction commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n\n if ((fiber.flags & Passive) !== NoFlags) {\n setCurrentFiber(fiber);\n\n try {\n commitPassiveMountOnFiber(root, fiber, committedLanes, committedTransitions);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n resetCurrentFiber();\n }\n\n if (fiber === subtreeRoot) {\n nextEffect = null;\n return;\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( finishedWork.mode & ProfileMode) {\n startPassiveEffectTimer();\n\n try {\n commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n } finally {\n recordPassiveEffectDuration(finishedWork);\n }\n } else {\n commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n }\n\n break;\n }\n }\n}\n\nfunction commitPassiveUnmountEffects(firstChild) {\n nextEffect = firstChild;\n commitPassiveUnmountEffects_begin();\n}\n\nfunction commitPassiveUnmountEffects_begin() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var child = fiber.child;\n\n if ((nextEffect.flags & ChildDeletion) !== NoFlags) {\n var deletions = fiber.deletions;\n\n if (deletions !== null) {\n for (var i = 0; i < deletions.length; i++) {\n var fiberToDelete = deletions[i];\n nextEffect = fiberToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);\n }\n\n {\n // A fiber was deleted from this parent fiber, but it's still part of\n // the previous (alternate) parent fiber's list of children. Because\n // children are a linked list, an earlier sibling that's still alive\n // will be connected to the deleted fiber via its `alternate`:\n //\n // live fiber\n // --alternate--> previous live fiber\n // --sibling--> deleted fiber\n //\n // We can't disconnect `alternate` on nodes that haven't been deleted\n // yet, but we can disconnect the `sibling` and `child` pointers.\n var previousFiber = fiber.alternate;\n\n if (previousFiber !== null) {\n var detachedChild = previousFiber.child;\n\n if (detachedChild !== null) {\n previousFiber.child = null;\n\n do {\n var detachedSibling = detachedChild.sibling;\n detachedChild.sibling = null;\n detachedChild = detachedSibling;\n } while (detachedChild !== null);\n }\n }\n }\n\n nextEffect = fiber;\n }\n }\n\n if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitPassiveUnmountEffects_complete();\n }\n }\n}\n\nfunction commitPassiveUnmountEffects_complete() {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n\n if ((fiber.flags & Passive) !== NoFlags) {\n setCurrentFiber(fiber);\n commitPassiveUnmountOnFiber(fiber);\n resetCurrentFiber();\n }\n\n var sibling = fiber.sibling;\n\n if (sibling !== null) {\n sibling.return = fiber.return;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = fiber.return;\n }\n}\n\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( finishedWork.mode & ProfileMode) {\n startPassiveEffectTimer();\n commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n recordPassiveEffectDuration(finishedWork);\n } else {\n commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n }\n\n break;\n }\n }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {\n while (nextEffect !== null) {\n var fiber = nextEffect; // Deletion effects fire in parent -> child order\n // TODO: Check if fiber has a PassiveStatic flag\n\n setCurrentFiber(fiber);\n commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);\n resetCurrentFiber();\n var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we\n // do this, still need to handle `deletedTreeCleanUpLevel` correctly.)\n\n if (child !== null) {\n child.return = fiber;\n nextEffect = child;\n } else {\n commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);\n }\n }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {\n while (nextEffect !== null) {\n var fiber = nextEffect;\n var sibling = fiber.sibling;\n var returnFiber = fiber.return;\n\n {\n // Recursively traverse the entire deleted tree and clean up fiber fields.\n // This is more aggressive than ideal, and the long term goal is to only\n // have to detach the deleted tree at the root.\n detachFiberAfterEffects(fiber);\n\n if (fiber === deletedSubtreeRoot) {\n nextEffect = null;\n return;\n }\n }\n\n if (sibling !== null) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n return;\n }\n\n nextEffect = returnFiber;\n }\n}\n\nfunction commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n if ( current.mode & ProfileMode) {\n startPassiveEffectTimer();\n commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n recordPassiveEffectDuration(current);\n } else {\n commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n }\n\n break;\n }\n }\n} // TODO: Reuse reappearLayoutEffects traversal here?\n\n\nfunction invokeLayoutEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Layout | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n\n try {\n instance.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokePassiveEffectMountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListMount(Passive$1 | HasEffect, fiber);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokeLayoutEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n var instance = fiber.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n }\n\n break;\n }\n }\n }\n}\n\nfunction invokePassiveEffectUnmountInDEV(fiber) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n try {\n commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return);\n } catch (error) {\n captureCommitPhaseError(fiber, fiber.return, error);\n }\n }\n }\n }\n}\n\nvar COMPONENT_TYPE = 0;\nvar HAS_PSEUDO_CLASS_TYPE = 1;\nvar ROLE_TYPE = 2;\nvar TEST_NAME_TYPE = 3;\nvar TEXT_TYPE = 4;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n COMPONENT_TYPE = symbolFor('selector.component');\n HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class');\n ROLE_TYPE = symbolFor('selector.role');\n TEST_NAME_TYPE = symbolFor('selector.test_id');\n TEXT_TYPE = symbolFor('selector.text');\n}\nvar commitHooks = [];\nfunction onCommitRoot$1() {\n {\n commitHooks.forEach(function (commitHook) {\n return commitHook();\n });\n }\n}\n\nvar ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;\nfunction isLegacyActEnvironment(fiber) {\n {\n // Legacy mode. We preserve the behavior of React 17's act. It assumes an\n // act environment whenever `jest` is defined, but you can still turn off\n // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly\n // to false.\n var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowExpectedError - Flow doesn't know about jest\n\n var jestIsDefined = typeof jest !== 'undefined';\n return jestIsDefined && isReactActEnvironmentGlobal !== false;\n }\n}\nfunction isConcurrentActEnvironment() {\n {\n var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined;\n\n if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) {\n // TODO: Include link to relevant documentation page.\n error('The current testing environment is not configured to support ' + 'act(...)');\n }\n\n return isReactActEnvironmentGlobal;\n }\n}\n\nvar ceil = Math.ceil;\nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig,\n ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;\nvar NoContext =\n/* */\n0;\nvar BatchedContext =\n/* */\n1;\nvar RenderContext =\n/* */\n2;\nvar CommitContext =\n/* */\n4;\nvar RootInProgress = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5;\nvar RootDidNotComplete = 6; // Describes where we are in the React execution stack\n\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The lanes we're rendering\n\nvar workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree\n// This is a superset of the lanes we started working on at the root. The only\n// case where it's different from `workInProgressRootRenderLanes` is when we\n// enter a subtree that is hidden and needs to be unhidden: Suspense and\n// Offscreen component.\n//\n// Most things in the work loop should deal with workInProgressRootRenderLanes.\n// Most things in begin/complete phases should deal with subtreeRenderLanes.\n\nvar subtreeRenderLanes = NoLanes;\nvar subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // \"Included\" lanes refer to lanes that were worked on during this render. It's\n// slightly different than `renderLanes` because `renderLanes` can change as you\n// enter and exit an Offscreen tree. This value is the combination of all render\n// lanes for the entire render phase.\n\nvar workInProgressRootIncludedLanes = NoLanes; // 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 workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\nvar workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).\n\nvar workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase.\n\nvar workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.\n// We will log them once the tree commits.\n\nvar workInProgressRootRecoverableErrors = null; // 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; // The absolute time for when we should start giving up on rendering\n// more and prefer CPU suspense heuristics instead.\n\nvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n// suspense heuristics and opt out of rendering more content.\n\nvar RENDER_TIMEOUT_MS = 500;\nvar workInProgressTransitions = null;\n\nfunction resetRenderTimer() {\n workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;\n}\n\nfunction getRenderTargetTime() {\n return workInProgressRootRenderTargetTime;\n}\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsLanes = NoLanes;\nvar pendingPassiveProfilerEffects = [];\nvar pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar isFlushingPassiveEffects = false;\nvar didScheduleUpdateDuringPassiveEffects = false;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0;\nvar rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their\n// event times as simultaneous, even if the actual clock time has advanced\n// between the first and second call.\n\nvar currentEventTime = NoTimestamp;\nvar currentEventTransitionLane = NoLanes;\nvar isRunningInsertionEffect = false;\nfunction getWorkInProgressRoot() {\n return workInProgressRoot;\n}\nfunction requestEventTime() {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // We're inside React, so it's fine to read the actual time.\n return now();\n } // We're not inside React, so we may be in the middle of a browser event.\n\n\n if (currentEventTime !== NoTimestamp) {\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 = now();\n return currentEventTime;\n}\nfunction requestUpdateLane(fiber) {\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n } else if ( (executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {\n // This is a render phase update. These are not officially supported. The\n // old behavior is to give this the same \"thread\" (lanes) as\n // whatever is currently rendering. So if you call `setState` on a component\n // that happens later in the same render, it will flush. Ideally, we want to\n // remove the special case and treat them as if they came from an\n // interleaved event. Regardless, this pattern is not officially supported.\n // This behavior is only a fallback. The flag only exists until we can roll\n // out the setState warning, since existing code might accidentally rely on\n // the current behavior.\n return pickArbitraryLane(workInProgressRootRenderLanes);\n }\n\n var isTransition = requestCurrentTransition() !== NoTransition;\n\n if (isTransition) {\n if ( ReactCurrentBatchConfig$3.transition !== null) {\n var transition = ReactCurrentBatchConfig$3.transition;\n\n if (!transition._updatedFibers) {\n transition._updatedFibers = new Set();\n }\n\n transition._updatedFibers.add(fiber);\n } // The algorithm for assigning an update to a lane should be stable for all\n // updates at the same priority within the same event. To do this, the\n // inputs to the algorithm must be the same.\n //\n // The trick we use is to cache the first of each of these inputs within an\n // event. Then reset the cached values once we can be sure the event is\n // over. Our heuristic for that is whenever we enter a concurrent work loop.\n\n\n if (currentEventTransitionLane === NoLane) {\n // All transitions within the same event are assigned the same lane.\n currentEventTransitionLane = claimNextTransitionLane();\n }\n\n return currentEventTransitionLane;\n } // Updates originating inside certain React methods, like flushSync, have\n // their priority set by tracking it with a context variable.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n\n var updateLane = getCurrentUpdatePriority();\n\n if (updateLane !== NoLane) {\n return updateLane;\n } // This update originated outside React. Ask the host environment for an\n // appropriate priority, based on the type of event.\n //\n // The opaque type returned by the host config is internally a lane, so we can\n // use that directly.\n // TODO: Move this type conversion to the event priority module.\n\n\n var eventLane = getCurrentEventPriority();\n return eventLane;\n}\n\nfunction requestRetryLane(fiber) {\n // This is a fork of `requestUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & ConcurrentMode) === NoMode) {\n return SyncLane;\n }\n\n return claimNextRetryLane();\n}\n\nfunction scheduleUpdateOnFiber(root, fiber, lane, eventTime) {\n checkForNestedUpdates();\n\n {\n if (isRunningInsertionEffect) {\n error('useInsertionEffect must not schedule updates.');\n }\n }\n\n {\n if (isFlushingPassiveEffects) {\n didScheduleUpdateDuringPassiveEffects = true;\n }\n } // Mark that the root has a pending update.\n\n\n markRootUpdated(root, lane, eventTime);\n\n if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {\n // This update was dispatched during the render phase. This is a mistake\n // if the update originates from user space (with the exception of local\n // hook updates, which are handled differently and don't reach this\n // function), but there are some internal React features that use this as\n // an implementation detail, like selective hydration.\n warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase\n } else {\n // This is a normal update, scheduled from outside the render phase. For\n // example, during an input event.\n {\n if (isDevToolsPresent) {\n addFiberToLanesMap(root, fiber, lane);\n }\n }\n\n warnIfUpdatesNotWrappedWithActDEV(fiber);\n\n if (root === workInProgressRoot) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that there was an interleaved update work on this root. Unless the\n // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render\n // phase update. In that case, we don't treat render phase updates as if\n // they were interleaved, for backwards compat reasons.\n if ( (executionContext & RenderContext) === NoContext) {\n workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);\n }\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: Make sure this doesn't override pings that happen while we've\n // already started rendering.\n markRootSuspended$1(root, workInProgressRootRenderLanes);\n }\n }\n\n ensureRootIsScheduled(root, eventTime);\n\n if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n !( ReactCurrentActQueue$1.isBatchingLegacy)) {\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 resetRenderTimer();\n flushSyncCallbacksOnlyInLegacyMode();\n }\n }\n}\nfunction scheduleInitialHydrationOnRoot(root, lane, eventTime) {\n // This is a special fork of scheduleUpdateOnFiber that is only used to\n // schedule the initial hydration of a root that has just been created. Most\n // of the stuff in scheduleUpdateOnFiber can be skipped.\n //\n // The main reason for this separate path, though, is to distinguish the\n // initial children from subsequent updates. In fully client-rendered roots\n // (createRoot instead of hydrateRoot), all top-level renders are modeled as\n // updates, but hydration roots are special because the initial render must\n // match what was rendered on the server.\n var current = root.current;\n current.lanes = lane;\n markRootUpdated(root, lane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n}\nfunction isUnsafeClassRenderPhaseUpdate(fiber) {\n // Check if this is a render phase update. Only called by class components,\n // which special (deprecated) behavior for UNSAFE_componentWillReceive props.\n return (// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We\n // decided not to enable it.\n (executionContext & RenderContext) !== NoContext\n );\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 priority\n// of the existing task is the same as the priority of the next level that the\n// root has work on. This function is called on every update, and right before\n// exiting a task.\n\nfunction ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback$1(existingCallbackNode);\n }\n\n root.callbackNode = null;\n root.callbackPriority = NoLane;\n return;\n } // We use the highest priority lane to represent the priority of the callback.\n\n\n var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it.\n\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority && // Special case related to `act`. If the currently scheduled task is a\n // Scheduler task, rather than an `act` task, cancel it and re-scheduled\n // on the `act` queue.\n !( ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) {\n {\n // If we're going to re-use an existing task, it needs to exist.\n // Assume that discrete update microtasks are non-cancellable and null.\n // TODO: Temporary until we confirm this warning is not fired.\n if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) {\n error('Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.');\n }\n } // The priority hasn't changed. We can reuse the existing task. Exit.\n\n\n return;\n }\n\n if (existingCallbackNode != null) {\n // Cancel the existing callback. We'll schedule a new one below.\n cancelCallback$1(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLane) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n if (root.tag === LegacyRoot) {\n if ( ReactCurrentActQueue$1.isBatchingLegacy !== null) {\n ReactCurrentActQueue$1.didScheduleLegacyUpdate = true;\n }\n\n scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else {\n scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n }\n\n {\n // Flush the queue in a microtask.\n if ( ReactCurrentActQueue$1.current !== null) {\n // Inside `act`, use our internal `act` queue so that these get flushed\n // at the end of the current scope even when using the sync version\n // of `act`.\n ReactCurrentActQueue$1.current.push(flushSyncCallbacks);\n } else {\n scheduleMicrotask(function () {\n // In Safari, appending an iframe forces microtasks to run.\n // https://github.com/facebook/react/issues/22459\n // We don't support running callbacks in the middle of render\n // or commit so we need to check against that.\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n // Note that this would still prematurely flush the callbacks\n // if this happens outside render or commit phase (e.g. in an event).\n flushSyncCallbacks();\n }\n });\n }\n }\n\n newCallbackNode = null;\n } else {\n var schedulerPriorityLevel;\n\n switch (lanesToEventPriority(nextLanes)) {\n case DiscreteEventPriority:\n schedulerPriorityLevel = ImmediatePriority;\n break;\n\n case ContinuousEventPriority:\n schedulerPriorityLevel = UserBlockingPriority;\n break;\n\n case DefaultEventPriority:\n schedulerPriorityLevel = NormalPriority;\n break;\n\n case IdleEventPriority:\n schedulerPriorityLevel = IdlePriority;\n break;\n\n default:\n schedulerPriorityLevel = NormalPriority;\n break;\n }\n\n newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\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 {\n resetNestedUpdateFlag();\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\n\n currentEventTime = NoTimestamp;\n currentEventTransitionLane = NoLanes;\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n } // Flush any pending passive effects before deciding which lanes to work on,\n // in case they schedule additional work.\n\n\n var originalCallbackNode = root.callbackNode;\n var didFlushPassiveEffects = flushPassiveEffects();\n\n if (didFlushPassiveEffects) {\n // Something in the passive effect phase may have canceled the current task.\n // Check if the task node for this root was changed.\n if (root.callbackNode !== originalCallbackNode) {\n // The current task was canceled. Exit. We don't need to call\n // `ensureRootIsScheduled` because the check above implies either that\n // there's a new task, or that there's no remaining work on this root.\n return null;\n }\n } // Determine the next lanes to work on, using the fields stored\n // on the root.\n\n\n var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (lanes === NoLanes) {\n // Defensive coding. This is never expected to happen.\n return null;\n } // We disable time-slicing in some cases: if the work has been CPU-bound\n // for too long (\"expired\" work, to prevent starvation), or we're in\n // sync-updates-by-default mode.\n // TODO: We only check `didTimeout` defensively, to account for a Scheduler\n // bug we're still investigating. Once the bug in Scheduler is fixed,\n // we can remove this, since we track expiration ourselves.\n\n\n var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && ( !didTimeout);\n var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);\n\n if (exitStatus !== RootInProgress) {\n if (exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll\n // render synchronously to block concurrent data mutations, and we'll\n // includes all pending updates are included. If it still fails after\n // the second attempt, we'll give up and commit the resulting tree.\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n }\n\n if (exitStatus === RootDidNotComplete) {\n // The render unwound without completing the tree. This happens in special\n // cases where need to exit the current render without producing a\n // consistent tree or committing.\n //\n // This should only happen during a concurrent render, not a discrete or\n // synchronous update. We should have already checked for this when we\n // unwound the stack.\n markRootSuspended$1(root, lanes);\n } else {\n // The render completed.\n // Check if this render may have yielded to a concurrent event, and if so,\n // confirm that any newly rendered stores are consistent.\n // TODO: It's possible that even a concurrent render may never have yielded\n // to the main thread, if it was fast enough, or if it expired. We could\n // skip the consistency check in that case, too.\n var renderWasConcurrent = !includesBlockingLane(root, lanes);\n var finishedWork = root.current.alternate;\n\n if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {\n // A store was mutated in an interleaved event. Render again,\n // synchronously, to block further mutations.\n exitStatus = renderRootSync(root, lanes); // We need to check again if something threw\n\n if (exitStatus === RootErrored) {\n var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (_errorRetryLanes !== NoLanes) {\n lanes = _errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any\n // concurrent events.\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var _fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw _fatalError;\n }\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\n\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n finishConcurrentRender(root, exitStatus, lanes);\n }\n }\n\n ensureRootIsScheduled(root, now());\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 return null;\n}\n\nfunction recoverFromConcurrentError(root, errorRetryLanes) {\n // If an error occurred during hydration, discard server response and fall\n // back to client side render.\n // Before rendering again, save the errors from the previous attempt.\n var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;\n\n if (isRootDehydrated(root)) {\n // The shell failed to hydrate. Set a flag to force a client rendering\n // during the next attempt. To do this, we call prepareFreshStack now\n // to create the root work-in-progress fiber. This is a bit weird in terms\n // of factoring, because it relies on renderRootSync not calling\n // prepareFreshStack again in the call below, which happens because the\n // root and lanes haven't changed.\n //\n // TODO: I think what we should do is set ForceClientRender inside\n // throwException, like we do for nested Suspense boundaries. The reason\n // it's here instead is so we can switch to the synchronous work loop, too.\n // Something to consider for a future refactor.\n var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);\n rootWorkInProgress.flags |= ForceClientRender;\n\n {\n errorHydratingContainer(root.containerInfo);\n }\n }\n\n var exitStatus = renderRootSync(root, errorRetryLanes);\n\n if (exitStatus !== RootErrored) {\n // Successfully finished rendering on retry\n // The errors from the failed first attempt have been recovered. Add\n // them to the collection of recoverable errors. We'll log them in the\n // commit phase.\n var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors\n // from the first attempt, to preserve the causal sequence.\n\n if (errorsFromSecondAttempt !== null) {\n queueRecoverableErrors(errorsFromSecondAttempt);\n }\n }\n\n return exitStatus;\n}\n\nfunction queueRecoverableErrors(errors) {\n if (workInProgressRootRecoverableErrors === null) {\n workInProgressRootRecoverableErrors = errors;\n } else {\n workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);\n }\n}\n\nfunction finishConcurrentRender(root, exitStatus, lanes) {\n switch (exitStatus) {\n case RootInProgress:\n case RootFatalErrored:\n {\n throw new Error('Root did not complete. This is a bug in React.');\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 // We should have already attempted to retry this tree. If we reached\n // this point, it errored again. Commit it.\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n\n case RootSuspended:\n {\n markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we\n // should immediately commit it or wait a bit.\n\n if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope\n !shouldForceFlushFallbacksInDEV()) {\n // This render only included retries, no updates. Throttle committing\n // retries so that we don't show too many 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 var nextLanes = getNextLanes(root, NoLanes);\n\n if (nextLanes !== NoLanes) {\n // There's additional work on this root.\n break;\n }\n\n var suspendedLanes = root.suspendedLanes;\n\n if (!isSubsetOfLanes(suspendedLanes, lanes)) {\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 // FIXME: What if the suspended lanes are Idle? Should not restart.\n var eventTime = requestEventTime();\n markRootPinged(root, suspendedLanes);\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, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n\n case RootSuspendedWithDelay:\n {\n markRootSuspended$1(root, lanes);\n\n if (includesOnlyTransitions(lanes)) {\n // This is a transition, so we should exit without committing a\n // placeholder and without scheduling a timeout. Delay indefinitely\n // until we receive more data.\n break;\n }\n\n if (!shouldForceFlushFallbacksInDEV()) {\n // This is not a transition, but we did trigger an avoided state.\n // Schedule a placeholder to display after a short delay, using the Just\n // Noticeable Difference.\n // TODO: Is the JND optimization worth the added complexity? If this is\n // the only reason we track the event time, then probably not.\n // Consider removing.\n var mostRecentEventTime = getMostRecentEventTime(root, lanes);\n var eventTimeMs = mostRecentEventTime;\n var timeElapsedMs = now() - eventTimeMs;\n\n var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.\n\n\n if (_msUntilTimeout > 10) {\n // Instead of committing the fallback immediately, wait for more data\n // to arrive.\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);\n break;\n }\n } // Commit the placeholder.\n\n\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n\n case RootCompleted:\n {\n // The work completed. Ready to commit.\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n break;\n }\n\n default:\n {\n throw new Error('Unknown root exit status.');\n }\n }\n}\n\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n // Search the rendered tree for external store reads, and check whether the\n // stores were mutated in a concurrent event. Intentionally using an iterative\n // loop instead of recursion so we can exit early.\n var node = finishedWork;\n\n while (true) {\n if (node.flags & StoreConsistency) {\n var updateQueue = node.updateQueue;\n\n if (updateQueue !== null) {\n var checks = updateQueue.stores;\n\n if (checks !== null) {\n for (var i = 0; i < checks.length; i++) {\n var check = checks[i];\n var getSnapshot = check.getSnapshot;\n var renderedValue = check.value;\n\n try {\n if (!objectIs(getSnapshot(), renderedValue)) {\n // Found an inconsistent store.\n return false;\n }\n } catch (error) {\n // If `getSnapshot` throws, return `false`. This will schedule\n // a re-render, and the error will be rethrown during render.\n return false;\n }\n }\n }\n }\n }\n\n var child = node.child;\n\n if (node.subtreeFlags & StoreConsistency && child !== null) {\n child.return = node;\n node = child;\n continue;\n }\n\n if (node === finishedWork) {\n return true;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return true;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow doesn't know this is unreachable, but eslint does\n // eslint-disable-next-line no-unreachable\n\n\n return true;\n}\n\nfunction markRootSuspended$1(root, suspendedLanes) {\n // When suspending, we should always exclude lanes that were pinged or (more\n // rarely, since we try to avoid it) updated during the render phase.\n // TODO: Lol maybe there's a better way to factor this besides this\n // obnoxiously named function :)\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);\n markRootSuspended(root, suspendedLanes);\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root) {\n {\n syncNestedUpdateFlag();\n }\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Should not already be working.');\n }\n\n flushPassiveEffects();\n var lanes = getNextLanes(root, NoLanes);\n\n if (!includesSomeLane(lanes, SyncLane)) {\n // There's no remaining sync work left.\n ensureRootIsScheduled(root, now());\n return null;\n }\n\n var exitStatus = renderRootSync(root, lanes);\n\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (errorRetryLanes !== NoLanes) {\n lanes = errorRetryLanes;\n exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n }\n\n if (exitStatus === RootDidNotComplete) {\n throw new Error('Root did not complete. This is a bug in React.');\n } // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n ensureRootIsScheduled(root, now());\n return null;\n}\n\nfunction flushRoot(root, lanes) {\n if (lanes !== NoLanes) {\n markRootEntangled(root, mergeLanes(lanes, SyncLane));\n ensureRootIsScheduled(root, now());\n\n if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n resetRenderTimer();\n flushSyncCallbacks();\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; // If there were legacy sync updates, flush them at the end of the outer\n // most batchedUpdates-like method.\n\n if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n !( ReactCurrentActQueue$1.isBatchingLegacy)) {\n resetRenderTimer();\n flushSyncCallbacksOnlyInLegacyMode();\n }\n }\n}\nfunction discreteUpdates(fn, a, b, c, d) {\n var previousPriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n return fn(a, b, c, d);\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\n\n if (executionContext === NoContext) {\n resetRenderTimer();\n }\n }\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n\n// eslint-disable-next-line no-redeclare\nfunction flushSync(fn) {\n // In legacy mode, we flush pending passive effects at the beginning of the\n // next event, not at the end of the previous one.\n if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushPassiveEffects();\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n var previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n\n if (fn) {\n return fn();\n } else {\n return undefined;\n }\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\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 if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n flushSyncCallbacks();\n }\n }\n}\nfunction isAlreadyRendering() {\n // Used by the renderer to print a warning if certain APIs are called from\n // the wrong context.\n return (executionContext & (RenderContext | CommitContext)) !== NoContext;\n}\nfunction pushRenderLanes(fiber, lanes) {\n push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);\n subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);\n workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);\n}\nfunction popRenderLanes(fiber) {\n subtreeRenderLanes = subtreeRenderLanesCursor.current;\n pop(subtreeRenderLanesCursor, fiber);\n}\n\nfunction prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\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 var current = interruptedWork.alternate;\n unwindInterruptedWork(current, interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n }\n\n workInProgressRoot = root;\n var rootWorkInProgress = createWorkInProgress(root.current, null);\n workInProgress = rootWorkInProgress;\n workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;\n workInProgressRootExitStatus = RootInProgress;\n workInProgressRootFatalError = null;\n workInProgressRootSkippedLanes = NoLanes;\n workInProgressRootInterleavedUpdatedLanes = NoLanes;\n workInProgressRootPingedLanes = NoLanes;\n workInProgressRootConcurrentErrors = null;\n workInProgressRootRecoverableErrors = null;\n finishQueueingConcurrentUpdates();\n\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n\n return rootWorkInProgress;\n}\n\nfunction handleError(root, thrownValue) {\n do {\n var erroredWork = workInProgress;\n\n try {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksAfterThrow();\n resetCurrentFiber(); // TODO: I found and added this missing line while investigating a\n // separate issue. Write a regression test using string refs.\n\n ReactCurrentOwner$2.current = null;\n\n if (erroredWork === null || erroredWork.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 // intentionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return;\n }\n\n if (enableProfilerTimer && erroredWork.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(erroredWork, true);\n }\n\n if (enableSchedulingProfiler) {\n markComponentRenderStopped();\n\n if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {\n var wakeable = thrownValue;\n markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);\n } else {\n markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);\n }\n }\n\n throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);\n completeUnitOfWork(erroredWork);\n } catch (yetAnotherThrownValue) {\n // Something in the return path also threw.\n thrownValue = yetAnotherThrownValue;\n\n if (workInProgress === erroredWork && erroredWork !== null) {\n // If this boundary has already errored, then we had trouble processing\n // the error. Bubble it to the next boundary.\n erroredWork = erroredWork.return;\n workInProgress = erroredWork;\n } else {\n erroredWork = workInProgress;\n }\n\n continue;\n } // Return to the normal work loop.\n\n\n return;\n } while (true);\n}\n\nfunction pushDispatcher() {\n var prevDispatcher = ReactCurrentDispatcher$2.current;\n ReactCurrentDispatcher$2.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$2.current = prevDispatcher;\n}\n\nfunction markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now();\n}\nfunction markSkippedUpdateLanes(lane) {\n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n}\nfunction renderDidSuspend() {\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootSuspended;\n }\n}\nfunction renderDidSuspendDelayIfPossible() {\n if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) {\n workInProgressRootExitStatus = RootSuspendedWithDelay;\n } // Check if there are updates that we skipped tree that might have unblocked\n // this render.\n\n\n if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {\n // Mark the current render as suspended so that we switch to working on\n // the updates that were skipped. Usually we only suspend at the end of\n // the render phase.\n // TODO: We should probably always mark the root as suspended immediately\n // (inside this function), since by suspending at the end of the render\n // phase introduces a potential mistake where we suspend lanes that were\n // pinged or updated while we were rendering.\n markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);\n }\n}\nfunction renderDidError(error) {\n if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {\n workInProgressRootExitStatus = RootErrored;\n }\n\n if (workInProgressRootConcurrentErrors === null) {\n workInProgressRootConcurrentErrors = [error];\n } else {\n workInProgressRootConcurrentErrors.push(error);\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 === RootInProgress;\n}\n\nfunction renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n\n workInProgressTransitions = getTransitionsForLanes();\n prepareFreshStack(root, lanes);\n }\n\n {\n markRenderStarted(lanes);\n }\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 if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');\n }\n\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes;\n return workInProgressRootExitStatus;\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 performUnitOfWork(workInProgress);\n }\n}\n\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n\n if (memoizedUpdaters.size > 0) {\n restorePendingUpdaters(root, workInProgressRootRenderLanes);\n memoizedUpdaters.clear();\n } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n // If we bailout on this work, we'll move them back (like above).\n // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n // That way we can keep the current update and future updates separate.\n\n\n movePendingFibersToMemoized(root, lanes);\n }\n }\n\n workInProgressTransitions = getTransitionsForLanes();\n resetRenderTimer();\n prepareFreshStack(root, lanes);\n }\n\n {\n markRenderStarted(lanes);\n }\n\n do {\n try {\n workLoopConcurrent();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n popDispatcher(prevDispatcher);\n executionContext = prevExecutionContext;\n\n\n if (workInProgress !== null) {\n // Still work remaining.\n {\n markRenderYielded();\n }\n\n return RootInProgress;\n } else {\n // Completed the tree.\n {\n markRenderStopped();\n } // Set this to null to indicate there's no in-progress render.\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // Return the final exit status.\n\n return workInProgressRootExitStatus;\n }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n 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 setCurrentFiber(unitOfWork);\n var next;\n\n if ( (unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\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 completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$2.current = null;\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 var completedWork = 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 = completedWork.alternate;\n var returnFiber = completedWork.return; // Check if the work completed or if something threw.\n\n if ((completedWork.flags & Incomplete) === NoFlags) {\n setCurrentFiber(completedWork);\n var next = void 0;\n\n if ( (completedWork.mode & ProfileMode) === NoMode) {\n next = completeWork(current, completedWork, subtreeRenderLanes);\n } else {\n startProfilerTimer(completedWork);\n next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n }\n\n resetCurrentFiber();\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n workInProgress = next;\n return;\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(current, completedWork); // Because this fiber did not complete, don't reset its lanes.\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 _next.flags &= HostEffectMask;\n workInProgress = _next;\n return;\n }\n\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = completedWork.actualDuration;\n var child = completedWork.child;\n\n while (child !== null) {\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n }\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its subtree flags.\n returnFiber.flags |= Incomplete;\n returnFiber.subtreeFlags = NoFlags;\n returnFiber.deletions = null;\n } else {\n // We've unwound all the way to the root.\n workInProgressRootExitStatus = RootDidNotComplete;\n workInProgress = null;\n return;\n }\n }\n\n var siblingFiber = completedWork.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n workInProgress = siblingFiber;\n return;\n } // Otherwise, return to the parent\n\n\n completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = completedWork;\n } while (completedWork !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootInProgress) {\n workInProgressRootExitStatus = RootCompleted;\n }\n}\n\nfunction commitRoot(root, recoverableErrors, transitions) {\n // TODO: This no longer makes any sense. We already wrap the mutation and\n // layout phases. Should be able to remove.\n var previousUpdateLanePriority = getCurrentUpdatePriority();\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(DiscreteEventPriority);\n commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority);\n } finally {\n ReactCurrentBatchConfig$3.transition = prevTransition;\n setCurrentUpdatePriority(previousUpdateLanePriority);\n }\n\n return null;\n}\n\nfunction commitRootImpl(root, recoverableErrors, transitions, 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 throw new Error('Should not already be working.');\n }\n\n var finishedWork = root.finishedWork;\n var lanes = root.finishedLanes;\n\n {\n markCommitStarted(lanes);\n }\n\n if (finishedWork === null) {\n\n {\n markCommitStopped();\n }\n\n return null;\n } else {\n {\n if (lanes === NoLanes) {\n error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');\n }\n }\n }\n\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n\n if (finishedWork === root.current) {\n throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');\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.callbackPriority = NoLane; // 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 remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);\n markRootFinished(root, remainingLanes);\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n workInProgressRootRenderLanes = NoLanes;\n } // If there are pending passive effects, schedule a callback to process them.\n // Do this as early as possible, so it is queued before anything else that\n // might get scheduled in the commit phase. (See #16714.)\n // TODO: Delete all other places that schedule the passive effect callback\n // They're redundant.\n\n\n if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) {\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n // to store it in pendingPassiveTransitions until they get processed\n // We need to pass this through as an argument to commitRoot\n // because workInProgressTransitions might have changed between\n // the previous render and commit if we throttle the commit\n // with setTimeout\n\n pendingPassiveTransitions = transitions;\n scheduleCallback$1(NormalPriority, function () {\n flushPassiveEffects(); // This render triggered passive effects: release the root cache pool\n // *after* passive effects fire to avoid freeing a cache pool that may\n // be referenced by a node in the tree (HostRoot, Cache boundary etc)\n\n return null;\n });\n }\n } // Check if there are any effects in the whole tree.\n // TODO: This is left over from the effect list implementation, where we had\n // to check for the existence of `firstEffect` to satisfy Flow. I think the\n // only other reason this optimization exists is because it affects profiling.\n // Reconsider whether this is necessary.\n\n\n var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n\n if (subtreeHasEffects || rootHasEffect) {\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n ReactCurrentBatchConfig$3.transition = null;\n var previousPriority = getCurrentUpdatePriority();\n setCurrentUpdatePriority(DiscreteEventPriority);\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext; // 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 var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(root, finishedWork);\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 }\n\n\n commitMutationEffects(root, finishedWork, lanes);\n\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\n {\n markLayoutEffectsStarted(lanes);\n }\n\n commitLayoutEffects(finishedWork, root, lanes);\n\n {\n markLayoutEffectsStopped();\n }\n // opportunity to paint.\n\n\n requestPaint();\n executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.\n\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition;\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 {\n recordCommitTime();\n }\n }\n\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 pendingPassiveEffectsLanes = lanes;\n } else {\n\n {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\n }\n } // Read this again, since an effect might have updated it\n\n\n remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n // TODO: This is part of the `componentDidCatch` implementation. Its purpose\n // is to detect whether something might have called setState inside\n // `componentDidCatch`. The mechanism is known to be flawed because `setState`\n // inside `componentDidCatch` is itself flawed — that's why we recommend\n // `getDerivedStateFromError` instead. However, it could be improved by\n // checking if remainingLanes includes Sync work, instead of whether there's\n // any work remaining at all (which would also include stuff like Suspense\n // retries or transitions). It's been like this for a while, though, so fixing\n // it probably isn't that urgent.\n\n if (remainingLanes === NoLanes) {\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 commitDoubleInvokeEffectsInDEV(root.current, false);\n }\n }\n\n onCommitRoot(finishedWork.stateNode, renderPriorityLevel);\n\n {\n if (isDevToolsPresent) {\n root.memoizedUpdaters.clear();\n }\n }\n\n {\n onCommitRoot$1();\n } // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n\n ensureRootIsScheduled(root, now());\n\n if (recoverableErrors !== null) {\n // There were errors during this render, but recovered from them without\n // needing to surface it to the UI. We log them here.\n var onRecoverableError = root.onRecoverableError;\n\n for (var i = 0; i < recoverableErrors.length; i++) {\n var recoverableError = recoverableErrors[i];\n var componentStack = recoverableError.stack;\n var digest = recoverableError.digest;\n onRecoverableError(recoverableError.value, {\n componentStack: componentStack,\n digest: digest\n });\n }\n }\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var error$1 = firstUncaughtError;\n firstUncaughtError = null;\n throw error$1;\n } // If the passive effects are the result of a discrete render, flush them\n // synchronously at the end of the current task so that the result is\n // immediately observable. Otherwise, we assume that they are not\n // order-dependent and do not need to be observed by external systems, so we\n // can wait until after paint.\n // TODO: We can optimize this by not scheduling the callback earlier. Since we\n // currently schedule the callback in multiple places, will wait until those\n // are consolidated.\n\n\n if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root.tag !== LegacyRoot) {\n flushPassiveEffects();\n } // Read this again, since a passive effect might have updated it\n\n\n remainingLanes = root.pendingLanes;\n\n if (includesSomeLane(remainingLanes, SyncLane)) {\n {\n markNestedUpdateScheduled();\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\n\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncCallbacks();\n\n {\n markCommitStopped();\n }\n\n return null;\n}\n\nfunction flushPassiveEffects() {\n // Returns whether passive effects were flushed.\n // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should\n // probably just combine the two functions. I believe they were only separate\n // in the first place because we used to wrap it with\n // `Scheduler.runWithPriority`, which accepts a function. But now we track the\n // priority within React itself, so we can mutate the variable directly.\n if (rootWithPendingPassiveEffects !== null) {\n var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);\n var priority = lowerEventPriority(DefaultEventPriority, renderPriority);\n var prevTransition = ReactCurrentBatchConfig$3.transition;\n var previousPriority = getCurrentUpdatePriority();\n\n try {\n ReactCurrentBatchConfig$3.transition = null;\n setCurrentUpdatePriority(priority);\n return flushPassiveEffectsImpl();\n } finally {\n setCurrentUpdatePriority(previousPriority);\n ReactCurrentBatchConfig$3.transition = prevTransition; // Once passive effects have run for the tree - giving components a\n }\n }\n\n return false;\n}\nfunction enqueuePendingPassiveProfilerEffect(fiber) {\n {\n pendingPassiveProfilerEffects.push(fiber);\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback$1(NormalPriority, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n}\n\nfunction flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n } // Cache and clear the transitions flag\n\n\n var transitions = pendingPassiveTransitions;\n pendingPassiveTransitions = null;\n var root = rootWithPendingPassiveEffects;\n var lanes = pendingPassiveEffectsLanes;\n rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.\n // Figure out why and fix it. It's not causing any known issues (probably\n // because it's only used for profiling), but it's a refactor hazard.\n\n pendingPassiveEffectsLanes = NoLanes;\n\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n throw new Error('Cannot flush passive effects while already rendering.');\n }\n\n {\n isFlushingPassiveEffects = true;\n didScheduleUpdateDuringPassiveEffects = false;\n }\n\n {\n markPassiveEffectsStarted(lanes);\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n commitPassiveUnmountEffects(root.current);\n commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects\n\n {\n var profilerEffects = pendingPassiveProfilerEffects;\n pendingPassiveProfilerEffects = [];\n\n for (var i = 0; i < profilerEffects.length; i++) {\n var _fiber = profilerEffects[i];\n commitPassiveEffectDurations(root, _fiber);\n }\n }\n\n {\n markPassiveEffectsStopped();\n }\n\n {\n commitDoubleInvokeEffectsInDEV(root.current, true);\n }\n\n executionContext = prevExecutionContext;\n flushSyncCallbacks();\n\n {\n // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n if (didScheduleUpdateDuringPassiveEffects) {\n if (root === rootWithPassiveNestedUpdates) {\n nestedPassiveUpdateCount++;\n } else {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = root;\n }\n } else {\n nestedPassiveUpdateCount = 0;\n }\n\n isFlushingPassiveEffects = false;\n didScheduleUpdateDuringPassiveEffects = false;\n } // TODO: Move to commitPassiveMountEffects\n\n\n onPostCommitRoot(root);\n\n {\n var stateNode = root.current.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n\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 = createCapturedValueAtFiber(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n var root = enqueueUpdate(rootFiber, update, SyncLane);\n var eventTime = requestEventTime();\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n}\n\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {\n {\n reportUncaughtErrorInDEV(error$1);\n setIsRunningInsertionEffect(false);\n }\n\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$1);\n return;\n }\n\n var fiber = null;\n\n {\n fiber = nearestMountedAncestor;\n }\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);\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 = createCapturedValueAtFiber(error$1, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n var root = enqueueUpdate(fiber, update, SyncLane);\n var eventTime = requestEventTime();\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n\n {\n // TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning\n // will fire for errors that are thrown by destroy functions inside deleted\n // trees. What it should instead do is propagate the error to the parent of\n // the deleted tree. In the meantime, do not add this warning to the\n // allowlist; this is only for our internal use.\n error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Likely ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\\n\\n' + 'Error message:\\n\\n%s', error$1);\n }\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(wakeable);\n }\n\n var eventTime = requestEventTime();\n markRootPinged(root, pingedLanes);\n warnIfSuspenseResolutionNotWrappedWithActDEV(root);\n\n if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\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, or if it's a retry, we'll always suspend\n // so we can always restart.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Restart from the root.\n prepareFreshStack(root, NoLanes);\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 workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n }\n }\n\n ensureRootIsScheduled(root, eventTime);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\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 lanes.\n if (retryLane === NoLane) {\n // TODO: Assign this to `suspenseState.retryLane`? to avoid\n // unnecessary entanglement?\n retryLane = requestRetryLane(boundaryFiber);\n } // TODO: Special case idle priority?\n\n\n var eventTime = requestEventTime();\n var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n\n if (root !== null) {\n markRootUpdated(root, retryLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n }\n}\n\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState;\n var retryLane = NoLane;\n\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = NoLane; // Default\n\n var retryCache;\n\n switch (boundaryFiber.tag) {\n case SuspenseComponent:\n retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n\n if (suspenseState !== null) {\n retryLane = suspenseState.retryLane;\n }\n\n break;\n\n case SuspenseListComponent:\n retryCache = boundaryFiber.stateNode;\n break;\n\n default:\n throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');\n }\n\n if (retryCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(wakeable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\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 checkForNestedUpdates() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = null;\n throw new 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 if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n rootWithPassiveNestedUpdates = null;\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 commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {\n {\n // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects\n // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.\n // Maybe not a big deal since this is DEV only behavior.\n setCurrentFiber(fiber);\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);\n\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);\n }\n\n invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);\n\n if (hasPassiveEffects) {\n invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);\n }\n\n resetCurrentFiber();\n }\n}\n\nfunction invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {\n {\n // We don't need to re-check StrictEffectsMode here.\n // This function is only called if that check has already passed.\n var current = firstChild;\n var subtreeRoot = null;\n\n while (current !== null) {\n var primarySubtreeFlag = current.subtreeFlags & fiberFlags;\n\n if (current !== subtreeRoot && current.child !== null && primarySubtreeFlag !== NoFlags) {\n current = current.child;\n } else {\n if ((current.flags & fiberFlags) !== NoFlags) {\n invokeEffectFn(current);\n }\n\n if (current.sibling !== null) {\n current = current.sibling;\n } else {\n current = subtreeRoot = current.return;\n }\n }\n }\n }\n}\n\nvar didWarnStateUpdateForNotYetMountedComponent = null;\nfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n // We let the other warning about render phase updates deal with this one.\n return;\n }\n\n if (!(fiber.mode & ConcurrentMode)) {\n return;\n }\n\n var tag = fiber.tag;\n\n if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';\n\n if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n }\n\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error(\"Can't perform a React state update on a component that hasn't mounted yet. \" + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n}\nvar beginWork$1;\n\n{\n var dummyFiber = null;\n\n beginWork$1 = function (current, unitOfWork, lanes) {\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, lanes);\n } catch (originalError) {\n if (didSuspendOrErrorWhileHydratingDEV() || originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises.\n // Don't replay errors if we are hydrating and have already suspended or handled 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(current, 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, lanes);\n\n if (hasCaughtError()) {\n var replayError = clearCaughtError();\n\n if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) {\n // If suppressed, let the flag carry over to the original error which is the one we'll rethrow.\n originalError._suppressLogging = true;\n }\n } // We always throw the original error in case the second render pass is not idempotent.\n // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.\n\n\n throw originalError;\n }\n };\n}\n\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || '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 = getComponentNameFromFiber(fiber) || '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://reactjs.org/link/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}\n\nfunction restorePendingUpdaters(root, lanes) {\n {\n if (isDevToolsPresent) {\n var memoizedUpdaters = root.memoizedUpdaters;\n memoizedUpdaters.forEach(function (schedulingFiber) {\n addFiberToLanesMap(root, schedulingFiber, lanes);\n }); // This function intentionally does not clear memoized updaters.\n // Those may still be relevant to the current commit\n // and a future one (e.g. Suspense).\n }\n }\n}\nvar fakeActCallbackNode = {};\n\nfunction scheduleCallback$1(priorityLevel, callback) {\n {\n // If we're currently inside an `act` scope, bypass Scheduler and push to\n // the `act` queue instead.\n var actQueue = ReactCurrentActQueue$1.current;\n\n if (actQueue !== null) {\n actQueue.push(callback);\n return fakeActCallbackNode;\n } else {\n return scheduleCallback(priorityLevel, callback);\n }\n }\n}\n\nfunction cancelCallback$1(callbackNode) {\n if ( callbackNode === fakeActCallbackNode) {\n return;\n } // In production, always call Scheduler. This function will be stripped out.\n\n\n return cancelCallback(callbackNode);\n}\n\nfunction shouldForceFlushFallbacksInDEV() {\n // Never force flush in production. This function should get stripped out.\n return ReactCurrentActQueue$1.current !== null;\n}\n\nfunction warnIfUpdatesNotWrappedWithActDEV(fiber) {\n {\n if (fiber.mode & ConcurrentMode) {\n if (!isConcurrentActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n } else {\n // Legacy mode has additional cases where we suppress a warning.\n if (!isLegacyActEnvironment()) {\n // Not in an act environment. No need to warn.\n return;\n }\n\n if (executionContext !== NoContext) {\n // Legacy mode doesn't warn if the update is batched, i.e.\n // batchedUpdates or flushSync.\n return;\n }\n\n if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {\n // For backwards compatibility with pre-hooks code, legacy mode only\n // warns for updates that originate from a hook.\n return;\n }\n }\n\n if (ReactCurrentActQueue$1.current === null) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\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://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\n\nfunction warnIfSuspenseResolutionNotWrappedWithActDEV(root) {\n {\n if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {\n error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\\n\\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\\n\\n' + 'act(() => {\\n' + ' /* finish loading suspended data */\\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://reactjs.org/link/wrap-tests-with-act');\n }\n }\n}\n\nfunction setIsRunningInsertionEffect(isRunning) {\n {\n isRunningInsertionEffect = isRunning;\n }\n}\n\n/* eslint-disable react-internal/prod-error-codes */\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 flushSync(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 var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (_root !== null) {\n scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);\n }\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\nvar hasBadMapPolyfill;\n\n{\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n\n new Map([[nonExtensibleObject, null]]);\n new Set([nonExtensibleObject]);\n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n}\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.flags = NoFlags;\n this.subtreeFlags = NoFlags;\n this.deletions = null;\n this.lanes = NoLanes;\n this.childLanes = NoLanes;\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 }\n\n {\n // This isn't directly used but is handy for debugging internals:\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$1(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct$1(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 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; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.flags = NoFlags; // The effects are no longer valid.\n\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.deletions = 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 } // Reset all effects except static ones.\n // Static effects are not specific to a render.\n\n\n workInProgress.flags = current.flags & StaticMask;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\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 lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\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, renderLanes) {\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 flags but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.\n\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childLanes = NoLanes;\n workInProgress.lanes = renderLanes;\n workInProgress.child = null;\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n workInProgress.stateNode = 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.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.subtreeFlags = NoFlags;\n workInProgress.deletions = null;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // 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 lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\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, isStrictMode, concurrentUpdatesByDefaultOverride) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode;\n\n if (isStrictMode === true) {\n mode |= StrictLegacyMode;\n\n {\n mode |= StrictEffectsMode;\n }\n }\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, lanes) {\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$1(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, lanes, key);\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictLegacyMode;\n\n if ( (mode & ConcurrentMode) !== NoMode) {\n // Strict effects should never run on legacy roots\n mode |= StrictEffectsMode;\n }\n\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n case REACT_LEGACY_HIDDEN_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_SCOPE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_CACHE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_TRACING_MARKER_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n case REACT_DEBUG_TRACING_MODE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\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 }\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 ? getComponentNameFromFiber(owner) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n\n throw new 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 var fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.lanes = lanes;\n\n {\n fiber._debugOwner = owner;\n }\n\n return fiber;\n}\nfunction createFiberFromElement(element, mode, lanes) {\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, lanes);\n\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n\n return fiber;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.lanes = lanes;\n return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {\n {\n if (typeof pendingProps.id !== 'string') {\n error('Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);\n }\n }\n\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.lanes = lanes;\n\n {\n fiber.stateNode = {\n effectDuration: 0,\n passiveEffectDuration: 0\n };\n }\n\n return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);\n fiber.elementType = REACT_OFFSCREEN_TYPE;\n fiber.lanes = lanes;\n var primaryChildInstance = {\n isHidden: false\n };\n fiber.stateNode = primaryChildInstance;\n return fiber;\n}\nfunction createFiberFromText(content, mode, lanes) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode);\n fiber.elementType = 'DELETED';\n return fiber;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n var fiber = createFiber(DehydratedFragment, null, null, NoMode);\n fiber.stateNode = dehydratedNode;\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.lanes = lanes;\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.flags = source.flags;\n target.subtreeFlags = source.subtreeFlags;\n target.deletions = source.deletions;\n target.lanes = source.lanes;\n target.childLanes = source.childLanes;\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 target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}\n\nfunction FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.current = null;\n this.pingCache = null;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.context = null;\n this.pendingContext = null;\n this.callbackNode = null;\n this.callbackPriority = NoLane;\n this.eventTimes = createLaneMap(NoLanes);\n this.expirationTimes = createLaneMap(NoTimestamp);\n this.pendingLanes = NoLanes;\n this.suspendedLanes = NoLanes;\n this.pingedLanes = NoLanes;\n this.expiredLanes = NoLanes;\n this.mutableReadLanes = NoLanes;\n this.finishedLanes = NoLanes;\n this.entangledLanes = NoLanes;\n this.entanglements = createLaneMap(NoLanes);\n this.identifierPrefix = identifierPrefix;\n this.onRecoverableError = onRecoverableError;\n\n {\n this.mutableSourceEagerHydrationData = null;\n }\n\n {\n this.effectDuration = 0;\n this.passiveEffectDuration = 0;\n }\n\n {\n this.memoizedUpdaters = new Set();\n var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];\n\n for (var _i = 0; _i < TotalLanes; _i++) {\n pendingUpdatersLaneMap.push(new Set());\n }\n }\n\n {\n switch (tag) {\n case ConcurrentRoot:\n this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';\n break;\n\n case LegacyRoot:\n this._debugRootType = hydrate ? 'hydrate()' : 'render()';\n break;\n }\n }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the\n// host config, but because they are passed in at runtime, we have to thread\n// them through the root constructor. Perhaps we should put them all into a\n// single type, like a DynamicHostConfig that is defined by the renderer.\nidentifierPrefix, onRecoverableError, transitionCallbacks) {\n var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError);\n // stateNode is any.\n\n\n var uninitializedFiber = createHostRootFiber(tag, isStrictMode);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n\n {\n var _initialState = {\n element: initialChildren,\n isDehydrated: hydrate,\n cache: null,\n // not enabled yet\n transitions: null,\n pendingSuspenseBoundaries: null\n };\n uninitializedFiber.memoizedState = _initialState;\n }\n\n initializeUpdateQueue(uninitializedFiber);\n return root;\n}\n\nvar ReactVersion = '18.3.1';\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\n {\n checkKeyStringCoercion(key);\n }\n\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 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 throw new Error('Unable to find node on an unmounted component.');\n } else {\n var keys = Object.keys(component).join(',');\n throw new Error(\"Argument appears to not be a ReactComponent. Keys: \" + keys);\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictLegacyMode) {\n var componentName = getComponentNameFromFiber(fiber) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n var previousFiber = current;\n\n try {\n setCurrentFiber(hostFiber);\n\n if (fiber.mode & StrictLegacyMode) {\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://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\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://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n }\n } finally {\n // Ideally this should reset to previous but this shouldn't be called in\n // render and there's another warning for that anyway.\n if (previousFiber) {\n setCurrentFiber(previousFiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n\n return hostFiber.stateNode;\n }\n}\n\nfunction createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = false;\n var initialChildren = null;\n return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n}\nfunction createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.\ncallback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n var hydrate = true;\n var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor\n\n root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from\n // a regular update because the initial render must match was was rendered\n // on the server.\n // NOTE: This update intentionally doesn't have a payload. We're only using\n // the update to schedule work on the root fiber (and, for legacy roots, to\n // enqueue the callback if one is provided).\n\n var current = root.current;\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(current);\n var update = createUpdate(eventTime, lane);\n update.callback = callback !== undefined && callback !== null ? callback : null;\n enqueueUpdate(current, update, lane);\n scheduleInitialHydrationOnRoot(root, lane, eventTime);\n return root;\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n\n var current$1 = container.current;\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(current$1);\n\n {\n markRenderScheduled(lane);\n }\n\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.', getComponentNameFromFiber(current) || 'Unknown');\n }\n }\n\n var update = createUpdate(eventTime, lane); // 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 var root = enqueueUpdate(current$1, update, lane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, current$1, lane, eventTime);\n entangleTransitions(root, current$1, lane);\n }\n\n return lane;\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}\nfunction attemptSynchronousHydration$1(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n {\n var root = fiber.stateNode;\n\n if (isRootDehydrated(root)) {\n // Flush the first scheduled \"update\".\n var lanes = getHighestPriorityPendingLanes(root);\n flushRoot(root, lanes);\n }\n\n break;\n }\n\n case SuspenseComponent:\n {\n flushSync(function () {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, SyncLane, eventTime);\n }\n }); // If we're still blocked after this, we need to increase\n // the priority of any promises resolving within this\n // boundary so that they next attempt also has higher pri.\n\n var retryLane = SyncLane;\n markRetryLaneIfNotHydrated(fiber, retryLane);\n break;\n }\n }\n}\n\nfunction markRetryLaneImpl(fiber, retryLane) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n }\n} // Increases the priority of thenables when they resolve within this boundary.\n\n\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryLaneImpl(alternate, retryLane);\n }\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 var lane = SelectiveHydrationLane;\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n }\n\n markRetryLaneIfNotHydrated(fiber, lane);\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 lane = requestUpdateLane(fiber);\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n if (root !== null) {\n var eventTime = requestEventTime();\n scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n }\n\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n}\n\nvar shouldErrorImpl = function (fiber) {\n return null;\n};\n\nfunction shouldError(fiber) {\n return shouldErrorImpl(fiber);\n}\n\nvar shouldSuspendImpl = function (fiber) {\n return false;\n};\n\nfunction shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideHookStateDeletePath = null;\nvar overrideHookStateRenamePath = null;\nvar overrideProps = null;\nvar overridePropsDeletePath = null;\nvar overridePropsRenamePath = null;\nvar scheduleUpdate = null;\nvar setErrorHandler = null;\nvar setSuspenseHandler = null;\n\n{\n var copyWithDeleteImpl = function (obj, path, index) {\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n if (index + 1 === path.length) {\n if (isArray(updated)) {\n updated.splice(key, 1);\n } else {\n delete updated[key];\n }\n\n return updated;\n } // $FlowFixMe number or string is fine here\n\n\n updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n return updated;\n };\n\n var copyWithDelete = function (obj, path) {\n return copyWithDeleteImpl(obj, path, 0);\n };\n\n var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n var oldKey = oldPath[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n if (index + 1 === oldPath.length) {\n var newKey = newPath[index]; // $FlowFixMe number or string is fine here\n\n updated[newKey] = updated[oldKey];\n\n if (isArray(updated)) {\n updated.splice(oldKey, 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe number or string is fine here\n updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here\n obj[oldKey], oldPath, newPath, index + 1);\n }\n\n return updated;\n };\n\n var copyWithRename = function (obj, oldPath, newPath) {\n if (oldPath.length !== newPath.length) {\n warn('copyWithRename() expects paths of the same length');\n\n return;\n } else {\n for (var i = 0; i < newPath.length - 1; i++) {\n if (oldPath[i] !== newPath[i]) {\n warn('copyWithRename() expects paths to be the same except for the deepest key');\n\n return;\n }\n }\n }\n\n return copyWithRenameImpl(obj, oldPath, newPath, 0);\n };\n\n var copyWithSetImpl = function (obj, path, index, value) {\n if (index >= path.length) {\n return value;\n }\n\n var key = path[index];\n var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n };\n\n var findHook = function (fiber, id) {\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 return currentHook;\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithSet(hook.memoizedState, path, value);\n hook.memoizedState = newState;\n hook.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 var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n };\n\n overrideHookStateDeletePath = function (fiber, id, path) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithDelete(hook.memoizedState, path);\n hook.memoizedState = newState;\n hook.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 var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n }\n };\n\n overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n hook.memoizedState = newState;\n hook.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 var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\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 var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n\n overridePropsDeletePath = function (fiber, path) {\n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n\n overridePropsRenamePath = function (fiber, oldPath, newPath) {\n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n\n scheduleUpdate = function (fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n if (root !== null) {\n scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n }\n };\n\n setErrorHandler = function (newShouldErrorImpl) {\n shouldErrorImpl = newShouldErrorImpl;\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n}\n\nfunction findHostInstanceByFiber(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n}\n\nfunction emptyFindFiberByHostInstance(instance) {\n return null;\n}\n\nfunction getCurrentFiberForDevTools() {\n return current;\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals({\n bundleType: devToolsConfig.bundleType,\n version: devToolsConfig.version,\n rendererPackageName: devToolsConfig.rendererPackageName,\n rendererConfig: devToolsConfig.rendererConfig,\n overrideHookState: overrideHookState,\n overrideHookStateDeletePath: overrideHookStateDeletePath,\n overrideHookStateRenamePath: overrideHookStateRenamePath,\n overrideProps: overrideProps,\n overridePropsDeletePath: overridePropsDeletePath,\n overridePropsRenamePath: overridePropsRenamePath,\n setErrorHandler: setErrorHandler,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: findHostInstanceByFiber,\n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\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: getCurrentFiberForDevTools ,\n // Enables DevTools to detect reconciler version rather than renderer version\n // which may not match for third party renderers.\n reconcilerVersion: ReactVersion\n });\n}\n\n/* global reportError */\n\nvar defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,\n// emulating an uncaught JavaScript error.\nreportError : function (error) {\n // In older browsers and test environments, fallback to console.error.\n // eslint-disable-next-line react-internal/no-production-logging\n console['error'](error);\n};\n\nfunction ReactDOMRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\n\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) {\n var root = this._internalRoot;\n\n if (root === null) {\n throw new Error('Cannot update an unmounted root.');\n }\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 } else if (isValidContainer(arguments[1])) {\n error('You passed a container to the second argument of root.render(...). ' + \"You don't need to pass it again since you already passed it to create the root.\");\n } else if (typeof arguments[1] !== 'undefined') {\n error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');\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\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.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\n if (root !== null) {\n this._internalRoot = null;\n var container = root.containerInfo;\n\n {\n if (isAlreadyRendering()) {\n error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');\n }\n }\n\n flushSync(function () {\n updateContainer(null, root, null, null);\n });\n unmarkContainerAsRoot(container);\n }\n};\n\nfunction createRoot(container, options) {\n if (!isValidContainer(container)) {\n throw new Error('createRoot(...): Target container is not a DOM element.');\n }\n\n warnIfReactDOMContainerInDEV(container);\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n var transitionCallbacks = null;\n\n if (options !== null && options !== undefined) {\n {\n if (options.hydrate) {\n warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');\n } else {\n if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {\n error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\\n\\n' + ' let root = createRoot(domContainer);\\n' + ' root.render(<App />);');\n }\n }\n }\n\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n\n if (options.transitionCallbacks !== undefined) {\n transitionCallbacks = options.transitionCallbacks;\n }\n }\n\n var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n return new ReactDOMRoot(root);\n}\n\nfunction ReactDOMHydrationRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\n\nfunction scheduleHydration(target) {\n if (target) {\n queueExplicitHydrationTarget(target);\n }\n}\n\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;\nfunction hydrateRoot(container, initialChildren, options) {\n if (!isValidContainer(container)) {\n throw new Error('hydrateRoot(...): Target container is not a DOM element.');\n }\n\n warnIfReactDOMContainerInDEV(container);\n\n {\n if (initialChildren === undefined) {\n error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');\n }\n } // For now we reuse the whole bag of options since they contain\n // the hydration callbacks.\n\n\n var hydrationCallbacks = options != null ? options : null; // TODO: Delete this option\n\n var mutableSources = options != null && options.hydratedSources || null;\n var isStrictMode = false;\n var concurrentUpdatesByDefaultOverride = false;\n var identifierPrefix = '';\n var onRecoverableError = defaultOnRecoverableError;\n\n if (options !== null && options !== undefined) {\n if (options.unstable_strictMode === true) {\n isStrictMode = true;\n }\n\n if (options.identifierPrefix !== undefined) {\n identifierPrefix = options.identifierPrefix;\n }\n\n if (options.onRecoverableError !== undefined) {\n onRecoverableError = options.onRecoverableError;\n }\n }\n\n var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway.\n\n listenToAllSupportedEvents(container);\n\n if (mutableSources) {\n for (var i = 0; i < mutableSources.length; i++) {\n var mutableSource = mutableSources[i];\n registerMutableSourceForHydration(root, mutableSource);\n }\n }\n\n return new ReactDOMHydrationRoot(root);\n}\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers ));\n} // TODO: Remove this function which also includes comment nodes.\n// We only use it in places that are currently more relaxed.\n\nfunction isValidContainerLegacy(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\nfunction warnIfReactDOMContainerInDEV(container) {\n {\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('createRoot(): Creating roots directly with 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 using a container element created ' + 'for your app.');\n }\n\n if (isContainerMarkedAsRoot(container)) {\n if (container._reactRootContainer) {\n error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');\n } else {\n error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');\n }\n }\n }\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\n\n{\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.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(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 noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the\n // legacy API.\n}\n\nfunction legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {\n if (isHydrationContainer) {\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n }\n\n var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks\n false, // isStrictMode\n false, // concurrentUpdatesByDefaultOverride,\n '', // identifierPrefix\n noopOnRecoverableError);\n container._reactRootContainer = root;\n markContainerAsRoot(root.current, container);\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n flushSync();\n return root;\n } else {\n // First clear any existing content.\n var rootSibling;\n\n while (rootSibling = container.lastChild) {\n container.removeChild(rootSibling);\n }\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(_root);\n\n _originalCallback.call(instance);\n };\n }\n\n var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks\n false, // isStrictMode\n false, // concurrentUpdatesByDefaultOverride,\n '', // identifierPrefix\n noopOnRecoverableError);\n\n container._reactRootContainer = _root;\n markContainerAsRoot(_root.current, container);\n\n var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n\n listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.\n\n flushSync(function () {\n updateContainer(initialChildren, _root, parentComponent, callback);\n });\n return _root;\n }\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 }\n\n var maybeRoot = container._reactRootContainer;\n var root;\n\n if (!maybeRoot) {\n // Initial mount\n root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);\n } else {\n root = maybeRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(root);\n originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, root, parentComponent, callback);\n }\n\n return getPublicRootInstance(root);\n}\n\nvar didWarnAboutFindDOMNode = false;\nfunction findDOMNode(componentOrElement) {\n {\n if (!didWarnAboutFindDOMNode) {\n didWarnAboutFindDOMNode = true;\n\n error('findDOMNode is deprecated and will be removed in the next major ' + 'release. Instead, add a ref directly to the element you want ' + 'to reference. Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node');\n }\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.', getComponentNameFromType(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 {\n error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\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 ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, 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 {\n error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('Target container is not a DOM element.');\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 ReactDOMClient.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 {\n error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + \"the createRoot API, your app will behave as if it's running React \" + '17. Learn more: https://reactjs.org/link/switch-to-createroot');\n }\n\n if (!isValidContainerLegacy(containerNode)) {\n throw new Error('Target container is not a DOM element.');\n }\n\n if (parentComponent == null || !has(parentComponent)) {\n throw new Error('parentComponent must be a valid React Component');\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nvar didWarnAboutUnmountComponentAtNode = false;\nfunction unmountComponentAtNode(container) {\n {\n if (!didWarnAboutUnmountComponentAtNode) {\n didWarnAboutUnmountComponentAtNode = true;\n\n error('unmountComponentAtNode is deprecated and will be removed in the ' + 'next major release. Switch to the createRoot API. Learn ' + 'more: https://reactjs.org/link/switch-to-createroot');\n }\n }\n\n if (!isValidContainerLegacy(container)) {\n throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.');\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 ReactDOMClient.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(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 flushSync(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(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(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\nsetAttemptSynchronousHydration(attemptSynchronousHydration$1);\nsetAttemptContinuousHydration(attemptContinuousHydration$1);\nsetAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\nsetGetCurrentUpdatePriority(getCurrentUpdatePriority);\nsetAttemptHydrationAtPriority(runWithPriority);\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://reactjs.org/link/react-polyfills');\n }\n}\n\nsetRestoreImplementation(restoreControlledState$3);\nsetBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync);\n\nfunction createPortal$1(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n throw new Error('Target container is not a DOM element.');\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 return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nvar Internals = {\n usingClientEntryPoint: false,\n // Keep in sync with ReactTestUtils.js.\n // This is an array for better minification.\n Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1]\n};\n\nfunction createRoot$1(container, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing createRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n\n return createRoot(container, options);\n}\n\nfunction hydrateRoot$1(container, initialChildren, options) {\n {\n if (!Internals.usingClientEntryPoint && !false) {\n error('You are importing hydrateRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n }\n }\n\n return hydrateRoot(container, initialChildren, options);\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n\n\n// eslint-disable-next-line no-redeclare\nfunction flushSync$1(fn) {\n {\n if (isAlreadyRendering()) {\n error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n }\n }\n\n return flushSync(fn);\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://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/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.createRoot = createRoot$1;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync$1;\nexports.hydrate = hydrate;\nexports.hydrateRoot = hydrateRoot$1;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.version = ReactVersion;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;;AAEZ,IAAIA,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;EACzC,CAAC,YAAW;IAEJ,YAAY;;IAEtB;IACA,IACE,OAAOC,8BAA8B,KAAK,WAAW,IACrD,OAAOA,8BAA8B,CAACC,2BAA2B,KAC/D,UAAU,EACZ;MACAD,8BAA8B,CAACC,2BAA2B,CAAC,IAAIC,KAAK,CAAC,CAAC,CAAC;IACzE;IACU,IAAIC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC;IACtC,IAAIC,SAAS,GAAGD,OAAO,CAAC,WAAW,CAAC;IAEpC,IAAIE,oBAAoB,GAAGH,KAAK,CAACI,kDAAkD;IAEnF,IAAIC,eAAe,GAAG,KAAK;IAC3B,SAASC,kBAAkBA,CAACC,kBAAkB,EAAE;MAC9C;QACEF,eAAe,GAAGE,kBAAkB;MACtC;IACF,CAAC,CAAC;IACF;IACA;IACA;IACA;;IAEA,SAASC,IAAIA,CAACC,MAAM,EAAE;MACpB;QACE,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