@expo/cli 1.0.0-canary-20250404-3c3b5fd → 1.0.0-canary-20250701-6a945c5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +33 -24
  2. package/build/bin/cli +1 -1
  3. package/build/metro-require/require.js +6 -4
  4. package/build/src/api/user/actions.js +25 -11
  5. package/build/src/api/user/actions.js.map +1 -1
  6. package/build/src/customize/templates.js +15 -1
  7. package/build/src/customize/templates.js.map +1 -1
  8. package/build/src/export/exportApp.js +26 -14
  9. package/build/src/export/exportApp.js.map +1 -1
  10. package/build/src/export/exportAsync.js +6 -0
  11. package/build/src/export/exportAsync.js.map +1 -1
  12. package/build/src/export/exportHermes.js +2 -2
  13. package/build/src/export/exportHermes.js.map +1 -1
  14. package/build/src/export/persistMetroAssets.js.map +1 -1
  15. package/build/src/install/checkPackages.js +22 -4
  16. package/build/src/install/checkPackages.js.map +1 -1
  17. package/build/src/install/index.js +3 -1
  18. package/build/src/install/index.js.map +1 -1
  19. package/build/src/install/resolveOptions.js +7 -2
  20. package/build/src/install/resolveOptions.js.map +1 -1
  21. package/build/src/install/utils/checkPackagesCompatibility.js +1 -1
  22. package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
  23. package/build/src/lint/ESlintPrerequisite.js +32 -48
  24. package/build/src/lint/ESlintPrerequisite.js.map +1 -1
  25. package/build/src/lint/index.js +45 -47
  26. package/build/src/lint/index.js.map +1 -1
  27. package/build/src/lint/lintAsync.js +150 -4
  28. package/build/src/lint/lintAsync.js.map +1 -1
  29. package/build/src/lint/resolveOptions.js +115 -0
  30. package/build/src/lint/resolveOptions.js.map +1 -0
  31. package/build/src/prebuild/renameTemplateAppName.js +4 -1
  32. package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
  33. package/build/src/prebuild/resolveTemplate.js +4 -4
  34. package/build/src/prebuild/resolveTemplate.js.map +1 -1
  35. package/build/src/prebuild/updatePackageJson.js +19 -9
  36. package/build/src/prebuild/updatePackageJson.js.map +1 -1
  37. package/build/src/run/android/resolveOptions.js +13 -1
  38. package/build/src/run/android/resolveOptions.js.map +1 -1
  39. package/build/src/run/android/runAndroidAsync.js +39 -17
  40. package/build/src/run/android/runAndroidAsync.js.map +1 -1
  41. package/build/src/run/ios/XcodeBuild.js +3 -3
  42. package/build/src/run/ios/XcodeBuild.js.map +1 -1
  43. package/build/src/run/ios/options/resolveOptions.js +13 -1
  44. package/build/src/run/ios/options/resolveOptions.js.map +1 -1
  45. package/build/src/run/ios/runIosAsync.js +38 -7
  46. package/build/src/run/ios/runIosAsync.js.map +1 -1
  47. package/build/src/start/doctor/SecurityBinPrerequisite.js +1 -1
  48. package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
  49. package/build/src/start/doctor/apple/XcodePrerequisite.js +1 -1
  50. package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
  51. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +1 -1
  52. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
  53. package/build/src/start/doctor/dependencies/resolvePackages.js +1 -1
  54. package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
  55. package/build/src/start/doctor/ngrok/ExternalModule.js +1 -1
  56. package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
  57. package/build/src/start/index.js +1 -1
  58. package/build/src/start/index.js.map +1 -1
  59. package/build/src/start/platforms/PlatformManager.js +1 -1
  60. package/build/src/start/platforms/PlatformManager.js.map +1 -1
  61. package/build/src/start/platforms/android/AndroidPlatformManager.js +1 -1
  62. package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
  63. package/build/src/start/platforms/android/getDevices.js +1 -1
  64. package/build/src/start/platforms/android/getDevices.js.map +1 -1
  65. package/build/src/start/platforms/ios/AppleDeviceManager.js +1 -1
  66. package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
  67. package/build/src/start/platforms/ios/xcrun.js +1 -1
  68. package/build/src/start/platforms/ios/xcrun.js.map +1 -1
  69. package/build/src/start/project/dotExpo.js +5 -0
  70. package/build/src/start/project/dotExpo.js.map +1 -1
  71. package/build/src/start/resolveOptions.js +3 -0
  72. package/build/src/start/resolveOptions.js.map +1 -1
  73. package/build/src/start/server/metro/MetroBundlerDevServer.js +38 -26
  74. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  75. package/build/src/start/server/metro/MetroTerminalReporter.js +29 -2
  76. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  77. package/build/src/start/server/metro/createExpoFallbackResolver.js +6 -4
  78. package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
  79. package/build/src/start/server/metro/createJResolver.js +2 -2
  80. package/build/src/start/server/metro/createJResolver.js.map +1 -1
  81. package/build/src/start/server/metro/createServerComponentsMiddleware.js +16 -5
  82. package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
  83. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +19 -19
  84. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  85. package/build/src/start/server/metro/externals.js +1 -1
  86. package/build/src/start/server/metro/externals.js.map +1 -1
  87. package/build/src/start/server/metro/instantiateMetro.js +13 -8
  88. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  89. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +21 -2
  90. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  91. package/build/src/start/server/metro/log-box/formatProjectFilePath.js +15 -12
  92. package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
  93. package/build/src/start/server/metro/metroErrorInterface.js +19 -8
  94. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  95. package/build/src/start/server/metro/runServer-fork.js +1 -1
  96. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  97. package/build/src/start/server/metro/withMetroMultiPlatform.js +7 -12
  98. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  99. package/build/src/start/server/middleware/CorsMiddleware.js +1 -1
  100. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
  101. package/build/src/start/server/middleware/ManifestMiddleware.js +4 -8
  102. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  103. package/build/src/start/server/middleware/inspector/JsInspector.js +2 -25
  104. package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
  105. package/build/src/start/server/middleware/metroOptions.js +2 -26
  106. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  107. package/build/src/utils/build-cache-providers/helpers.js +61 -0
  108. package/build/src/utils/build-cache-providers/helpers.js.map +1 -0
  109. package/build/src/utils/build-cache-providers/index.js +283 -0
  110. package/build/src/utils/build-cache-providers/index.js.map +1 -0
  111. package/build/src/utils/codesigning.js +14 -2
  112. package/build/src/utils/codesigning.js.map +1 -1
  113. package/build/src/utils/exit.js +0 -1
  114. package/build/src/utils/exit.js.map +1 -1
  115. package/build/src/utils/ip.js +7 -104
  116. package/build/src/utils/ip.js.map +1 -1
  117. package/build/src/utils/modifyConfigAsync.js +1 -1
  118. package/build/src/utils/modifyConfigAsync.js.map +1 -1
  119. package/build/src/utils/resolveArgs.js +8 -0
  120. package/build/src/utils/resolveArgs.js.map +1 -1
  121. package/build/src/utils/scheme.js +1 -1
  122. package/build/src/utils/scheme.js.map +1 -1
  123. package/build/src/utils/telemetry/clients/FetchClient.js +2 -2
  124. package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
  125. package/build/src/utils/telemetry/utils/context.js +1 -1
  126. package/build/src/utils/tsconfig/evaluateTsConfig.js +7 -2
  127. package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
  128. package/build/src/utils/variadic.js +63 -6
  129. package/build/src/utils/variadic.js.map +1 -1
  130. package/package.json +20 -20
  131. package/static/canary/react-is/cjs/react-is.development.js +118 -185
  132. package/static/canary/react-is/cjs/react-is.production.js +2 -2
  133. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +16582 -26565
  134. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +3495 -3357
  135. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +3929 -3801
  136. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16869 -27032
  137. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3535 -3428
  138. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4198 -4095
  139. package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +387 -684
  140. package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +0 -9
  141. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +137 -195
  142. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +0 -5
  143. package/static/canary/scheduler/cjs/scheduler.development.js +339 -600
  144. package/static/canary/scheduler/cjs/scheduler.native.development.js +324 -512
  145. package/static/canary/scheduler/cjs/scheduler.native.production.js +6 -5
  146. package/static/canary/scheduler/cjs/scheduler.production.js +16 -17
  147. package/static/canary-full/react/cjs/react-compiler-runtime.development.js +13 -68
  148. package/static/canary-full/react/cjs/react-jsx-dev-runtime.development.js +317 -1251
  149. package/static/canary-full/react/cjs/react-jsx-dev-runtime.react-server.development.js +353 -1286
  150. package/static/canary-full/react/cjs/react-jsx-runtime.development.js +326 -1279
  151. package/static/canary-full/react/cjs/react-jsx-runtime.react-server.development.js +353 -1286
  152. package/static/canary-full/react/cjs/react.development.js +1204 -2771
  153. package/static/canary-full/react/cjs/react.production.js +25 -20
  154. package/static/canary-full/react/cjs/react.react-server.development.js +783 -2162
  155. package/static/canary-full/react/cjs/react.react-server.production.js +13 -63
  156. package/static/canary-full/react/package.json +1 -1
  157. package/static/canary-full/react-dom/cjs/react-dom-client.development.js +24847 -37099
  158. package/static/canary-full/react-dom/cjs/react-dom-client.production.js +8261 -7475
  159. package/static/canary-full/react-dom/cjs/react-dom-profiling.development.js +25252 -37571
  160. package/static/canary-full/react-dom/cjs/react-dom-profiling.profiling.js +9442 -8662
  161. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.development.js +8944 -11568
  162. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.production.js +1378 -944
  163. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.development.js +8944 -11568
  164. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.production.js +1386 -954
  165. package/static/canary-full/react-dom/cjs/react-dom-server.browser.development.js +9344 -11600
  166. package/static/canary-full/react-dom/cjs/react-dom-server.browser.production.js +1545 -954
  167. package/static/canary-full/react-dom/cjs/react-dom-server.bun.development.js +8286 -11064
  168. package/static/canary-full/react-dom/cjs/react-dom-server.bun.production.js +1437 -976
  169. package/static/canary-full/react-dom/cjs/react-dom-server.edge.development.js +9356 -11609
  170. package/static/canary-full/react-dom/cjs/react-dom-server.edge.production.js +1542 -970
  171. package/static/canary-full/react-dom/cjs/react-dom-server.node.development.js +9227 -11571
  172. package/static/canary-full/react-dom/cjs/react-dom-server.node.production.js +1787 -1183
  173. package/static/canary-full/react-dom/cjs/react-dom-test-utils.development.js +13 -59
  174. package/static/canary-full/react-dom/cjs/react-dom.development.js +402 -604
  175. package/static/canary-full/react-dom/cjs/react-dom.production.js +4 -3
  176. package/static/canary-full/react-dom/cjs/react-dom.react-server.development.js +322 -382
  177. package/static/canary-full/react-dom/cjs/react-dom.react-server.production.js +6 -7
  178. package/static/canary-full/react-dom/package.json +5 -5
  179. package/static/canary-full/react-dom/static.browser.js +1 -0
  180. package/static/canary-full/react-dom/static.edge.js +1 -0
  181. package/static/canary-full/react-dom/static.node.js +1 -0
  182. package/static/template/eslint.config.js +10 -0
@@ -8,2187 +8,808 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
 
