@gemeente-denhaag/alert 1.0.3 → 1.1.1

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 (3) hide show
  1. package/dist/cjs/index.js +1290 -639
  2. package/dist/mjs/index.js +1290 -639
  3. package/package.json +7 -7
package/dist/cjs/index.js CHANGED
@@ -122,50 +122,29 @@ var Button$1 = React.forwardRef(function Button(_a, ref) {
122
122
  for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
123
123
  }
124
124
  return i;
125
- }var jsxRuntime = {exports: {}};var reactJsxRuntime_production = {};/**
125
+ }var jsxRuntime = {exports: {}};var reactJsxRuntime_production_min = {};/**
126
126
  * @license React
127
- * react-jsx-runtime.production.js
127
+ * react-jsx-runtime.production.min.js
128
128
  *
129
- * Copyright (c) Meta Platforms, Inc. and affiliates.
129
+ * Copyright (c) Facebook, Inc. and its affiliates.
130
130
  *
131
131
  * This source code is licensed under the MIT license found in the
132
132
  * LICENSE file in the root directory of this source tree.
133
133
  */
134
134
 
135
- var hasRequiredReactJsxRuntime_production;
136
-
137
- function requireReactJsxRuntime_production () {
138
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
139
- hasRequiredReactJsxRuntime_production = 1;
140
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
141
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
142
- function jsxProd(type, config, maybeKey) {
143
- var key = null;
144
- void 0 !== maybeKey && (key = "" + maybeKey);
145
- void 0 !== config.key && (key = "" + config.key);
146
- if ("key" in config) {
147
- maybeKey = {};
148
- for (var propName in config)
149
- "key" !== propName && (maybeKey[propName] = config[propName]);
150
- } else maybeKey = config;
151
- config = maybeKey.ref;
152
- return {
153
- $$typeof: REACT_ELEMENT_TYPE,
154
- type: type,
155
- key: key,
156
- ref: void 0 !== config ? config : null,
157
- props: maybeKey
158
- };
159
- }
160
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
161
- reactJsxRuntime_production.jsx = jsxProd;
162
- reactJsxRuntime_production.jsxs = jsxProd;
163
- return reactJsxRuntime_production;
135
+ var hasRequiredReactJsxRuntime_production_min;
136
+
137
+ function requireReactJsxRuntime_production_min () {
138
+ if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
139
+ hasRequiredReactJsxRuntime_production_min = 1;
140
+ var f=React,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:!0,ref:!0,__self:!0,__source:!0};
141
+ 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;
142
+ return reactJsxRuntime_production_min;
164
143
  }var reactJsxRuntime_development = {};/**
165
144
  * @license React
166
145
  * react-jsx-runtime.development.js
167
146
  *
168
- * Copyright (c) Meta Platforms, Inc. and affiliates.
147
+ * Copyright (c) Facebook, Inc. and its affiliates.
169
148
  *
170
149
  * This source code is licensed under the MIT license found in the
171
150
  * LICENSE file in the root directory of this source tree.
@@ -176,650 +155,1322 @@ var hasRequiredReactJsxRuntime_development;
176
155
  function requireReactJsxRuntime_development () {
177
156
  if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
178
157
  hasRequiredReactJsxRuntime_development = 1;
179
- "production" !== process.env.NODE_ENV &&
180
- (function () {
181
- function getComponentNameFromType(type) {
182
- if (null == type) return null;
183
- if ("function" === typeof type)
184
- return type.$$typeof === REACT_CLIENT_REFERENCE$2
185
- ? null
186
- : type.displayName || type.name || null;
187
- if ("string" === typeof type) return type;
188
- switch (type) {
189
- case REACT_FRAGMENT_TYPE:
190
- return "Fragment";
191
- case REACT_PORTAL_TYPE:
192
- return "Portal";
193
- case REACT_PROFILER_TYPE:
194
- return "Profiler";
195
- case REACT_STRICT_MODE_TYPE:
196
- return "StrictMode";
197
- case REACT_SUSPENSE_TYPE:
198
- return "Suspense";
199
- case REACT_SUSPENSE_LIST_TYPE:
200
- return "SuspenseList";
158
+
159
+ if (process.env.NODE_ENV !== "production") {
160
+ (function() {
161
+
162
+ var React$1 = React;
163
+
164
+ // ATTENTION
165
+ // When adding new symbols to this file,
166
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
167
+ // The Symbol used to tag the ReactElement-like types.
168
+ var REACT_ELEMENT_TYPE = Symbol.for('react.element');
169
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
170
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
171
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
172
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
173
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
174
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
175
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
176
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
177
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
178
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
179
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
180
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
181
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
182
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
183
+ function getIteratorFn(maybeIterable) {
184
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
185
+ return null;
186
+ }
187
+
188
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
189
+
190
+ if (typeof maybeIterator === 'function') {
191
+ return maybeIterator;
192
+ }
193
+
194
+ return null;
195
+ }
196
+
197
+ var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
198
+
199
+ function error(format) {
200
+ {
201
+ {
202
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
203
+ args[_key2 - 1] = arguments[_key2];
201
204
  }
202
- if ("object" === typeof type)
203
- switch (
204
- ("number" === typeof type.tag &&
205
- console.error(
206
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
207
- ),
208
- type.$$typeof)
209
- ) {
210
- case REACT_CONTEXT_TYPE:
211
- return (type.displayName || "Context") + ".Provider";
212
- case REACT_CONSUMER_TYPE:
213
- return (type._context.displayName || "Context") + ".Consumer";
214
- case REACT_FORWARD_REF_TYPE:
215
- var innerType = type.render;
216
- type = type.displayName;
217
- type ||
218
- ((type = innerType.displayName || innerType.name || ""),
219
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
220
- return type;
221
- case REACT_MEMO_TYPE:
222
- return (
223
- (innerType = type.displayName || null),
224
- null !== innerType
225
- ? innerType
226
- : getComponentNameFromType(type.type) || "Memo"
227
- );
228
- case REACT_LAZY_TYPE:
229
- innerType = type._payload;
230
- type = type._init;
231
- try {
232
- return getComponentNameFromType(type(innerType));
233
- } catch (x) {}
205
+
206
+ printWarning('error', format, args);
207
+ }
208
+ }
209
+ }
210
+
211
+ function printWarning(level, format, args) {
212
+ // When changing this logic, you might want to also
213
+ // update consoleWithStackDev.www.js as well.
214
+ {
215
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
216
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
217
+
218
+ if (stack !== '') {
219
+ format += '%s';
220
+ args = args.concat([stack]);
221
+ } // eslint-disable-next-line react-internal/safe-string-coercion
222
+
223
+
224
+ var argsWithFormat = args.map(function (item) {
225
+ return String(item);
226
+ }); // Careful: RN currently depends on this prefix
227
+
228
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
229
+ // breaks IE9: https://github.com/facebook/react/issues/13610
230
+ // eslint-disable-next-line react-internal/no-production-logging
231
+
232
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
233
+ }
234
+ }
235
+
236
+ // -----------------------------------------------------------------------------
237
+
238
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
239
+ var enableCacheElement = false;
240
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
241
+
242
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
243
+ // stuff. Intended to enable React core members to more easily debug scheduling
244
+ // issues in DEV builds.
245
+
246
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
247
+
248
+ var REACT_MODULE_REFERENCE;
249
+
250
+ {
251
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
252
+ }
253
+
254
+ function isValidElementType(type) {
255
+ if (typeof type === 'string' || typeof type === 'function') {
256
+ return true;
257
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
258
+
259
+
260
+ 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 ) {
261
+ return true;
262
+ }
263
+
264
+ if (typeof type === 'object' && type !== null) {
265
+ 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
266
+ // types supported by any Flight configuration anywhere since
267
+ // we don't know which Flight build this will end up being used
268
+ // with.
269
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
270
+ return true;
271
+ }
272
+ }
273
+
274
+ return false;
275
+ }
276
+
277
+ function getWrappedName(outerType, innerType, wrapperName) {
278
+ var displayName = outerType.displayName;
279
+
280
+ if (displayName) {
281
+ return displayName;
282
+ }
283
+
284
+ var functionName = innerType.displayName || innerType.name || '';
285
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
286
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
287
+
288
+
289
+ function getContextName(type) {
290
+ return type.displayName || 'Context';
291
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
292
+
293
+
294
+ function getComponentNameFromType(type) {
295
+ if (type == null) {
296
+ // Host root, text node or just invalid type.
297
+ return null;
298
+ }
299
+
300
+ {
301
+ if (typeof type.tag === 'number') {
302
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
303
+ }
304
+ }
305
+
306
+ if (typeof type === 'function') {
307
+ return type.displayName || type.name || null;
308
+ }
309
+
310
+ if (typeof type === 'string') {
311
+ return type;
312
+ }
313
+
314
+ switch (type) {
315
+ case REACT_FRAGMENT_TYPE:
316
+ return 'Fragment';
317
+
318
+ case REACT_PORTAL_TYPE:
319
+ return 'Portal';
320
+
321
+ case REACT_PROFILER_TYPE:
322
+ return 'Profiler';
323
+
324
+ case REACT_STRICT_MODE_TYPE:
325
+ return 'StrictMode';
326
+
327
+ case REACT_SUSPENSE_TYPE:
328
+ return 'Suspense';
329
+
330
+ case REACT_SUSPENSE_LIST_TYPE:
331
+ return 'SuspenseList';
332
+
333
+ }
334
+
335
+ if (typeof type === 'object') {
336
+ switch (type.$$typeof) {
337
+ case REACT_CONTEXT_TYPE:
338
+ var context = type;
339
+ return getContextName(context) + '.Consumer';
340
+
341
+ case REACT_PROVIDER_TYPE:
342
+ var provider = type;
343
+ return getContextName(provider._context) + '.Provider';
344
+
345
+ case REACT_FORWARD_REF_TYPE:
346
+ return getWrappedName(type, type.render, 'ForwardRef');
347
+
348
+ case REACT_MEMO_TYPE:
349
+ var outerName = type.displayName || null;
350
+
351
+ if (outerName !== null) {
352
+ return outerName;
234
353
  }
235
- return null;
354
+
355
+ return getComponentNameFromType(type.type) || 'Memo';
356
+
357
+ case REACT_LAZY_TYPE:
358
+ {
359
+ var lazyComponent = type;
360
+ var payload = lazyComponent._payload;
361
+ var init = lazyComponent._init;
362
+
363
+ try {
364
+ return getComponentNameFromType(init(payload));
365
+ } catch (x) {
366
+ return null;
367
+ }
368
+ }
369
+
370
+ // eslint-disable-next-line no-fallthrough
236
371
  }
237
- function testStringCoercion(value) {
238
- return "" + value;
372
+ }
373
+
374
+ return null;
375
+ }
376
+
377
+ var assign = Object.assign;
378
+
379
+ // Helpers to patch console.logs to avoid logging during side-effect free
380
+ // replaying on render function. This currently only patches the object
381
+ // lazily which won't cover if the log function was extracted eagerly.
382
+ // We could also eagerly patch the method.
383
+ var disabledDepth = 0;
384
+ var prevLog;
385
+ var prevInfo;
386
+ var prevWarn;
387
+ var prevError;
388
+ var prevGroup;
389
+ var prevGroupCollapsed;
390
+ var prevGroupEnd;
391
+
392
+ function disabledLog() {}
393
+
394
+ disabledLog.__reactDisabledLog = true;
395
+ function disableLogs() {
396
+ {
397
+ if (disabledDepth === 0) {
398
+ /* eslint-disable react-internal/no-production-logging */
399
+ prevLog = console.log;
400
+ prevInfo = console.info;
401
+ prevWarn = console.warn;
402
+ prevError = console.error;
403
+ prevGroup = console.group;
404
+ prevGroupCollapsed = console.groupCollapsed;
405
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
406
+
407
+ var props = {
408
+ configurable: true,
409
+ enumerable: true,
410
+ value: disabledLog,
411
+ writable: true
412
+ }; // $FlowFixMe Flow thinks console is immutable.
413
+
414
+ Object.defineProperties(console, {
415
+ info: props,
416
+ log: props,
417
+ warn: props,
418
+ error: props,
419
+ group: props,
420
+ groupCollapsed: props,
421
+ groupEnd: props
422
+ });
423
+ /* eslint-enable react-internal/no-production-logging */
239
424
  }
