dsql-admin/dsql-app/.local_dist/static/chunks/react-refresh.js
2024-11-05 12:12:42 +01:00

62 lines
75 KiB
JavaScript

// runtime can't be in strict mode because a global variable is assign and maybe created.
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([["react-refresh"],{
/***/ "./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js":
/*!********************************************************************************************!*\
!*** ./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js ***!
\********************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\n/**\n * MIT License\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n// This file is copied from the Metro JavaScript bundler, with minor tweaks for\n// webpack 4 compatibility.\n//\n// https://github.com/facebook/metro/blob/d6b9685c730d0d63577db40f41369157f28dfa3a/packages/metro/src/lib/polyfills/require.js\nconst runtime_1 = __importDefault(__webpack_require__(/*! next/dist/compiled/react-refresh/runtime */ \"./node_modules/next/dist/compiled/react-refresh/runtime.js\"));\nfunction isSafeExport(key) {\n return (key === '__esModule' ||\n key === '__N_SSG' ||\n key === '__N_SSP' ||\n // TODO: remove this key from page config instead of allow listing it\n key === 'config');\n}\nfunction registerExportsForReactRefresh(moduleExports, moduleID) {\n runtime_1.default.register(moduleExports, moduleID + ' %exports%');\n if (moduleExports == null || typeof moduleExports !== 'object') {\n // Exit if we can't iterate over exports.\n // (This is important for legacy environments.)\n return;\n }\n for (var key in moduleExports) {\n if (isSafeExport(key)) {\n continue;\n }\n var exportValue = moduleExports[key];\n var typeID = moduleID + ' %exports% ' + key;\n runtime_1.default.register(exportValue, typeID);\n }\n}\nfunction getRefreshBoundarySignature(moduleExports) {\n var signature = [];\n signature.push(runtime_1.default.getFamilyByType(moduleExports));\n if (moduleExports == null || typeof moduleExports !== 'object') {\n // Exit if we can't iterate over exports.\n // (This is important for legacy environments.)\n return signature;\n }\n for (var key in moduleExports) {\n if (isSafeExport(key)) {\n continue;\n }\n var exportValue = moduleExports[key];\n signature.push(key);\n signature.push(runtime_1.default.getFamilyByType(exportValue));\n }\n return signature;\n}\nfunction isReactRefreshBoundary(moduleExports) {\n if (runtime_1.default.isLikelyComponentType(moduleExports)) {\n return true;\n }\n if (moduleExports == null || typeof moduleExports !== 'object') {\n // Exit if we can't iterate over exports.\n return false;\n }\n var hasExports = false;\n var areAllExportsComponents = true;\n for (var key in moduleExports) {\n hasExports = true;\n if (isSafeExport(key)) {\n continue;\n }\n var exportValue = moduleExports[key];\n if (!runtime_1.default.isLikelyComponentType(exportValue)) {\n areAllExportsComponents = false;\n }\n }\n return hasExports && areAllExportsComponents;\n}\nfunction shouldInvalidateReactRefreshBoundary(prevExports, nextExports) {\n var prevSignature = getRefreshBoundarySignature(prevExports);\n var nextSignature = getRefreshBoundarySignature(nextExports);\n if (prevSignature.length !== nextSignature.length) {\n return true;\n }\n for (var i = 0; i < nextSignature.length; i++) {\n if (prevSignature[i] !== nextSignature[i]) {\n return true;\n }\n }\n return false;\n}\nvar isUpdateScheduled = false;\nfunction scheduleUpdate() {\n if (isUpdateScheduled) {\n return;\n }\n function canApplyUpdate() {\n return module.hot.status() === 'idle';\n }\n isUpdateScheduled = true;\n setTimeout(function () {\n isUpdateScheduled = false;\n // Only trigger refresh if the webpack HMR state is idle\n if (canApplyUpdate()) {\n try {\n runtime_1.default.performReactRefresh();\n }\n catch (err) {\n console.warn('Warning: Failed to re-render. We will retry on the next Fast Refresh event.\\n' +\n err);\n }\n return;\n }\n return scheduleUpdate();\n }, 30);\n}\n// Needs to be compatible with IE11\nexports[\"default\"] = {\n registerExportsForReactRefresh: registerExportsForReactRefresh,\n isReactRefreshBoundary: isReactRefreshBoundary,\n shouldInvalidateReactRefreshBoundary: shouldInvalidateReactRefreshBoundary,\n getRefreshBoundarySignature: getRefreshBoundarySignature,\n scheduleUpdate: scheduleUpdate,\n};\n//# sourceMappingURL=helpers.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL0BuZXh0L3JlYWN0LXJlZnJlc2gtdXRpbHMvZGlzdC9pbnRlcm5hbC9oZWxwZXJzLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQT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duYXR1cmUsXG4gICAgc2NoZWR1bGVVcGRhdGU6IHNjaGVkdWxlVXBkYXRlLFxufTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWhlbHBlcnMuanMubWFwIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js\n"));
/***/ }),
/***/ "./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js":
/*!***********************************************************************************!*\
!*** ./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js ***!
\***********************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst runtime_1 = __importDefault(__webpack_require__(/*! next/dist/compiled/react-refresh/runtime */ \"./node_modules/next/dist/compiled/react-refresh/runtime.js\"));\nconst helpers_1 = __importDefault(__webpack_require__(/*! ./internal/helpers */ \"./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js\"));\n// Hook into ReactDOM initialization\nruntime_1.default.injectIntoGlobalHook(self);\n// Register global helpers\nself.$RefreshHelpers$ = helpers_1.default;\n// Register a helper for module execution interception\nself.$RefreshInterceptModuleExecution$ = function (webpackModuleId) {\n var prevRefreshReg = self.$RefreshReg$;\n var prevRefreshSig = self.$RefreshSig$;\n self.$RefreshReg$ = function (type, id) {\n runtime_1.default.register(type, webpackModuleId + ' ' + id);\n };\n self.$RefreshSig$ = runtime_1.default.createSignatureFunctionForTransform;\n // Modeled after `useEffect` cleanup pattern:\n // https://reactjs.org/docs/hooks-effect.html#effects-with-cleanup\n return function () {\n self.$RefreshReg$ = prevRefreshReg;\n self.$RefreshSig$ = prevRefreshSig;\n };\n};\n//# sourceMappingURL=runtime.js.map//# sourceURL=[module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2xlYW51cFxuICAgIHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHNlbGYuJFJlZnJlc2hSZWckID0gcHJldlJlZnJlc2hSZWc7XG4gICAgICAgIHNlbGYuJFJlZnJlc2hTaWckID0gcHJldlJlZnJlc2hTaWc7XG4gICAgfTtcbn07XG4vLyMgc291cmNlTWFwcGluZ1VSTD1ydW50aW1lLmpzLm1hcCJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js\n"));
/***/ }),
/***/ "./node_modules/next/dist/compiled/react-refresh/cjs/react-refresh-runtime.development.js":
/*!************************************************************************************************!*\
!*** ./node_modules/next/dist/compiled/react-refresh/cjs/react-refresh-runtime.development.js ***!
\************************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("/**\n * @license React\n * react-refresh-runtime.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\n\nif (true) {\n (function() {\n'use strict';\n\n// ATTENTION\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\n\nvar PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // We never remove these associations.\n// It's OK to reference families, but use WeakMap/Set for types.\n\nvar allFamiliesByID = new Map();\nvar allFamiliesByType = new PossiblyWeakMap();\nvar allSignaturesByType = new PossiblyWeakMap(); // This WeakMap is read by React, so we only put families\n// that have actually been edited here. This keeps checks fast.\n// $FlowIssue\n\nvar updatedFamiliesByType = new PossiblyWeakMap(); // This is cleared on every performReactRefresh() call.\n// It is an array of [Family, NextType] tuples.\n\nvar pendingUpdates = []; // This is injected by the renderer via DevTools global hook.\n\nvar helpersByRendererID = new Map();\nvar helpersByRoot = new Map(); // We keep track of mounted roots so we can schedule updates.\n\nvar mountedRoots = new Set(); // If a root captures an error, we remember it so we can retry on edit.\n\nvar failedRoots = new Set(); // In environments that support WeakMap, we also remember the last element for every root.\n// It needs to be weak because we do this even for roots that failed to mount.\n// If there is no WeakMap, we won't attempt to do retrying.\n// $FlowIssue\n\nvar rootElements = // $FlowIssue\ntypeof WeakMap === 'function' ? new WeakMap() : null;\nvar isPerformingRefresh = false;\n\nfunction computeFullKey(signature) {\n if (signature.fullKey !== null) {\n return signature.fullKey;\n }\n\n var fullKey = signature.ownKey;\n var hooks;\n\n try {\n hooks = signature.getCustomHooks();\n } catch (err) {\n // This can happen in an edge case, e.g. if expression like Foo.useSomething\n // depends on Foo which is lazily initialized during rendering.\n // In that case just assume we'll have to remount.\n signature.forceReset = true;\n signature.fullKey = fullKey;\n return fullKey;\n }\n\n for (var i = 0; i < hooks.length; i++) {\n var hook = hooks[i];\n\n if (typeof hook !== 'function') {\n // Something's wrong. Assume we need to remount.\n signature.forceReset = true;\n signature.fullKey = fullKey;\n return fullKey;\n }\n\n var nestedHookSignature = allSignaturesByType.get(hook);\n\n if (nestedHookSignature === undefined) {\n // No signature means Hook wasn't in the source code, e.g. in a library.\n // We'll skip it because we can assume it won't change during this session.\n continue;\n }\n\n var nestedHookKey = computeFullKey(nestedHookSignature);\n\n if (nestedHookSignature.forceReset) {\n signature.forceReset = true;\n }\n\n fullKey += '\\n---\\n' + nestedHookKey;\n }\n\n signature.fullKey = fullKey;\n return fullKey;\n}\n\nfunction haveEqualSignatures(prevType, nextType) {\n var prevSignature = allSignaturesByType.get(prevType);\n var nextSignature = allSignaturesByType.get(nextType);\n\n if (prevSignature === undefined && nextSignature === undefined) {\n return true;\n }\n\n if (prevSignature === undefined || nextSignature === undefined) {\n return false;\n }\n\n if (computeFullKey(prevSignature) !== computeFullKey(nextSignature)) {\n return false;\n }\n\n if (nextSignature.forceReset) {\n return false;\n }\n\n return true;\n}\n\nfunction isReactClass(type) {\n return type.prototype && type.prototype.isReactComponent;\n}\n\nfunction canPreserveStateBetween(prevType, nextType) {\n if (isReactClass(prevType) || isReactClass(nextType)) {\n return false;\n }\n\n if (haveEqualSignatures(prevType, nextType)) {\n return true;\n }\n\n return false;\n}\n\nfunction resolveFamily(type) {\n // Only check updated types to keep lookups fast.\n return updatedFamiliesByType.get(type);\n} // If we didn't care about IE11, we could use new Map/Set(iterable).\n\n\nfunction cloneMap(map) {\n var clone = new Map();\n map.forEach(function (value, key) {\n clone.set(key, value);\n });\n return clone;\n}\n\nfunction cloneSet(set) {\n var clone = new Set();\n set.forEach(function (value) {\n clone.add(value);\n });\n return clone;\n} // This is a safety mechanism to protect against rogue getters and Proxies.\n\n\nfunction getProperty(object, property) {\n try {\n return object[property];\n } catch (err) {\n // Intentionally ignore.\n return undefined;\n }\n}\n\nfunction performReactRefresh() {\n\n if (pendingUpdates.length === 0) {\n return null;\n }\n\n if (isPerformingRefresh) {\n return null;\n }\n\n isPerformingRefresh = true;\n\n try {\n var staleFamilies = new Set();\n var updatedFamilies = new Set();\n var updates = pendingUpdates;\n pendingUpdates = [];\n updates.forEach(function (_ref) {\n var family = _ref[0],\n nextType = _ref[1];\n // Now that we got a real edit, we can create associations\n // that will be read by the React reconciler.\n var prevType = family.current;\n updatedFamiliesByType.set(prevType, family);\n updatedFamiliesByType.set(nextType, family);\n family.current = nextType; // Determine whether this should be a re-render or a re-mount.\n\n if (canPreserveStateBetween(prevType, nextType)) {\n updatedFamilies.add(family);\n } else {\n staleFamilies.add(family);\n }\n }); // TODO: rename these fields to something more meaningful.\n\n var update = {\n updatedFamilies: updatedFamilies,\n // Families that will re-render preserving state\n staleFamilies: staleFamilies // Families that will be remounted\n\n };\n helpersByRendererID.forEach(function (helpers) {\n // Even if there are no roots, set the handler on first update.\n // This ensures that if *new* roots are mounted, they'll use the resolve handler.\n helpers.setRefreshHandler(resolveFamily);\n });\n var didError = false;\n var firstError = null; // We snapshot maps and sets that are mutated during commits.\n // If we don't do this, there is a risk they will be mutated while\n // we iterate over them. For example, trying to recover a failed root\n // may cause another root to be added to the failed list -- an infinite loop.\n\n var failedRootsSnapshot = cloneSet(failedRoots);\n var mountedRootsSnapshot = cloneSet(mountedRoots);\n var helpersByRootSnapshot = cloneMap(helpersByRoot);\n failedRootsSnapshot.forEach(function (root) {\n var helpers = helpersByRootSnapshot.get(root);\n\n if (helpers === undefined) {\n throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');\n }\n\n if (!failedRoots.has(root)) {// No longer failed.\n }\n\n if (rootElements === null) {\n return;\n }\n\n if (!rootElements.has(root)) {\n return;\n }\n\n var element = rootElements.get(root);\n\n try {\n helpers.scheduleRoot(root, element);\n } catch (err) {\n if (!didError) {\n didError = true;\n firstError = err;\n } // Keep trying other roots.\n\n }\n });\n mountedRootsSnapshot.forEach(function (root) {\n var helpers = helpersByRootSnapshot.get(root);\n\n if (helpers === undefined) {\n throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');\n }\n\n if (!mountedRoots.has(root)) {// No longer mounted.\n }\n\n try {\n helpers.scheduleRefresh(root, update);\n } catch (err) {\n if (!didError) {\n didError = true;\n firstError = err;\n } // Keep trying other roots.\n\n }\n });\n\n if (didError) {\n throw firstError;\n }\n\n return update;\n } finally {\n isPerformingRefresh = false;\n }\n}\nfunction register(type, id) {\n {\n if (type === null) {\n return;\n }\n\n if (typeof type !== 'function' && typeof type !== 'object') {\n return;\n } // This can happen in an edge case, e.g. if we register\n // return value of a HOC but it returns a cached component.\n // Ignore anything but the first registration for each type.\n\n\n if (allFamiliesByType.has(type)) {\n return;\n } // Create family or remember to update it.\n // None of this bookkeeping affects reconciliation\n // until the first performReactRefresh() call above.\n\n\n var family = allFamiliesByID.get(id);\n\n if (family === undefined) {\n family = {\n current: type\n };\n allFamiliesByID.set(id, family);\n } else {\n pendingUpdates.push([family, type]);\n }\n\n allFamiliesByType.set(type, family); // Visit inner types because we might not have registered them.\n\n if (typeof type === 'object' && type !== null) {\n switch (getProperty(type, '$$typeof')) {\n case REACT_FORWARD_REF_TYPE:\n register(type.render, id + '$render');\n break;\n\n case REACT_MEMO_TYPE:\n register(type.type, id + '$type');\n break;\n }\n }\n }\n}\nfunction setSignature(type, key) {\n var forceReset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var getCustomHooks = arguments.length > 3 ? arguments[3] : undefined;\n\n {\n if (!allSignaturesByType.has(type)) {\n allSignaturesByType.set(type, {\n forceReset: forceReset,\n ownKey: key,\n fullKey: null,\n getCustomHooks: getCustomHooks || function () {\n return [];\n }\n });\n } // Visit inner types because we might not have signed them.\n\n\n if (typeof type === 'object' && type !== null) {\n switch (getProperty(type, '$$typeof')) {\n case REACT_FORWARD_REF_TYPE:\n setSignature(type.render, key, forceReset, getCustomHooks);\n break;\n\n case REACT_MEMO_TYPE:\n setSignature(type.type, key, forceReset, getCustomHooks);\n break;\n }\n }\n }\n} // This is lazily called during first render for a type.\n// It captures Hook list at that time so inline requires don't break comparisons.\n\nfunction collectCustomHooksForSignature(type) {\n {\n var signature = allSignaturesByType.get(type);\n\n if (signature !== undefined) {\n computeFullKey(signature);\n }\n }\n}\nfunction getFamilyByID(id) {\n {\n return allFamiliesByID.get(id);\n }\n}\nfunction getFamilyByType(type) {\n {\n return allFamiliesByType.get(type);\n }\n}\nfunction findAffectedHostInstances(families) {\n {\n var affectedInstances = new Set();\n mountedRoots.forEach(function (root) {\n var helpers = helpersByRoot.get(root);\n\n if (helpers === undefined) {\n throw new Error('Could not find helpers for a root. This is a bug in React Refresh.');\n }\n\n var instancesForRoot = helpers.findHostInstancesForRefresh(root, families);\n instancesForRoot.forEach(function (inst) {\n affectedInstances.add(inst);\n });\n });\n return affectedInstances;\n }\n}\nfunction injectIntoGlobalHook(globalObject) {\n {\n // For React Native, the global hook will be set up by require('react-devtools-core').\n // That code will run before us. So we need to monkeypatch functions on existing hook.\n // For React Web, the global hook will be set up by the extension.\n // This will also run before us.\n var hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook === undefined) {\n // However, if there is no DevTools extension, we'll need to set up the global hook ourselves.\n // Note that in this case it's important that renderer code runs *after* this method call.\n // Otherwise, the renderer will think that there is no global hook, and won't do the injection.\n var nextID = 0;\n globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {\n renderers: new Map(),\n supportsFiber: true,\n inject: function (injected) {\n return nextID++;\n },\n onScheduleFiberRoot: function (id, root, children) {},\n onCommitFiberRoot: function (id, root, maybePriorityLevel, didError) {},\n onCommitFiberUnmount: function () {}\n };\n }\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 // Using console['warn'] to evade Babel and ESLint\n console['warn']('Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' + 'Fast Refresh is not compatible with this shim and will be disabled.');\n return;\n } // Here, we just want to get a reference to scheduleRefresh.\n\n\n var oldInject = hook.inject;\n\n hook.inject = function (injected) {\n var id = oldInject.apply(this, arguments);\n\n if (typeof injected.scheduleRefresh === 'function' && typeof injected.setRefreshHandler === 'function') {\n // This version supports React Refresh.\n helpersByRendererID.set(id, injected);\n }\n\n return id;\n }; // Do the same for any already injected roots.\n // This is useful if ReactDOM has already been initialized.\n // https://github.com/facebook/react/issues/17626\n\n\n hook.renderers.forEach(function (injected, id) {\n if (typeof injected.scheduleRefresh === 'function' && typeof injected.setRefreshHandler === 'function') {\n // This version supports React Refresh.\n helpersByRendererID.set(id, injected);\n }\n }); // We also want to track currently mounted roots.\n\n var oldOnCommitFiberRoot = hook.onCommitFiberRoot;\n\n var oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || function () {};\n\n hook.onScheduleFiberRoot = function (id, root, children) {\n if (!isPerformingRefresh) {\n // If it was intentionally scheduled, don't attempt to restore.\n // This includes intentionally scheduled unmounts.\n failedRoots.delete(root);\n\n if (rootElements !== null) {\n rootElements.set(root, children);\n }\n }\n\n return oldOnScheduleFiberRoot.apply(this, arguments);\n };\n\n hook.onCommitFiberRoot = function (id, root, maybePriorityLevel, didError) {\n var helpers = helpersByRendererID.get(id);\n\n if (helpers !== undefined) {\n helpersByRoot.set(root, helpers);\n var current = root.current;\n var alternate = current.alternate; // We need to determine whether this root has just (un)mounted.\n // This logic is copy-pasted from similar logic in the DevTools backend.\n // If this breaks with some refactoring, you'll want to update DevTools too.\n\n if (alternate !== null) {\n var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null && mountedRoots.has(root);\n var isMounted = current.memoizedState != null && current.memoizedState.element != null;\n\n if (!wasMounted && isMounted) {\n // Mount a new root.\n mountedRoots.add(root);\n failedRoots.delete(root);\n } else if (wasMounted && isMounted) ; else if (wasMounted && !isMounted) {\n // Unmount an existing root.\n mountedRoots.delete(root);\n\n if (didError) {\n // We'll remount it on future edits.\n failedRoots.add(root);\n } else {\n helpersByRoot.delete(root);\n }\n } else if (!wasMounted && !isMounted) {\n if (didError) {\n // We'll remount it on future edits.\n failedRoots.add(root);\n }\n }\n } else {\n // Mount a new root.\n mountedRoots.add(root);\n }\n } // Always call the decorated DevTools hook.\n\n\n return oldOnCommitFiberRoot.apply(this, arguments);\n };\n }\n}\nfunction hasUnrecoverableErrors() {\n // TODO: delete this after removing dependency in RN.\n return false;\n} // Exposed for testing.\n\nfunction _getMountedRootCount() {\n {\n return mountedRoots.size;\n }\n} // This is a wrapper over more primitive functions for setting signature.\n// Signatures let us decide whether the Hook order has changed on refresh.\n//\n// This function is intended to be used as a transform target, e.g.:\n// var _s = createSignatureFunctionForTransform()\n//\n// function Hello() {\n// const [foo, setFoo] = useState(0);\n// const value = useCustomHook();\n// _s(); /* Call without arguments triggers collecting the custom Hook list.\n// * This doesn't happen during the module evaluation because we\n// * don't want to change the module order with inline requires.\n// * Next calls are noops. */\n// return <h1>Hi</h1>;\n// }\n//\n// /* Call with arguments attaches the signature to the type: */\n// _s(\n// Hello,\n// 'useState{[foo, setFoo]}(0)',\n// () => [useCustomHook], /* Lazy to avoid triggering inline requires */\n// );\n\nfunction createSignatureFunctionForTransform() {\n {\n var savedType;\n var hasCustomHooks;\n var didCollectHooks = false;\n return function (type, key, forceReset, getCustomHooks) {\n if (typeof key === 'string') {\n // We're in the initial phase that associates signatures\n // with the functions. Note this may be called multiple times\n // in HOC chains like _s(hoc1(_s(hoc2(_s(actualFunction))))).\n if (!savedType) {\n // We're in the innermost call, so this is the actual type.\n savedType = type;\n hasCustomHooks = typeof getCustomHooks === 'function';\n } // Set the signature for all types (even wrappers!) in case\n // they have no signatures of their own. This is to prevent\n // problems like https://github.com/facebook/react/issues/20417.\n\n\n if (type != null && (typeof type === 'function' || typeof type === 'object')) {\n setSignature(type, key, forceReset, getCustomHooks);\n }\n\n return type;\n } else {\n // We're in the _s() call without arguments, which means\n // this is the time to collect custom Hook signatures.\n // Only do this once. This path is hot and runs *inside* every render!\n if (!didCollectHooks && hasCustomHooks) {\n didCollectHooks = true;\n collectCustomHooksForSignature(savedType);\n }\n }\n };\n }\n}\nfunction isLikelyComponentType(type) {\n {\n switch (typeof type) {\n case 'function':\n {\n // First, deal with classes.\n if (type.prototype != null) {\n if (type.prototype.isReactComponent) {\n // React class.\n return true;\n }\n\n var ownNames = Object.getOwnPropertyNames(type.prototype);\n\n if (ownNames.length > 1 || ownNames[0] !== 'constructor') {\n // This looks like a class.\n return false;\n } // eslint-disable-next-line no-proto\n\n\n if (type.prototype.__proto__ !== Object.prototype) {\n // It has a superclass.\n return false;\n } // Pass through.\n // This looks like a regular function with empty prototype.\n\n } // For plain functions and arrows, use name as a heuristic.\n\n\n var name = type.name || type.displayName;\n return typeof name === 'string' && /^[A-Z]/.test(name);\n }\n\n case 'object':\n {\n if (type != null) {\n switch (getProperty(type, '$$typeof')) {\n case REACT_FORWARD_REF_TYPE:\n case REACT_MEMO_TYPE:\n // Definitely React components.\n return true;\n\n default:\n return false;\n }\n }\n\n return false;\n }\n\n default:\n {\n return false;\n }\n }\n }\n}\n\nexports._getMountedRootCount = _getMountedRootCount;\nexports.collectCustomHooksForSignature = collectCustomHooksForSignature;\nexports.createSignatureFunctionForTransform = createSignatureFunctionForTransform;\nexports.findAffectedHostInstances = findAffectedHostInstances;\nexports.getFamilyByID = getFamilyByID;\nexports.getFamilyByType = getFamilyByType;\nexports.hasUnrecoverableErrors = hasUnrecoverableErrors;\nexports.injectIntoGlobalHook = injectIntoGlobalHook;\nexports.isLikelyComponentType = isLikelyComponentType;\nexports.performReactRefresh = performReactRefresh;\nexports.register = register;\nexports.setSignature = setSignature;\n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL3JlYWN0LXJlZnJlc2gvY2pzL3JlYWN0LXJlZnJlc2gtcnVudGltZS5kZXZlbG9wbWVudC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRWE7O0FBRWIsSUFBSSxJQUFxQztBQUN6QztBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQSxxRUFBcUU7QUFDckU7O0FBRUE7QUFDQTtBQUNBLGlEQUFpRDtBQUNqRDtBQUNBOztBQUVBLG1EQUFtRDtBQUNuRDs7QUFFQSx5QkFBeUI7O0FBRXpCO0FBQ0EsK0JBQStCOztBQUUvQiw4QkFBOEI7O0FBRTlCLDZCQUE2QjtBQUM3QjtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLElBQUk7QUFDSjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxrQkFBa0Isa0JBQWtCO0FBQ3BDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0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ZWRSb290cy5hZGQocm9vdCk7XG4gICAgICAgICAgICBmYWlsZWRSb290cy5kZWxldGUocm9vdCk7XG4gICAgICAgICAgfSBlbHNlIGlmICh3YXNNb3VudGVkICYmIGlzTW91bnRlZCkgOyBlbHNlIGlmICh3YXNNb3VudGVkICYmICFpc01vdW50ZWQpIHtcbiAgICAgICAgICAgIC8vIFVubW91bnQgYW4gZXhpc3Rpbmcgcm9vdC5cbiAgICAgICAgICAgIG1vdW50ZWRSb290cy5kZWxldGUocm9vdCk7XG5cbiAgICAgICAgICAgIGlmIChkaWRFcnJvcikge1xuICAgICAgICAgICAgICAvLyBXZSdsbCByZW1vdW50IGl0IG9uIGZ1dHVyZSBlZGl0cy5cbiAgICAgICAgICAgICAgZmFpbGVkUm9vdHMuYWRkKHJvb3QpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaGVscGVyc0J5Um9vdC5kZWxldGUocm9vdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICghd2FzTW91bnRlZCAmJiAhaXNNb3VudGVkKSB7XG4gICAgICAgICAgICBpZiAoZGlkRXJyb3IpIHtcbiAgICAgICAgICAgICAgLy8gV2UnbGwgcmVtb3VudCBpdCBvbiBmdXR1cmUgZWRpdHMuXG4gICAgICAgICAgICAgIGZhaWxlZFJvb3RzLmFkZChyb290KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gTW91bnQgYSBuZXcgcm9vdC5cbiAgICAgICAgICBtb3VudGVkUm9vdHMuYWRkKHJvb3QpO1xuICAgICAgICB9XG4gICAgICB9IC8vIEFsd2F5cyBjYWxsIHRoZSBkZWNvcmF0ZWQgRGV2VG9vbHMgaG9vay5cblxuXG4gICAgICByZXR1cm4gb2xkT25Db21taXRGaWJlclJvb3QuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICB9O1xuICB9XG59XG5mdW5jdG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AgICAgICAgICBkaWRDb2xsZWN0SG9va3MgPSB0cnVlO1xuICAgICAgICAgIGNvbGxlY3RDdXN0b21Ib29rc0ZvclNpZ25hdHVyZShzYXZlZFR5cGUpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuZnVuY3Rpb24gaXNMaWtlbHlDb21wb25lbnRUeXBlKHR5cGUpIHtcbiAge1xuICAgIHN3aXRjaCAodHlwZW9mIHR5cGUpIHtcbiAgICAgIGNhc2UgJ2Z1bmN0aW9uJzpcbiAgICAgICAge1xuICAgICAgICAgIC8vIEZpcnN0LCBkZWFsIHdpdGggY2xhc3Nlcy5cbiAgICAgICAgICBpZiAodHlwZS5wcm90b3R5cGUgIT0gbnVsbCkge1xuICAgICAgICAgICAgaWYgKHR5cGUucHJvdG90eXBlLmlzUmVhY3RDb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgLy8gUmVhY3QgY2xhc3MuXG4gICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgb3duTmFtZXMgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyh0eXBlLnByb3RvdHlwZSk7XG5cbiAgICAgICAgICAgIGlmIChvd25OYW1lcy5sZW5ndGggPiAxIHx8IG93bk5hbWVzWzBdICE9PSAnY29uc3RydWN0b3InKSB7XG4gICAgICAgICAgICAgIC8vIFRoaXMgbG9va3MgbGlrZSBhIGNsYXNzLlxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9IC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1wcm90b1xuXG5cbiAgICAgICAgICAgIGlmICh0eXBlLnByb3RvdHlwZS5fX3Byb3RvX18gIT09IE9iamVjdC5wcm90b3R5cGUpIHtcbiAgICAgICAgICAgICAgLy8gSXQgaGFzIGEgc3VwZXJjbGFzcy5cbiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfSAvLyBQYXNzIHRocm91Z2guXG4gICAgICAgICAgICAvLyBUaGlzIGxvb2tzIGxpa2UgYSByZWd1bGFyIGZ1bmN0aW9uIHdpdGggZW1wdHkgcHJvdG90eXBlLlxuXG4gICAgICAgICAgfSAvLyBGb3IgcGxhaW4gZnVuY3Rpb25zIGFuZCBhcnJvd3MsIHVzZSBuYW1lIGFzIGEgaGV1cmlzdGljLlxuXG5cbiAgICAgICAgICB2YXIgbmFtZSA9IHR5cGUubmFtZSB8fCB0eXBlLmRpc3BsYXlOYW1lO1xuICAgICAgICAgIHJldHVybiB0eXBlb2YgbmFtZSA9PT0gJ3N0cmluZycgJiYgL15bQS1aXS8udGVzdChuYW1lKTtcbiAgICAgICAgfVxuXG4gICAgICBjYXNlICdvYmplY3QnOlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKHR5cGUgIT0gbnVsbCkge1xuICAgICAgICAgICAgc3dpdGNoIChnZXRQcm9wZXJ0eSh0eXBlLCAnJCR0eXBlb2YnKSkge1xuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0ZPUldBUkRfUkVGX1RZUEU6XG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfTUVNT19UWVBFOlxuICAgICAgICAgICAgICAgIC8vIERlZmluaXRlbHkgUmVhY3QgY29tcG9uZW50cy5cbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcblxuICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAge1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgIH1cbiAgfVxufVxuXG5leHBvcnRzLl9nZXRNb3VudGVkUm9vdENvdW50ID0gX2dldE1vdW50ZWRSb290Q291bnQ7XG5leHBvcnRzLmNvbGxlY3RDdXN0b21Ib29rc0ZvclNpZ25hdHVyZSA9IGNvbGxlY3RDdXN0b21Ib29rc0ZvclNpZ25hdHVyZTtcbmV4cG9ydHMuY3JlYXRlU2lnbmF0dXJlRnVuY3Rpb25Gb3JUcmFuc2Zvcm0gPSBjcmVhdGVTaWduYXR1cmVGdW5jdGlvbkZvclRyYW5zZm9ybTtcbmV4cG9ydHMuZmluZEFmZmVjdGVkSG9zdEluc3RhbmNlcyA9IGZpbmRBZmZlY3RlZEhvc3RJbnN0YW5jZXM7XG5leHBvcnRzLmdldEZhbWlseUJ5SUQgPSBnZXRGYW1pbHlCeUlEO1xuZXhwb3J0cy5nZXRGYW1pbHlCeVR5cGUgPSBnZXRGYW1pbHlCeVR5cGU7XG5leHBvcnRzLmhhc1VucmVjb3ZlcmFibGVFcnJvcnMgPSBoYXNVbnJlY292ZXJhYmxlRXJyb3JzO1xuZXhwb3J0cy5pbmplY3RJbnRvR2xvYmFsSG9vayA9IGluamVjdEludG9HbG9iYWxIb29rO1xuZXhwb3J0cy5pc0xpa2VseUNvbXBvbmVudFR5cGUgPSBpc0xpa2VseUNvbXBvbmVudFR5cGU7XG5leHBvcnRzLnBlcmZvcm1SZWFjdFJlZnJlc2ggPSBwZXJmb3JtUmVhY3RSZWZyZXNoO1xuZXhwb3J0cy5yZWdpc3RlciA9IHJlZ2lzdGVyO1xuZXhwb3J0cy5zZXRTaWduYXR1cmUgPSBzZXRTaWduYXR1cmU7XG4gIH0pKCk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/next/dist/compiled/react-refresh/cjs/react-refresh-runtime.development.js\n"));
/***/ }),
/***/ "./node_modules/next/dist/compiled/react-refresh/runtime.js":
/*!******************************************************************!*\
!*** ./node_modules/next/dist/compiled/react-refresh/runtime.js ***!
\******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-refresh-runtime.development.js */ \"./node_modules/next/dist/compiled/react-refresh/cjs/react-refresh-runtime.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL3JlYWN0LXJlZnJlc2gvcnVudGltZS5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFJLEtBQXFDLEVBQUUsRUFFMUMsQ0FBQztBQUNGLEVBQUUsa0xBQXNFO0FBQ3hFIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvY29tcGlsZWQvcmVhY3QtcmVmcmVzaC9ydW50aW1lLmpzPzljNmUiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5pZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09ICdwcm9kdWN0aW9uJykge1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3JlYWN0LXJlZnJlc2gtcnVudGltZS5wcm9kdWN0aW9uLm1pbi5qcycpO1xufSBlbHNlIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC1yZWZyZXNoLXJ1bnRpbWUuZGV2ZWxvcG1lbnQuanMnKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/next/dist/compiled/react-refresh/runtime.js\n"));
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ var __webpack_exports__ = (__webpack_exec__("./node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js"));
/******/ _N_E = __webpack_exports__;
/******/ }
]);