11
- 'use strict';
12
-
13
- if (process.env.NODE_ENV !== "production") {
14
- (function() {
15
- 'use strict';
16
-
17
- // -----------------------------------------------------------------------------
18
-
19
- var enableScopeAPI = false; // Experimental Create Event Handle API.
20
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
21
-
22
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
23
- // as a normal prop instead of stripping it from the props object.
24
- // Passes `ref` as a normal prop instead of stripping it from the props object
25
- // during element creation.
26
-
27
- var enableRefAsProp = true;
28
-
29
- var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
30
- // stuff. Intended to enable React core members to more easily debug scheduling
31
- // issues in DEV builds.
32
-
33
- var enableDebugTracing = false;
34
-
35
- var ReactSharedInternals = {
36
- H: null,
37
- A: null
38
- };
39
-
40
- {
41
- var currentExtraStackFrame = null;
42
-
43
- ReactSharedInternals.setExtraStackFrame = function (stack) {
44
- currentExtraStackFrame = stack;
45
- }; // Stack implementation injected by the current renderer.
46
-
47
-
48
- ReactSharedInternals.getCurrentStack = null;
49
-
50
- ReactSharedInternals.getStackAddendum = function () {
51
- var stack = ''; // Add an extra top frame while an element is being validated
52
-
53
- if (currentExtraStackFrame) {
54
- stack += currentExtraStackFrame;
55
- } // Delegate to the injected renderer-specific implementation
56
-
57
-
58
- var impl = ReactSharedInternals.getCurrentStack;
59
-
60
- if (impl) {
61
- stack += impl() || '';
62
- }
63
-
64
- return stack;
65
- };
66
- }
67
-
68
- // by calls to these methods by a Babel plugin.
69
- //
70
- // In PROD (or in packages without access to React internals),
71
- // they are left as they are instead.
72
-
73
- function warn(format) {
74
- {
75
- {
76
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
77
- args[_key - 1] = arguments[_key];
78
- }
79
-
80
- printWarning('warn', format, args);
81
- }
82
- }
83
- }
84
- function error(format) {
85
- {
86
- {
87
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
88
- args[_key2 - 1] = arguments[_key2];
89
- }
90
-
91
- printWarning('error', format, args);
92
- }
93
- }
94
- }
95
-
96
- function printWarning(level, format, args) {
97
- // When changing this logic, you might want to also
98
- // update consoleWithStackDev.www.js as well.
99
- {
100
- var stack = ReactSharedInternals.getStackAddendum();
101
-
102
- if (stack !== '') {
103
- format += '%s';
104
- args = args.concat([stack]);
105
- } // eslint-disable-next-line react-internal/safe-string-coercion
106
-
107
-
108
- var argsWithFormat = args.map(function (item) {
109
- return String(item);
110
- }); // Careful: RN currently depends on this prefix
111
-
112
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
113
- // breaks IE9: https://github.com/facebook/react/issues/13610
114
- // eslint-disable-next-line react-internal/no-production-logging
115
-
116
- Function.prototype.apply.call(console[level], console, argsWithFormat);
117
- }
118
- }
119
-
120
- var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
121
-
122
- function isArray(a) {
123
- return isArrayImpl(a);
124
- }
125
-
126
- var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element') ;
127
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
128
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
129
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
130
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
131
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext
132
-
133
- var REACT_CONSUMER_TYPE = Symbol.for('react.consumer');
134
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
135
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
136
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
137
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
138
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
139
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
140
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
141
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
142
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
143
- function getIteratorFn(maybeIterable) {
144
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
145
- return null;
146
- }
147
-
148
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
149
-
150
- if (typeof maybeIterator === 'function') {
151
- return maybeIterator;
152
- }
153
-
154
- return null;
155
- }
156
-
157
- /*
158
- * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
159
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
160
- *
161
- * The functions in this module will throw an easier-to-understand,
162
- * easier-to-debug exception with a clear errors message message explaining the
163
- * problem. (Instead of a confusing exception thrown inside the implementation
164
- * of the `value` object).
165
- */
166
- // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
167
- function typeName(value) {
168
- {
169
- // toStringTag is needed for namespaced types like Temporal.Instant
170
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
171
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]
172
-
173
- return type;
174
- }
175
- } // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
176
-
177
-
178
- function willCoercionThrow(value) {
179
- {
180
- try {
181
- testStringCoercion(value);
182
- return false;
183
- } catch (e) {
184
- return true;
185
- }
186
- }
187
- }
188
-
189
- function testStringCoercion(value) {
190
- // If you ended up here by following an exception call stack, here's what's
191
- // happened: you supplied an object or symbol value to React (as a prop, key,
192
- // DOM attribute, CSS property, string ref, etc.) and when React tried to
193
- // coerce it to a string using `'' + value`, an exception was thrown.
194
- //
195
- // The most common types that will cause this exception are `Symbol` instances
196
- // and Temporal objects like `Temporal.Instant`. But any object that has a
197
- // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
198
- // exception. (Library authors do this to prevent users from using built-in
199
- // numeric operators like `+` or comparison operators like `>=` because custom
200
- // methods are needed to perform accurate arithmetic or comparison.)
201
- //
202
- // To fix the problem, coerce this object or symbol value to a string before
203
- // passing it to React. The most reliable way is usually `String(value)`.
204
- //
205
- // To find which value is throwing, check the browser or debugger console.
206
- // Before this exception was thrown, there should be `console.error` output
207
- // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
208
- // problem and how that type was used: key, atrribute, input value prop, etc.
209
- // In most cases, this console output also shows the component and its
210
- // ancestor components where the exception happened.
211
- //
212
- // eslint-disable-next-line react-internal/safe-string-coercion
213
- return '' + value;
214
- }
215
- function checkKeyStringCoercion(value) {
216
- {
217
- if (willCoercionThrow(value)) {
218
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));
219
-
220
- return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
221
- }
222
- }
223
- }
224
-
225
- function getWrappedName(outerType, innerType, wrapperName) {
226
- var displayName = outerType.displayName;
227
-
228
- if (displayName) {
229
- return displayName;
230
- }
231
-
232
- var functionName = innerType.displayName || innerType.name || '';
233
- return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
234
- } // Keep in sync with react-reconciler/getComponentNameFromFiber
235
-
236
-
237
- function getContextName(type) {
238
- return type.displayName || 'Context';
239
- }
240
-
241
- var REACT_CLIENT_REFERENCE$2 = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
242
-
243
- function getComponentNameFromType(type) {
244
- if (type == null) {
245
- // Host root, text node or just invalid type.
246
- return null;
247
- }
248
-
249
- if (typeof type === 'function') {
250
- if (type.$$typeof === REACT_CLIENT_REFERENCE$2) {
251
- // TODO: Create a convention for naming client references with debug info.
252
- return null;
253
- }
254
-
255
- return type.displayName || type.name || null;
256
- }
257
-
258
- if (typeof type === 'string') {
259
- return type;
260
- }
261
-
262
- switch (type) {
263
- case REACT_FRAGMENT_TYPE:
264
- return 'Fragment';
265
-
266
- case REACT_PORTAL_TYPE:
267
- return 'Portal';
268
-
269
- case REACT_PROFILER_TYPE:
270
- return 'Profiler';
271
-
272
- case REACT_STRICT_MODE_TYPE:
273
- return 'StrictMode';
274
-
275
- case REACT_SUSPENSE_TYPE:
276
- return 'Suspense';
277
-
278
- case REACT_SUSPENSE_LIST_TYPE:
279
- return 'SuspenseList';
280
-
281
- }
282
-
283
- if (typeof type === 'object') {
284
- {
285
- if (typeof type.tag === 'number') {
286
- error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
287
- }
288
- }
289
-
290
- switch (type.$$typeof) {
291
- case REACT_PROVIDER_TYPE:
292
- {
293
- return null;
294
- }
295
-
296
- case REACT_CONTEXT_TYPE:
297
- var context = type;
298
-
299
- {
300
- return getContextName(context) + '.Provider';
301
- }
302
-
303
- case REACT_CONSUMER_TYPE:
304
- {
305
- var consumer = type;
306
- return getContextName(consumer._context) + '.Consumer';
307
- }
308
-
309
- case REACT_FORWARD_REF_TYPE:
310
- return getWrappedName(type, type.render, 'ForwardRef');
311
-
312
- case REACT_MEMO_TYPE:
313
- var outerName = type.displayName || null;
314
-
315
- if (outerName !== null) {
316
- return outerName;
317
- }
318
-
319
- return getComponentNameFromType(type.type) || 'Memo';
320
-
321
- case REACT_LAZY_TYPE:
322
- {
323
- var lazyComponent = type;
324
- var payload = lazyComponent._payload;
325
- var init = lazyComponent._init;
326
-
327
- try {
328
- return getComponentNameFromType(init(payload));
329
- } catch (x) {
330
- return null;
331
- }
332
- }
333
- }
334
- }
335
-
336
- return null;
337
- }
338
-
339
- // $FlowFixMe[method-unbinding]
340
- var hasOwnProperty = Object.prototype.hasOwnProperty;
341
-
342
- var assign = Object.assign;
343
-
344
- var REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference');
345
- function isValidElementType(type) {
346
- if (typeof type === 'string' || typeof type === 'function') {
347
- return true;
348
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
349
-
350
-
351
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableTransitionTracing ) {
352
- return true;
353
- }
354
-
355
- if (typeof type === 'object' && type !== null) {
356
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || !enableRenderableContext || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
357
- // types supported by any Flight configuration anywhere since
358
- // we don't know which Flight build this will end up being used
359
- // with.
360
- type.$$typeof === REACT_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) {
361
- return true;
362
- }
363
- }
364
-
365
- return false;
366
- }
367
-
368
- // Helpers to patch console.logs to avoid logging during side-effect free
369
- // replaying on render function. This currently only patches the object
370
- // lazily which won't cover if the log function was extracted eagerly.
371
- // We could also eagerly patch the method.
372
- var disabledDepth = 0;
373
- var prevLog;
374
- var prevInfo;
375
- var prevWarn;
376
- var prevError;
377
- var prevGroup;
378
- var prevGroupCollapsed;
379
- var prevGroupEnd;
380
-
381
- function disabledLog() {}
382
-
383
- disabledLog.__reactDisabledLog = true;
384
- function disableLogs() {
385
- {
386
- if (disabledDepth === 0) {
387
- /* eslint-disable react-internal/no-production-logging */
388
- prevLog = console.log;
389
- prevInfo = console.info;
390
- prevWarn = console.warn;
391
- prevError = console.error;
392
- prevGroup = console.group;
393
- prevGroupCollapsed = console.groupCollapsed;
394
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
395
-
396
- var props = {
397
- configurable: true,
398
- enumerable: true,
399
- value: disabledLog,
400
- writable: true
401
- }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.
402
-
403
- Object.defineProperties(console, {
404
- info: props,
405
- log: props,
406
- warn: props,
407
- error: props,
408
- group: props,
409
- groupCollapsed: props,
410
- groupEnd: props
411
- });
412
- /* eslint-enable react-internal/no-production-logging */
413
- }
414
-
415
- disabledDepth++;
416
- }
417
- }
418
- function reenableLogs() {
419
- {
420
- disabledDepth--;
421
-
422
- if (disabledDepth === 0) {
423
- /* eslint-disable react-internal/no-production-logging */
424
- var props = {
425
- configurable: true,
426
- enumerable: true,
427
- writable: true
428
- }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.
429
-
430
- Object.defineProperties(console, {
431
- log: assign({}, props, {
432
- value: prevLog
433
- }),
434
- info: assign({}, props, {
435
- value: prevInfo
436
- }),
437
- warn: assign({}, props, {
438
- value: prevWarn
439
- }),
440
- error: assign({}, props, {
441
- value: prevError
442
- }),
443
- group: assign({}, props, {
444
- value: prevGroup
445
- }),
446
- groupCollapsed: assign({}, props, {
447
- value: prevGroupCollapsed
448
- }),
449
- groupEnd: assign({}, props, {
450
- value: prevGroupEnd
451
- })
452
- });
453
- /* eslint-enable react-internal/no-production-logging */
454
- }
455
-
456
- if (disabledDepth < 0) {
457
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
458
- }
459
- }
460
- }
461
-
462
- var prefix;
463
- function describeBuiltInComponentFrame(name) {
464
- {
465
- if (prefix === undefined) {
466
- // Extract the VM specific prefix used by each line.
467
- try {
468
- throw Error();
469
- } catch (x) {
470
- var match = x.stack.trim().match(/\n( *(at )?)/);
471
- prefix = match && match[1] || '';
472
- }
473
- } // We use the prefix to ensure our stacks line up with native stack frames.
474
-
475
-
476
- return '\n' + prefix + name;
477
- }
478
- }
479
- var reentry = false;
480
- var componentFrameCache;
481
-
482
- {
483
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
484
- componentFrameCache = new PossiblyWeakMap();
485
- }
486
- /**
487
- * Leverages native browser/VM stack frames to get proper details (e.g.
488
- * filename, line + col number) for a single component in a component stack. We
489
- * do this by:
490
- * (1) throwing and catching an error in the function - this will be our
491
- * control error.
492
- * (2) calling the component which will eventually throw an error that we'll
493
- * catch - this will be our sample error.
494
- * (3) diffing the control and sample error stacks to find the stack frame
495
- * which represents our component.
496
- */
497
-
498
-
499
- function describeNativeComponentFrame(fn, construct) {
500
- // If something asked for a stack inside a fake render, it should get ignored.
501
- if (!fn || reentry) {
502
- return '';
503
- }
504
-
505
- {
506
- var frame = componentFrameCache.get(fn);
507
-
508
- if (frame !== undefined) {
509
- return frame;
510
- }
511
- }
512
-
513
- reentry = true;
514
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.
515
-
516
- Error.prepareStackTrace = undefined;
517
- var previousDispatcher = null;
518
-
519
- {
520
- previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function
521
- // for warnings.
522
-
523
- ReactSharedInternals.H = null;
524
- disableLogs();
525
- }
526
- /**
527
- * Finding a common stack frame between sample and control errors can be
528
- * tricky given the different types and levels of stack trace truncation from
529
- * different JS VMs. So instead we'll attempt to control what that common
530
- * frame should be through this object method:
531
- * Having both the sample and control errors be in the function under the
532
- * `DescribeNativeComponentFrameRoot` property, + setting the `name` and
533
- * `displayName` properties of the function ensures that a stack
534
- * frame exists that has the method name `DescribeNativeComponentFrameRoot` in
535
- * it for both control and sample stacks.
536
- */
537
-
538
-
539
- var RunInRootFrame = {
540
- DetermineComponentFrameRoot: function () {
541
- var control;
542
-
543
- try {
544
- // This should throw.
545
- if (construct) {
546
- // Something should be setting the props in the constructor.
547
- var Fake = function () {
548
- throw Error();
549
- }; // $FlowFixMe[prop-missing]
550
-
551
-
552
- Object.defineProperty(Fake.prototype, 'props', {
553
- set: function () {
554
- // We use a throwing setter instead of frozen or non-writable props
555
- // because that won't throw in a non-strict mode function.
556
- throw Error();
557
- }
558
- });
559
-
560
- if (typeof Reflect === 'object' && Reflect.construct) {
561
- // We construct a different control for this case to include any extra
562
- // frames added by the construct call.
563
- try {
564
- Reflect.construct(Fake, []);
565
- } catch (x) {
566
- control = x;
567
- }
568
-
569
- Reflect.construct(fn, [], Fake);
570
- } else {
571
- try {
572
- Fake.call();
573
- } catch (x) {
574
- control = x;
575
- } // $FlowFixMe[prop-missing] found when upgrading Flow
576
-
577
-
578
- fn.call(Fake.prototype);
579
- }
580
- } else {
581
- try {
582
- throw Error();
583
- } catch (x) {
584
- control = x;
585
- } // TODO(luna): This will currently only throw if the function component
586
- // tries to access React/ReactDOM/props. We should probably make this throw
587
- // in simple components too
588
-
589
-
590
- var maybePromise = fn(); // If the function component returns a promise, it's likely an async
591
- // component, which we don't yet support. Attach a noop catch handler to
592
- // silence the error.
593
- // TODO: Implement component stacks for async client components?
594
-
595
- if (maybePromise && typeof maybePromise.catch === 'function') {
596
- maybePromise.catch(function () {});
597
- }
598
- }
599
- } catch (sample) {
600
- // This is inlined manually because closure doesn't do it for us.
601
- if (sample && control && typeof sample.stack === 'string') {
602
- return [sample.stack, control.stack];
603
- }
604
- }
605
-
606
- return [null, null];
607
- }
608
- }; // $FlowFixMe[prop-missing]
609
-
610
- RunInRootFrame.DetermineComponentFrameRoot.displayName = 'DetermineComponentFrameRoot';
611
- var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, 'name'); // Before ES6, the `name` property was not configurable.
612
-
613
- if (namePropDescriptor && namePropDescriptor.configurable) {
614
- // V8 utilizes a function's `name` property when generating a stack trace.
615
- Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, // Configurable properties can be updated even if its writable descriptor
616
- // is set to `false`.
617
- // $FlowFixMe[cannot-write]
618
- 'name', {
619
- value: 'DetermineComponentFrameRoot'
620
- });
621
- }
622
-
623
- try {
624
- var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
625
- sampleStack = _RunInRootFrame$Deter[0],
626
- controlStack = _RunInRootFrame$Deter[1];
627
-
628
- if (sampleStack && controlStack) {
629
- // This extracts the first frame from the sample that isn't also in the control.
630
- // Skipping one frame that we assume is the frame that calls the two.
631
- var sampleLines = sampleStack.split('\n');
632
- var controlLines = controlStack.split('\n');
633
- var s = 0;
634
- var c = 0;
635
-
636
- while (s < sampleLines.length && !sampleLines[s].includes('DetermineComponentFrameRoot')) {
637
- s++;
638
- }
639
-
640
- while (c < controlLines.length && !controlLines[c].includes('DetermineComponentFrameRoot')) {
641
- c++;
642
- } // We couldn't find our intentionally injected common root frame, attempt
643
- // to find another common root frame by search from the bottom of the
644
- // control stack...
645
-
646
-
647
- if (s === sampleLines.length || c === controlLines.length) {
648
- s = sampleLines.length - 1;
649
- c = controlLines.length - 1;
650
-
651
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
652
- // We expect at least one stack frame to be shared.
653
- // Typically this will be the root most one. However, stack frames may be
654
- // cut off due to maximum stack limits. In this case, one maybe cut off
655
- // earlier than the other. We assume that the sample is longer or the same
656
- // and there for cut off earlier. So we should find the root most frame in
657
- // the sample somewhere in the control.
658
- c--;
659
- }
660
- }
661
-
662
- for (; s >= 1 && c >= 0; s--, c--) {
663
- // Next we find the first one that isn't the same which should be the
664
- // frame that called our sample function and the control.
665
- if (sampleLines[s] !== controlLines[c]) {
666
- // In V8, the first line is describing the message but other VMs don't.
667
- // If we're about to return the first line, and the control is also on the same
668
- // line, that's a pretty good indicator that our sample threw at same line as
669
- // the control. I.e. before we entered the sample frame. So we ignore this result.
670
- // This can happen if you passed a class to function component, or non-function.
671
- if (s !== 1 || c !== 1) {
672
- do {
673
- s--;
674
- c--; // We may still have similar intermediate frames from the construct call.
675
- // The next one that isn't the same should be our match though.
676
-
677
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
678
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
679
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
680
- // but we have a user-provided "displayName"
681
- // splice it in to make the stack more readable.
682
-
683
-
684
- if (fn.displayName && _frame.includes('<anonymous>')) {
685
- _frame = _frame.replace('<anonymous>', fn.displayName);
686
- }
687
-
688
- if (true) {
689
- if (typeof fn === 'function') {
690
- componentFrameCache.set(fn, _frame);
691
- }
692
- } // Return the line we found.
693
-
694
-
695
- return _frame;
696
- }
697
- } while (s >= 1 && c >= 0);
698
- }
699
-
700
- break;
701
- }
702
- }
703
- }
704
- } finally {
705
- reentry = false;
706
-
707
- {
708
- ReactSharedInternals.H = previousDispatcher;
709
- reenableLogs();
710
- }
711
-
712
- Error.prepareStackTrace = previousPrepareStackTrace;
713
- } // Fallback to just using the name if we couldn't make it throw.
714
-
715
-
716
- var name = fn ? fn.displayName || fn.name : '';
717
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
718
-
719
- {
720
- if (typeof fn === 'function') {
721
- componentFrameCache.set(fn, syntheticFrame);
722
- }
723
- }
724
-
725
- return syntheticFrame;
726
- }
727
- function describeFunctionComponentFrame(fn) {
728
- {
729
- return describeNativeComponentFrame(fn, false);
730
- }
731
- }
732
-
733
- function shouldConstruct(Component) {
734
- var prototype = Component.prototype;
735
- return !!(prototype && prototype.isReactComponent);
736
- }
737
-
738
- function describeUnknownElementTypeFrameInDEV(type) {
739
-
740
- if (type == null) {
741
- return '';
742
- }
743
-
744
- if (typeof type === 'function') {
745
- {
746
- return describeNativeComponentFrame(type, shouldConstruct(type));
747
- }
748
- }
749
-
750
- if (typeof type === 'string') {
751
- return describeBuiltInComponentFrame(type);
752
- }
753
-
754
- switch (type) {
755
- case REACT_SUSPENSE_TYPE:
756
- return describeBuiltInComponentFrame('Suspense');
757
-
758
- case REACT_SUSPENSE_LIST_TYPE:
759
- return describeBuiltInComponentFrame('SuspenseList');
760
- }
761
-
762
- if (typeof type === 'object') {
763
- switch (type.$$typeof) {
764
- case REACT_FORWARD_REF_TYPE:
765
- return describeFunctionComponentFrame(type.render);
766
-
767
- case REACT_MEMO_TYPE:
768
- // Memo may contain any component type so we recursively resolve it.
769
- return describeUnknownElementTypeFrameInDEV(type.type);
770
-
771
- case REACT_LAZY_TYPE:
772
- {
773
- var lazyComponent = type;
774
- var payload = lazyComponent._payload;
775
- var init = lazyComponent._init;
776
-
777
- try {
778
- // Lazy may contain any component type so we recursively resolve it.
779
- return describeUnknownElementTypeFrameInDEV(init(payload));
780
- } catch (x) {}
781
- }
782
- }
783
- }
784
-
785
- return '';
786
- }
787
-
788
- var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
789
-
790
- function getOwner() {
791
- {
792
- var dispatcher = ReactSharedInternals.A;
793
-
794
- if (dispatcher === null) {
795
- return null;
796
- }
797
-
798
- return dispatcher.getOwner();
799
- }
800
- }
801
-
802
- var specialPropKeyWarningShown;
803
- var didWarnAboutElementRef;
804
- var didWarnAboutOldJSXRuntime;
805
-
806
- {
807
- didWarnAboutElementRef = {};
808
- }
809
-
810
- function hasValidRef(config) {
811
- {
812
- if (hasOwnProperty.call(config, 'ref')) {
813
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
814
-
815
- if (getter && getter.isReactWarning) {
816
- return false;
817
- }
818
- }
819
- }
820
-
821
- return config.ref !== undefined;
822
- }
823
-
824
- function hasValidKey(config) {
825
- {
826
- if (hasOwnProperty.call(config, 'key')) {
827
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
828
-
829
- if (getter && getter.isReactWarning) {
830
- return false;
831
- }
832
- }
833
- }
834
-
835
- return config.key !== undefined;
836
- }
837
-
838
- function defineKeyPropWarningGetter(props, displayName) {
839
- {
840
- var warnAboutAccessingKey = function () {
841
- if (!specialPropKeyWarningShown) {
842
- specialPropKeyWarningShown = true;
843
-
844
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://react.dev/link/special-props)', displayName);
845
- }
846
- };
847
-
848
- warnAboutAccessingKey.isReactWarning = true;
849
- Object.defineProperty(props, 'key', {
850
- get: warnAboutAccessingKey,
851
- configurable: true
852
- });
853
- }
854
- }
855
-
856
- function elementRefGetterWithDeprecationWarning() {
857
- {
858
- var componentName = getComponentNameFromType(this.type);
859
-
860
- if (!didWarnAboutElementRef[componentName]) {
861
- didWarnAboutElementRef[componentName] = true;
862
-
863
- error('Accessing element.ref was removed in React 19. ref is now a ' + 'regular prop. It will be removed from the JSX Element ' + 'type in a future release.');
864
- } // An undefined `element.ref` is coerced to `null` for
865
- // backwards compatibility.
866
-
867
-
868
- var refProp = this.props.ref;
869
- return refProp !== undefined ? refProp : null;
870
- }
871
- }
872
- /**
873
- * Factory method to create a new React element. This no longer adheres to
874
- * the class pattern, so do not use new to call it. Also, instanceof check
875
- * will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check
876
- * if something is a React Element.
877
- *
878
- * @param {*} type
879
- * @param {*} props
880
- * @param {*} key
881
- * @param {string|object} ref
882
- * @param {*} owner
883
- * @param {*} self A *temporary* helper to detect places where `this` is
884
- * different from the `owner` when React.createElement is called, so that we
885
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
886
- * functions, and as long as `this` and owner are the same, there will be no
887
- * change in behavior.
888
- * @param {*} source An annotation object (added by a transpiler or otherwise)
889
- * indicating filename, line number, and/or other information.
890
- * @internal
891
- */
892
-
893
-
894
- function ReactElement(type, key, _ref, self, source, owner, props) {
895
- var ref;
896
-
897
- {
898
- // When enableRefAsProp is on, ignore whatever was passed as the ref
899
- // argument and treat `props.ref` as the source of truth. The only thing we
900
- // use this for is `element.ref`, which will log a deprecation warning on
901
- // access. In the next release, we can remove `element.ref` as well as the
902
- // `ref` argument.
903
- var refProp = props.ref; // An undefined `element.ref` is coerced to `null` for
904
- // backwards compatibility.
905
-
906
- ref = refProp !== undefined ? refProp : null;
907
- }
908
-
909
- var element;
910
-
911
- {
912
- // In dev, make `ref` a non-enumerable property with a warning. It's non-
913
- // enumerable so that test matchers and serializers don't access it and
914
- // trigger the warning.
915
- //
916
- // `ref` will be removed from the element completely in a future release.
917
- element = {
918
- // This tag allows us to uniquely identify this as a React Element
919
- $$typeof: REACT_ELEMENT_TYPE,
920
- // Built-in properties that belong on the element
921
- type: type,
922
- key: key,
923
- props: props,
924
- // Record the component responsible for creating this element.
925
- _owner: owner
926
- };
927
-
928
- if (ref !== null) {
929
- Object.defineProperty(element, 'ref', {
930
- enumerable: false,
931
- get: elementRefGetterWithDeprecationWarning
932
- });
933
- } else {
934
- // Don't warn on access if a ref is not given. This reduces false
935
- // positives in cases where a test serializer uses
936
- // getOwnPropertyDescriptors to compare objects, like Jest does, which is
937
- // a problem because it bypasses non-enumerability.
938
- //
939
- // So unfortunately this will trigger a false positive warning in Jest
940
- // when the diff is printed:
941
- //
942
- // expect(<div ref={ref} />).toEqual(<span ref={ref} />);
943
- //
944
- // A bit sketchy, but this is what we've done for the `props.key` and
945
- // `props.ref` accessors for years, which implies it will be good enough
946
- // for `element.ref`, too. Let's see if anyone complains.
947
- Object.defineProperty(element, 'ref', {
948
- enumerable: false,
949
- value: null
950
- });
951
- }
952
- }
953
-
954
- {
955
- // The validation flag is currently mutative. We put it on
956
- // an external backing store so that we can freeze the whole object.
957
- // This can be replaced with a WeakMap once they are implemented in
958
- // commonly used development environments.
959
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
960
- // the validation flag non-enumerable (where possible, which should
961
- // include every environment we run tests in), so the test framework
962
- // ignores it.
963
-
964
- Object.defineProperty(element._store, 'validated', {
965
- configurable: false,
966
- enumerable: false,
967
- writable: true,
968
- value: false
969
- }); // debugInfo contains Server Component debug information.
970
-
971
- Object.defineProperty(element, '_debugInfo', {
972
- configurable: false,
973
- enumerable: false,
974
- writable: true,
975
- value: null
976
- });
977
-
978
- if (Object.freeze) {
979
- Object.freeze(element.props);
980
- Object.freeze(element);
981
- }
982
- }
983
-
984
- return element;
985
- }
986
- /**
987
- * Create and return a new ReactElement of the given type.
988
- * See https://reactjs.org/docs/react-api.html#createelement
989
- */
990
-
991
- function createElement(type, config, children) {
992
- {
993
- if (!isValidElementType(type)) {
994
- // This is an invalid element type.
995
- //
996
- // We warn in this case but don't throw. We expect the element creation to
997
- // succeed and there will likely be errors in render.
998
- var info = '';
999
-
1000
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1001
- 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.";
1002
- }
1003
-
1004
- var typeString;
1005
-
1006
- if (type === null) {
1007
- typeString = 'null';
1008
- } else if (isArray(type)) {
1009
- typeString = 'array';
1010
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
1011
- typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
1012
- info = ' Did you accidentally export a JSX literal instead of a component?';
1013
- } else {
1014
- typeString = typeof type;
1015
- }
1016
-
1017
- error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
1018
- } else {
1019
- // This is a valid element type.
1020
- // Skip key warning if the type isn't valid since our key validation logic
1021
- // doesn't expect a non-string/function type and can throw confusing
1022
- // errors. We don't want exception behavior to differ between dev and
1023
- // prod. (Rendering will throw with a helpful message and as soon as the
1024
- // type is fixed, the key warnings will appear.)
1025
- for (var i = 2; i < arguments.length; i++) {
1026
- validateChildKeys(arguments[i], type);
1027
- }
1028
- } // Unlike the jsx() runtime, createElement() doesn't warn about key spread.
1029
-
1030
- }
1031
-
1032
- var propName; // Reserved names are extracted
1033
-
1034
- var props = {};
1035
- var key = null;
1036
- var ref = null;
1037
-
1038
- if (config != null) {
1039
- {
1040
- if (!didWarnAboutOldJSXRuntime && '__self' in config && // Do not assume this is the result of an oudated JSX transform if key
1041
- // is present, because the modern JSX transform sometimes outputs
1042
- // createElement to preserve precedence between a static key and a
1043
- // spread key. To avoid false positive warnings, we never warn if
1044
- // there's a key.
1045
- !('key' in config)) {
1046
- didWarnAboutOldJSXRuntime = true;
1047
-
1048
- warn('Your app (or one of its dependencies) is using an outdated JSX ' + 'transform. Update to the modern JSX transform for ' + 'faster performance: https://react.dev/link/new-jsx-transform');
1049
- }
1050
- }
1051
-
1052
- if (hasValidRef(config)) ;
1053
-
1054
- if (hasValidKey(config)) {
1055
- {
1056
- checkKeyStringCoercion(config.key);
1057
- }
1058
-
1059
- key = '' + config.key;
1060
- } // Remaining properties are added to a new props object
1061
-
1062
-
1063
- for (propName in config) {
1064
- if (hasOwnProperty.call(config, propName) && // Skip over reserved prop names
1065
- propName !== 'key' && (enableRefAsProp ) && // Even though we don't use these anymore in the runtime, we don't want
1066
- // them to appear as props, so in createElement we filter them out.
1067
- // We don't have to do this in the jsx() runtime because the jsx()
1068
- // transform never passed these as props; it used separate arguments.
1069
- propName !== '__self' && propName !== '__source') {
1070
- {
1071
- props[propName] = config[propName];
1072
- }
1073
- }
1074
- }
1075
- } // Children can be more than one argument, and those are transferred onto
1076
- // the newly allocated props object.
1077
-
1078
-
1079
- var childrenLength = arguments.length - 2;
1080
-
1081
- if (childrenLength === 1) {
1082
- props.children = children;
1083
- } else if (childrenLength > 1) {
1084
- var childArray = Array(childrenLength);
1085
-
1086
- for (var _i = 0; _i < childrenLength; _i++) {
1087
- childArray[_i] = arguments[_i + 2];
1088
- }
1089
-
1090
- {
1091
- if (Object.freeze) {
1092
- Object.freeze(childArray);
1093
- }
1094
- }
1095
-
1096
- props.children = childArray;
1097
- } // Resolve default props
1098
-
1099
-
1100
- if (type && type.defaultProps) {
1101
- var defaultProps = type.defaultProps;
1102
-
1103
- for (propName in defaultProps) {
1104
- if (props[propName] === undefined) {
1105
- props[propName] = defaultProps[propName];
1106
- }
1107
- }
1108
- }
1109
-
1110
- {
1111
- if (key || !enableRefAsProp ) {
1112
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1113
-
1114
- if (key) {
1115
- defineKeyPropWarningGetter(props, displayName);
1116
- }
1117
- }
1118
- }
1119
-
1120
- var element = ReactElement(type, key, ref, undefined, undefined, getOwner(), props);
1121
-
1122
- if (type === REACT_FRAGMENT_TYPE) {
1123
- validateFragmentProps(element);
1124
- }
1125
-
1126
- return element;
1127
- }
1128
- function cloneAndReplaceKey(oldElement, newKey) {
1129
- return ReactElement(oldElement.type, newKey, // When enableRefAsProp is on, this argument is ignored. This check only
1130
- // exists to avoid the `ref` access warning.
1131
- null , undefined, undefined, oldElement._owner, oldElement.props);
1132
- }
1133
- /**
1134
- * Clone and return a new ReactElement using element as the starting point.
1135
- * See https://reactjs.org/docs/react-api.html#cloneelement
1136
- */
1137
-
1138
- function cloneElement(element, config, children) {
1139
- if (element === null || element === undefined) {
1140
- throw new Error("The argument must be a React element, but you passed " + element + ".");
1141
- }
1142
-
1143
- var propName; // Original props are copied
1144
-
1145
- var props = assign({}, element.props); // Reserved names are extracted
1146
-
1147
- var key = element.key;
1148
- var ref = null ; // Owner will be preserved, unless ref is overridden
1149
-
1150
- var owner = element._owner;
1151
-
1152
- if (config != null) {
1153
- if (hasValidRef(config)) {
1154
- owner = getOwner() ;
1155
- }
1156
-
1157
- if (hasValidKey(config)) {
1158
- {
1159
- checkKeyStringCoercion(config.key);
1160
- }
1161
-
1162
- key = '' + config.key;
1163
- } // Remaining properties override existing props
1164
-
1165
- for (propName in config) {
1166
- if (hasOwnProperty.call(config, propName) && // Skip over reserved prop names
1167
- propName !== 'key' && (enableRefAsProp ) && // ...and maybe these, too, though we currently rely on them for
1168
- // warnings and debug information in dev. Need to decide if we're OK
1169
- // with dropping them. In the jsx() runtime it's not an issue because
1170
- // the data gets passed as separate arguments instead of props, but
1171
- // it would be nice to stop relying on them entirely so we can drop
1172
- // them from the internal Fiber field.
1173
- propName !== '__self' && propName !== '__source' && // Undefined `ref` is ignored by cloneElement. We treat it the same as
1174
- // if the property were missing. This is mostly for
1175
- // backwards compatibility.
1176
- !(propName === 'ref' && config.ref === undefined)) {
1177
- {
1178
- {
1179
- props[propName] = config[propName];
1180
- }
1181
- }
1182
- }
1183
- }
1184
- } // Children can be more than one argument, and those are transferred onto
1185
- // the newly allocated props object.
1186
-
1187
-
1188
- var childrenLength = arguments.length - 2;
1189
-
1190
- if (childrenLength === 1) {
1191
- props.children = children;
1192
- } else if (childrenLength > 1) {
1193
- var childArray = Array(childrenLength);
1194
-
1195
- for (var i = 0; i < childrenLength; i++) {
1196
- childArray[i] = arguments[i + 2];
1197
- }
1198
-
1199
- props.children = childArray;
1200
- }
1201
-
1202
- var clonedElement = ReactElement(element.type, key, ref, undefined, undefined, owner, props);
1203
-
1204
- for (var _i2 = 2; _i2 < arguments.length; _i2++) {
1205
- validateChildKeys(arguments[_i2], clonedElement.type);
1206
- }
1207
-
1208
- return clonedElement;
1209
- }
1210
-
1211
- function getDeclarationErrorAddendum() {
1212
- {
1213
- var owner = getOwner();
1214
-
1215
- if (owner) {
1216
- var name = getComponentNameFromType(owner.type);
1217
-
1218
- if (name) {
1219
- return '\n\nCheck the render method of `' + name + '`.';
1220
- }
1221
- }
1222
-
1223
- return '';
1224
- }
1225
- }
1226
- /**
1227
- * Ensure that every element either is passed in a static location, in an
1228
- * array with an explicit keys property defined, or in an object literal
1229
- * with valid key property.
1230
- *
1231
- * @internal
1232
- * @param {ReactNode} node Statically passed child of any type.
1233
- * @param {*} parentType node's parent's type.
1234
- */
1235
-
1236
-
1237
- function validateChildKeys(node, parentType) {
1238
- {
1239
- if (typeof node !== 'object' || !node) {
1240
- return;
1241
- }
1242
-
1243
- if (node.$$typeof === REACT_CLIENT_REFERENCE) ; else if (isArray(node)) {
1244
- for (var i = 0; i < node.length; i++) {
1245
- var child = node[i];
1246
-
1247
- if (isValidElement(child)) {
1248
- validateExplicitKey(child, parentType);
1249
- }
1250
- }
1251
- } else if (isValidElement(node)) {
1252
- // This element was passed in a valid location.
1253
- if (node._store) {
1254
- node._store.validated = true;
1255
- }
1256
- } else {
1257
- var iteratorFn = getIteratorFn(node);
1258
-
1259
- if (typeof iteratorFn === 'function') {
1260
- // Entry iterators used to provide implicit keys,
1261
- // but now we print a separate warning for them later.
1262
- if (iteratorFn !== node.entries) {
1263
- var iterator = iteratorFn.call(node);
1264
-
1265
- if (iterator !== node) {
1266
- var step;
1267
-
1268
- while (!(step = iterator.next()).done) {
1269
- if (isValidElement(step.value)) {
1270
- validateExplicitKey(step.value, parentType);
1271
- }
1272
- }
1273
- }
1274
- }
1275
- }
1276
- }
1277
- }
1278
- }
1279
- /**
1280
- * Verifies the object is a ReactElement.
1281
- * See https://reactjs.org/docs/react-api.html#isvalidelement
1282
- * @param {?object} object
1283
- * @return {boolean} True if `object` is a ReactElement.
1284
- * @final
1285
- */
1286
-
1287
-
1288
- function isValidElement(object) {
1289
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1290
- }
1291
- var ownerHasKeyUseWarning = {};
1292
- /**
1293
- * Warn if the element doesn't have an explicit key assigned to it.
1294
- * This element is in an array. The array could grow and shrink or be
1295
- * reordered. All children that haven't already been validated are required to
1296
- * have a "key" property assigned to it. Error statuses are cached so a warning
1297
- * will only be shown once.
1298
- *
1299
- * @internal
1300
- * @param {ReactElement} element Element that requires a key.
1301
- * @param {*} parentType element's parent's type.
1302
- */
1303
-
1304
- function validateExplicitKey(element, parentType) {
1305
- {
1306
- if (!element._store || element._store.validated || element.key != null) {
1307
- return;
1308
- }
1309
-
1310
- element._store.validated = true;
1311
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1312
-
1313
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1314
- return;
1315
- }
1316
-
1317
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
1318
- // property, it may be the creator of the child that's responsible for
1319
- // assigning it a key.
1320
-
1321
- var childOwner = '';
1322
-
1323
- if (element && element._owner != null && element._owner !== getOwner()) {
1324
- var ownerName = null;
1325
-
1326
- if (typeof element._owner.tag === 'number') {
1327
- ownerName = getComponentNameFromType(element._owner.type);
1328
- } else if (typeof element._owner.name === 'string') {
1329
- ownerName = element._owner.name;
1330
- } // Give the component that originally created this child.
1331
-
1332
-
1333
- childOwner = " It was passed a child from " + ownerName + ".";
1334
- }
1335
-
1336
- setCurrentlyValidatingElement(element);
1337
-
1338
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
1339
-
1340
- setCurrentlyValidatingElement(null);
1341
- }
1342
- }
1343
-
1344
- function setCurrentlyValidatingElement(element) {
1345
- {
1346
- if (element) {
1347
- var stack = describeUnknownElementTypeFrameInDEV(element.type);
1348
- ReactSharedInternals.setExtraStackFrame(stack);
1349
- } else {
1350
- ReactSharedInternals.setExtraStackFrame(null);
1351
- }
1352
- }
1353
- }
1354
-
1355
- function getCurrentComponentErrorInfo(parentType) {
1356
- {
1357
- var info = getDeclarationErrorAddendum();
1358
-
1359
- if (!info) {
1360
- var parentName = getComponentNameFromType(parentType);
1361
-
1362
- if (parentName) {
1363
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1364
- }
1365
- }
1366
-
1367
- return info;
1368
- }
1369
- }
1370
- /**
1371
- * Given a fragment, validate that it can only be provided with fragment props
1372
- * @param {ReactElement} fragment
1373
- */
1374
-
1375
-
1376
- function validateFragmentProps(fragment) {
1377
- // TODO: Move this to render phase instead of at element creation.
1378
- {
1379
- var keys = Object.keys(fragment.props);
1380
-
1381
- for (var i = 0; i < keys.length; i++) {
1382
- var key = keys[i];
1383
-
1384
- if (key !== 'children' && key !== 'key') {
1385
- setCurrentlyValidatingElement(fragment);
1386
-
1387
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
1388
-
1389
- setCurrentlyValidatingElement(null);
1390
- break;
1391
- }
1392
- }
1393
- }
1394
- }
1395
-
1396
- var SEPARATOR = '.';
1397
- var SUBSEPARATOR = ':';
1398
- /**
1399
- * Escape and wrap key so it is safe to use as a reactid
1400
- *
1401
- * @param {string} key to be escaped.
1402
- * @return {string} the escaped key.
1403
- */
1404
-
1405
- function escape(key) {
1406
- var escapeRegex = /[=:]/g;
1407
- var escaperLookup = {
1408
- '=': '=0',
1409
- ':': '=2'
1410
- };
1411
- var escapedString = key.replace(escapeRegex, function (match) {
1412
- return escaperLookup[match];
1413
- });
1414
- return '$' + escapedString;
1415
- }
1416
- /**
1417
- * TODO: Test that a single child and an array with one item have the same key
1418
- * pattern.
1419
- */
1420
-
1421
-
1422
- var didWarnAboutMaps = false;
1423
- var userProvidedKeyEscapeRegex = /\/+/g;
1424
-
1425
- function escapeUserProvidedKey(text) {
1426
- return text.replace(userProvidedKeyEscapeRegex, '$&/');
1427
- }
1428
- /**
1429
- * Generate a key string that identifies a element within a set.
1430
- *
1431
- * @param {*} element A element that could contain a manual key.
1432
- * @param {number} index Index that is used if a manual key is not provided.
1433
- * @return {string}
1434
- */
1435
-
1436
-
1437
- function getElementKey(element, index) {
1438
- // Do some typechecking here since we call this blindly. We want to ensure
1439
- // that we don't block potential future ES APIs.
1440
- if (typeof element === 'object' && element !== null && element.key != null) {
1441
- // Explicit key
1442
- {
1443
- checkKeyStringCoercion(element.key);
1444
- }
1445
-
1446
- return escape('' + element.key);
1447
- } // Implicit key determined by the index in the set
1448
-
1449
-
1450
- return index.toString(36);
1451
- }
1452
-
1453
- function noop$1() {}
1454
-
1455
- function resolveThenable(thenable) {
1456
- switch (thenable.status) {
1457
- case 'fulfilled':
1458
- {
1459
- var fulfilledValue = thenable.value;
1460
- return fulfilledValue;
1461
- }
1462
-
1463
- case 'rejected':
1464
- {
1465
- var rejectedError = thenable.reason;
1466
- throw rejectedError;
1467
- }
1468
-
1469
- default:
1470
- {
1471
- if (typeof thenable.status === 'string') {
1472
- // Only instrument the thenable if the status if not defined. If
1473
- // it's defined, but an unknown value, assume it's been instrumented by
1474
- // some custom userspace implementation. We treat it as "pending".
1475
- // Attach a dummy listener, to ensure that any lazy initialization can
1476
- // happen. Flight lazily parses JSON when the value is actually awaited.
1477
- thenable.then(noop$1, noop$1);
1478
- } else {
1479
- // This is an uncached thenable that we haven't seen before.
1480
- // TODO: Detect infinite ping loops caused by uncached promises.
1481
- var pendingThenable = thenable;
1482
- pendingThenable.status = 'pending';
1483
- pendingThenable.then(function (fulfilledValue) {
1484
- if (thenable.status === 'pending') {
1485
- var fulfilledThenable = thenable;
1486
- fulfilledThenable.status = 'fulfilled';
1487
- fulfilledThenable.value = fulfilledValue;
1488
- }
1489
- }, function (error) {
1490
- if (thenable.status === 'pending') {
1491
- var rejectedThenable = thenable;
1492
- rejectedThenable.status = 'rejected';
1493
- rejectedThenable.reason = error;
1494
- }
1495
- });
1496
- } // Check one more time in case the thenable resolved synchronously.
1497
-
1498
-
1499
- switch (thenable.status) {
1500
- case 'fulfilled':
1501
- {
1502
- var fulfilledThenable = thenable;
1503
- return fulfilledThenable.value;
1504
- }
1505
-
1506
- case 'rejected':
1507
- {
1508
- var rejectedThenable = thenable;
1509
- var _rejectedError = rejectedThenable.reason;
1510
- throw _rejectedError;
1511
- }
1512
- }
1513
- }
1514
- }
1515
-
1516
- throw thenable;
1517
- }
1518
-
1519
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
1520
- var type = typeof children;
1521
-
1522
- if (type === 'undefined' || type === 'boolean') {
1523
- // All of the above are perceived as null.
1524
- children = null;
1525
- }
1526
-
1527
- var invokeCallback = false;
1528
-
1529
- if (children === null) {
1530
- invokeCallback = true;
1531
- } else {
1532
- switch (type) {
1533
- case 'bigint':
1534
- case 'string':
1535
- case 'number':
1536
- invokeCallback = true;
1537
- break;
1538
-
1539
- case 'object':
1540
- switch (children.$$typeof) {
1541
- case REACT_ELEMENT_TYPE:
11
+ "use strict";
12
+ "production" !== process.env.NODE_ENV &&
13
+ (function () {
14
+ function getIteratorFn(maybeIterable) {
15
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
16
+ return null;
17
+ maybeIterable =
18
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
19
+ maybeIterable["@@iterator"];
20
+ return "function" === typeof maybeIterable ? maybeIterable : null;
21
+ }
22
+ function testStringCoercion(value) {
23
+ return "" + value;
24
+ }
25
+ function checkKeyStringCoercion(value) {
26
+ try {
27
+ testStringCoercion(value);
28
+ var JSCompiler_inline_result = !1;
29
+ } catch (e) {
30
+ JSCompiler_inline_result = !0;
31
+ }
32
+ if (JSCompiler_inline_result) {
33
+ JSCompiler_inline_result = console;
34
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
35
+ var JSCompiler_inline_result$jscomp$0 =
36
+ ("function" === typeof Symbol &&
37
+ Symbol.toStringTag &&
38
+ value[Symbol.toStringTag]) ||
39
+ value.constructor.name ||
40
+ "Object";
41
+ JSCompiler_temp_const.call(
42
+ JSCompiler_inline_result,
43
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
44
+ JSCompiler_inline_result$jscomp$0
45
+ );
46
+ return testStringCoercion(value);
47
+ }
48
+ }
49
+ function getComponentNameFromType(type) {
50
+ if (null == type) return null;
51
+ if ("function" === typeof type)
52
+ return type.$$typeof === REACT_CLIENT_REFERENCE
53
+ ? null
54
+ : type.displayName || type.name || null;
55
+ if ("string" === typeof type) return type;
56
+ switch (type) {
57
+ case REACT_FRAGMENT_TYPE:
58
+ return "Fragment";
59
+ case REACT_PROFILER_TYPE:
60
+ return "Profiler";
61
+ case REACT_STRICT_MODE_TYPE:
62
+ return "StrictMode";
63
+ case REACT_SUSPENSE_TYPE:
64
+ return "Suspense";
65
+ case REACT_SUSPENSE_LIST_TYPE:
66
+ return "SuspenseList";
67
+ case REACT_ACTIVITY_TYPE:
68
+ return "Activity";
69
+ }
70
+ if ("object" === typeof type)
71
+ switch (
72
+ ("number" === typeof type.tag &&
73
+ console.error(
74
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
75
+ ),
76
+ type.$$typeof)
77
+ ) {
1542
78
  case REACT_PORTAL_TYPE:
1543
- invokeCallback = true;
1544
- break;
1545
-
79
+ return "Portal";
80
+ case REACT_CONTEXT_TYPE:
81
+ return (type.displayName || "Context") + ".Provider";
82
+ case REACT_CONSUMER_TYPE:
83
+ return (type._context.displayName || "Context") + ".Consumer";
84
+ case REACT_FORWARD_REF_TYPE:
85
+ var innerType = type.render;
86
+ type = type.displayName;
87
+ type ||
88
+ ((type = innerType.displayName || innerType.name || ""),
89
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
90
+ return type;
91
+ case REACT_MEMO_TYPE:
92
+ return (
93
+ (innerType = type.displayName || null),
94
+ null !== innerType
95
+ ? innerType
96
+ : getComponentNameFromType(type.type) || "Memo"
97
+ );
1546
98
  case REACT_LAZY_TYPE:
1547
- var payload = children._payload;
1548
- var init = children._init;
1549
- return mapIntoArray(init(payload), array, escapedPrefix, nameSoFar, callback);
1550
- }
1551
-
1552
- }
1553
- }
1554
-
1555
- if (invokeCallback) {
1556
- var _child = children;
1557
- var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
1558
- // so that it's consistent if the number of children grows:
1559
-
1560
- var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
1561
-
1562
- if (isArray(mappedChild)) {
1563
- var escapedChildKey = '';
1564
-
1565
- if (childKey != null) {
1566
- escapedChildKey = escapeUserProvidedKey(childKey) + '/';
1567
- }
1568
-
1569
- mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
1570
- return c;
1571
- });
1572
- } else if (mappedChild != null) {
1573
- if (isValidElement(mappedChild)) {
1574
- {
1575
- // The `if` statement here prevents auto-disabling of the safe
1576
- // coercion ESLint rule, so we must manually disable it below.
1577
- // $FlowFixMe[incompatible-type] Flow incorrectly thinks React.Portal doesn't have a key
1578
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
1579
- checkKeyStringCoercion(mappedChild.key);
1580
- }
99
+ innerType = type._payload;
100
+ type = type._init;
101
+ try {
102
+ return getComponentNameFromType(type(innerType));
103
+ } catch (x) {}
1581
104
  }
1582
-
1583
- mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
1584
- // traverseAllChildren used to do for objects as children
1585
- escapedPrefix + ( // $FlowFixMe[incompatible-type] Flow incorrectly thinks React.Portal doesn't have a key
1586
- mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey( // $FlowFixMe[unsafe-addition]
1587
- '' + mappedChild.key // eslint-disable-line react-internal/safe-string-coercion
1588
- ) + '/' : '') + childKey);
1589
- }
1590
-
1591
- array.push(mappedChild);
1592
- }
1593
-
1594
- return 1;
1595
- }
1596
-
1597
- var child;
1598
- var nextName;
1599
- var subtreeCount = 0; // Count of children found in the current subtree.
1600
-
1601
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1602
-
1603
- if (isArray(children)) {
1604
- for (var i = 0; i < children.length; i++) {
1605
- child = children[i];
1606
- nextName = nextNamePrefix + getElementKey(child, i);
1607
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
105
+ return null;
1608
106
  }
1609
- } else {
1610
- var iteratorFn = getIteratorFn(children);
1611
-
1612
- if (typeof iteratorFn === 'function') {
1613
- var iterableChildren = children;
1614
-
1615
- {
1616
- // Warn about using Maps as children
1617
- if (iteratorFn === iterableChildren.entries) {
1618
- if (!didWarnAboutMaps) {
1619
- warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
1620
- }
1621
-
1622
- didWarnAboutMaps = true;
1623
- }
1624
- }
1625
-
1626
- var iterator = iteratorFn.call(iterableChildren);
1627
- var step;
1628
- var ii = 0; // $FlowFixMe[incompatible-use] `iteratorFn` might return null according to typing.
1629
-
1630
- while (!(step = iterator.next()).done) {
1631
- child = step.value;
1632
- nextName = nextNamePrefix + getElementKey(child, ii++);
1633
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
107
+ function getTaskName(type) {
108
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
109
+ if (
110
+ "object" === typeof type &&
111
+ null !== type &&
112
+ type.$$typeof === REACT_LAZY_TYPE
113
+ )
114
+ return "<...>";
115
+ try {
116
+ var name = getComponentNameFromType(type);
117
+ return name ? "<" + name + ">" : "<...>";
118
+ } catch (x) {
119
+ return "<...>";
1634
120
  }
1635
- } else if (type === 'object') {
1636
- if (typeof children.then === 'function') {
1637
- return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
1638
- } // eslint-disable-next-line react-internal/safe-string-coercion
1639
-
1640
-
1641
- var childrenString = String(children);
1642
- throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
1643
- }
1644
- }
1645
-
1646
- return subtreeCount;
1647
- }
1648
- /**
1649
- * Maps children that are typically specified as `props.children`.
1650
- *
1651
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
1652
- *
1653
- * The provided mapFunction(child, index) will be called for each
1654
- * leaf child.
1655
- *
1656
- * @param {?*} children Children tree container.
1657
- * @param {function(*, int)} func The map function.
1658
- * @param {*} context Context for mapFunction.
1659
- * @return {object} Object containing the ordered map of results.
1660
- */
1661
-
1662
-
1663
- function mapChildren(children, func, context) {
1664
- if (children == null) {
1665
- // $FlowFixMe limitation refining abstract types in Flow
1666
- return children;
1667
- }
1668
-
1669
- var result = [];
1670
- var count = 0;
1671
- mapIntoArray(children, result, '', '', function (child) {
1672
- return func.call(context, child, count++);
1673
- });
1674
- return result;
1675
- }
1676
- /**
1677
- * Count the number of children that are typically specified as
1678
- * `props.children`.
1679
- *
1680
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
1681
- *
1682
- * @param {?*} children Children tree container.
1683
- * @return {number} The number of children.
1684
- */
1685
-
1686
-
1687
- function countChildren(children) {
1688
- var n = 0;
1689
- mapChildren(children, function () {
1690
- n++; // Don't return anything
1691
- });
1692
- return n;
1693
- }
1694
- /**
1695
- * Iterates through children that are typically specified as `props.children`.
1696
- *
1697
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
1698
- *
1699
- * The provided forEachFunc(child, index) will be called for each
1700
- * leaf child.
1701
- *
1702
- * @param {?*} children Children tree container.
1703
- * @param {function(*, int)} forEachFunc
1704
- * @param {*} forEachContext Context for forEachContext.
1705
- */
1706
-
1707
-
1708
- function forEachChildren(children, forEachFunc, forEachContext) {
1709
- mapChildren(children, // $FlowFixMe[missing-this-annot]
1710
- function () {
1711
- forEachFunc.apply(this, arguments); // Don't return anything.
1712
- }, forEachContext);
1713
- }
1714
- /**
1715
- * Flatten a children object (typically specified as `props.children`) and
1716
- * return an array with appropriately re-keyed children.
1717
- *
1718
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1719
- */
1720
-
1721
-
1722
- function toArray(children) {
1723
- return mapChildren(children, function (child) {
1724
- return child;
1725
- }) || [];
1726
- }
1727
- /**
1728
- * Returns the first child in a collection of children and verifies that there
1729
- * is only one child in the collection.
1730
- *
1731
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1732
- *
1733
- * The current implementation of this function assumes that a single child gets
1734
- * passed without a wrapper, but the purpose of this helper function is to
1735
- * abstract away the particular structure of children.
1736
- *
1737
- * @param {?object} children Child collection structure.
1738
- * @return {ReactElement} The first and only `ReactElement` contained in the
1739
- * structure.
1740
- */
1741
-
1742
-
1743
- function onlyChild(children) {
1744
- if (!isValidElement(children)) {
1745
- throw new Error('React.Children.only expected to receive a single React element child.');
1746
- }
1747
-
1748
- return children;
1749
- }
1750
-
1751
- // an immutable object with a single mutable value
1752
- function createRef() {
1753
- var refObject = {
1754
- current: null
1755
- };
1756
-
1757
- {
1758
- Object.seal(refObject);
1759
- }
1760
-
1761
- return refObject;
1762
- }
1763
-
1764
- function resolveDispatcher() {
1765
- var dispatcher = ReactSharedInternals.H;
1766
-
1767
- {
1768
- if (dispatcher === null) {
1769
- 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://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');
1770
121
  }
1771
- } // Will result in a null access error if accessed outside render phase. We
1772
- // intentionally don't throw our own error because this is in a hot path.
1773
- // Also helps ensure this is inlined.
1774
-
1775
-
1776
- return dispatcher;
1777
- }
1778
- function useCallback(callback, deps) {
1779
- var dispatcher = resolveDispatcher();
1780
- return dispatcher.useCallback(callback, deps);
1781
- }
1782
- function useMemo(create, deps) {
1783
- var dispatcher = resolveDispatcher();
1784
- return dispatcher.useMemo(create, deps);
1785
- }
1786
- function useDebugValue(value, formatterFn) {
1787
- {
1788
- var dispatcher = resolveDispatcher();
1789
- return dispatcher.useDebugValue(value, formatterFn);
1790
- }
1791
- }
1792
- function useId() {
1793
- var dispatcher = resolveDispatcher();
1794
- return dispatcher.useId();
1795
- }
1796
- function use(usable) {
1797
- var dispatcher = resolveDispatcher();
1798
- return dispatcher.use(usable);
1799
- }
1800
- function useActionState(action, initialState, permalink) {
1801
- {
1802
- var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional
1803
-
1804
- return dispatcher.useActionState(action, initialState, permalink);
1805
- }
1806
- }
1807
-
1808
- function forwardRef(render) {
1809
- {
1810
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
1811
- error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
1812
- } else if (typeof render !== 'function') {
1813
- error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
1814
- } else {
1815
- if (render.length !== 0 && render.length !== 2) {
1816
- error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
1817
- }
122
+ function getOwner() {
123
+ var dispatcher = ReactSharedInternals.A;
124
+ return null === dispatcher ? null : dispatcher.getOwner();
1818
125
  }
1819
-
1820
- if (render != null) {
1821
- if (render.defaultProps != null) {
1822
- error('forwardRef render functions do not support defaultProps. ' + 'Did you accidentally pass a React component?');
1823
- }
126
+ function UnknownOwner() {
127
+ return Error("react-stack-top-frame");
1824
128
  }
1825
- }
1826
-
1827
- var elementType = {
1828
- $$typeof: REACT_FORWARD_REF_TYPE,
1829
- render: render
1830
- };
1831
-
1832
- {
1833
- var ownName;
1834
- Object.defineProperty(elementType, 'displayName', {
1835
- enumerable: false,
1836
- configurable: true,
1837
- get: function () {
1838
- return ownName;
1839
- },
1840
- set: function (name) {
1841
- ownName = name; // The inner component shouldn't inherit this display name in most cases,
1842
- // because the component may be used elsewhere.
1843
- // But it's nice for anonymous functions to inherit the name,
1844
- // so that our component-stack generation logic will display their frames.
1845
- // An anonymous function generally suggests a pattern like:
1846
- // React.forwardRef((props, ref) => {...});
1847
- // This kind of inner function is not used elsewhere so the side effect is okay.
1848
-
1849
- if (!render.name && !render.displayName) {
1850
- render.displayName = name;
1851
- }
1852
- }
1853
- });
1854
- }
1855
-
1856
- return elementType;
1857
- }
1858
-
1859
- var Uninitialized = -1;
1860
- var Pending = 0;
1861
- var Resolved = 1;
1862
- var Rejected = 2;
1863
-
1864
- function lazyInitializer(payload) {
1865
- if (payload._status === Uninitialized) {
1866
- var ctor = payload._result;
1867
- var thenable = ctor(); // Transition to the next state.
1868
- // This might throw either because it's missing or throws. If so, we treat it
1869
- // as still uninitialized and try again next time. Which is the same as what
1870
- // happens if the ctor or any wrappers processing the ctor throws. This might
1871
- // end up fixing it if the resolution was a concurrency bug.
1872
-
1873
- thenable.then(function (moduleObject) {
1874
- if (payload._status === Pending || payload._status === Uninitialized) {
1875
- // Transition to the next state.
1876
- var resolved = payload;
1877
- resolved._status = Resolved;
1878
- resolved._result = moduleObject;
1879
- }
1880
- }, function (error) {
1881
- if (payload._status === Pending || payload._status === Uninitialized) {
1882
- // Transition to the next state.
1883
- var rejected = payload;
1884
- rejected._status = Rejected;
1885
- rejected._result = error;
129
+ function hasValidKey(config) {
130
+ if (hasOwnProperty.call(config, "key")) {
131
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
132
+ if (getter && getter.isReactWarning) return !1;
1886
133
  }
1887
- });
1888
-
1889
- if (payload._status === Uninitialized) {
1890
- // In case, we're still uninitialized, then we're waiting for the thenable
1891
- // to resolve. Set it as pending in the meantime.
1892
- var pending = payload;
1893
- pending._status = Pending;
1894
- pending._result = thenable;
134
+ return void 0 !== config.key;
1895
135
  }
1896
- }
1897
-
1898
- if (payload._status === Resolved) {
1899
- var moduleObject = payload._result;
1900
-
1901
- {
1902
- if (moduleObject === undefined) {
1903
- error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1904
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
136
+ function defineKeyPropWarningGetter(props, displayName) {
137
+ function warnAboutAccessingKey() {
138
+ specialPropKeyWarningShown ||
139
+ ((specialPropKeyWarningShown = !0),
140
+ console.error(
141
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
142
+ displayName
143
+ ));
1905
144
  }
145
+ warnAboutAccessingKey.isReactWarning = !0;
146
+ Object.defineProperty(props, "key", {
147
+ get: warnAboutAccessingKey,
148
+ configurable: !0
149
+ });
1906
150
  }
1907
-
1908
- {
1909
- if (!('default' in moduleObject)) {
1910
- error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1911
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
151
+ function elementRefGetterWithDeprecationWarning() {
152
+ var componentName = getComponentNameFromType(this.type);
153
+ didWarnAboutElementRef[componentName] ||
154
+ ((didWarnAboutElementRef[componentName] = !0),
155
+ console.error(
156
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
157
+ ));
158
+ componentName = this.props.ref;
159
+ return void 0 !== componentName ? componentName : null;
160
+ }
161
+ function ReactElement(
162
+ type,
163
+ key,
164
+ self,
165
+ source,
166
+ owner,
167
+ props,
168
+ debugStack,
169
+ debugTask
170
+ ) {
171
+ self = props.ref;
172
+ type = {
173
+ $$typeof: REACT_ELEMENT_TYPE,
174
+ type: type,
175
+ key: key,
176
+ props: props,
177
+ _owner: owner
178
+ };
179
+ null !== (void 0 !== self ? self : null)
180
+ ? Object.defineProperty(type, "ref", {
181
+ enumerable: !1,
182
+ get: elementRefGetterWithDeprecationWarning
183
+ })
184
+ : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
185
+ type._store = {};
186
+ Object.defineProperty(type._store, "validated", {
187
+ configurable: !1,
188
+ enumerable: !1,
189
+ writable: !0,
190
+ value: 0
191
+ });
192
+ Object.defineProperty(type, "_debugInfo", {
193
+ configurable: !1,
194
+ enumerable: !1,
195
+ writable: !0,
196
+ value: null
197
+ });
198
+ Object.defineProperty(type, "_debugStack", {
199
+ configurable: !1,
200
+ enumerable: !1,
201
+ writable: !0,
202
+ value: debugStack
203
+ });
204
+ Object.defineProperty(type, "_debugTask", {
205
+ configurable: !1,
206
+ enumerable: !1,
207
+ writable: !0,
208
+ value: debugTask
209
+ });
210
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
211
+ return type;
212
+ }
213
+ function cloneAndReplaceKey(oldElement, newKey) {
214
+ newKey = ReactElement(
215
+ oldElement.type,
216
+ newKey,
217
+ void 0,
218
+ void 0,
219
+ oldElement._owner,
220
+ oldElement.props,
221
+ oldElement._debugStack,
222
+ oldElement._debugTask
223
+ );
224
+ oldElement._store &&
225
+ (newKey._store.validated = oldElement._store.validated);
226
+ return newKey;
227
+ }
228
+ function isValidElement(object) {
229
+ return (
230
+ "object" === typeof object &&
231
+ null !== object &&
232
+ object.$$typeof === REACT_ELEMENT_TYPE
233
+ );
234
+ }
235
+ function escape(key) {
236
+ var escaperLookup = { "=": "=0", ":": "=2" };
237
+ return (
238
+ "$" +
239
+ key.replace(/[=:]/g, function (match) {
240
+ return escaperLookup[match];
241
+ })
242
+ );
243
+ }
244
+ function getElementKey(element, index) {
245
+ return "object" === typeof element &&
246
+ null !== element &&
247
+ null != element.key
248
+ ? (checkKeyStringCoercion(element.key), escape("" + element.key))
249
+ : index.toString(36);
250
+ }
251
+ function noop() {}
252
+ function resolveThenable(thenable) {
253
+ switch (thenable.status) {
254
+ case "fulfilled":
255
+ return thenable.value;
256
+ case "rejected":
257
+ throw thenable.reason;
258
+ default:
259
+ switch (
260
+ ("string" === typeof thenable.status
261
+ ? thenable.then(noop, noop)
262
+ : ((thenable.status = "pending"),
263
+ thenable.then(
264
+ function (fulfilledValue) {
265
+ "pending" === thenable.status &&
266
+ ((thenable.status = "fulfilled"),
267
+ (thenable.value = fulfilledValue));
268
+ },
269
+ function (error) {
270
+ "pending" === thenable.status &&
271
+ ((thenable.status = "rejected"),
272
+ (thenable.reason = error));
273
+ }
274
+ )),
275
+ thenable.status)
276
+ ) {
277
+ case "fulfilled":
278
+ return thenable.value;
279
+ case "rejected":
280
+ throw thenable.reason;
281
+ }
1912
282
  }
283
+ throw thenable;
284
+ }
285
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
286
+ var type = typeof children;
287
+ if ("undefined" === type || "boolean" === type) children = null;
288
+ var invokeCallback = !1;
289
+ if (null === children) invokeCallback = !0;
290
+ else
291
+ switch (type) {
292
+ case "bigint":
293
+ case "string":
294
+ case "number":
295
+ invokeCallback = !0;
296
+ break;
297
+ case "object":
298
+ switch (children.$$typeof) {
299
+ case REACT_ELEMENT_TYPE:
300
+ case REACT_PORTAL_TYPE:
301
+ invokeCallback = !0;
302
+ break;
303
+ case REACT_LAZY_TYPE:
304
+ return (
305
+ (invokeCallback = children._init),
306
+ mapIntoArray(
307
+ invokeCallback(children._payload),
308
+ array,
309
+ escapedPrefix,
310
+ nameSoFar,
311
+ callback
312
+ )
313
+ );
314
+ }
315
+ }
316
+ if (invokeCallback) {
317
+ invokeCallback = children;
318
+ callback = callback(invokeCallback);
319
+ var childKey =
320
+ "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
321
+ isArrayImpl(callback)
322
+ ? ((escapedPrefix = ""),
323
+ null != childKey &&
324
+ (escapedPrefix =
325
+ childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
326
+ mapIntoArray(callback, array, escapedPrefix, "", function (c) {
327
+ return c;
328
+ }))
329
+ : null != callback &&
330
+ (isValidElement(callback) &&
331
+ (null != callback.key &&
332
+ ((invokeCallback && invokeCallback.key === callback.key) ||
333
+ checkKeyStringCoercion(callback.key)),
334
+ (escapedPrefix = cloneAndReplaceKey(
335
+ callback,
336
+ escapedPrefix +
337
+ (null == callback.key ||
338
+ (invokeCallback && invokeCallback.key === callback.key)
339
+ ? ""
340
+ : ("" + callback.key).replace(
341
+ userProvidedKeyEscapeRegex,
342
+ "$&/"
343
+ ) + "/") +
344
+ childKey
345
+ )),
346
+ "" !== nameSoFar &&
347
+ null != invokeCallback &&
348
+ isValidElement(invokeCallback) &&
349
+ null == invokeCallback.key &&
350
+ invokeCallback._store &&
351
+ !invokeCallback._store.validated &&
352
+ (escapedPrefix._store.validated = 2),
353
+ (callback = escapedPrefix)),
354
+ array.push(callback));
355
+ return 1;
356
+ }
357
+ invokeCallback = 0;
358
+ childKey = "" === nameSoFar ? "." : nameSoFar + ":";
359
+ if (isArrayImpl(children))
360
+ for (var i = 0; i < children.length; i++)
361
+ (nameSoFar = children[i]),
362
+ (type = childKey + getElementKey(nameSoFar, i)),
363
+ (invokeCallback += mapIntoArray(
364
+ nameSoFar,
365
+ array,
366
+ escapedPrefix,
367
+ type,
368
+ callback
369
+ ));
370
+ else if (((i = getIteratorFn(children)), "function" === typeof i))
371
+ for (
372
+ i === children.entries &&
373
+ (didWarnAboutMaps ||
374
+ console.warn(
375
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
376
+ ),
377
+ (didWarnAboutMaps = !0)),
378
+ children = i.call(children),
379
+ i = 0;
380
+ !(nameSoFar = children.next()).done;
381
+
382
+ )
383
+ (nameSoFar = nameSoFar.value),
384
+ (type = childKey + getElementKey(nameSoFar, i++)),
385
+ (invokeCallback += mapIntoArray(
386
+ nameSoFar,
387
+ array,
388
+ escapedPrefix,
389
+ type,
390
+ callback
391
+ ));
392
+ else if ("object" === type) {
393
+ if ("function" === typeof children.then)
394
+ return mapIntoArray(
395
+ resolveThenable(children),
396
+ array,
397
+ escapedPrefix,
398
+ nameSoFar,
399
+ callback
400
+ );
401
+ array = String(children);
402
+ throw Error(
403
+ "Objects are not valid as a React child (found: " +
404
+ ("[object Object]" === array
405
+ ? "object with keys {" + Object.keys(children).join(", ") + "}"
406
+ : array) +
407
+ "). If you meant to render a collection of children, use an array instead."
408
+ );
409
+ }
410
+ return invokeCallback;
411
+ }
412
+ function mapChildren(children, func, context) {
413
+ if (null == children) return children;
414
+ var result = [],
415
+ count = 0;
416
+ mapIntoArray(children, result, "", "", function (child) {
417
+ return func.call(context, child, count++);
418
+ });
419
+ return result;
1913
420
  }
1914
-
1915
- return moduleObject.default;
1916
- } else {
1917
- throw payload._result;
1918
- }
1919
- }
1920
-
1921
- function lazy(ctor) {
1922
- var payload = {
1923
- // We use these fields to store the result.
1924
- _status: Uninitialized,
1925
- _result: ctor
1926
- };
1927
- var lazyType = {
1928
- $$typeof: REACT_LAZY_TYPE,
1929
- _payload: payload,
1930
- _init: lazyInitializer
1931
- };
1932
-
1933
- return lazyType;
1934
- }
1935
-
1936
- function memo(type, compare) {
1937
- {
1938
- if (!isValidElementType(type)) {
1939
- error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
1940
- }
1941
- }
1942
-
1943
- var elementType = {
1944
- $$typeof: REACT_MEMO_TYPE,
1945
- type: type,
1946
- compare: compare === undefined ? null : compare
1947
- };
1948
-
1949
- {
1950
- var ownName;
1951
- Object.defineProperty(elementType, 'displayName', {
1952
- enumerable: false,
1953
- configurable: true,
1954
- get: function () {
1955
- return ownName;
421
+ function resolveDispatcher() {
422
+ var dispatcher = ReactSharedInternals.H;
423
+ null === dispatcher &&
424
+ console.error(
425
+ "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
426
+ );
427
+ return dispatcher;
428
+ }
429
+ function lazyInitializer(payload) {
430
+ if (-1 === payload._status) {
431
+ var ctor = payload._result;
432
+ ctor = ctor();
433
+ ctor.then(
434
+ function (moduleObject) {
435
+ if (0 === payload._status || -1 === payload._status)
436
+ (payload._status = 1), (payload._result = moduleObject);
437
+ },
438
+ function (error) {
439
+ if (0 === payload._status || -1 === payload._status)
440
+ (payload._status = 2), (payload._result = error);
441
+ }
442
+ );
443
+ -1 === payload._status &&
444
+ ((payload._status = 0), (payload._result = ctor));
445
+ }
446
+ if (1 === payload._status)
447
+ return (
448
+ (ctor = payload._result),
449
+ void 0 === ctor &&
450
+ console.error(
451
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
452
+ ctor
453
+ ),
454
+ "default" in ctor ||
455
+ console.error(
456
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
457
+ ctor
458
+ ),
459
+ ctor.default
460
+ );
461
+ throw payload._result;
462
+ }
463
+ function createCacheRoot() {
464
+ return new WeakMap();
465
+ }
466
+ function createCacheNode() {
467
+ return { s: 0, v: void 0, o: null, p: null };
468
+ }
469
+ var ReactSharedInternals = {
470
+ H: null,
471
+ A: null,
472
+ getCurrentStack: null,
473
+ recentlyCreatedOwnerStacks: 0
1956
474
  },
1957
- set: function (name) {
1958
- ownName = name; // The inner component shouldn't inherit this display name in most cases,
1959
- // because the component may be used elsewhere.
1960
- // But it's nice for anonymous functions to inherit the name,
1961
- // so that our component-stack generation logic will display their frames.
1962
- // An anonymous function generally suggests a pattern like:
1963
- // React.memo((props) => {...});
1964
- // This kind of inner function is not used elsewhere so the side effect is okay.
1965
-
1966
- if (!type.name && !type.displayName) {
1967
- type.displayName = name;
475
+ isArrayImpl = Array.isArray,
476
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
477
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
478
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
479
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
480
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler");
481
+ Symbol.for("react.provider");
482
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
483
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
484
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
485
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
486
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
487
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
488
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
489
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
490
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
491
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
492
+ hasOwnProperty = Object.prototype.hasOwnProperty,
493
+ assign = Object.assign,
494
+ createTask = console.createTask
495
+ ? console.createTask
496
+ : function () {
497
+ return null;
498
+ },
499
+ createFakeCallStack = {
500
+ "react-stack-bottom-frame": function (callStackForError) {
501
+ return callStackForError();
1968
502
  }
503
+ },
504
+ specialPropKeyWarningShown,
505
+ didWarnAboutOldJSXRuntime;
506
+ var didWarnAboutElementRef = {};
507
+ var unknownOwnerDebugStack = createFakeCallStack[
508
+ "react-stack-bottom-frame"
509
+ ].bind(createFakeCallStack, UnknownOwner)();
510
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
511
+ var didWarnAboutMaps = !1,
512
+ userProvidedKeyEscapeRegex = /\/+/g;
513
+ exports.Children = {
514
+ map: mapChildren,
515
+ forEach: function (children, forEachFunc, forEachContext) {
516
+ mapChildren(
517
+ children,
518
+ function () {
519
+ forEachFunc.apply(this, arguments);
520
+ },
521
+ forEachContext
522
+ );
523
+ },
524
+ count: function (children) {
525
+ var n = 0;
526
+ mapChildren(children, function () {
527
+ n++;
528
+ });
529
+ return n;
530
+ },
531
+ toArray: function (children) {
532
+ return (
533
+ mapChildren(children, function (child) {
534
+ return child;
535
+ }) || []
536
+ );
537
+ },
538
+ only: function (children) {
539
+ if (!isValidElement(children))
540
+ throw Error(
541
+ "React.Children.only expected to receive a single React element child."
542
+ );
543
+ return children;
1969
544
  }
1970
- });
1971
- }
1972
-
1973
- return elementType;
1974
- }
1975
-
1976
- var UNTERMINATED = 0;
1977
- var TERMINATED = 1;
1978
- var ERRORED = 2;
1979
-
1980
- function createCacheRoot() {
1981
- return new WeakMap();
1982
- }
1983
-
1984
- function createCacheNode() {
1985
- return {
1986
- s: UNTERMINATED,
1987
- // status, represents whether the cached computation returned a value or threw an error
1988
- v: undefined,
1989
- // value, either the cached result or an error, depending on s
1990
- o: null,
1991
- // object cache, a WeakMap where non-primitive arguments are stored
1992
- p: null // primitive cache, a regular Map where primitive arguments are stored.
1993
-
1994
- };
1995
- }
1996
-
1997
- function cache(fn) {
1998
- return function () {
1999
- var dispatcher = ReactSharedInternals.A;
2000
-
2001
- if (!dispatcher) {
2002
- // If there is no dispatcher, then we treat this as not being cached.
2003
- // $FlowFixMe[incompatible-call]: We don't want to use rest arguments since we transpile the code.
2004
- return fn.apply(null, arguments);
2005
- }
2006
-
2007
- var fnMap = dispatcher.getCacheForType(createCacheRoot);
2008
- var fnNode = fnMap.get(fn);
2009
- var cacheNode;
2010
-
2011
- if (fnNode === undefined) {
2012
- cacheNode = createCacheNode();
2013
- fnMap.set(fn, cacheNode);
2014
- } else {
2015
- cacheNode = fnNode;
2016
- }
2017
-
2018
- for (var i = 0, l = arguments.length; i < l; i++) {
2019
- var arg = arguments[i];
2020
-
2021
- if (typeof arg === 'function' || typeof arg === 'object' && arg !== null) {
2022
- // Objects go into a WeakMap
2023
- var objectCache = cacheNode.o;
2024
-
2025
- if (objectCache === null) {
2026
- cacheNode.o = objectCache = new WeakMap();
545
+ };
546
+ exports.Fragment = REACT_FRAGMENT_TYPE;
547
+ exports.Profiler = REACT_PROFILER_TYPE;
548
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
549
+ exports.Suspense = REACT_SUSPENSE_TYPE;
550
+ exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
551
+ ReactSharedInternals;
552
+ exports.cache = function (fn) {
553
+ return function () {
554
+ var dispatcher = ReactSharedInternals.A;
555
+ if (!dispatcher) return fn.apply(null, arguments);
556
+ var fnMap = dispatcher.getCacheForType(createCacheRoot);
557
+ dispatcher = fnMap.get(fn);
558
+ void 0 === dispatcher &&
559
+ ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));
560
+ fnMap = 0;
561
+ for (var l = arguments.length; fnMap < l; fnMap++) {
562
+ var arg = arguments[fnMap];
563
+ if (
564
+ "function" === typeof arg ||
565
+ ("object" === typeof arg && null !== arg)
566
+ ) {
567
+ var objectCache = dispatcher.o;
568
+ null === objectCache &&
569
+ (dispatcher.o = objectCache = new WeakMap());
570
+ dispatcher = objectCache.get(arg);
571
+ void 0 === dispatcher &&
572
+ ((dispatcher = createCacheNode()),
573
+ objectCache.set(arg, dispatcher));
574
+ } else
575
+ (objectCache = dispatcher.p),
576
+ null === objectCache && (dispatcher.p = objectCache = new Map()),
577
+ (dispatcher = objectCache.get(arg)),
578
+ void 0 === dispatcher &&
579
+ ((dispatcher = createCacheNode()),
580
+ objectCache.set(arg, dispatcher));
2027
581
  }
2028
-
2029
- var objectNode = objectCache.get(arg);
2030
-
2031
- if (objectNode === undefined) {
2032
- cacheNode = createCacheNode();
2033
- objectCache.set(arg, cacheNode);
2034
- } else {
2035
- cacheNode = objectNode;
582
+ if (1 === dispatcher.s) return dispatcher.v;
583
+ if (2 === dispatcher.s) throw dispatcher.v;
584
+ try {
585
+ var result = fn.apply(null, arguments);
586
+ fnMap = dispatcher;
587
+ fnMap.s = 1;
588
+ return (fnMap.v = result);
589
+ } catch (error) {
590
+ throw (
591
+ ((result = dispatcher), (result.s = 2), (result.v = error), error)
592
+ );
2036
593
  }
2037
- } else {
2038
- // Primitives go into a regular Map
2039
- var primitiveCache = cacheNode.p;
2040
-
2041
- if (primitiveCache === null) {
2042
- cacheNode.p = primitiveCache = new Map();
594
+ };
595
+ };
596
+ exports.captureOwnerStack = function () {
597
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
598
+ return null === getCurrentStack ? null : getCurrentStack();
599
+ };
600
+ exports.cloneElement = function (element, config, children) {
601
+ if (null === element || void 0 === element)
602
+ throw Error(
603
+ "The argument must be a React element, but you passed " +
604
+ element +
605
+ "."
606
+ );
607
+ var props = assign({}, element.props),
608
+ key = element.key,
609
+ owner = element._owner;
610
+ if (null != config) {
611
+ var JSCompiler_inline_result;
612
+ a: {
613
+ if (
614
+ hasOwnProperty.call(config, "ref") &&
615
+ (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
616
+ config,
617
+ "ref"
618
+ ).get) &&
619
+ JSCompiler_inline_result.isReactWarning
620
+ ) {
621
+ JSCompiler_inline_result = !1;
622
+ break a;
623
+ }
624
+ JSCompiler_inline_result = void 0 !== config.ref;
2043
625
  }
2044
-
2045
- var primitiveNode = primitiveCache.get(arg);
2046
-
2047
- if (primitiveNode === undefined) {
2048
- cacheNode = createCacheNode();
2049
- primitiveCache.set(arg, cacheNode);
2050
- } else {
2051
- cacheNode = primitiveNode;
626
+ JSCompiler_inline_result && (owner = getOwner());
627
+ hasValidKey(config) &&
628
+ (checkKeyStringCoercion(config.key), (key = "" + config.key));
629
+ for (propName in config)
630
+ !hasOwnProperty.call(config, propName) ||
631
+ "key" === propName ||
632
+ "__self" === propName ||
633
+ "__source" === propName ||
634
+ ("ref" === propName && void 0 === config.ref) ||
635
+ (props[propName] = config[propName]);
636
+ }
637
+ var propName = arguments.length - 2;
638
+ if (1 === propName) props.children = children;
639
+ else if (1 < propName) {
640
+ JSCompiler_inline_result = Array(propName);
641
+ for (var i = 0; i < propName; i++)
642
+ JSCompiler_inline_result[i] = arguments[i + 2];
643
+ props.children = JSCompiler_inline_result;
644
+ }
645
+ props = ReactElement(
646
+ element.type,
647
+ key,
648
+ void 0,
649
+ void 0,
650
+ owner,
651
+ props,
652
+ element._debugStack,
653
+ element._debugTask
654
+ );
655
+ for (key = 2; key < arguments.length; key++)
656
+ (owner = arguments[key]),
657
+ isValidElement(owner) && owner._store && (owner._store.validated = 1);
658
+ return props;
659
+ };
660
+ exports.createElement = function (type, config, children) {
661
+ for (var i = 2; i < arguments.length; i++) {
662
+ var node = arguments[i];
663
+ isValidElement(node) && node._store && (node._store.validated = 1);
664
+ }
665
+ i = {};
666
+ node = null;
667
+ if (null != config)
668
+ for (propName in (didWarnAboutOldJSXRuntime ||
669
+ !("__self" in config) ||
670
+ "key" in config ||
671
+ ((didWarnAboutOldJSXRuntime = !0),
672
+ console.warn(
673
+ "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
674
+ )),
675
+ hasValidKey(config) &&
676
+ (checkKeyStringCoercion(config.key), (node = "" + config.key)),
677
+ config))
678
+ hasOwnProperty.call(config, propName) &&
679
+ "key" !== propName &&
680
+ "__self" !== propName &&
681
+ "__source" !== propName &&
682
+ (i[propName] = config[propName]);
683
+ var childrenLength = arguments.length - 2;
684
+ if (1 === childrenLength) i.children = children;
685
+ else if (1 < childrenLength) {
686
+ for (
687
+ var childArray = Array(childrenLength), _i = 0;
688
+ _i < childrenLength;
689
+ _i++
690
+ )
691
+ childArray[_i] = arguments[_i + 2];
692
+ Object.freeze && Object.freeze(childArray);
693
+ i.children = childArray;
694
+ }
695
+ if (type && type.defaultProps)
696
+ for (propName in ((childrenLength = type.defaultProps), childrenLength))
697
+ void 0 === i[propName] && (i[propName] = childrenLength[propName]);
698
+ node &&
699
+ defineKeyPropWarningGetter(
700
+ i,
701
+ "function" === typeof type
702
+ ? type.displayName || type.name || "Unknown"
703
+ : type
704
+ );
705
+ var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
706
+ return ReactElement(
707
+ type,
708
+ node,
709
+ void 0,
710
+ void 0,
711
+ getOwner(),
712
+ i,
713
+ propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
714
+ propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
715
+ );
716
+ };
717
+ exports.createRef = function () {
718
+ var refObject = { current: null };
719
+ Object.seal(refObject);
720
+ return refObject;
721
+ };
722
+ exports.forwardRef = function (render) {
723
+ null != render && render.$$typeof === REACT_MEMO_TYPE
724
+ ? console.error(
725
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
726
+ )
727
+ : "function" !== typeof render
728
+ ? console.error(
729
+ "forwardRef requires a render function but was given %s.",
730
+ null === render ? "null" : typeof render
731
+ )
732
+ : 0 !== render.length &&
733
+ 2 !== render.length &&
734
+ console.error(
735
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
736
+ 1 === render.length
737
+ ? "Did you forget to use the ref parameter?"
738
+ : "Any additional parameter will be undefined."
739
+ );
740
+ null != render &&
741
+ null != render.defaultProps &&
742
+ console.error(
743
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
744
+ );
745
+ var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
746
+ ownName;
747
+ Object.defineProperty(elementType, "displayName", {
748
+ enumerable: !1,
749
+ configurable: !0,
750
+ get: function () {
751
+ return ownName;
752
+ },
753
+ set: function (name) {
754
+ ownName = name;
755
+ render.name ||
756
+ render.displayName ||
757
+ (Object.defineProperty(render, "name", { value: name }),
758
+ (render.displayName = name));
2052
759
  }
2053
- }
2054
- }
2055
-
2056
- if (cacheNode.s === TERMINATED) {
2057
- return cacheNode.v;
2058
- }
2059
-
2060
- if (cacheNode.s === ERRORED) {
2061
- throw cacheNode.v;
2062
- }
2063
-
2064
- try {
2065
- // $FlowFixMe[incompatible-call]: We don't want to use rest arguments since we transpile the code.
2066
- var result = fn.apply(null, arguments);
2067
- var terminatedNode = cacheNode;
2068
- terminatedNode.s = TERMINATED;
2069
- terminatedNode.v = result;
2070
- return result;
2071
- } catch (error) {
2072
- // We store the first error that's thrown and rethrow it.
2073
- var erroredNode = cacheNode;
2074
- erroredNode.s = ERRORED;
2075
- erroredNode.v = error;
2076
- throw error;
2077
- }
2078
- };
2079
- }
2080
-
2081
- var reportGlobalError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,
2082
- // emulating an uncaught JavaScript error.
2083
- reportError : function (error) {
2084
- if (typeof window === 'object' && typeof window.ErrorEvent === 'function') {
2085
- // Browser Polyfill
2086
- var message = typeof error === 'object' && error !== null && typeof error.message === 'string' ? // eslint-disable-next-line react-internal/safe-string-coercion
2087
- String(error.message) : // eslint-disable-next-line react-internal/safe-string-coercion
2088
- String(error);
2089
- var event = new window.ErrorEvent('error', {
2090
- bubbles: true,
2091
- cancelable: true,
2092
- message: message,
2093
- error: error
2094
- });
2095
- var shouldLog = window.dispatchEvent(event);
2096
-
2097
- if (!shouldLog) {
2098
- return;
2099
- }
2100
- } else if (typeof process === 'object' && // $FlowFixMe[method-unbinding]
2101
- typeof process.emit === 'function') {
2102
- // Node Polyfill
2103
- process.emit('uncaughtException', error);
2104
- return;
2105
- } // eslint-disable-next-line react-internal/no-production-logging
2106
-
2107
-
2108
- console['error'](error);
2109
- };
2110
-
2111
- function startTransition(scope, options) {
2112
- var prevTransition = ReactSharedInternals.T; // Each renderer registers a callback to receive the return value of
2113
- // the scope function. This is used to implement async actions.
2114
-
2115
- var callbacks = new Set();
2116
- var transition = {
2117
- _callbacks: callbacks
2118
- };
2119
- ReactSharedInternals.T = transition;
2120
- var currentTransition = ReactSharedInternals.T;
2121
-
2122
- {
2123
- ReactSharedInternals.T._updatedFibers = new Set();
2124
- }
2125
-
2126
- {
2127
- try {
2128
- var returnValue = scope();
2129
-
2130
- if (typeof returnValue === 'object' && returnValue !== null && typeof returnValue.then === 'function') {
2131
- callbacks.forEach(function (callback) {
2132
- return callback(currentTransition, returnValue);
2133
- });
2134
- returnValue.then(noop, reportGlobalError);
2135
- }
2136
- } catch (error) {
2137
- reportGlobalError(error);
2138
- } finally {
2139
- warnAboutTransitionSubscriptions(prevTransition, currentTransition);
2140
- ReactSharedInternals.T = prevTransition;
2141
- }
2142
- }
2143
- }
2144
-
2145
- function warnAboutTransitionSubscriptions(prevTransition, currentTransition) {
2146
- {
2147
- if (prevTransition === null && currentTransition._updatedFibers) {
2148
- var updatedFibersCount = currentTransition._updatedFibers.size;
2149
-
2150
- currentTransition._updatedFibers.clear();
2151
-
2152
- if (updatedFibersCount > 10) {
2153
- 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.');
2154
- }
2155
- }
2156
- }
2157
- }
2158
-
2159
- function noop() {}
2160
-
2161
- var ReactVersion = '19.0.0-beta-4508873393-20240430';
2162
-
2163
- var Children = {
2164
- map: mapChildren,
2165
- forEach: forEachChildren,
2166
- count: countChildren,
2167
- toArray: toArray,
2168
- only: onlyChild
2169
- };
2170
-
2171
- exports.Children = Children;
2172
- exports.Fragment = REACT_FRAGMENT_TYPE;
2173
- exports.Profiler = REACT_PROFILER_TYPE;
2174
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
2175
- exports.Suspense = REACT_SUSPENSE_TYPE;
2176
- exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
2177
- exports.cache = cache;
2178
- exports.cloneElement = cloneElement;
2179
- exports.createElement = createElement;
2180
- exports.createRef = createRef;
2181
- exports.forwardRef = forwardRef;
2182
- exports.isValidElement = isValidElement;
2183
- exports.lazy = lazy;
2184
- exports.memo = memo;
2185
- exports.startTransition = startTransition;
2186
- exports.use = use;
2187
- exports.useActionState = useActionState;
2188
- exports.useCallback = useCallback;
2189
- exports.useDebugValue = useDebugValue;
2190
- exports.useId = useId;
2191
- exports.useMemo = useMemo;
2192
- exports.version = ReactVersion;
760
+ });
761
+ return elementType;
762
+ };
763
+ exports.isValidElement = isValidElement;
764
+ exports.lazy = function (ctor) {
765
+ return {
766
+ $$typeof: REACT_LAZY_TYPE,
767
+ _payload: { _status: -1, _result: ctor },
768
+ _init: lazyInitializer
769
+ };
770
+ };
771
+ exports.memo = function (type, compare) {
772
+ null == type &&
773
+ console.error(
774
+ "memo: The first argument must be a component. Instead received: %s",
775
+ null === type ? "null" : typeof type
776
+ );
777
+ compare = {
778
+ $$typeof: REACT_MEMO_TYPE,
779
+ type: type,
780
+ compare: void 0 === compare ? null : compare
781
+ };
782
+ var ownName;
783
+ Object.defineProperty(compare, "displayName", {
784
+ enumerable: !1,
785
+ configurable: !0,
786
+ get: function () {
787
+ return ownName;
788
+ },
789
+ set: function (name) {
790
+ ownName = name;
791
+ type.name ||
792
+ type.displayName ||
793
+ (Object.defineProperty(type, "name", { value: name }),
794
+ (type.displayName = name));
795
+ }
796
+ });
797
+ return compare;
798
+ };
799
+ exports.use = function (usable) {
800
+ return resolveDispatcher().use(usable);
801
+ };
802
+ exports.useCallback = function (callback, deps) {
803
+ return resolveDispatcher().useCallback(callback, deps);
804
+ };
805
+ exports.useDebugValue = function (value, formatterFn) {
806
+ return resolveDispatcher().useDebugValue(value, formatterFn);
807
+ };
808
+ exports.useId = function () {
809
+ return resolveDispatcher().useId();
810
+ };
811
+ exports.useMemo = function (create, deps) {
812
+ return resolveDispatcher().useMemo(create, deps);
813
+ };
814
+ exports.version = "19.2.0-canary-5252281c-20250408";
2193
815
  })();
2194
- }