240
- function checkKeyStringCoercion(value) {
241
- try {
242
- testStringCoercion(value);
243
- var JSCompiler_inline_result = !1;
244
- } catch (e) {
245
- JSCompiler_inline_result = !0;
246
- }
247
- if (JSCompiler_inline_result) {
248
- JSCompiler_inline_result = console;
249
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
250
- var JSCompiler_inline_result$jscomp$0 =
251
- ("function" === typeof Symbol &&
252
- Symbol.toStringTag &&
253
- value[Symbol.toStringTag]) ||
254
- value.constructor.name ||
255
- "Object";
256
- JSCompiler_temp_const.call(
257
- JSCompiler_inline_result,
258
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
259
- JSCompiler_inline_result$jscomp$0
260
- );
261
- return testStringCoercion(value);
262
- }
425
+
426
+ disabledDepth++;
427
+ }
428
+ }
429
+ function reenableLogs() {
430
+ {
431
+ disabledDepth--;
432
+
433
+ if (disabledDepth === 0) {
434
+ /* eslint-disable react-internal/no-production-logging */
435
+ var props = {
436
+ configurable: true,
437
+ enumerable: true,
438
+ writable: true
439
+ }; // $FlowFixMe Flow thinks console is immutable.
440
+
441
+ Object.defineProperties(console, {
442
+ log: assign({}, props, {
443
+ value: prevLog
444
+ }),
445
+ info: assign({}, props, {
446
+ value: prevInfo
447
+ }),
448
+ warn: assign({}, props, {
449
+ value: prevWarn
450
+ }),
451
+ error: assign({}, props, {
452
+ value: prevError
453
+ }),
454
+ group: assign({}, props, {
455
+ value: prevGroup
456
+ }),
457
+ groupCollapsed: assign({}, props, {
458
+ value: prevGroupCollapsed
459
+ }),
460
+ groupEnd: assign({}, props, {
461
+ value: prevGroupEnd
462
+ })
463
+ });
464
+ /* eslint-enable react-internal/no-production-logging */
263
465
  }
264
- function disabledLog() {}
265
- function disableLogs() {
266
- if (0 === disabledDepth) {
267
- prevLog = console.log;
268
- prevInfo = console.info;
269
- prevWarn = console.warn;
270
- prevError = console.error;
271
- prevGroup = console.group;
272
- prevGroupCollapsed = console.groupCollapsed;
273
- prevGroupEnd = console.groupEnd;
274
- var props = {
275
- configurable: !0,
276
- enumerable: !0,
277
- value: disabledLog,
278
- writable: !0
279
- };
280
- Object.defineProperties(console, {
281
- info: props,
282
- log: props,
283
- warn: props,
284
- error: props,
285
- group: props,
286
- groupCollapsed: props,
287
- groupEnd: props
288
- });
289
- }
290
- disabledDepth++;
466
+
467
+ if (disabledDepth < 0) {
468
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
291
469
  }
292
- function reenableLogs() {
293
- disabledDepth--;
294
- if (0 === disabledDepth) {
295
- var props = { configurable: !0, enumerable: !0, writable: !0 };
296
- Object.defineProperties(console, {
297
- log: assign({}, props, { value: prevLog }),
298
- info: assign({}, props, { value: prevInfo }),
299
- warn: assign({}, props, { value: prevWarn }),
300
- error: assign({}, props, { value: prevError }),
301
- group: assign({}, props, { value: prevGroup }),
302
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
303
- groupEnd: assign({}, props, { value: prevGroupEnd })
304
- });
470
+ }
471
+ }
472
+
473
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
474
+ var prefix;
475
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
476
+ {
477
+ if (prefix === undefined) {
478
+ // Extract the VM specific prefix used by each line.
479
+ try {
480
+ throw Error();
481
+ } catch (x) {
482
+ var match = x.stack.trim().match(/\n( *(at )?)/);
483
+ prefix = match && match[1] || '';
305
484
  }
306
- 0 > disabledDepth &&
307
- console.error(
308
- "disabledDepth fell below zero. This is a bug in React. Please file an issue."
309
- );
485
+ } // We use the prefix to ensure our stacks line up with native stack frames.
486
+
487
+
488
+ return '\n' + prefix + name;
489
+ }
490
+ }
491
+ var reentry = false;
492
+ var componentFrameCache;
493
+
494
+ {
495
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
496
+ componentFrameCache = new PossiblyWeakMap();
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;
310
510
  }
311
- function describeBuiltInComponentFrame(name) {
312
- if (void 0 === prefix)
313
- try {
511
+ }
512
+
513
+ var control;
514
+ reentry = true;
515
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
516
+
517
+ Error.prepareStackTrace = undefined;
518
+ var previousDispatcher;
519
+
520
+ {
521
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
522
+ // for warnings.
523
+
524
+ ReactCurrentDispatcher.current = null;
525
+ disableLogs();
526
+ }
527
+
528
+ try {
529
+ // This should throw.
530
+ if (construct) {
531
+ // Something should be setting the props in the constructor.
532
+ var Fake = function () {
533
+ throw Error();
534
+ }; // $FlowFixMe
535
+
536
+
537
+ Object.defineProperty(Fake.prototype, 'props', {
538
+ set: function () {
539
+ // We use a throwing setter instead of frozen or non-writable props
540
+ // because that won't throw in a non-strict mode function.
314
541
  throw Error();
542
+ }
543
+ });
544
+
545
+ if (typeof Reflect === 'object' && Reflect.construct) {
546
+ // We construct a different control for this case to include any extra
547
+ // frames added by the construct call.
548
+ try {
549
+ Reflect.construct(Fake, []);
315
550
  } catch (x) {
316
- var match = x.stack.trim().match(/\n( *(at )?)/);
317
- prefix = (match && match[1]) || "";
318
- suffix =
319
- -1 < x.stack.indexOf("\n at")
320
- ? " (<anonymous>)"
321
- : -1 < x.stack.indexOf("@")
322
- ? "@unknown:0:0"
323
- : "";
551
+ control = x;
324
552
  }
325
- return "\n" + prefix + name + suffix;
326
- }
327
- function describeNativeComponentFrame(fn, construct) {
328
- if (!fn || reentry) return "";
329
- var frame = componentFrameCache.get(fn);
330
- if (void 0 !== frame) return frame;
331
- reentry = !0;
332
- frame = Error.prepareStackTrace;
333
- Error.prepareStackTrace = void 0;
334
- var previousDispatcher = null;
335
- previousDispatcher = ReactSharedInternals.H;
336
- ReactSharedInternals.H = null;
337
- disableLogs();
553
+
554
+ Reflect.construct(fn, [], Fake);
555
+ } else {
556
+ try {
557
+ Fake.call();
558
+ } catch (x) {
559
+ control = x;
560
+ }
561
+
562
+ fn.call(Fake.prototype);
563
+ }
564
+ } else {
338
565
  try {
339
- var RunInRootFrame = {
340
- DetermineComponentFrameRoot: function () {
341
- try {
342
- if (construct) {
343
- var Fake = function () {
344
- throw Error();
345
- };
346
- Object.defineProperty(Fake.prototype, "props", {
347
- set: function () {
348
- throw Error();
349
- }
350
- });
351
- if ("object" === typeof Reflect && Reflect.construct) {
352
- try {
353
- Reflect.construct(Fake, []);
354
- } catch (x) {
355
- var control = x;
356
- }
357
- Reflect.construct(fn, [], Fake);
358
- } else {
359
- try {
360
- Fake.call();
361
- } catch (x$0) {
362
- control = x$0;
363
- }
364
- fn.call(Fake.prototype);
365
- }
366
- } else {
367
- try {
368
- throw Error();
369
- } catch (x$1) {
370
- control = x$1;
566
+ throw Error();
567
+ } catch (x) {
568
+ control = x;
569
+ }
570
+
571
+ fn();
572
+ }
573
+ } catch (sample) {
574
+ // This is inlined manually because closure doesn't do it for us.
575
+ if (sample && control && typeof sample.stack === 'string') {
576
+ // This extracts the first frame from the sample that isn't also in the control.
577
+ // Skipping one frame that we assume is the frame that calls the two.
578
+ var sampleLines = sample.stack.split('\n');
579
+ var controlLines = control.stack.split('\n');
580
+ var s = sampleLines.length - 1;
581
+ var c = controlLines.length - 1;
582
+
583
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
584
+ // We expect at least one stack frame to be shared.
585
+ // Typically this will be the root most one. However, stack frames may be
586
+ // cut off due to maximum stack limits. In this case, one maybe cut off
587
+ // earlier than the other. We assume that the sample is longer or the same
588
+ // and there for cut off earlier. So we should find the root most frame in
589
+ // the sample somewhere in the control.
590
+ c--;
591
+ }
592
+
593
+ for (; s >= 1 && c >= 0; s--, c--) {
594
+ // Next we find the first one that isn't the same which should be the
595
+ // frame that called our sample function and the control.
596
+ if (sampleLines[s] !== controlLines[c]) {
597
+ // In V8, the first line is describing the message but other VMs don't.
598
+ // If we're about to return the first line, and the control is also on the same
599
+ // line, that's a pretty good indicator that our sample threw at same line as
600
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
601
+ // This can happen if you passed a class to function component, or non-function.
602
+ if (s !== 1 || c !== 1) {
603
+ do {
604
+ s--;
605
+ c--; // We may still have similar intermediate frames from the construct call.
606
+ // The next one that isn't the same should be our match though.
607
+
608
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
609
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
610
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
611
+ // but we have a user-provided "displayName"
612
+ // splice it in to make the stack more readable.
613
+
614
+
615
+ if (fn.displayName && _frame.includes('<anonymous>')) {
616
+ _frame = _frame.replace('<anonymous>', fn.displayName);
371
617
  }
372
- (Fake = fn()) &&
373
- "function" === typeof Fake.catch &&
374
- Fake.catch(function () {});
375
- }
376
- } catch (sample) {
377
- if (sample && control && "string" === typeof sample.stack)
378
- return [sample.stack, control.stack];
379
- }
380
- return [null, null];
381
- }
382
- };
383
- RunInRootFrame.DetermineComponentFrameRoot.displayName =
384
- "DetermineComponentFrameRoot";
385
- var namePropDescriptor = Object.getOwnPropertyDescriptor(
386
- RunInRootFrame.DetermineComponentFrameRoot,
387
- "name"
388
- );
389
- namePropDescriptor &&
390
- namePropDescriptor.configurable &&
391
- Object.defineProperty(
392
- RunInRootFrame.DetermineComponentFrameRoot,
393
- "name",
394
- { value: "DetermineComponentFrameRoot" }
395
- );
396
- var _RunInRootFrame$Deter =
397
- RunInRootFrame.DetermineComponentFrameRoot(),
398
- sampleStack = _RunInRootFrame$Deter[0],
399
- controlStack = _RunInRootFrame$Deter[1];
400
- if (sampleStack && controlStack) {
401
- var sampleLines = sampleStack.split("\n"),
402
- controlLines = controlStack.split("\n");
403
- for (
404
- _RunInRootFrame$Deter = namePropDescriptor = 0;
405
- namePropDescriptor < sampleLines.length &&
406
- !sampleLines[namePropDescriptor].includes(
407
- "DetermineComponentFrameRoot"
408
- );
409
-
410
- )
411
- namePropDescriptor++;
412
- for (
413
- ;
414
- _RunInRootFrame$Deter < controlLines.length &&
415
- !controlLines[_RunInRootFrame$Deter].includes(
416
- "DetermineComponentFrameRoot"
417
- );
418
-
419
- )
420
- _RunInRootFrame$Deter++;
421
- if (
422
- namePropDescriptor === sampleLines.length ||
423
- _RunInRootFrame$Deter === controlLines.length
424
- )
425
- for (
426
- namePropDescriptor = sampleLines.length - 1,
427
- _RunInRootFrame$Deter = controlLines.length - 1;
428
- 1 <= namePropDescriptor &&
429
- 0 <= _RunInRootFrame$Deter &&
430
- sampleLines[namePropDescriptor] !==
431
- controlLines[_RunInRootFrame$Deter];
432
-
433
- )
434
- _RunInRootFrame$Deter--;
435
- for (
436
- ;
437
- 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
438
- namePropDescriptor--, _RunInRootFrame$Deter--
439
- )
440
- if (
441
- sampleLines[namePropDescriptor] !==
442
- controlLines[_RunInRootFrame$Deter]
443
- ) {
444
- if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
445
- do
446
- if (
447
- (namePropDescriptor--,
448
- _RunInRootFrame$Deter--,
449
- 0 > _RunInRootFrame$Deter ||
450
- sampleLines[namePropDescriptor] !==
451
- controlLines[_RunInRootFrame$Deter])
452
- ) {
453
- var _frame =
454
- "\n" +
455
- sampleLines[namePropDescriptor].replace(
456
- " at new ",
457
- " at "
458
- );
459
- fn.displayName &&
460
- _frame.includes("<anonymous>") &&
461
- (_frame = _frame.replace("<anonymous>", fn.displayName));
462
- "function" === typeof fn &&
463
- componentFrameCache.set(fn, _frame);
464
- return _frame;
618
+
619
+ {
620
+ if (typeof fn === 'function') {
621
+ componentFrameCache.set(fn, _frame);
465
622
  }
466
- while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
623
+ } // Return the line we found.
624
+
625
+
626
+ return _frame;
467
627
  }
468
- break;
469
- }
628
+ } while (s >= 1 && c >= 0);
629
+ }
630
+
631
+ break;
470
632
  }
471
- } finally {
472
- (reentry = !1),
473
- (ReactSharedInternals.H = previousDispatcher),
474
- reenableLogs(),
475
- (Error.prepareStackTrace = frame);
476
633
  }
477
- sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
478
- ? describeBuiltInComponentFrame(sampleLines)
479
- : "";
480
- "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
481
- return sampleLines;
482
634
  }
483
- function describeUnknownElementTypeFrameInDEV(type) {
484
- if (null == type) return "";
485
- if ("function" === typeof type) {
486
- var prototype = type.prototype;
487
- return describeNativeComponentFrame(
488
- type,
489
- !(!prototype || !prototype.isReactComponent)
490
- );
635
+ } finally {
636
+ reentry = false;
637
+
638
+ {
639
+ ReactCurrentDispatcher.current = previousDispatcher;
640
+ reenableLogs();
641
+ }
642
+
643
+ Error.prepareStackTrace = previousPrepareStackTrace;
644
+ } // Fallback to just using the name if we couldn't make it throw.
645
+
646
+
647
+ var name = fn ? fn.displayName || fn.name : '';
648
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
649
+
650
+ {
651
+ if (typeof fn === 'function') {
652
+ componentFrameCache.set(fn, syntheticFrame);
653
+ }
654
+ }
655
+
656
+ return syntheticFrame;
657
+ }
658
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
659
+ {
660
+ return describeNativeComponentFrame(fn, false);
661
+ }
662
+ }
663
+
664
+ function shouldConstruct(Component) {
665
+ var prototype = Component.prototype;
666
+ return !!(prototype && prototype.isReactComponent);
667
+ }
668
+
669
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
670
+
671
+ if (type == null) {
672
+ return '';
673
+ }
674
+
675
+ if (typeof type === 'function') {
676
+ {
677
+ return describeNativeComponentFrame(type, shouldConstruct(type));
678
+ }
679
+ }
680
+
681
+ if (typeof type === 'string') {
682
+ return describeBuiltInComponentFrame(type);
683
+ }
684
+
685
+ switch (type) {
686
+ case REACT_SUSPENSE_TYPE:
687
+ return describeBuiltInComponentFrame('Suspense');
688
+
689
+ case REACT_SUSPENSE_LIST_TYPE:
690
+ return describeBuiltInComponentFrame('SuspenseList');
691
+ }
692
+
693
+ if (typeof type === 'object') {
694
+ switch (type.$$typeof) {
695
+ case REACT_FORWARD_REF_TYPE:
696
+ return describeFunctionComponentFrame(type.render);
697
+
698
+ case REACT_MEMO_TYPE:
699
+ // Memo may contain any component type so we recursively resolve it.
700
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
701
+
702
+ case REACT_LAZY_TYPE:
703
+ {
704
+ var lazyComponent = type;
705
+ var payload = lazyComponent._payload;
706
+ var init = lazyComponent._init;
707
+
708
+ try {
709
+ // Lazy may contain any component type so we recursively resolve it.
710
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
711
+ } catch (x) {}
712
+ }
713
+ }
714
+ }
715
+
716
+ return '';
717
+ }
718
+
719
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
720
+
721
+ var loggedTypeFailures = {};
722
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
723
+
724
+ function setCurrentlyValidatingElement(element) {
725
+ {
726
+ if (element) {
727
+ var owner = element._owner;
728
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
729
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
730
+ } else {
731
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
732
+ }
733
+ }
734
+ }
735
+
736
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
737
+ {
738
+ // $FlowFixMe This is okay but Flow doesn't know it.
739
+ var has = Function.call.bind(hasOwnProperty);
740
+
741
+ for (var typeSpecName in typeSpecs) {
742
+ if (has(typeSpecs, typeSpecName)) {
743
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
744
+ // fail the render phase where it didn't fail before. So we log it.
745
+ // After these have been cleaned up, we'll let them throw.
746
+
747
+ try {
748
+ // This is intentionally an invariant that gets caught. It's the same
749
+ // behavior as without this statement except with a better message.
750
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
751
+ // eslint-disable-next-line react-internal/prod-error-codes
752
+ 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`.');
753
+ err.name = 'Invariant Violation';
754
+ throw err;
755
+ }
756
+
757
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
758
+ } catch (ex) {
759
+ error$1 = ex;
760
+ }
761
+
762
+ if (error$1 && !(error$1 instanceof Error)) {
763
+ setCurrentlyValidatingElement(element);
764
+
765
+ 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);
766
+
767
+ setCurrentlyValidatingElement(null);
768
+ }
769
+
770
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
771
+ // Only monitor this failure once because there tends to be a lot of the
772
+ // same error.
773
+ loggedTypeFailures[error$1.message] = true;
774
+ setCurrentlyValidatingElement(element);
775
+
776
+ error('Failed %s type: %s', location, error$1.message);
777
+
778
+ setCurrentlyValidatingElement(null);
779
+ }
491
780
  }
492
- if ("string" === typeof type) return describeBuiltInComponentFrame(type);
493
- switch (type) {
494
- case REACT_SUSPENSE_TYPE:
495
- return describeBuiltInComponentFrame("Suspense");
496
- case REACT_SUSPENSE_LIST_TYPE:
497
- return describeBuiltInComponentFrame("SuspenseList");
781
+ }
782
+ }
783
+ }
784
+
785
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
786
+
787
+ function isArray(a) {
788
+ return isArrayImpl(a);
789
+ }
790
+
791
+ /*
792
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
793
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
794
+ *
795
+ * The functions in this module will throw an easier-to-understand,
796
+ * easier-to-debug exception with a clear errors message message explaining the
797
+ * problem. (Instead of a confusing exception thrown inside the implementation
798
+ * of the `value` object).
799
+ */
800
+ // $FlowFixMe only called in DEV, so void return is not possible.
801
+ function typeName(value) {
802
+ {
803
+ // toStringTag is needed for namespaced types like Temporal.Instant
804
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
805
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
806
+ return type;
807
+ }
808
+ } // $FlowFixMe only called in DEV, so void return is not possible.
809
+
810
+
811
+ function willCoercionThrow(value) {
812
+ {
813
+ try {
814
+ testStringCoercion(value);
815
+ return false;
816
+ } catch (e) {
817
+ return true;
818
+ }
819
+ }
820
+ }
821
+
822
+ function testStringCoercion(value) {
823
+ // If you ended up here by following an exception call stack, here's what's
824
+ // happened: you supplied an object or symbol value to React (as a prop, key,
825
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
826
+ // coerce it to a string using `'' + value`, an exception was thrown.
827
+ //
828
+ // The most common types that will cause this exception are `Symbol` instances
829
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
830
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
831
+ // exception. (Library authors do this to prevent users from using built-in
832
+ // numeric operators like `+` or comparison operators like `>=` because custom
833
+ // methods are needed to perform accurate arithmetic or comparison.)
834
+ //
835
+ // To fix the problem, coerce this object or symbol value to a string before
836
+ // passing it to React. The most reliable way is usually `String(value)`.
837
+ //
838
+ // To find which value is throwing, check the browser or debugger console.
839
+ // Before this exception was thrown, there should be `console.error` output
840
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
841
+ // problem and how that type was used: key, atrribute, input value prop, etc.
842
+ // In most cases, this console output also shows the component and its
843
+ // ancestor components where the exception happened.
844
+ //
845
+ // eslint-disable-next-line react-internal/safe-string-coercion
846
+ return '' + value;
847
+ }
848
+ function checkKeyStringCoercion(value) {
849
+ {
850
+ if (willCoercionThrow(value)) {
851
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
852
+
853
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
854
+ }
855
+ }
856
+ }
857
+
858
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
859
+ var RESERVED_PROPS = {
860
+ key: true,
861
+ ref: true,
862
+ __self: true,
863
+ __source: true
864
+ };
865
+ var specialPropKeyWarningShown;
866
+ var specialPropRefWarningShown;
867
+ var didWarnAboutStringRefs;
868
+
869
+ {
870
+ didWarnAboutStringRefs = {};
871
+ }
872
+
873
+ function hasValidRef(config) {
874
+ {
875
+ if (hasOwnProperty.call(config, 'ref')) {
876
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
877
+
878
+ if (getter && getter.isReactWarning) {
879
+ return false;
880
+ }
881
+ }
882
+ }
883
+
884
+ return config.ref !== undefined;
885
+ }
886
+
887
+ function hasValidKey(config) {
888
+ {
889
+ if (hasOwnProperty.call(config, 'key')) {
890
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
891
+
892
+ if (getter && getter.isReactWarning) {
893
+ return false;
894
+ }
895
+ }
896
+ }
897
+
898
+ return config.key !== undefined;
899
+ }
900
+
901
+ function warnIfStringRefCannotBeAutoConverted(config, self) {
902
+ {
903
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
904
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
905
+
906
+ if (!didWarnAboutStringRefs[componentName]) {
907
+ error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
908
+
909
+ didWarnAboutStringRefs[componentName] = true;
910
+ }
911
+ }
912
+ }
913
+ }
914
+
915
+ function defineKeyPropWarningGetter(props, displayName) {
916
+ {
917
+ var warnAboutAccessingKey = function () {
918
+ if (!specialPropKeyWarningShown) {
919
+ specialPropKeyWarningShown = true;
920
+
921
+ 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);
498
922
  }
499
- if ("object" === typeof type)
500
- switch (type.$$typeof) {
501
- case REACT_FORWARD_REF_TYPE:
502
- return (type = describeNativeComponentFrame(type.render, !1)), type;
503
- case REACT_MEMO_TYPE:
504
- return describeUnknownElementTypeFrameInDEV(type.type);
505
- case REACT_LAZY_TYPE:
506
- prototype = type._payload;
507
- type = type._init;
508
- try {
509
- return describeUnknownElementTypeFrameInDEV(type(prototype));
510
- } catch (x) {}
923
+ };
924
+
925
+ warnAboutAccessingKey.isReactWarning = true;
926
+ Object.defineProperty(props, 'key', {
927
+ get: warnAboutAccessingKey,
928
+ configurable: true
929
+ });
930
+ }
931
+ }
932
+
933
+ function defineRefPropWarningGetter(props, displayName) {
934
+ {
935
+ var warnAboutAccessingRef = function () {
936
+ if (!specialPropRefWarningShown) {
937
+ specialPropRefWarningShown = true;
938
+
939
+ 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);
940
+ }
941
+ };
942
+
943
+ warnAboutAccessingRef.isReactWarning = true;
944
+ Object.defineProperty(props, 'ref', {
945
+ get: warnAboutAccessingRef,
946
+ configurable: true
947
+ });
948
+ }
949
+ }
950
+ /**
951
+ * Factory method to create a new React element. This no longer adheres to
952
+ * the class pattern, so do not use new to call it. Also, instanceof check
953
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
954
+ * if something is a React Element.
955
+ *
956
+ * @param {*} type
957
+ * @param {*} props
958
+ * @param {*} key
959
+ * @param {string|object} ref
960
+ * @param {*} owner
961
+ * @param {*} self A *temporary* helper to detect places where `this` is
962
+ * different from the `owner` when React.createElement is called, so that we
963
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
964
+ * functions, and as long as `this` and owner are the same, there will be no
965
+ * change in behavior.
966
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
967
+ * indicating filename, line number, and/or other information.
968
+ * @internal
969
+ */
970
+
971
+
972
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
973
+ var element = {
974
+ // This tag allows us to uniquely identify this as a React Element
975
+ $$typeof: REACT_ELEMENT_TYPE,
976
+ // Built-in properties that belong on the element
977
+ type: type,
978
+ key: key,
979
+ ref: ref,
980
+ props: props,
981
+ // Record the component responsible for creating this element.
982
+ _owner: owner
983
+ };
984
+
985
+ {
986
+ // The validation flag is currently mutative. We put it on
987
+ // an external backing store so that we can freeze the whole object.
988
+ // This can be replaced with a WeakMap once they are implemented in
989
+ // commonly used development environments.
990
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
991
+ // the validation flag non-enumerable (where possible, which should
992
+ // include every environment we run tests in), so the test framework
993
+ // ignores it.
994
+
995
+ Object.defineProperty(element._store, 'validated', {
996
+ configurable: false,
997
+ enumerable: false,
998
+ writable: true,
999
+ value: false
1000
+ }); // self and source are DEV only properties.
1001
+
1002
+ Object.defineProperty(element, '_self', {
1003
+ configurable: false,
1004
+ enumerable: false,
1005
+ writable: false,
1006
+ value: self
1007
+ }); // Two elements created in two different places should be considered
1008
+ // equal for testing purposes and therefore we hide it from enumeration.
1009
+
1010
+ Object.defineProperty(element, '_source', {
1011
+ configurable: false,
1012
+ enumerable: false,
1013
+ writable: false,
1014
+ value: source
1015
+ });
1016
+
1017
+ if (Object.freeze) {
1018
+ Object.freeze(element.props);
1019
+ Object.freeze(element);
1020
+ }
1021
+ }
1022
+
1023
+ return element;
1024
+ };
1025
+ /**
1026
+ * https://github.com/reactjs/rfcs/pull/107
1027
+ * @param {*} type
1028
+ * @param {object} props
1029
+ * @param {string} key
1030
+ */
1031
+
1032
+ function jsxDEV(type, config, maybeKey, source, self) {
1033
+ {
1034
+ var propName; // Reserved names are extracted
1035
+
1036
+ var props = {};
1037
+ var key = null;
1038
+ var ref = null; // Currently, key can be spread in as a prop. This causes a potential
1039
+ // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
1040
+ // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
1041
+ // but as an intermediary step, we will use jsxDEV for everything except
1042
+ // <div {...props} key="Hi" />, because we aren't currently able to tell if
1043
+ // key is explicitly declared to be undefined or not.
1044
+
1045
+ if (maybeKey !== undefined) {
1046
+ {
1047
+ checkKeyStringCoercion(maybeKey);
1048
+ }
1049
+
1050
+ key = '' + maybeKey;
1051
+ }
1052
+
1053
+ if (hasValidKey(config)) {
1054
+ {
1055
+ checkKeyStringCoercion(config.key);
1056
+ }
1057
+
1058
+ key = '' + config.key;
1059
+ }
1060
+
1061
+ if (hasValidRef(config)) {
1062
+ ref = config.ref;
1063
+ warnIfStringRefCannotBeAutoConverted(config, self);
1064
+ } // Remaining properties are added to a new props object
1065
+
1066
+
1067
+ for (propName in config) {
1068
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1069
+ props[propName] = config[propName];
1070
+ }
1071
+ } // Resolve default props
1072
+
1073
+
1074
+ if (type && type.defaultProps) {
1075
+ var defaultProps = type.defaultProps;
1076
+
1077
+ for (propName in defaultProps) {
1078
+ if (props[propName] === undefined) {
1079
+ props[propName] = defaultProps[propName];
511
1080
  }
512
- return "";
1081
+ }
513
1082
  }
514
- function getOwner() {
515
- var dispatcher = ReactSharedInternals.A;
516
- return null === dispatcher ? null : dispatcher.getOwner();
1083
+
1084
+ if (key || ref) {
1085
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1086
+
1087
+ if (key) {
1088
+ defineKeyPropWarningGetter(props, displayName);
1089
+ }
1090
+
1091
+ if (ref) {
1092
+ defineRefPropWarningGetter(props, displayName);
1093
+ }
517
1094
  }
518
- function hasValidKey(config) {
519
- if (hasOwnProperty.call(config, "key")) {
520
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
521
- if (getter && getter.isReactWarning) return !1;
1095
+
1096
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
1097
+ }
1098
+ }
1099
+
1100
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
1101
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1102
+
1103
+ function setCurrentlyValidatingElement$1(element) {
1104
+ {
1105
+ if (element) {
1106
+ var owner = element._owner;
1107
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1108
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1109
+ } else {
1110
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1111
+ }
1112
+ }
1113
+ }
1114
+
1115
+ var propTypesMisspellWarningShown;
1116
+
1117
+ {
1118
+ propTypesMisspellWarningShown = false;
1119
+ }
1120
+ /**
1121
+ * Verifies the object is a ReactElement.
1122
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
1123
+ * @param {?object} object
1124
+ * @return {boolean} True if `object` is a ReactElement.
1125
+ * @final
1126
+ */
1127
+
1128
+
1129
+ function isValidElement(object) {
1130
+ {
1131
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1132
+ }
1133
+ }
1134
+
1135
+ function getDeclarationErrorAddendum() {
1136
+ {
1137
+ if (ReactCurrentOwner$1.current) {
1138
+ var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
1139
+
1140
+ if (name) {
1141
+ return '\n\nCheck the render method of `' + name + '`.';
522
1142
  }
523
- return void 0 !== config.key;
524
1143
  }
525
- function defineKeyPropWarningGetter(props, displayName) {
526
- function warnAboutAccessingKey() {
527
- specialPropKeyWarningShown ||
528
- ((specialPropKeyWarningShown = !0),
529
- console.error(
530
- "%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)",
531
- displayName
532
- ));
1144
+
1145
+ return '';
1146
+ }
1147
+ }
1148
+
1149
+ function getSourceInfoErrorAddendum(source) {
1150
+ {
1151
+
1152
+ return '';
1153
+ }
1154
+ }
1155
+ /**
1156
+ * Warn if there's no key explicitly set on dynamic arrays of children or
1157
+ * object keys are not valid. This allows us to keep track of children between
1158
+ * updates.
1159
+ */
1160
+
1161
+
1162
+ var ownerHasKeyUseWarning = {};
1163
+
1164
+ function getCurrentComponentErrorInfo(parentType) {
1165
+ {
1166
+ var info = getDeclarationErrorAddendum();
1167
+
1168
+ if (!info) {
1169
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
1170
+
1171
+ if (parentName) {
1172
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
533
1173
  }
534
- warnAboutAccessingKey.isReactWarning = !0;
535
- Object.defineProperty(props, "key", {
536
- get: warnAboutAccessingKey,
537
- configurable: !0
538
- });
539
1174
  }
540
- function elementRefGetterWithDeprecationWarning() {
541
- var componentName = getComponentNameFromType(this.type);
542
- didWarnAboutElementRef[componentName] ||
543
- ((didWarnAboutElementRef[componentName] = !0),
544
- console.error(
545
- "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."
546
- ));
547
- componentName = this.props.ref;
548
- return void 0 !== componentName ? componentName : null;
1175
+
1176
+ return info;
1177
+ }
1178
+ }
1179
+ /**
1180
+ * Warn if the element doesn't have an explicit key assigned to it.
1181
+ * This element is in an array. The array could grow and shrink or be
1182
+ * reordered. All children that haven't already been validated are required to
1183
+ * have a "key" property assigned to it. Error statuses are cached so a warning
1184
+ * will only be shown once.
1185
+ *
1186
+ * @internal
1187
+ * @param {ReactElement} element Element that requires a key.
1188
+ * @param {*} parentType element's parent's type.
1189
+ */
1190
+
1191
+
1192
+ function validateExplicitKey(element, parentType) {
1193
+ {
1194
+ if (!element._store || element._store.validated || element.key != null) {
1195
+ return;
549
1196
  }
550
- function ReactElement(type, key, self, source, owner, props) {
551
- self = props.ref;
552
- type = {
553
- $$typeof: REACT_ELEMENT_TYPE,
554
- type: type,
555
- key: key,
556
- props: props,
557
- _owner: owner
558
- };
559
- null !== (void 0 !== self ? self : null)
560
- ? Object.defineProperty(type, "ref", {
561
- enumerable: !1,
562
- get: elementRefGetterWithDeprecationWarning
563
- })
564
- : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
565
- type._store = {};
566
- Object.defineProperty(type._store, "validated", {
567
- configurable: !1,
568
- enumerable: !1,
569
- writable: !0,
570
- value: 0
571
- });
572
- Object.defineProperty(type, "_debugInfo", {
573
- configurable: !1,
574
- enumerable: !1,
575
- writable: !0,
576
- value: null
577
- });
578
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
579
- return type;
1197
+
1198
+ element._store.validated = true;
1199
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1200
+
1201
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1202
+ return;
1203
+ }
1204
+
1205
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
1206
+ // property, it may be the creator of the child that's responsible for
1207
+ // assigning it a key.
1208
+
1209
+ var childOwner = '';
1210
+
1211
+ if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
1212
+ // Give the component that originally created this child.
1213
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1214
+ }
1215
+
1216
+ setCurrentlyValidatingElement$1(element);
1217
+
1218
+ 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);
1219
+
1220
+ setCurrentlyValidatingElement$1(null);
1221
+ }
1222
+ }
1223
+ /**
1224
+ * Ensure that every element either is passed in a static location, in an
1225
+ * array with an explicit keys property defined, or in an object literal
1226
+ * with valid key property.
1227
+ *
1228
+ * @internal
1229
+ * @param {ReactNode} node Statically passed child of any type.
1230
+ * @param {*} parentType node's parent's type.
1231
+ */
1232
+
1233
+
1234
+ function validateChildKeys(node, parentType) {
1235
+ {
1236
+ if (typeof node !== 'object') {
1237
+ return;
1238
+ }
1239
+
1240
+ if (isArray(node)) {
1241
+ for (var i = 0; i < node.length; i++) {
1242
+ var child = node[i];
1243
+
1244
+ if (isValidElement(child)) {
1245
+ validateExplicitKey(child, parentType);
1246
+ }
1247
+ }
1248
+ } else if (isValidElement(node)) {
1249
+ // This element was passed in a valid location.
1250
+ if (node._store) {
1251
+ node._store.validated = true;
1252
+ }
1253
+ } else if (node) {
1254
+ var iteratorFn = getIteratorFn(node);
1255
+
1256
+ if (typeof iteratorFn === 'function') {
1257
+ // Entry iterators used to provide implicit keys,
1258
+ // but now we print a separate warning for them later.
1259
+ if (iteratorFn !== node.entries) {
1260
+ var iterator = iteratorFn.call(node);
1261
+ var step;
1262
+
1263
+ while (!(step = iterator.next()).done) {
1264
+ if (isValidElement(step.value)) {
1265
+ validateExplicitKey(step.value, parentType);
1266
+ }
1267
+ }
1268
+ }
1269
+ }
1270
+ }
1271
+ }
1272
+ }
1273
+ /**
1274
+ * Given an element, validate that its props follow the propTypes definition,
1275
+ * provided by the type.
1276
+ *
1277
+ * @param {ReactElement} element
1278
+ */
1279
+
1280
+
1281
+ function validatePropTypes(element) {
1282
+ {
1283
+ var type = element.type;
1284
+
1285
+ if (type === null || type === undefined || typeof type === 'string') {
1286
+ return;
1287
+ }
1288
+
1289
+ var propTypes;
1290
+
1291
+ if (typeof type === 'function') {
1292
+ propTypes = type.propTypes;
1293
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1294
+ // Inner props are checked in the reconciler.
1295
+ type.$$typeof === REACT_MEMO_TYPE)) {
1296
+ propTypes = type.propTypes;
1297
+ } else {
1298
+ return;
1299
+ }
1300
+
1301
+ if (propTypes) {
1302
+ // Intentionally inside to avoid triggering lazy initializers:
1303
+ var name = getComponentNameFromType(type);
1304
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
1305
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
1306
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
1307
+
1308
+ var _name = getComponentNameFromType(type);
1309
+
1310
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
1311
+ }
1312
+
1313
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
1314
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
1315
+ }
1316
+ }
1317
+ }
1318
+ /**
1319
+ * Given a fragment, validate that it can only be provided with fragment props
1320
+ * @param {ReactElement} fragment
1321
+ */
1322
+
1323
+
1324
+ function validateFragmentProps(fragment) {
1325
+ {
1326
+ var keys = Object.keys(fragment.props);
1327
+
1328
+ for (var i = 0; i < keys.length; i++) {
1329
+ var key = keys[i];
1330
+
1331
+ if (key !== 'children' && key !== 'key') {
1332
+ setCurrentlyValidatingElement$1(fragment);
1333
+
1334
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
1335
+
1336
+ setCurrentlyValidatingElement$1(null);
1337
+ break;
1338
+ }
580
1339
  }
581
- function jsxDEVImpl(
582
- type,
583
- config,
584
- maybeKey,
585
- isStaticChildren,
586
- source,
587
- self
588
- ) {
589
- if (
590
- "string" === typeof type ||
591
- "function" === typeof type ||
592
- type === REACT_FRAGMENT_TYPE ||
593
- type === REACT_PROFILER_TYPE ||
594
- type === REACT_STRICT_MODE_TYPE ||
595
- type === REACT_SUSPENSE_TYPE ||
596
- type === REACT_SUSPENSE_LIST_TYPE ||
597
- type === REACT_OFFSCREEN_TYPE ||
598
- ("object" === typeof type &&
599
- null !== type &&
600
- (type.$$typeof === REACT_LAZY_TYPE ||
601
- type.$$typeof === REACT_MEMO_TYPE ||
602
- type.$$typeof === REACT_CONTEXT_TYPE ||
603
- type.$$typeof === REACT_CONSUMER_TYPE ||
604
- type.$$typeof === REACT_FORWARD_REF_TYPE ||
605
- type.$$typeof === REACT_CLIENT_REFERENCE$1 ||
606
- void 0 !== type.getModuleId))
607
- ) {
608
- var children = config.children;
609
- if (void 0 !== children)
610
- if (isStaticChildren)
611
- if (isArrayImpl(children)) {
612
- for (
613
- isStaticChildren = 0;
614
- isStaticChildren < children.length;
615
- isStaticChildren++
616
- )
617
- validateChildKeys(children[isStaticChildren], type);
618
- Object.freeze && Object.freeze(children);
619
- } else
620
- console.error(
621
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
622
- );
623
- else validateChildKeys(children, type);
1340
+
1341
+ if (fragment.ref !== null) {
1342
+ setCurrentlyValidatingElement$1(fragment);
1343
+
1344
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
1345
+
1346
+ setCurrentlyValidatingElement$1(null);
1347
+ }
1348
+ }
1349
+ }
1350
+
1351
+ var didWarnAboutKeySpread = {};
1352
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
1353
+ {
1354
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
1355
+ // succeed and there will likely be errors in render.
1356
+
1357
+ if (!validType) {
1358
+ var info = '';
1359
+
1360
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1361
+ 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.";
1362
+ }
1363
+
1364
+ var sourceInfo = getSourceInfoErrorAddendum();
1365
+
1366
+ if (sourceInfo) {
1367
+ info += sourceInfo;
624
1368
  } else {
625
- children = "";
626
- if (
627
- void 0 === type ||
628
- ("object" === typeof type &&
629
- null !== type &&
630
- 0 === Object.keys(type).length)
631
- )
632
- children +=
633
- " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
634
- null === type
635
- ? (isStaticChildren = "null")
636
- : isArrayImpl(type)
637
- ? (isStaticChildren = "array")
638
- : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE
639
- ? ((isStaticChildren =
640
- "<" +
641
- (getComponentNameFromType(type.type) || "Unknown") +
642
- " />"),
643
- (children =
644
- " Did you accidentally export a JSX literal instead of a component?"))
645
- : (isStaticChildren = typeof type);
646
- console.error(
647
- "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
648
- isStaticChildren,
649
- children
650
- );
1369
+ info += getDeclarationErrorAddendum();
651
1370
  }
652
- if (hasOwnProperty.call(config, "key")) {
653
- children = getComponentNameFromType(type);
654
- var keys = Object.keys(config).filter(function (k) {
655
- return "key" !== k;
656
- });
657
- isStaticChildren =
658
- 0 < keys.length
659
- ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
660
- : "{key: someKey}";
661
- didWarnAboutKeySpread[children + isStaticChildren] ||
662
- ((keys =
663
- 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
664
- console.error(
665
- '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} />',
666
- isStaticChildren,
667
- children,
668
- keys,
669
- children
670
- ),
671
- (didWarnAboutKeySpread[children + isStaticChildren] = !0));
1371
+
1372
+ var typeString;
1373
+
1374
+ if (type === null) {
1375
+ typeString = 'null';
1376
+ } else if (isArray(type)) {
1377
+ typeString = 'array';
1378
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
1379
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
1380
+ info = ' Did you accidentally export a JSX literal instead of a component?';
1381
+ } else {
1382
+ typeString = typeof type;
672
1383
  }
673
- children = null;
674
- void 0 !== maybeKey &&
675
- (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
676
- hasValidKey(config) &&
677
- (checkKeyStringCoercion(config.key), (children = "" + config.key));
678
- if ("key" in config) {
679
- maybeKey = {};
680
- for (var propName in config)
681
- "key" !== propName && (maybeKey[propName] = config[propName]);
682
- } else maybeKey = config;
683
- children &&
684
- defineKeyPropWarningGetter(
685
- maybeKey,
686
- "function" === typeof type
687
- ? type.displayName || type.name || "Unknown"
688
- : type
689
- );
690
- return ReactElement(type, children, self, source, getOwner(), maybeKey);
1384
+
1385
+ 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);
691
1386
  }
692
- function validateChildKeys(node, parentType) {
693
- if (
694
- "object" === typeof node &&
695
- node &&
696
- node.$$typeof !== REACT_CLIENT_REFERENCE
697
- )
698
- if (isArrayImpl(node))
699
- for (var i = 0; i < node.length; i++) {
700
- var child = node[i];
701
- isValidElement(child) && validateExplicitKey(child, parentType);
1387
+
1388
+ var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
1389
+ // TODO: Drop this when these are no longer allowed as the type argument.
1390
+
1391
+ if (element == null) {
1392
+ return element;
1393
+ } // Skip key warning if the type isn't valid since our key validation logic
1394
+ // doesn't expect a non-string/function type and can throw confusing errors.
1395
+ // We don't want exception behavior to differ between dev and prod.
1396
+ // (Rendering will throw with a helpful message and as soon as the type is
1397
+ // fixed, the key warnings will appear.)
1398
+
1399
+
1400
+ if (validType) {
1401
+ var children = props.children;
1402
+
1403
+ if (children !== undefined) {
1404
+ if (isStaticChildren) {
1405
+ if (isArray(children)) {
1406
+ for (var i = 0; i < children.length; i++) {
1407
+ validateChildKeys(children[i], type);
1408
+ }
1409
+
1410
+ if (Object.freeze) {
1411
+ Object.freeze(children);
1412
+ }
1413
+ } else {
1414
+ 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.');
702
1415
  }
703
- else if (isValidElement(node))
704
- node._store && (node._store.validated = 1);
705
- else if (
706
- (null === node || "object" !== typeof node
707
- ? (i = null)
708
- : ((i =
709
- (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
710
- node["@@iterator"]),
711
- (i = "function" === typeof i ? i : null)),
712
- "function" === typeof i &&
713
- i !== node.entries &&
714
- ((i = i.call(node)), i !== node))
715
- )
716
- for (; !(node = i.next()).done; )
717
- isValidElement(node.value) &&
718
- validateExplicitKey(node.value, parentType);
719
- }
720
- function isValidElement(object) {
721
- return (
722
- "object" === typeof object &&
723
- null !== object &&
724
- object.$$typeof === REACT_ELEMENT_TYPE
725
- );
1416
+ } else {
1417
+ validateChildKeys(children, type);
1418
+ }
1419
+ }
726
1420
  }
727
- function validateExplicitKey(element, parentType) {
728
- if (
729
- element._store &&
730
- !element._store.validated &&
731
- null == element.key &&
732
- ((element._store.validated = 1),
733
- (parentType = getCurrentComponentErrorInfo(parentType)),
734
- !ownerHasKeyUseWarning[parentType])
735
- ) {
736
- ownerHasKeyUseWarning[parentType] = !0;
737
- var childOwner = "";
738
- element &&
739
- null != element._owner &&
740
- element._owner !== getOwner() &&
741
- ((childOwner = null),
742
- "number" === typeof element._owner.tag
743
- ? (childOwner = getComponentNameFromType(element._owner.type))
744
- : "string" === typeof element._owner.name &&
745
- (childOwner = element._owner.name),
746
- (childOwner = " It was passed a child from " + childOwner + "."));
747
- var prevGetCurrentStack = ReactSharedInternals.getCurrentStack;
748
- ReactSharedInternals.getCurrentStack = function () {
749
- var stack = describeUnknownElementTypeFrameInDEV(element.type);
750
- prevGetCurrentStack && (stack += prevGetCurrentStack() || "");
751
- return stack;
752
- };
753
- console.error(
754
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
755
- parentType,
756
- childOwner
757
- );
758
- ReactSharedInternals.getCurrentStack = prevGetCurrentStack;
1421
+
1422
+ {
1423
+ if (hasOwnProperty.call(props, 'key')) {
1424
+ var componentName = getComponentNameFromType(type);
1425
+ var keys = Object.keys(props).filter(function (k) {
1426
+ return k !== 'key';
1427
+ });
1428
+ var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
1429
+
1430
+ if (!didWarnAboutKeySpread[componentName + beforeExample]) {
1431
+ var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
1432
+
1433
+ 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);
1434
+
1435
+ didWarnAboutKeySpread[componentName + beforeExample] = true;
1436
+ }
759
1437
  }
760
1438
  }
761
- function getCurrentComponentErrorInfo(parentType) {
762
- var info = "",
763
- owner = getOwner();
764
- owner &&
765
- (owner = getComponentNameFromType(owner.type)) &&
766
- (info = "\n\nCheck the render method of `" + owner + "`.");
767
- info ||
768
- ((parentType = getComponentNameFromType(parentType)) &&
769
- (info =
770
- "\n\nCheck the top-level render call using <" + parentType + ">."));
771
- return info;
1439
+
1440
+ if (type === REACT_FRAGMENT_TYPE) {
1441
+ validateFragmentProps(element);
1442
+ } else {
1443
+ validatePropTypes(element);
772
1444
  }
773
- var React$1 = React,
774
- REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
775
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
776
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
777
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
778
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
779
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
780
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
781
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
782
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
783
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
784
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
785
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
786
- REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
787
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
788
- REACT_CLIENT_REFERENCE$2 = Symbol.for("react.client.reference"),
789
- ReactSharedInternals =
790
- React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
791
- hasOwnProperty = Object.prototype.hasOwnProperty,
792
- assign = Object.assign,
793
- REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference"),
794
- isArrayImpl = Array.isArray,
795
- disabledDepth = 0,
796
- prevLog,
797
- prevInfo,
798
- prevWarn,
799
- prevError,
800
- prevGroup,
801
- prevGroupCollapsed,
802
- prevGroupEnd;
803
- disabledLog.__reactDisabledLog = !0;
804
- var prefix,
805
- suffix,
806
- reentry = !1;
807
- var componentFrameCache = new (
808
- "function" === typeof WeakMap ? WeakMap : Map
809
- )();
810
- var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
811
- specialPropKeyWarningShown;
812
- var didWarnAboutElementRef = {};
813
- var didWarnAboutKeySpread = {},
814
- ownerHasKeyUseWarning = {};
815
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
816
- reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
817
- return jsxDEVImpl(type, config, maybeKey, !1, source, self);
818
- };
819
- reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
820
- return jsxDEVImpl(type, config, maybeKey, !0, source, self);
821
- };
1445
+
1446
+ return element;
1447
+ }
1448
+ } // These two functions exist to still get child warnings in dev
1449
+ // even with the prod transform. This means that jsxDEV is purely
1450
+ // opt-in behavior for better messages but that we won't stop
1451
+ // giving you warnings if you use production apis.
1452
+
1453
+ function jsxWithValidationStatic(type, props, key) {
1454
+ {
1455
+ return jsxWithValidation(type, props, key, true);
1456
+ }
1457
+ }
1458
+ function jsxWithValidationDynamic(type, props, key) {
1459
+ {
1460
+ return jsxWithValidation(type, props, key, false);
1461
+ }
1462
+ }
1463
+
1464
+ var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
1465
+ // for now we can ship identical prod functions
1466
+
1467
+ var jsxs = jsxWithValidationStatic ;
1468
+
1469
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
1470
+ reactJsxRuntime_development.jsx = jsx;
1471
+ reactJsxRuntime_development.jsxs = jsxs;
822
1472
  })();
1473
+ }
823
1474
  return reactJsxRuntime_development;
824
1475
  }var hasRequiredJsxRuntime;
825
1476
 
@@ -828,7 +1479,7 @@ function requireJsxRuntime () {
828
1479
  hasRequiredJsxRuntime = 1;
829
1480
 
830
1481
  if (process.env.NODE_ENV === 'production') {
831
- jsxRuntime.exports = requireReactJsxRuntime_production();
1482
+ jsxRuntime.exports = requireReactJsxRuntime_production_min();
832
1483
  } else {
833
1484
  jsxRuntime.exports = requireReactJsxRuntime_development();
834
1485
  }