@typespec/html-program-viewer 0.79.0-dev.0 → 0.79.0-dev.2

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.
@@ -935,7 +935,7 @@ const TextDirectionProvider = ({
935
935
  ...defaultProps,
936
936
  ...props,
937
937
  [SLOT_ELEMENT_TYPE_SYMBOL]: elementType,
938
- [SLOT_CLASS_NAME_PROP_SYMBOL]: props === null || props === void 0 ? void 0 : props.className
938
+ [SLOT_CLASS_NAME_PROP_SYMBOL]: (props === null || props === void 0 ? void 0 : props.className) || (defaultProps === null || defaultProps === void 0 ? void 0 : defaultProps.className)
939
939
  };
940
940
  if (props && typeof props.children === 'function') {
941
941
  propsWithMetadata[SLOT_RENDER_FUNCTION_SYMBOL] = props.children;
@@ -1148,6 +1148,7 @@ const toObjectMap = (...items)=>{
1148
1148
  'htmlFor',
1149
1149
  'id',
1150
1150
  'lang',
1151
+ 'popover',
1151
1152
  'ref',
1152
1153
  'role',
1153
1154
  'style',
@@ -1247,6 +1248,8 @@ const toObjectMap = (...items)=>{
1247
1248
  'formMethod',
1248
1249
  'formNoValidate',
1249
1250
  'formTarget',
1251
+ 'popoverTarget',
1252
+ 'popoverTargetAction',
1250
1253
  'type',
1251
1254
  'value'
1252
1255
  ]);
@@ -2020,26 +2023,47 @@ function createJSX(runtime, slotRuntime) {
2020
2023
 
2021
2024
  var jsxRuntime$1 = {exports: {}};
2022
2025
 
2023
- var reactJsxRuntime_production_min = {};
2026
+ var reactJsxRuntime_production = {};
2024
2027
 
2025
2028
  /**
2026
2029
  * @license React
2027
- * react-jsx-runtime.production.min.js
2030
+ * react-jsx-runtime.production.js
2028
2031
  *
2029
- * Copyright (c) Facebook, Inc. and its affiliates.
2032
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2030
2033
  *
2031
2034
  * This source code is licensed under the MIT license found in the
2032
2035
  * LICENSE file in the root directory of this source tree.
2033
2036
  */
2034
2037
 
2035
- var hasRequiredReactJsxRuntime_production_min;
2036
-
2037
- function requireReactJsxRuntime_production_min () {
2038
- if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
2039
- hasRequiredReactJsxRuntime_production_min = 1;
2040
- var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:true,ref:true,__self:true,__source:true};
2041
- function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a) void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
2042
- return reactJsxRuntime_production_min;
2038
+ var hasRequiredReactJsxRuntime_production;
2039
+
2040
+ function requireReactJsxRuntime_production () {
2041
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
2042
+ hasRequiredReactJsxRuntime_production = 1;
2043
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
2044
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
2045
+ function jsxProd(type, config, maybeKey) {
2046
+ var key = null;
2047
+ void 0 !== maybeKey && (key = "" + maybeKey);
2048
+ void 0 !== config.key && (key = "" + config.key);
2049
+ if ("key" in config) {
2050
+ maybeKey = {};
2051
+ for (var propName in config)
2052
+ "key" !== propName && (maybeKey[propName] = config[propName]);
2053
+ } else maybeKey = config;
2054
+ config = maybeKey.ref;
2055
+ return {
2056
+ $$typeof: REACT_ELEMENT_TYPE,
2057
+ type: type,
2058
+ key: key,
2059
+ ref: void 0 !== config ? config : null,
2060
+ props: maybeKey
2061
+ };
2062
+ }
2063
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
2064
+ reactJsxRuntime_production.jsx = jsxProd;
2065
+ reactJsxRuntime_production.jsxs = jsxProd;
2066
+ return reactJsxRuntime_production;
2043
2067
  }
2044
2068
 
2045
2069
  var reactJsxRuntime_development = {};
@@ -2048,7 +2072,7 @@ var reactJsxRuntime_development = {};
2048
2072
  * @license React
2049
2073
  * react-jsx-runtime.development.js
2050
2074
  *
2051
- * Copyright (c) Facebook, Inc. and its affiliates.
2075
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2052
2076
  *
2053
2077
  * This source code is licensed under the MIT license found in the
2054
2078
  * LICENSE file in the root directory of this source tree.
@@ -2059,1309 +2083,347 @@ var hasRequiredReactJsxRuntime_development;
2059
2083
  function requireReactJsxRuntime_development () {
2060
2084
  if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
2061
2085
  hasRequiredReactJsxRuntime_development = 1;
2062
-
2063
- if (process.env.NODE_ENV !== "production") {
2064
- (function() {
2065
-
2066
- var React = React__default;
2067
-
2068
- // ATTENTION
2069
- // When adding new symbols to this file,
2070
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
2071
- // The Symbol used to tag the ReactElement-like types.
2072
- var REACT_ELEMENT_TYPE = Symbol.for('react.element');
2073
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
2074
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
2075
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
2076
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
2077
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
2078
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
2079
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
2080
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
2081
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
2082
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
2083
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
2084
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
2085
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
2086
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
2087
- function getIteratorFn(maybeIterable) {
2088
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
2089
- return null;
2090
- }
2091
-
2092
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2093
-
2094
- if (typeof maybeIterator === 'function') {
2095
- return maybeIterator;
2096
- }
2097
-
2098
- return null;
2099
- }
2100
-
2101
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2102
-
2103
- function error(format) {
2104
- {
2105
- {
2106
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2107
- args[_key2 - 1] = arguments[_key2];
2086
+ "production" !== process.env.NODE_ENV &&
2087
+ (function () {
2088
+ function getComponentNameFromType(type) {
2089
+ if (null == type) return null;
2090
+ if ("function" === typeof type)
2091
+ return type.$$typeof === REACT_CLIENT_REFERENCE
2092
+ ? null
2093
+ : type.displayName || type.name || null;
2094
+ if ("string" === typeof type) return type;
2095
+ switch (type) {
2096
+ case REACT_FRAGMENT_TYPE:
2097
+ return "Fragment";
2098
+ case REACT_PROFILER_TYPE:
2099
+ return "Profiler";
2100
+ case REACT_STRICT_MODE_TYPE:
2101
+ return "StrictMode";
2102
+ case REACT_SUSPENSE_TYPE:
2103
+ return "Suspense";
2104
+ case REACT_SUSPENSE_LIST_TYPE:
2105
+ return "SuspenseList";
2106
+ case REACT_ACTIVITY_TYPE:
2107
+ return "Activity";
2108
2108
  }
2109
-
2110
- printWarning('error', format, args);
2111
- }
2112
- }
2113
- }
2114
-
2115
- function printWarning(level, format, args) {
2116
- // When changing this logic, you might want to also
2117
- // update consoleWithStackDev.www.js as well.
2118
- {
2119
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2120
- var stack = ReactDebugCurrentFrame.getStackAddendum();
2121
-
2122
- if (stack !== '') {
2123
- format += '%s';
2124
- args = args.concat([stack]);
2125
- } // eslint-disable-next-line react-internal/safe-string-coercion
2126
-
2127
-
2128
- var argsWithFormat = args.map(function (item) {
2129
- return String(item);
2130
- }); // Careful: RN currently depends on this prefix
2131
-
2132
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
2133
- // breaks IE9: https://github.com/facebook/react/issues/13610
2134
- // eslint-disable-next-line react-internal/no-production-logging
2135
-
2136
- Function.prototype.apply.call(console[level], console, argsWithFormat);
2137
- }
2138
- }
2139
-
2140
- // -----------------------------------------------------------------------------
2141
-
2142
- var enableScopeAPI = false; // Experimental Create Event Handle API.
2143
- var enableCacheElement = false;
2144
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
2145
-
2146
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
2147
- // stuff. Intended to enable React core members to more easily debug scheduling
2148
- // issues in DEV builds.
2149
-
2150
- var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
2151
-
2152
- var REACT_MODULE_REFERENCE;
2153
-
2154
- {
2155
- REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
2156
- }
2157
-
2158
- function isValidElementType(type) {
2159
- if (typeof type === 'string' || typeof type === 'function') {
2160
- return true;
2161
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
2162
-
2163
-
2164
- 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 || enableCacheElement || enableTransitionTracing ) {
2165
- return true;
2166
- }
2167
-
2168
- if (typeof type === 'object' && type !== null) {
2169
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
2170
- // types supported by any Flight configuration anywhere since
2171
- // we don't know which Flight build this will end up being used
2172
- // with.
2173
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
2174
- return true;
2175
- }
2176
- }
2177
-
2178
- return false;
2179
- }
2180
-
2181
- function getWrappedName(outerType, innerType, wrapperName) {
2182
- var displayName = outerType.displayName;
2183
-
2184
- if (displayName) {
2185
- return displayName;
2186
- }
2187
-
2188
- var functionName = innerType.displayName || innerType.name || '';
2189
- return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
2190
- } // Keep in sync with react-reconciler/getComponentNameFromFiber
2191
-
2192
-
2193
- function getContextName(type) {
2194
- return type.displayName || 'Context';
2195
- } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
2196
-
2197
-
2198
- function getComponentNameFromType(type) {
2199
- if (type == null) {
2200
- // Host root, text node or just invalid type.
2201
- return null;
2202
- }
2203
-
2204
- {
2205
- if (typeof type.tag === 'number') {
2206
- error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
2207
- }
2208
- }
2209
-
2210
- if (typeof type === 'function') {
2211
- return type.displayName || type.name || null;
2212
- }
2213
-
2214
- if (typeof type === 'string') {
2215
- return type;
2216
- }
2217
-
2218
- switch (type) {
2219
- case REACT_FRAGMENT_TYPE:
2220
- return 'Fragment';
2221
-
2222
- case REACT_PORTAL_TYPE:
2223
- return 'Portal';
2224
-
2225
- case REACT_PROFILER_TYPE:
2226
- return 'Profiler';
2227
-
2228
- case REACT_STRICT_MODE_TYPE:
2229
- return 'StrictMode';
2230
-
2231
- case REACT_SUSPENSE_TYPE:
2232
- return 'Suspense';
2233
-
2234
- case REACT_SUSPENSE_LIST_TYPE:
2235
- return 'SuspenseList';
2236
-
2237
- }
2238
-
2239
- if (typeof type === 'object') {
2240
- switch (type.$$typeof) {
2241
- case REACT_CONTEXT_TYPE:
2242
- var context = type;
2243
- return getContextName(context) + '.Consumer';
2244
-
2245
- case REACT_PROVIDER_TYPE:
2246
- var provider = type;
2247
- return getContextName(provider._context) + '.Provider';
2248
-
2249
- case REACT_FORWARD_REF_TYPE:
2250
- return getWrappedName(type, type.render, 'ForwardRef');
2251
-
2252
- case REACT_MEMO_TYPE:
2253
- var outerName = type.displayName || null;
2254
-
2255
- if (outerName !== null) {
2256
- return outerName;
2257
- }
2258
-
2259
- return getComponentNameFromType(type.type) || 'Memo';
2260
-
2261
- case REACT_LAZY_TYPE:
2262
- {
2263
- var lazyComponent = type;
2264
- var payload = lazyComponent._payload;
2265
- var init = lazyComponent._init;
2266
-
2267
- try {
2268
- return getComponentNameFromType(init(payload));
2269
- } catch (x) {
2270
- return null;
2271
- }
2109
+ if ("object" === typeof type)
2110
+ switch (
2111
+ ("number" === typeof type.tag &&
2112
+ console.error(
2113
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
2114
+ ),
2115
+ type.$$typeof)
2116
+ ) {
2117
+ case REACT_PORTAL_TYPE:
2118
+ return "Portal";
2119
+ case REACT_CONTEXT_TYPE:
2120
+ return type.displayName || "Context";
2121
+ case REACT_CONSUMER_TYPE:
2122
+ return (type._context.displayName || "Context") + ".Consumer";
2123
+ case REACT_FORWARD_REF_TYPE:
2124
+ var innerType = type.render;
2125
+ type = type.displayName;
2126
+ type ||
2127
+ ((type = innerType.displayName || innerType.name || ""),
2128
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
2129
+ return type;
2130
+ case REACT_MEMO_TYPE:
2131
+ return (
2132
+ (innerType = type.displayName || null),
2133
+ null !== innerType
2134
+ ? innerType
2135
+ : getComponentNameFromType(type.type) || "Memo"
2136
+ );
2137
+ case REACT_LAZY_TYPE:
2138
+ innerType = type._payload;
2139
+ type = type._init;
2140
+ try {
2141
+ return getComponentNameFromType(type(innerType));
2142
+ } catch (x) {}
2272
2143
  }
2273
-
2274
- // eslint-disable-next-line no-fallthrough
2144
+ return null;
2275
2145
  }
2276
- }
2277
-
2278
- return null;
2279
- }
2280
-
2281
- var assign = Object.assign;
2282
-
2283
- // Helpers to patch console.logs to avoid logging during side-effect free
2284
- // replaying on render function. This currently only patches the object
2285
- // lazily which won't cover if the log function was extracted eagerly.
2286
- // We could also eagerly patch the method.
2287
- var disabledDepth = 0;
2288
- var prevLog;
2289
- var prevInfo;
2290
- var prevWarn;
2291
- var prevError;
2292
- var prevGroup;
2293
- var prevGroupCollapsed;
2294
- var prevGroupEnd;
2295
-
2296
- function disabledLog() {}
2297
-
2298
- disabledLog.__reactDisabledLog = true;
2299
- function disableLogs() {
2300
- {
2301
- if (disabledDepth === 0) {
2302
- /* eslint-disable react-internal/no-production-logging */
2303
- prevLog = console.log;
2304
- prevInfo = console.info;
2305
- prevWarn = console.warn;
2306
- prevError = console.error;
2307
- prevGroup = console.group;
2308
- prevGroupCollapsed = console.groupCollapsed;
2309
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
2310
-
2311
- var props = {
2312
- configurable: true,
2313
- enumerable: true,
2314
- value: disabledLog,
2315
- writable: true
2316
- }; // $FlowFixMe Flow thinks console is immutable.
2317
-
2318
- Object.defineProperties(console, {
2319
- info: props,
2320
- log: props,
2321
- warn: props,
2322
- error: props,
2323
- group: props,
2324
- groupCollapsed: props,
2325
- groupEnd: props
2326
- });
2327
- /* eslint-enable react-internal/no-production-logging */
2146
+ function testStringCoercion(value) {
2147
+ return "" + value;
2328
2148
  }
2329
-
2330
- disabledDepth++;
2331
- }
2332
- }
2333
- function reenableLogs() {
2334
- {
2335
- disabledDepth--;
2336
-
2337
- if (disabledDepth === 0) {
2338
- /* eslint-disable react-internal/no-production-logging */
2339
- var props = {
2340
- configurable: true,
2341
- enumerable: true,
2342
- writable: true
2343
- }; // $FlowFixMe Flow thinks console is immutable.
2344
-
2345
- Object.defineProperties(console, {
2346
- log: assign({}, props, {
2347
- value: prevLog
2348
- }),
2349
- info: assign({}, props, {
2350
- value: prevInfo
2351
- }),
2352
- warn: assign({}, props, {
2353
- value: prevWarn
2354
- }),
2355
- error: assign({}, props, {
2356
- value: prevError
2357
- }),
2358
- group: assign({}, props, {
2359
- value: prevGroup
2360
- }),
2361
- groupCollapsed: assign({}, props, {
2362
- value: prevGroupCollapsed
2363
- }),
2364
- groupEnd: assign({}, props, {
2365
- value: prevGroupEnd
2366
- })
2367
- });
2368
- /* eslint-enable react-internal/no-production-logging */
2369
- }
2370
-
2371
- if (disabledDepth < 0) {
2372
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
2373
- }
2374
- }
2375
- }
2376
-
2377
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2378
- var prefix;
2379
- function describeBuiltInComponentFrame(name, source, ownerFn) {
2380
- {
2381
- if (prefix === undefined) {
2382
- // Extract the VM specific prefix used by each line.
2149
+ function checkKeyStringCoercion(value) {
2383
2150
  try {
2384
- throw Error();
2385
- } catch (x) {
2386
- var match = x.stack.trim().match(/\n( *(at )?)/);
2387
- prefix = match && match[1] || '';
2151
+ testStringCoercion(value);
2152
+ var JSCompiler_inline_result = !1;
2153
+ } catch (e) {
2154
+ JSCompiler_inline_result = true;
2388
2155
  }
2389
- } // We use the prefix to ensure our stacks line up with native stack frames.
2390
-
2391
-
2392
- return '\n' + prefix + name;
2393
- }
2394
- }
2395
- var reentry = false;
2396
- var componentFrameCache;
2397
-
2398
- {
2399
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
2400
- componentFrameCache = new PossiblyWeakMap();
2401
- }
2402
-
2403
- function describeNativeComponentFrame(fn, construct) {
2404
- // If something asked for a stack inside a fake render, it should get ignored.
2405
- if ( !fn || reentry) {
2406
- return '';
2407
- }
2408
-
2409
- {
2410
- var frame = componentFrameCache.get(fn);
2411
-
2412
- if (frame !== undefined) {
2413
- return frame;
2414
- }
2415
- }
2416
-
2417
- var control;
2418
- reentry = true;
2419
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
2420
-
2421
- Error.prepareStackTrace = undefined;
2422
- var previousDispatcher;
2423
-
2424
- {
2425
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
2426
- // for warnings.
2427
-
2428
- ReactCurrentDispatcher.current = null;
2429
- disableLogs();
2430
- }
2431
-
2432
- try {
2433
- // This should throw.
2434
- if (construct) {
2435
- // Something should be setting the props in the constructor.
2436
- var Fake = function () {
2437
- throw Error();
2438
- }; // $FlowFixMe
2439
-
2440
-
2441
- Object.defineProperty(Fake.prototype, 'props', {
2442
- set: function () {
2443
- // We use a throwing setter instead of frozen or non-writable props
2444
- // because that won't throw in a non-strict mode function.
2445
- throw Error();
2446
- }
2447
- });
2448
-
2449
- if (typeof Reflect === 'object' && Reflect.construct) {
2450
- // We construct a different control for this case to include any extra
2451
- // frames added by the construct call.
2452
- try {
2453
- Reflect.construct(Fake, []);
2454
- } catch (x) {
2455
- control = x;
2456
- }
2457
-
2458
- Reflect.construct(fn, [], Fake);
2459
- } else {
2460
- try {
2461
- Fake.call();
2462
- } catch (x) {
2463
- control = x;
2464
- }
2465
-
2466
- fn.call(Fake.prototype);
2156
+ if (JSCompiler_inline_result) {
2157
+ JSCompiler_inline_result = console;
2158
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
2159
+ var JSCompiler_inline_result$jscomp$0 =
2160
+ ("function" === typeof Symbol &&
2161
+ Symbol.toStringTag &&
2162
+ value[Symbol.toStringTag]) ||
2163
+ value.constructor.name ||
2164
+ "Object";
2165
+ JSCompiler_temp_const.call(
2166
+ JSCompiler_inline_result,
2167
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
2168
+ JSCompiler_inline_result$jscomp$0
2169
+ );
2170
+ return testStringCoercion(value);
2467
2171
  }
2468
- } else {
2172
+ }
2173
+ function getTaskName(type) {
2174
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
2175
+ if (
2176
+ "object" === typeof type &&
2177
+ null !== type &&
2178
+ type.$$typeof === REACT_LAZY_TYPE
2179
+ )
2180
+ return "<...>";
2469
2181
  try {
2470
- throw Error();
2182
+ var name = getComponentNameFromType(type);
2183
+ return name ? "<" + name + ">" : "<...>";
2471
2184
  } catch (x) {
2472
- control = x;
2473
- }
2474
-
2475
- fn();
2476
- }
2477
- } catch (sample) {
2478
- // This is inlined manually because closure doesn't do it for us.
2479
- if (sample && control && typeof sample.stack === 'string') {
2480
- // This extracts the first frame from the sample that isn't also in the control.
2481
- // Skipping one frame that we assume is the frame that calls the two.
2482
- var sampleLines = sample.stack.split('\n');
2483
- var controlLines = control.stack.split('\n');
2484
- var s = sampleLines.length - 1;
2485
- var c = controlLines.length - 1;
2486
-
2487
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
2488
- // We expect at least one stack frame to be shared.
2489
- // Typically this will be the root most one. However, stack frames may be
2490
- // cut off due to maximum stack limits. In this case, one maybe cut off
2491
- // earlier than the other. We assume that the sample is longer or the same
2492
- // and there for cut off earlier. So we should find the root most frame in
2493
- // the sample somewhere in the control.
2494
- c--;
2495
- }
2496
-
2497
- for (; s >= 1 && c >= 0; s--, c--) {
2498
- // Next we find the first one that isn't the same which should be the
2499
- // frame that called our sample function and the control.
2500
- if (sampleLines[s] !== controlLines[c]) {
2501
- // In V8, the first line is describing the message but other VMs don't.
2502
- // If we're about to return the first line, and the control is also on the same
2503
- // line, that's a pretty good indicator that our sample threw at same line as
2504
- // the control. I.e. before we entered the sample frame. So we ignore this result.
2505
- // This can happen if you passed a class to function component, or non-function.
2506
- if (s !== 1 || c !== 1) {
2507
- do {
2508
- s--;
2509
- c--; // We may still have similar intermediate frames from the construct call.
2510
- // The next one that isn't the same should be our match though.
2511
-
2512
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
2513
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
2514
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
2515
- // but we have a user-provided "displayName"
2516
- // splice it in to make the stack more readable.
2517
-
2518
-
2519
- if (fn.displayName && _frame.includes('<anonymous>')) {
2520
- _frame = _frame.replace('<anonymous>', fn.displayName);
2521
- }
2522
-
2523
- {
2524
- if (typeof fn === 'function') {
2525
- componentFrameCache.set(fn, _frame);
2526
- }
2527
- } // Return the line we found.
2528
-
2529
-
2530
- return _frame;
2531
- }
2532
- } while (s >= 1 && c >= 0);
2533
- }
2534
-
2535
- break;
2536
- }
2537
- }
2538
- }
2539
- } finally {
2540
- reentry = false;
2541
-
2542
- {
2543
- ReactCurrentDispatcher.current = previousDispatcher;
2544
- reenableLogs();
2545
- }
2546
-
2547
- Error.prepareStackTrace = previousPrepareStackTrace;
2548
- } // Fallback to just using the name if we couldn't make it throw.
2549
-
2550
-
2551
- var name = fn ? fn.displayName || fn.name : '';
2552
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
2553
-
2554
- {
2555
- if (typeof fn === 'function') {
2556
- componentFrameCache.set(fn, syntheticFrame);
2557
- }
2558
- }
2559
-
2560
- return syntheticFrame;
2561
- }
2562
- function describeFunctionComponentFrame(fn, source, ownerFn) {
2563
- {
2564
- return describeNativeComponentFrame(fn, false);
2565
- }
2566
- }
2567
-
2568
- function shouldConstruct(Component) {
2569
- var prototype = Component.prototype;
2570
- return !!(prototype && prototype.isReactComponent);
2571
- }
2572
-
2573
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2574
-
2575
- if (type == null) {
2576
- return '';
2577
- }
2578
-
2579
- if (typeof type === 'function') {
2580
- {
2581
- return describeNativeComponentFrame(type, shouldConstruct(type));
2582
- }
2583
- }
2584
-
2585
- if (typeof type === 'string') {
2586
- return describeBuiltInComponentFrame(type);
2587
- }
2588
-
2589
- switch (type) {
2590
- case REACT_SUSPENSE_TYPE:
2591
- return describeBuiltInComponentFrame('Suspense');
2592
-
2593
- case REACT_SUSPENSE_LIST_TYPE:
2594
- return describeBuiltInComponentFrame('SuspenseList');
2595
- }
2596
-
2597
- if (typeof type === 'object') {
2598
- switch (type.$$typeof) {
2599
- case REACT_FORWARD_REF_TYPE:
2600
- return describeFunctionComponentFrame(type.render);
2601
-
2602
- case REACT_MEMO_TYPE:
2603
- // Memo may contain any component type so we recursively resolve it.
2604
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2605
-
2606
- case REACT_LAZY_TYPE:
2607
- {
2608
- var lazyComponent = type;
2609
- var payload = lazyComponent._payload;
2610
- var init = lazyComponent._init;
2611
-
2612
- try {
2613
- // Lazy may contain any component type so we recursively resolve it.
2614
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2615
- } catch (x) {}
2616
- }
2617
- }
2618
- }
2619
-
2620
- return '';
2621
- }
2622
-
2623
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2624
-
2625
- var loggedTypeFailures = {};
2626
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2627
-
2628
- function setCurrentlyValidatingElement(element) {
2629
- {
2630
- if (element) {
2631
- var owner = element._owner;
2632
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2633
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
2634
- } else {
2635
- ReactDebugCurrentFrame.setExtraStackFrame(null);
2636
- }
2637
- }
2638
- }
2639
-
2640
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
2641
- {
2642
- // $FlowFixMe This is okay but Flow doesn't know it.
2643
- var has = Function.call.bind(hasOwnProperty);
2644
-
2645
- for (var typeSpecName in typeSpecs) {
2646
- if (has(typeSpecs, typeSpecName)) {
2647
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
2648
- // fail the render phase where it didn't fail before. So we log it.
2649
- // After these have been cleaned up, we'll let them throw.
2650
-
2651
- try {
2652
- // This is intentionally an invariant that gets caught. It's the same
2653
- // behavior as without this statement except with a better message.
2654
- if (typeof typeSpecs[typeSpecName] !== 'function') {
2655
- // eslint-disable-next-line react-internal/prod-error-codes
2656
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
2657
- err.name = 'Invariant Violation';
2658
- throw err;
2659
- }
2660
-
2661
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
2662
- } catch (ex) {
2663
- error$1 = ex;
2664
- }
2665
-
2666
- if (error$1 && !(error$1 instanceof Error)) {
2667
- setCurrentlyValidatingElement(element);
2668
-
2669
- error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
2670
-
2671
- setCurrentlyValidatingElement(null);
2672
- }
2673
-
2674
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2675
- // Only monitor this failure once because there tends to be a lot of the
2676
- // same error.
2677
- loggedTypeFailures[error$1.message] = true;
2678
- setCurrentlyValidatingElement(element);
2679
-
2680
- error('Failed %s type: %s', location, error$1.message);
2681
-
2682
- setCurrentlyValidatingElement(null);
2683
- }
2684
- }
2685
- }
2686
- }
2687
- }
2688
-
2689
- var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
2690
-
2691
- function isArray(a) {
2692
- return isArrayImpl(a);
2693
- }
2694
-
2695
- /*
2696
- * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
2697
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
2698
- *
2699
- * The functions in this module will throw an easier-to-understand,
2700
- * easier-to-debug exception with a clear errors message message explaining the
2701
- * problem. (Instead of a confusing exception thrown inside the implementation
2702
- * of the `value` object).
2703
- */
2704
- // $FlowFixMe only called in DEV, so void return is not possible.
2705
- function typeName(value) {
2706
- {
2707
- // toStringTag is needed for namespaced types like Temporal.Instant
2708
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
2709
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
2710
- return type;
2711
- }
2712
- } // $FlowFixMe only called in DEV, so void return is not possible.
2713
-
2714
-
2715
- function willCoercionThrow(value) {
2716
- {
2717
- try {
2718
- testStringCoercion(value);
2719
- return false;
2720
- } catch (e) {
2721
- return true;
2722
- }
2723
- }
2724
- }
2725
-
2726
- function testStringCoercion(value) {
2727
- // If you ended up here by following an exception call stack, here's what's
2728
- // happened: you supplied an object or symbol value to React (as a prop, key,
2729
- // DOM attribute, CSS property, string ref, etc.) and when React tried to
2730
- // coerce it to a string using `'' + value`, an exception was thrown.
2731
- //
2732
- // The most common types that will cause this exception are `Symbol` instances
2733
- // and Temporal objects like `Temporal.Instant`. But any object that has a
2734
- // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
2735
- // exception. (Library authors do this to prevent users from using built-in
2736
- // numeric operators like `+` or comparison operators like `>=` because custom
2737
- // methods are needed to perform accurate arithmetic or comparison.)
2738
- //
2739
- // To fix the problem, coerce this object or symbol value to a string before
2740
- // passing it to React. The most reliable way is usually `String(value)`.
2741
- //
2742
- // To find which value is throwing, check the browser or debugger console.
2743
- // Before this exception was thrown, there should be `console.error` output
2744
- // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
2745
- // problem and how that type was used: key, atrribute, input value prop, etc.
2746
- // In most cases, this console output also shows the component and its
2747
- // ancestor components where the exception happened.
2748
- //
2749
- // eslint-disable-next-line react-internal/safe-string-coercion
2750
- return '' + value;
2751
- }
2752
- function checkKeyStringCoercion(value) {
2753
- {
2754
- if (willCoercionThrow(value)) {
2755
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
2756
-
2757
- return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
2758
- }
2759
- }
2760
- }
2761
-
2762
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2763
- var RESERVED_PROPS = {
2764
- key: true,
2765
- ref: true,
2766
- __self: true,
2767
- __source: true
2768
- };
2769
- var specialPropKeyWarningShown;
2770
- var specialPropRefWarningShown;
2771
-
2772
- function hasValidRef(config) {
2773
- {
2774
- if (hasOwnProperty.call(config, 'ref')) {
2775
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
2776
-
2777
- if (getter && getter.isReactWarning) {
2778
- return false;
2185
+ return "<...>";
2779
2186
  }
2780
2187
  }
2781
- }
2782
-
2783
- return config.ref !== undefined;
2784
- }
2785
-
2786
- function hasValidKey(config) {
2787
- {
2788
- if (hasOwnProperty.call(config, 'key')) {
2789
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
2790
-
2791
- if (getter && getter.isReactWarning) {
2792
- return false;
2793
- }
2188
+ function getOwner() {
2189
+ var dispatcher = ReactSharedInternals.A;
2190
+ return null === dispatcher ? null : dispatcher.getOwner();
2794
2191
  }
2795
- }
2796
-
2797
- return config.key !== undefined;
2798
- }
2799
-
2800
- function warnIfStringRefCannotBeAutoConverted(config, self) {
2801
- {
2802
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && self) ;
2803
- }
2804
- }
2805
-
2806
- function defineKeyPropWarningGetter(props, displayName) {
2807
- {
2808
- var warnAboutAccessingKey = function () {
2809
- if (!specialPropKeyWarningShown) {
2810
- specialPropKeyWarningShown = true;
2811
-
2812
- 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://reactjs.org/link/special-props)', displayName);
2813
- }
2814
- };
2815
-
2816
- warnAboutAccessingKey.isReactWarning = true;
2817
- Object.defineProperty(props, 'key', {
2818
- get: warnAboutAccessingKey,
2819
- configurable: true
2820
- });
2821
- }
2822
- }
2823
-
2824
- function defineRefPropWarningGetter(props, displayName) {
2825
- {
2826
- var warnAboutAccessingRef = function () {
2827
- if (!specialPropRefWarningShown) {
2828
- specialPropRefWarningShown = true;
2829
-
2830
- error('%s: `ref` 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://reactjs.org/link/special-props)', displayName);
2831
- }
2832
- };
2833
-
2834
- warnAboutAccessingRef.isReactWarning = true;
2835
- Object.defineProperty(props, 'ref', {
2836
- get: warnAboutAccessingRef,
2837
- configurable: true
2838
- });
2839
- }
2840
- }
2841
- /**
2842
- * Factory method to create a new React element. This no longer adheres to
2843
- * the class pattern, so do not use new to call it. Also, instanceof check
2844
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
2845
- * if something is a React Element.
2846
- *
2847
- * @param {*} type
2848
- * @param {*} props
2849
- * @param {*} key
2850
- * @param {string|object} ref
2851
- * @param {*} owner
2852
- * @param {*} self A *temporary* helper to detect places where `this` is
2853
- * different from the `owner` when React.createElement is called, so that we
2854
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
2855
- * functions, and as long as `this` and owner are the same, there will be no
2856
- * change in behavior.
2857
- * @param {*} source An annotation object (added by a transpiler or otherwise)
2858
- * indicating filename, line number, and/or other information.
2859
- * @internal
2860
- */
2861
-
2862
-
2863
- var ReactElement = function (type, key, ref, self, source, owner, props) {
2864
- var element = {
2865
- // This tag allows us to uniquely identify this as a React Element
2866
- $$typeof: REACT_ELEMENT_TYPE,
2867
- // Built-in properties that belong on the element
2868
- type: type,
2869
- key: key,
2870
- ref: ref,
2871
- props: props,
2872
- // Record the component responsible for creating this element.
2873
- _owner: owner
2874
- };
2875
-
2876
- {
2877
- // The validation flag is currently mutative. We put it on
2878
- // an external backing store so that we can freeze the whole object.
2879
- // This can be replaced with a WeakMap once they are implemented in
2880
- // commonly used development environments.
2881
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
2882
- // the validation flag non-enumerable (where possible, which should
2883
- // include every environment we run tests in), so the test framework
2884
- // ignores it.
2885
-
2886
- Object.defineProperty(element._store, 'validated', {
2887
- configurable: false,
2888
- enumerable: false,
2889
- writable: true,
2890
- value: false
2891
- }); // self and source are DEV only properties.
2892
-
2893
- Object.defineProperty(element, '_self', {
2894
- configurable: false,
2895
- enumerable: false,
2896
- writable: false,
2897
- value: self
2898
- }); // Two elements created in two different places should be considered
2899
- // equal for testing purposes and therefore we hide it from enumeration.
2900
-
2901
- Object.defineProperty(element, '_source', {
2902
- configurable: false,
2903
- enumerable: false,
2904
- writable: false,
2905
- value: source
2906
- });
2907
-
2908
- if (Object.freeze) {
2909
- Object.freeze(element.props);
2910
- Object.freeze(element);
2192
+ function UnknownOwner() {
2193
+ return Error("react-stack-top-frame");
2911
2194
  }
2912
- }
2913
-
2914
- return element;
2915
- };
2916
- /**
2917
- * https://github.com/reactjs/rfcs/pull/107
2918
- * @param {*} type
2919
- * @param {object} props
2920
- * @param {string} key
2921
- */
2922
-
2923
- function jsxDEV(type, config, maybeKey, source, self) {
2924
- {
2925
- var propName; // Reserved names are extracted
2926
-
2927
- var props = {};
2928
- var key = null;
2929
- var ref = null; // Currently, key can be spread in as a prop. This causes a potential
2930
- // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
2931
- // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
2932
- // but as an intermediary step, we will use jsxDEV for everything except
2933
- // <div {...props} key="Hi" />, because we aren't currently able to tell if
2934
- // key is explicitly declared to be undefined or not.
2935
-
2936
- if (maybeKey !== undefined) {
2937
- {
2938
- checkKeyStringCoercion(maybeKey);
2195
+ function hasValidKey(config) {
2196
+ if (hasOwnProperty.call(config, "key")) {
2197
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2198
+ if (getter && getter.isReactWarning) return false;
2939
2199
  }
2940
-
2941
- key = '' + maybeKey;
2200
+ return void 0 !== config.key;
2942
2201
  }
2943
-
2944
- if (hasValidKey(config)) {
2945
- {
2946
- checkKeyStringCoercion(config.key);
2947
- }
2948
-
2949
- key = '' + config.key;
2950
- }
2951
-
2952
- if (hasValidRef(config)) {
2953
- ref = config.ref;
2954
- warnIfStringRefCannotBeAutoConverted(config, self);
2955
- } // Remaining properties are added to a new props object
2956
-
2957
-
2958
- for (propName in config) {
2959
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2960
- props[propName] = config[propName];
2961
- }
2962
- } // Resolve default props
2963
-
2964
-
2965
- if (type && type.defaultProps) {
2966
- var defaultProps = type.defaultProps;
2967
-
2968
- for (propName in defaultProps) {
2969
- if (props[propName] === undefined) {
2970
- props[propName] = defaultProps[propName];
2971
- }
2972
- }
2973
- }
2974
-
2975
- if (key || ref) {
2976
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
2977
-
2978
- if (key) {
2979
- defineKeyPropWarningGetter(props, displayName);
2980
- }
2981
-
2982
- if (ref) {
2983
- defineRefPropWarningGetter(props, displayName);
2984
- }
2985
- }
2986
-
2987
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2988
- }
2989
- }
2990
-
2991
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2992
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2993
-
2994
- function setCurrentlyValidatingElement$1(element) {
2995
- {
2996
- if (element) {
2997
- var owner = element._owner;
2998
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2999
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
3000
- } else {
3001
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
3002
- }
3003
- }
3004
- }
3005
-
3006
- var propTypesMisspellWarningShown;
3007
-
3008
- {
3009
- propTypesMisspellWarningShown = false;
3010
- }
3011
- /**
3012
- * Verifies the object is a ReactElement.
3013
- * See https://reactjs.org/docs/react-api.html#isvalidelement
3014
- * @param {?object} object
3015
- * @return {boolean} True if `object` is a ReactElement.
3016
- * @final
3017
- */
3018
-
3019
-
3020
- function isValidElement(object) {
3021
- {
3022
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
3023
- }
3024
- }
3025
-
3026
- function getDeclarationErrorAddendum() {
3027
- {
3028
- if (ReactCurrentOwner$1.current) {
3029
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
3030
-
3031
- if (name) {
3032
- return '\n\nCheck the render method of `' + name + '`.';
3033
- }
3034
- }
3035
-
3036
- return '';
3037
- }
3038
- }
3039
-
3040
- function getSourceInfoErrorAddendum(source) {
3041
- {
3042
-
3043
- return '';
3044
- }
3045
- }
3046
- /**
3047
- * Warn if there's no key explicitly set on dynamic arrays of children or
3048
- * object keys are not valid. This allows us to keep track of children between
3049
- * updates.
3050
- */
3051
-
3052
-
3053
- var ownerHasKeyUseWarning = {};
3054
-
3055
- function getCurrentComponentErrorInfo(parentType) {
3056
- {
3057
- var info = getDeclarationErrorAddendum();
3058
-
3059
- if (!info) {
3060
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
3061
-
3062
- if (parentName) {
3063
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2202
+ function defineKeyPropWarningGetter(props, displayName) {
2203
+ function warnAboutAccessingKey() {
2204
+ specialPropKeyWarningShown ||
2205
+ ((specialPropKeyWarningShown = true),
2206
+ console.error(
2207
+ "%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)",
2208
+ displayName
2209
+ ));
3064
2210
  }
2211
+ warnAboutAccessingKey.isReactWarning = true;
2212
+ Object.defineProperty(props, "key", {
2213
+ get: warnAboutAccessingKey,
2214
+ configurable: true
2215
+ });
3065
2216
  }
3066
-
3067
- return info;
3068
- }
3069
- }
3070
- /**
3071
- * Warn if the element doesn't have an explicit key assigned to it.
3072
- * This element is in an array. The array could grow and shrink or be
3073
- * reordered. All children that haven't already been validated are required to
3074
- * have a "key" property assigned to it. Error statuses are cached so a warning
3075
- * will only be shown once.
3076
- *
3077
- * @internal
3078
- * @param {ReactElement} element Element that requires a key.
3079
- * @param {*} parentType element's parent's type.
3080
- */
3081
-
3082
-
3083
- function validateExplicitKey(element, parentType) {
3084
- {
3085
- if (!element._store || element._store.validated || element.key != null) {
3086
- return;
3087
- }
3088
-
3089
- element._store.validated = true;
3090
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
3091
-
3092
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
3093
- return;
3094
- }
3095
-
3096
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
3097
- // property, it may be the creator of the child that's responsible for
3098
- // assigning it a key.
3099
-
3100
- var childOwner = '';
3101
-
3102
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
3103
- // Give the component that originally created this child.
3104
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
3105
- }
3106
-
3107
- setCurrentlyValidatingElement$1(element);
3108
-
3109
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
3110
-
3111
- setCurrentlyValidatingElement$1(null);
3112
- }
3113
- }
3114
- /**
3115
- * Ensure that every element either is passed in a static location, in an
3116
- * array with an explicit keys property defined, or in an object literal
3117
- * with valid key property.
3118
- *
3119
- * @internal
3120
- * @param {ReactNode} node Statically passed child of any type.
3121
- * @param {*} parentType node's parent's type.
3122
- */
3123
-
3124
-
3125
- function validateChildKeys(node, parentType) {
3126
- {
3127
- if (typeof node !== 'object') {
3128
- return;
3129
- }
3130
-
3131
- if (isArray(node)) {
3132
- for (var i = 0; i < node.length; i++) {
3133
- var child = node[i];
3134
-
3135
- if (isValidElement(child)) {
3136
- validateExplicitKey(child, parentType);
3137
- }
3138
- }
3139
- } else if (isValidElement(node)) {
3140
- // This element was passed in a valid location.
3141
- if (node._store) {
3142
- node._store.validated = true;
3143
- }
3144
- } else if (node) {
3145
- var iteratorFn = getIteratorFn(node);
3146
-
3147
- if (typeof iteratorFn === 'function') {
3148
- // Entry iterators used to provide implicit keys,
3149
- // but now we print a separate warning for them later.
3150
- if (iteratorFn !== node.entries) {
3151
- var iterator = iteratorFn.call(node);
3152
- var step;
3153
-
3154
- while (!(step = iterator.next()).done) {
3155
- if (isValidElement(step.value)) {
3156
- validateExplicitKey(step.value, parentType);
3157
- }
3158
- }
3159
- }
3160
- }
3161
- }
3162
- }
3163
- }
3164
- /**
3165
- * Given an element, validate that its props follow the propTypes definition,
3166
- * provided by the type.
3167
- *
3168
- * @param {ReactElement} element
3169
- */
3170
-
3171
-
3172
- function validatePropTypes(element) {
3173
- {
3174
- var type = element.type;
3175
-
3176
- if (type === null || type === undefined || typeof type === 'string') {
3177
- return;
3178
- }
3179
-
3180
- var propTypes;
3181
-
3182
- if (typeof type === 'function') {
3183
- propTypes = type.propTypes;
3184
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
3185
- // Inner props are checked in the reconciler.
3186
- type.$$typeof === REACT_MEMO_TYPE)) {
3187
- propTypes = type.propTypes;
3188
- } else {
3189
- return;
3190
- }
3191
-
3192
- if (propTypes) {
3193
- // Intentionally inside to avoid triggering lazy initializers:
3194
- var name = getComponentNameFromType(type);
3195
- checkPropTypes(propTypes, element.props, 'prop', name, element);
3196
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
3197
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
3198
-
3199
- var _name = getComponentNameFromType(type);
3200
-
3201
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
2217
+ function elementRefGetterWithDeprecationWarning() {
2218
+ var componentName = getComponentNameFromType(this.type);
2219
+ didWarnAboutElementRef[componentName] ||
2220
+ ((didWarnAboutElementRef[componentName] = true),
2221
+ console.error(
2222
+ "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."
2223
+ ));
2224
+ componentName = this.props.ref;
2225
+ return void 0 !== componentName ? componentName : null;
3202
2226
  }
3203
-
3204
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
3205
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
2227
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
2228
+ var refProp = props.ref;
2229
+ type = {
2230
+ $$typeof: REACT_ELEMENT_TYPE,
2231
+ type: type,
2232
+ key: key,
2233
+ props: props,
2234
+ _owner: owner
2235
+ };
2236
+ null !== (void 0 !== refProp ? refProp : null)
2237
+ ? Object.defineProperty(type, "ref", {
2238
+ enumerable: false,
2239
+ get: elementRefGetterWithDeprecationWarning
2240
+ })
2241
+ : Object.defineProperty(type, "ref", { enumerable: false, value: null });
2242
+ type._store = {};
2243
+ Object.defineProperty(type._store, "validated", {
2244
+ configurable: false,
2245
+ enumerable: false,
2246
+ writable: true,
2247
+ value: 0
2248
+ });
2249
+ Object.defineProperty(type, "_debugInfo", {
2250
+ configurable: false,
2251
+ enumerable: false,
2252
+ writable: true,
2253
+ value: null
2254
+ });
2255
+ Object.defineProperty(type, "_debugStack", {
2256
+ configurable: false,
2257
+ enumerable: false,
2258
+ writable: true,
2259
+ value: debugStack
2260
+ });
2261
+ Object.defineProperty(type, "_debugTask", {
2262
+ configurable: false,
2263
+ enumerable: false,
2264
+ writable: true,
2265
+ value: debugTask
2266
+ });
2267
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
2268
+ return type;
3206
2269
  }
3207
- }
3208
- }
3209
- /**
3210
- * Given a fragment, validate that it can only be provided with fragment props
3211
- * @param {ReactElement} fragment
3212
- */
3213
-
3214
-
3215
- function validateFragmentProps(fragment) {
3216
- {
3217
- var keys = Object.keys(fragment.props);
3218
-
3219
- for (var i = 0; i < keys.length; i++) {
3220
- var key = keys[i];
3221
-
3222
- if (key !== 'children' && key !== 'key') {
3223
- setCurrentlyValidatingElement$1(fragment);
3224
-
3225
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
3226
-
3227
- setCurrentlyValidatingElement$1(null);
3228
- break;
2270
+ function jsxDEVImpl(
2271
+ type,
2272
+ config,
2273
+ maybeKey,
2274
+ isStaticChildren,
2275
+ debugStack,
2276
+ debugTask
2277
+ ) {
2278
+ var children = config.children;
2279
+ if (void 0 !== children)
2280
+ if (isStaticChildren)
2281
+ if (isArrayImpl(children)) {
2282
+ for (
2283
+ isStaticChildren = 0;
2284
+ isStaticChildren < children.length;
2285
+ isStaticChildren++
2286
+ )
2287
+ validateChildKeys(children[isStaticChildren]);
2288
+ Object.freeze && Object.freeze(children);
2289
+ } else
2290
+ console.error(
2291
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
2292
+ );
2293
+ else validateChildKeys(children);
2294
+ if (hasOwnProperty.call(config, "key")) {
2295
+ children = getComponentNameFromType(type);
2296
+ var keys = Object.keys(config).filter(function (k) {
2297
+ return "key" !== k;
2298
+ });
2299
+ isStaticChildren =
2300
+ 0 < keys.length
2301
+ ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
2302
+ : "{key: someKey}";
2303
+ didWarnAboutKeySpread[children + isStaticChildren] ||
2304
+ ((keys =
2305
+ 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
2306
+ console.error(
2307
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
2308
+ isStaticChildren,
2309
+ children,
2310
+ keys,
2311
+ children
2312
+ ),
2313
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
3229
2314
  }
2315
+ children = null;
2316
+ void 0 !== maybeKey &&
2317
+ (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
2318
+ hasValidKey(config) &&
2319
+ (checkKeyStringCoercion(config.key), (children = "" + config.key));
2320
+ if ("key" in config) {
2321
+ maybeKey = {};
2322
+ for (var propName in config)
2323
+ "key" !== propName && (maybeKey[propName] = config[propName]);
2324
+ } else maybeKey = config;
2325
+ children &&
2326
+ defineKeyPropWarningGetter(
2327
+ maybeKey,
2328
+ "function" === typeof type
2329
+ ? type.displayName || type.name || "Unknown"
2330
+ : type
2331
+ );
2332
+ return ReactElement(
2333
+ type,
2334
+ children,
2335
+ maybeKey,
2336
+ getOwner(),
2337
+ debugStack,
2338
+ debugTask
2339
+ );
3230
2340
  }
3231
-
3232
- if (fragment.ref !== null) {
3233
- setCurrentlyValidatingElement$1(fragment);
3234
-
3235
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
3236
-
3237
- setCurrentlyValidatingElement$1(null);
2341
+ function validateChildKeys(node) {
2342
+ isValidElement(node)
2343
+ ? node._store && (node._store.validated = 1)
2344
+ : "object" === typeof node &&
2345
+ null !== node &&
2346
+ node.$$typeof === REACT_LAZY_TYPE &&
2347
+ ("fulfilled" === node._payload.status
2348
+ ? isValidElement(node._payload.value) &&
2349
+ node._payload.value._store &&
2350
+ (node._payload.value._store.validated = 1)
2351
+ : node._store && (node._store.validated = 1));
3238
2352
  }
3239
- }
3240
- }
3241
-
3242
- var didWarnAboutKeySpread = {};
3243
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
3244
- {
3245
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
3246
- // succeed and there will likely be errors in render.
3247
-
3248
- if (!validType) {
3249
- var info = '';
3250
-
3251
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
3252
- 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.";
3253
- }
3254
-
3255
- var sourceInfo = getSourceInfoErrorAddendum();
3256
-
3257
- if (sourceInfo) {
3258
- info += sourceInfo;
3259
- } else {
3260
- info += getDeclarationErrorAddendum();
3261
- }
3262
-
3263
- var typeString;
3264
-
3265
- if (type === null) {
3266
- typeString = 'null';
3267
- } else if (isArray(type)) {
3268
- typeString = 'array';
3269
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
3270
- typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
3271
- info = ' Did you accidentally export a JSX literal instead of a component?';
3272
- } else {
3273
- typeString = typeof type;
3274
- }
3275
-
3276
- error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
2353
+ function isValidElement(object) {
2354
+ return (
2355
+ "object" === typeof object &&
2356
+ null !== object &&
2357
+ object.$$typeof === REACT_ELEMENT_TYPE
2358
+ );
3277
2359
  }
3278
-
3279
- var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
3280
- // TODO: Drop this when these are no longer allowed as the type argument.
3281
-
3282
- if (element == null) {
3283
- return element;
3284
- } // Skip key warning if the type isn't valid since our key validation logic
3285
- // doesn't expect a non-string/function type and can throw confusing errors.
3286
- // We don't want exception behavior to differ between dev and prod.
3287
- // (Rendering will throw with a helpful message and as soon as the type is
3288
- // fixed, the key warnings will appear.)
3289
-
3290
-
3291
- if (validType) {
3292
- var children = props.children;
3293
-
3294
- if (children !== undefined) {
3295
- if (isStaticChildren) {
3296
- if (isArray(children)) {
3297
- for (var i = 0; i < children.length; i++) {
3298
- validateChildKeys(children[i], type);
3299
- }
3300
-
3301
- if (Object.freeze) {
3302
- Object.freeze(children);
3303
- }
3304
- } else {
3305
- error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
3306
- }
3307
- } else {
3308
- validateChildKeys(children, type);
3309
- }
3310
- }
3311
- }
3312
-
3313
- {
3314
- if (hasOwnProperty.call(props, 'key')) {
3315
- var componentName = getComponentNameFromType(type);
3316
- var keys = Object.keys(props).filter(function (k) {
3317
- return k !== 'key';
3318
- });
3319
- var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
3320
-
3321
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
3322
- var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
3323
-
3324
- error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
3325
-
3326
- didWarnAboutKeySpread[componentName + beforeExample] = true;
3327
- }
2360
+ var React = React__default,
2361
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
2362
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
2363
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
2364
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
2365
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
2366
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
2367
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
2368
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
2369
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
2370
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
2371
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
2372
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
2373
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
2374
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
2375
+ ReactSharedInternals =
2376
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
2377
+ hasOwnProperty = Object.prototype.hasOwnProperty,
2378
+ isArrayImpl = Array.isArray,
2379
+ createTask = console.createTask
2380
+ ? console.createTask
2381
+ : function () {
2382
+ return null;
2383
+ };
2384
+ React = {
2385
+ react_stack_bottom_frame: function (callStackForError) {
2386
+ return callStackForError();
3328
2387
  }
3329
- }
3330
-
3331
- if (type === REACT_FRAGMENT_TYPE) {
3332
- validateFragmentProps(element);
3333
- } else {
3334
- validatePropTypes(element);
3335
- }
3336
-
3337
- return element;
3338
- }
3339
- } // These two functions exist to still get child warnings in dev
3340
- // even with the prod transform. This means that jsxDEV is purely
3341
- // opt-in behavior for better messages but that we won't stop
3342
- // giving you warnings if you use production apis.
3343
-
3344
- function jsxWithValidationStatic(type, props, key) {
3345
- {
3346
- return jsxWithValidation(type, props, key, true);
3347
- }
3348
- }
3349
- function jsxWithValidationDynamic(type, props, key) {
3350
- {
3351
- return jsxWithValidation(type, props, key, false);
3352
- }
3353
- }
3354
-
3355
- var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
3356
- // for now we can ship identical prod functions
3357
-
3358
- var jsxs = jsxWithValidationStatic ;
3359
-
3360
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
3361
- reactJsxRuntime_development.jsx = jsx;
3362
- reactJsxRuntime_development.jsxs = jsxs;
2388
+ };
2389
+ var specialPropKeyWarningShown;
2390
+ var didWarnAboutElementRef = {};
2391
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
2392
+ React,
2393
+ UnknownOwner
2394
+ )();
2395
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
2396
+ var didWarnAboutKeySpread = {};
2397
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
2398
+ reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
2399
+ var trackActualOwner =
2400
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
2401
+ return jsxDEVImpl(
2402
+ type,
2403
+ config,
2404
+ maybeKey,
2405
+ false,
2406
+ trackActualOwner
2407
+ ? Error("react-stack-top-frame")
2408
+ : unknownOwnerDebugStack,
2409
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
2410
+ );
2411
+ };
2412
+ reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
2413
+ var trackActualOwner =
2414
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
2415
+ return jsxDEVImpl(
2416
+ type,
2417
+ config,
2418
+ maybeKey,
2419
+ true,
2420
+ trackActualOwner
2421
+ ? Error("react-stack-top-frame")
2422
+ : unknownOwnerDebugStack,
2423
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
2424
+ );
2425
+ };
3363
2426
  })();
3364
- }
3365
2427
  return reactJsxRuntime_development;
3366
2428
  }
3367
2429
 
@@ -3372,7 +2434,7 @@ function requireJsxRuntime () {
3372
2434
  hasRequiredJsxRuntime = 1;
3373
2435
 
3374
2436
  if (process.env.NODE_ENV === 'production') {
3375
- jsxRuntime$1.exports = requireReactJsxRuntime_production_min();
2437
+ jsxRuntime$1.exports = requireReactJsxRuntime_production();
3376
2438
  } else {
3377
2439
  jsxRuntime$1.exports = requireReactJsxRuntime_development();
3378
2440
  }