@pear-protocol/hyperliquid-sdk 0.0.16 → 0.0.18

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.
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ import require$$0, { useState, useEffect, useRef, createContext, useMemo, useContext, useCallback } from 'react';
2
+ import require$$1 from 'react-dom';
1
3
  import { create } from 'zustand';
2
4
 
3
5
  function bind(fn, thisArg) {
@@ -3854,11 +3856,18 @@ class PearHyperliquidClient {
3854
3856
  });
3855
3857
  // Add response interceptor for error handling
3856
3858
  this.httpClient.interceptors.response.use((response) => response, (error) => {
3857
- var _a, _b, _c, _d, _e;
3859
+ var _a, _b;
3860
+ const payload = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data;
3861
+ const message = typeof payload === 'object' && payload && 'message' in payload
3862
+ ? String(payload.message)
3863
+ : error.message;
3864
+ const errField = typeof payload === 'object' && payload && 'error' in payload
3865
+ ? String(payload.error)
3866
+ : undefined;
3858
3867
  const apiError = {
3859
- statusCode: ((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) || 500,
3860
- message: ((_c = (_b = error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.message) || error.message,
3861
- error: (_e = (_d = error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error,
3868
+ statusCode: ((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) || 500,
3869
+ message,
3870
+ error: errField,
3862
3871
  };
3863
3872
  return Promise.reject(apiError);
3864
3873
  });
@@ -3932,13 +3941,13 @@ class PearHyperliquidClient {
3932
3941
  * @returns Promise with historical candle data
3933
3942
  */
3934
3943
  async fetchHistoricalCandles(coin, startTime, endTime, interval) {
3935
- var _a, _b, _c, _d, _e;
3944
+ var _a, _b;
3936
3945
  const request = {
3937
3946
  req: {
3938
3947
  coin,
3939
3948
  startTime,
3940
3949
  endTime,
3941
- interval: interval
3950
+ interval
3942
3951
  },
3943
3952
  type: "candleSnapshot"
3944
3953
  };
@@ -3957,12 +3966,18 @@ class PearHyperliquidClient {
3957
3966
  }
3958
3967
  catch (error) {
3959
3968
  const axiosError = error;
3960
- const apiError = {
3961
- statusCode: ((_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.status) || 500,
3962
- message: ((_c = (_b = axiosError.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.message) || axiosError.message,
3963
- error: (_e = (_d = axiosError.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error,
3969
+ const payload = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data;
3970
+ const message = typeof payload === 'object' && payload && 'message' in payload
3971
+ ? String(payload.message)
3972
+ : axiosError.message;
3973
+ const errField = typeof payload === 'object' && payload && 'error' in payload
3974
+ ? String(payload.error)
3975
+ : undefined;
3976
+ throw {
3977
+ statusCode: ((_b = axiosError.response) === null || _b === void 0 ? void 0 : _b.status) || 500,
3978
+ message,
3979
+ error: errField,
3964
3980
  };
3965
- throw apiError;
3966
3981
  }
3967
3982
  }
3968
3983
  }
@@ -4089,2938 +4104,1380 @@ function getDefaultExportFromCjs (x) {
4089
4104
 
4090
4105
  var jsxRuntime = {exports: {}};
4091
4106
 
4092
- var reactJsxRuntime_production = {};
4107
+ var reactJsxRuntime_production_min = {};
4093
4108
 
4094
4109
  /**
4095
4110
  * @license React
4096
- * react-jsx-runtime.production.js
4111
+ * react-jsx-runtime.production.min.js
4097
4112
  *
4098
- * Copyright (c) Meta Platforms, Inc. and affiliates.
4113
+ * Copyright (c) Facebook, Inc. and its affiliates.
4099
4114
  *
4100
4115
  * This source code is licensed under the MIT license found in the
4101
4116
  * LICENSE file in the root directory of this source tree.
4102
4117
  */
4103
4118
 
4104
- var hasRequiredReactJsxRuntime_production;
4105
-
4106
- function requireReactJsxRuntime_production () {
4107
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
4108
- hasRequiredReactJsxRuntime_production = 1;
4109
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
4110
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
4111
- function jsxProd(type, config, maybeKey) {
4112
- var key = null;
4113
- void 0 !== maybeKey && (key = "" + maybeKey);
4114
- void 0 !== config.key && (key = "" + config.key);
4115
- if ("key" in config) {
4116
- maybeKey = {};
4117
- for (var propName in config)
4118
- "key" !== propName && (maybeKey[propName] = config[propName]);
4119
- } else maybeKey = config;
4120
- config = maybeKey.ref;
4121
- return {
4122
- $$typeof: REACT_ELEMENT_TYPE,
4123
- type: type,
4124
- key: key,
4125
- ref: void 0 !== config ? config : null,
4126
- props: maybeKey
4127
- };
4128
- }
4129
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
4130
- reactJsxRuntime_production.jsx = jsxProd;
4131
- reactJsxRuntime_production.jsxs = jsxProd;
4132
- return reactJsxRuntime_production;
4119
+ var hasRequiredReactJsxRuntime_production_min;
4120
+
4121
+ function requireReactJsxRuntime_production_min () {
4122
+ if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
4123
+ hasRequiredReactJsxRuntime_production_min = 1;
4124
+ var f=require$$0,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};
4125
+ 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;
4126
+ return reactJsxRuntime_production_min;
4133
4127
  }
4134
4128
 
4135
4129
  var reactJsxRuntime_development = {};
4136
4130
 
4137
- var react = {exports: {}};
4138
-
4139
- var react_production = {};
4140
-
4141
4131
  /**
4142
4132
  * @license React
4143
- * react.production.js
4133
+ * react-jsx-runtime.development.js
4144
4134
  *
4145
- * Copyright (c) Meta Platforms, Inc. and affiliates.
4135
+ * Copyright (c) Facebook, Inc. and its affiliates.
4146
4136
  *
4147
4137
  * This source code is licensed under the MIT license found in the
4148
4138
  * LICENSE file in the root directory of this source tree.
4149
4139
  */
4150
4140
 
4151
- var hasRequiredReact_production;
4152
-
4153
- function requireReact_production () {
4154
- if (hasRequiredReact_production) return react_production;
4155
- hasRequiredReact_production = 1;
4156
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
4157
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
4158
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
4159
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
4160
- REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
4161
- REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
4162
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
4163
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
4164
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
4165
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
4166
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
4167
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
4141
+ var hasRequiredReactJsxRuntime_development;
4142
+
4143
+ function requireReactJsxRuntime_development () {
4144
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
4145
+ hasRequiredReactJsxRuntime_development = 1;
4146
+
4147
+ if (process.env.NODE_ENV !== "production") {
4148
+ (function() {
4149
+
4150
+ var React = require$$0;
4151
+
4152
+ // ATTENTION
4153
+ // When adding new symbols to this file,
4154
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
4155
+ // The Symbol used to tag the ReactElement-like types.
4156
+ var REACT_ELEMENT_TYPE = Symbol.for('react.element');
4157
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
4158
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
4159
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
4160
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
4161
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
4162
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
4163
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
4164
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
4165
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
4166
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
4167
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
4168
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
4169
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
4170
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
4168
4171
  function getIteratorFn(maybeIterable) {
4169
- if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
4170
- maybeIterable =
4171
- (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
4172
- maybeIterable["@@iterator"];
4173
- return "function" === typeof maybeIterable ? maybeIterable : null;
4172
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
4173
+ return null;
4174
+ }
4175
+
4176
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
4177
+
4178
+ if (typeof maybeIterator === 'function') {
4179
+ return maybeIterator;
4180
+ }
4181
+
4182
+ return null;
4174
4183
  }
4175
- var ReactNoopUpdateQueue = {
4176
- isMounted: function () {
4177
- return !1;
4178
- },
4179
- enqueueForceUpdate: function () {},
4180
- enqueueReplaceState: function () {},
4181
- enqueueSetState: function () {}
4182
- },
4183
- assign = Object.assign,
4184
- emptyObject = {};
4185
- function Component(props, context, updater) {
4186
- this.props = props;
4187
- this.context = context;
4188
- this.refs = emptyObject;
4189
- this.updater = updater || ReactNoopUpdateQueue;
4184
+
4185
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
4186
+
4187
+ function error(format) {
4188
+ {
4189
+ {
4190
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
4191
+ args[_key2 - 1] = arguments[_key2];
4192
+ }
4193
+
4194
+ printWarning('error', format, args);
4195
+ }
4196
+ }
4190
4197
  }
4191
- Component.prototype.isReactComponent = {};
4192
- Component.prototype.setState = function (partialState, callback) {
4193
- if (
4194
- "object" !== typeof partialState &&
4195
- "function" !== typeof partialState &&
4196
- null != partialState
4197
- )
4198
- throw Error(
4199
- "takes an object of state variables to update or a function which returns an object of state variables."
4200
- );
4201
- this.updater.enqueueSetState(this, partialState, callback, "setState");
4202
- };
4203
- Component.prototype.forceUpdate = function (callback) {
4204
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
4205
- };
4206
- function ComponentDummy() {}
4207
- ComponentDummy.prototype = Component.prototype;
4208
- function PureComponent(props, context, updater) {
4209
- this.props = props;
4210
- this.context = context;
4211
- this.refs = emptyObject;
4212
- this.updater = updater || ReactNoopUpdateQueue;
4198
+
4199
+ function printWarning(level, format, args) {
4200
+ // When changing this logic, you might want to also
4201
+ // update consoleWithStackDev.www.js as well.
4202
+ {
4203
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
4204
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
4205
+
4206
+ if (stack !== '') {
4207
+ format += '%s';
4208
+ args = args.concat([stack]);
4209
+ } // eslint-disable-next-line react-internal/safe-string-coercion
4210
+
4211
+
4212
+ var argsWithFormat = args.map(function (item) {
4213
+ return String(item);
4214
+ }); // Careful: RN currently depends on this prefix
4215
+
4216
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
4217
+ // breaks IE9: https://github.com/facebook/react/issues/13610
4218
+ // eslint-disable-next-line react-internal/no-production-logging
4219
+
4220
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
4221
+ }
4213
4222
  }
4214
- var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
4215
- pureComponentPrototype.constructor = PureComponent;
4216
- assign(pureComponentPrototype, Component.prototype);
4217
- pureComponentPrototype.isPureReactComponent = !0;
4218
- var isArrayImpl = Array.isArray,
4219
- ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null },
4220
- hasOwnProperty = Object.prototype.hasOwnProperty;
4221
- function ReactElement(type, key, self, source, owner, props) {
4222
- self = props.ref;
4223
- return {
4224
- $$typeof: REACT_ELEMENT_TYPE,
4225
- type: type,
4226
- key: key,
4227
- ref: void 0 !== self ? self : null,
4228
- props: props
4229
- };
4223
+
4224
+ // -----------------------------------------------------------------------------
4225
+
4226
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
4227
+ var enableCacheElement = false;
4228
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
4229
+
4230
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
4231
+ // stuff. Intended to enable React core members to more easily debug scheduling
4232
+ // issues in DEV builds.
4233
+
4234
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
4235
+
4236
+ var REACT_MODULE_REFERENCE;
4237
+
4238
+ {
4239
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
4230
4240
  }
4231
- function cloneAndReplaceKey(oldElement, newKey) {
4232
- return ReactElement(
4233
- oldElement.type,
4234
- newKey,
4235
- void 0,
4236
- void 0,
4237
- void 0,
4238
- oldElement.props
4239
- );
4241
+
4242
+ function isValidElementType(type) {
4243
+ if (typeof type === 'string' || typeof type === 'function') {
4244
+ return true;
4245
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
4246
+
4247
+
4248
+ 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 ) {
4249
+ return true;
4250
+ }
4251
+
4252
+ if (typeof type === 'object' && type !== null) {
4253
+ 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
4254
+ // types supported by any Flight configuration anywhere since
4255
+ // we don't know which Flight build this will end up being used
4256
+ // with.
4257
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
4258
+ return true;
4259
+ }
4260
+ }
4261
+
4262
+ return false;
4240
4263
  }
4241
- function isValidElement(object) {
4242
- return (
4243
- "object" === typeof object &&
4244
- null !== object &&
4245
- object.$$typeof === REACT_ELEMENT_TYPE
4246
- );
4264
+
4265
+ function getWrappedName(outerType, innerType, wrapperName) {
4266
+ var displayName = outerType.displayName;
4267
+
4268
+ if (displayName) {
4269
+ return displayName;
4270
+ }
4271
+
4272
+ var functionName = innerType.displayName || innerType.name || '';
4273
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
4274
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
4275
+
4276
+
4277
+ function getContextName(type) {
4278
+ return type.displayName || 'Context';
4279
+ } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
4280
+
4281
+
4282
+ function getComponentNameFromType(type) {
4283
+ if (type == null) {
4284
+ // Host root, text node or just invalid type.
4285
+ return null;
4286
+ }
4287
+
4288
+ {
4289
+ if (typeof type.tag === 'number') {
4290
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
4291
+ }
4292
+ }
4293
+
4294
+ if (typeof type === 'function') {
4295
+ return type.displayName || type.name || null;
4296
+ }
4297
+
4298
+ if (typeof type === 'string') {
4299
+ return type;
4300
+ }
4301
+
4302
+ switch (type) {
4303
+ case REACT_FRAGMENT_TYPE:
4304
+ return 'Fragment';
4305
+
4306
+ case REACT_PORTAL_TYPE:
4307
+ return 'Portal';
4308
+
4309
+ case REACT_PROFILER_TYPE:
4310
+ return 'Profiler';
4311
+
4312
+ case REACT_STRICT_MODE_TYPE:
4313
+ return 'StrictMode';
4314
+
4315
+ case REACT_SUSPENSE_TYPE:
4316
+ return 'Suspense';
4317
+
4318
+ case REACT_SUSPENSE_LIST_TYPE:
4319
+ return 'SuspenseList';
4320
+
4321
+ }
4322
+
4323
+ if (typeof type === 'object') {
4324
+ switch (type.$$typeof) {
4325
+ case REACT_CONTEXT_TYPE:
4326
+ var context = type;
4327
+ return getContextName(context) + '.Consumer';
4328
+
4329
+ case REACT_PROVIDER_TYPE:
4330
+ var provider = type;
4331
+ return getContextName(provider._context) + '.Provider';
4332
+
4333
+ case REACT_FORWARD_REF_TYPE:
4334
+ return getWrappedName(type, type.render, 'ForwardRef');
4335
+
4336
+ case REACT_MEMO_TYPE:
4337
+ var outerName = type.displayName || null;
4338
+
4339
+ if (outerName !== null) {
4340
+ return outerName;
4341
+ }
4342
+
4343
+ return getComponentNameFromType(type.type) || 'Memo';
4344
+
4345
+ case REACT_LAZY_TYPE:
4346
+ {
4347
+ var lazyComponent = type;
4348
+ var payload = lazyComponent._payload;
4349
+ var init = lazyComponent._init;
4350
+
4351
+ try {
4352
+ return getComponentNameFromType(init(payload));
4353
+ } catch (x) {
4354
+ return null;
4355
+ }
4356
+ }
4357
+
4358
+ // eslint-disable-next-line no-fallthrough
4359
+ }
4360
+ }
4361
+
4362
+ return null;
4363
+ }
4364
+
4365
+ var assign = Object.assign;
4366
+
4367
+ // Helpers to patch console.logs to avoid logging during side-effect free
4368
+ // replaying on render function. This currently only patches the object
4369
+ // lazily which won't cover if the log function was extracted eagerly.
4370
+ // We could also eagerly patch the method.
4371
+ var disabledDepth = 0;
4372
+ var prevLog;
4373
+ var prevInfo;
4374
+ var prevWarn;
4375
+ var prevError;
4376
+ var prevGroup;
4377
+ var prevGroupCollapsed;
4378
+ var prevGroupEnd;
4379
+
4380
+ function disabledLog() {}
4381
+
4382
+ disabledLog.__reactDisabledLog = true;
4383
+ function disableLogs() {
4384
+ {
4385
+ if (disabledDepth === 0) {
4386
+ /* eslint-disable react-internal/no-production-logging */
4387
+ prevLog = console.log;
4388
+ prevInfo = console.info;
4389
+ prevWarn = console.warn;
4390
+ prevError = console.error;
4391
+ prevGroup = console.group;
4392
+ prevGroupCollapsed = console.groupCollapsed;
4393
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
4394
+
4395
+ var props = {
4396
+ configurable: true,
4397
+ enumerable: true,
4398
+ value: disabledLog,
4399
+ writable: true
4400
+ }; // $FlowFixMe Flow thinks console is immutable.
4401
+
4402
+ Object.defineProperties(console, {
4403
+ info: props,
4404
+ log: props,
4405
+ warn: props,
4406
+ error: props,
4407
+ group: props,
4408
+ groupCollapsed: props,
4409
+ groupEnd: props
4410
+ });
4411
+ /* eslint-enable react-internal/no-production-logging */
4412
+ }
4413
+
4414
+ disabledDepth++;
4415
+ }
4416
+ }
4417
+ function reenableLogs() {
4418
+ {
4419
+ disabledDepth--;
4420
+
4421
+ if (disabledDepth === 0) {
4422
+ /* eslint-disable react-internal/no-production-logging */
4423
+ var props = {
4424
+ configurable: true,
4425
+ enumerable: true,
4426
+ writable: true
4427
+ }; // $FlowFixMe Flow thinks console is immutable.
4428
+
4429
+ Object.defineProperties(console, {
4430
+ log: assign({}, props, {
4431
+ value: prevLog
4432
+ }),
4433
+ info: assign({}, props, {
4434
+ value: prevInfo
4435
+ }),
4436
+ warn: assign({}, props, {
4437
+ value: prevWarn
4438
+ }),
4439
+ error: assign({}, props, {
4440
+ value: prevError
4441
+ }),
4442
+ group: assign({}, props, {
4443
+ value: prevGroup
4444
+ }),
4445
+ groupCollapsed: assign({}, props, {
4446
+ value: prevGroupCollapsed
4447
+ }),
4448
+ groupEnd: assign({}, props, {
4449
+ value: prevGroupEnd
4450
+ })
4451
+ });
4452
+ /* eslint-enable react-internal/no-production-logging */
4453
+ }
4454
+
4455
+ if (disabledDepth < 0) {
4456
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
4457
+ }
4458
+ }
4247
4459
  }
4248
- function escape(key) {
4249
- var escaperLookup = { "=": "=0", ":": "=2" };
4250
- return (
4251
- "$" +
4252
- key.replace(/[=:]/g, function (match) {
4253
- return escaperLookup[match];
4254
- })
4255
- );
4460
+
4461
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
4462
+ var prefix;
4463
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
4464
+ {
4465
+ if (prefix === undefined) {
4466
+ // Extract the VM specific prefix used by each line.
4467
+ try {
4468
+ throw Error();
4469
+ } catch (x) {
4470
+ var match = x.stack.trim().match(/\n( *(at )?)/);
4471
+ prefix = match && match[1] || '';
4472
+ }
4473
+ } // We use the prefix to ensure our stacks line up with native stack frames.
4474
+
4475
+
4476
+ return '\n' + prefix + name;
4477
+ }
4256
4478
  }
4257
- var userProvidedKeyEscapeRegex = /\/+/g;
4258
- function getElementKey(element, index) {
4259
- return "object" === typeof element && null !== element && null != element.key
4260
- ? escape("" + element.key)
4261
- : index.toString(36);
4479
+ var reentry = false;
4480
+ var componentFrameCache;
4481
+
4482
+ {
4483
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
4484
+ componentFrameCache = new PossiblyWeakMap();
4262
4485
  }
4263
- function noop$1() {}
4264
- function resolveThenable(thenable) {
4265
- switch (thenable.status) {
4266
- case "fulfilled":
4267
- return thenable.value;
4268
- case "rejected":
4269
- throw thenable.reason;
4270
- default:
4271
- switch (
4272
- ("string" === typeof thenable.status
4273
- ? thenable.then(noop$1, noop$1)
4274
- : ((thenable.status = "pending"),
4275
- thenable.then(
4276
- function (fulfilledValue) {
4277
- "pending" === thenable.status &&
4278
- ((thenable.status = "fulfilled"),
4279
- (thenable.value = fulfilledValue));
4280
- },
4281
- function (error) {
4282
- "pending" === thenable.status &&
4283
- ((thenable.status = "rejected"), (thenable.reason = error));
4486
+
4487
+ function describeNativeComponentFrame(fn, construct) {
4488
+ // If something asked for a stack inside a fake render, it should get ignored.
4489
+ if ( !fn || reentry) {
4490
+ return '';
4491
+ }
4492
+
4493
+ {
4494
+ var frame = componentFrameCache.get(fn);
4495
+
4496
+ if (frame !== undefined) {
4497
+ return frame;
4498
+ }
4499
+ }
4500
+
4501
+ var control;
4502
+ reentry = true;
4503
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
4504
+
4505
+ Error.prepareStackTrace = undefined;
4506
+ var previousDispatcher;
4507
+
4508
+ {
4509
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
4510
+ // for warnings.
4511
+
4512
+ ReactCurrentDispatcher.current = null;
4513
+ disableLogs();
4514
+ }
4515
+
4516
+ try {
4517
+ // This should throw.
4518
+ if (construct) {
4519
+ // Something should be setting the props in the constructor.
4520
+ var Fake = function () {
4521
+ throw Error();
4522
+ }; // $FlowFixMe
4523
+
4524
+
4525
+ Object.defineProperty(Fake.prototype, 'props', {
4526
+ set: function () {
4527
+ // We use a throwing setter instead of frozen or non-writable props
4528
+ // because that won't throw in a non-strict mode function.
4529
+ throw Error();
4530
+ }
4531
+ });
4532
+
4533
+ if (typeof Reflect === 'object' && Reflect.construct) {
4534
+ // We construct a different control for this case to include any extra
4535
+ // frames added by the construct call.
4536
+ try {
4537
+ Reflect.construct(Fake, []);
4538
+ } catch (x) {
4539
+ control = x;
4540
+ }
4541
+
4542
+ Reflect.construct(fn, [], Fake);
4543
+ } else {
4544
+ try {
4545
+ Fake.call();
4546
+ } catch (x) {
4547
+ control = x;
4548
+ }
4549
+
4550
+ fn.call(Fake.prototype);
4551
+ }
4552
+ } else {
4553
+ try {
4554
+ throw Error();
4555
+ } catch (x) {
4556
+ control = x;
4557
+ }
4558
+
4559
+ fn();
4560
+ }
4561
+ } catch (sample) {
4562
+ // This is inlined manually because closure doesn't do it for us.
4563
+ if (sample && control && typeof sample.stack === 'string') {
4564
+ // This extracts the first frame from the sample that isn't also in the control.
4565
+ // Skipping one frame that we assume is the frame that calls the two.
4566
+ var sampleLines = sample.stack.split('\n');
4567
+ var controlLines = control.stack.split('\n');
4568
+ var s = sampleLines.length - 1;
4569
+ var c = controlLines.length - 1;
4570
+
4571
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
4572
+ // We expect at least one stack frame to be shared.
4573
+ // Typically this will be the root most one. However, stack frames may be
4574
+ // cut off due to maximum stack limits. In this case, one maybe cut off
4575
+ // earlier than the other. We assume that the sample is longer or the same
4576
+ // and there for cut off earlier. So we should find the root most frame in
4577
+ // the sample somewhere in the control.
4578
+ c--;
4579
+ }
4580
+
4581
+ for (; s >= 1 && c >= 0; s--, c--) {
4582
+ // Next we find the first one that isn't the same which should be the
4583
+ // frame that called our sample function and the control.
4584
+ if (sampleLines[s] !== controlLines[c]) {
4585
+ // In V8, the first line is describing the message but other VMs don't.
4586
+ // If we're about to return the first line, and the control is also on the same
4587
+ // line, that's a pretty good indicator that our sample threw at same line as
4588
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
4589
+ // This can happen if you passed a class to function component, or non-function.
4590
+ if (s !== 1 || c !== 1) {
4591
+ do {
4592
+ s--;
4593
+ c--; // We may still have similar intermediate frames from the construct call.
4594
+ // The next one that isn't the same should be our match though.
4595
+
4596
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
4597
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
4598
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
4599
+ // but we have a user-provided "displayName"
4600
+ // splice it in to make the stack more readable.
4601
+
4602
+
4603
+ if (fn.displayName && _frame.includes('<anonymous>')) {
4604
+ _frame = _frame.replace('<anonymous>', fn.displayName);
4605
+ }
4606
+
4607
+ {
4608
+ if (typeof fn === 'function') {
4609
+ componentFrameCache.set(fn, _frame);
4610
+ }
4611
+ } // Return the line we found.
4612
+
4613
+
4614
+ return _frame;
4284
4615
  }
4285
- )),
4286
- thenable.status)
4287
- ) {
4288
- case "fulfilled":
4289
- return thenable.value;
4290
- case "rejected":
4291
- throw thenable.reason;
4616
+ } while (s >= 1 && c >= 0);
4617
+ }
4618
+
4619
+ break;
4620
+ }
4292
4621
  }
4622
+ }
4623
+ } finally {
4624
+ reentry = false;
4625
+
4626
+ {
4627
+ ReactCurrentDispatcher.current = previousDispatcher;
4628
+ reenableLogs();
4629
+ }
4630
+
4631
+ Error.prepareStackTrace = previousPrepareStackTrace;
4632
+ } // Fallback to just using the name if we couldn't make it throw.
4633
+
4634
+
4635
+ var name = fn ? fn.displayName || fn.name : '';
4636
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
4637
+
4638
+ {
4639
+ if (typeof fn === 'function') {
4640
+ componentFrameCache.set(fn, syntheticFrame);
4641
+ }
4293
4642
  }
4294
- throw thenable;
4643
+
4644
+ return syntheticFrame;
4295
4645
  }
4296
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
4297
- var type = typeof children;
4298
- if ("undefined" === type || "boolean" === type) children = null;
4299
- var invokeCallback = !1;
4300
- if (null === children) invokeCallback = !0;
4301
- else
4302
- switch (type) {
4303
- case "bigint":
4304
- case "string":
4305
- case "number":
4306
- invokeCallback = !0;
4307
- break;
4308
- case "object":
4309
- switch (children.$$typeof) {
4310
- case REACT_ELEMENT_TYPE:
4311
- case REACT_PORTAL_TYPE:
4312
- invokeCallback = !0;
4313
- break;
4314
- case REACT_LAZY_TYPE:
4315
- return (
4316
- (invokeCallback = children._init),
4317
- mapIntoArray(
4318
- invokeCallback(children._payload),
4319
- array,
4320
- escapedPrefix,
4321
- nameSoFar,
4322
- callback
4323
- )
4324
- );
4646
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
4647
+ {
4648
+ return describeNativeComponentFrame(fn, false);
4649
+ }
4650
+ }
4651
+
4652
+ function shouldConstruct(Component) {
4653
+ var prototype = Component.prototype;
4654
+ return !!(prototype && prototype.isReactComponent);
4655
+ }
4656
+
4657
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
4658
+
4659
+ if (type == null) {
4660
+ return '';
4661
+ }
4662
+
4663
+ if (typeof type === 'function') {
4664
+ {
4665
+ return describeNativeComponentFrame(type, shouldConstruct(type));
4666
+ }
4667
+ }
4668
+
4669
+ if (typeof type === 'string') {
4670
+ return describeBuiltInComponentFrame(type);
4671
+ }
4672
+
4673
+ switch (type) {
4674
+ case REACT_SUSPENSE_TYPE:
4675
+ return describeBuiltInComponentFrame('Suspense');
4676
+
4677
+ case REACT_SUSPENSE_LIST_TYPE:
4678
+ return describeBuiltInComponentFrame('SuspenseList');
4679
+ }
4680
+
4681
+ if (typeof type === 'object') {
4682
+ switch (type.$$typeof) {
4683
+ case REACT_FORWARD_REF_TYPE:
4684
+ return describeFunctionComponentFrame(type.render);
4685
+
4686
+ case REACT_MEMO_TYPE:
4687
+ // Memo may contain any component type so we recursively resolve it.
4688
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
4689
+
4690
+ case REACT_LAZY_TYPE:
4691
+ {
4692
+ var lazyComponent = type;
4693
+ var payload = lazyComponent._payload;
4694
+ var init = lazyComponent._init;
4695
+
4696
+ try {
4697
+ // Lazy may contain any component type so we recursively resolve it.
4698
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
4699
+ } catch (x) {}
4325
4700
  }
4326
4701
  }
4327
- if (invokeCallback)
4328
- return (
4329
- (callback = callback(children)),
4330
- (invokeCallback =
4331
- "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
4332
- isArrayImpl(callback)
4333
- ? ((escapedPrefix = ""),
4334
- null != invokeCallback &&
4335
- (escapedPrefix =
4336
- invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
4337
- mapIntoArray(callback, array, escapedPrefix, "", function (c) {
4338
- return c;
4339
- }))
4340
- : null != callback &&
4341
- (isValidElement(callback) &&
4342
- (callback = cloneAndReplaceKey(
4343
- callback,
4344
- escapedPrefix +
4345
- (null == callback.key ||
4346
- (children && children.key === callback.key)
4347
- ? ""
4348
- : ("" + callback.key).replace(
4349
- userProvidedKeyEscapeRegex,
4350
- "$&/"
4351
- ) + "/") +
4352
- invokeCallback
4353
- )),
4354
- array.push(callback)),
4355
- 1
4356
- );
4357
- invokeCallback = 0;
4358
- var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
4359
- if (isArrayImpl(children))
4360
- for (var i = 0; i < children.length; i++)
4361
- (nameSoFar = children[i]),
4362
- (type = nextNamePrefix + getElementKey(nameSoFar, i)),
4363
- (invokeCallback += mapIntoArray(
4364
- nameSoFar,
4365
- array,
4366
- escapedPrefix,
4367
- type,
4368
- callback
4369
- ));
4370
- else if (((i = getIteratorFn(children)), "function" === typeof i))
4371
- for (
4372
- children = i.call(children), i = 0;
4373
- !(nameSoFar = children.next()).done;
4374
-
4375
- )
4376
- (nameSoFar = nameSoFar.value),
4377
- (type = nextNamePrefix + getElementKey(nameSoFar, i++)),
4378
- (invokeCallback += mapIntoArray(
4379
- nameSoFar,
4380
- array,
4381
- escapedPrefix,
4382
- type,
4383
- callback
4384
- ));
4385
- else if ("object" === type) {
4386
- if ("function" === typeof children.then)
4387
- return mapIntoArray(
4388
- resolveThenable(children),
4389
- array,
4390
- escapedPrefix,
4391
- nameSoFar,
4392
- callback
4393
- );
4394
- array = String(children);
4395
- throw Error(
4396
- "Objects are not valid as a React child (found: " +
4397
- ("[object Object]" === array
4398
- ? "object with keys {" + Object.keys(children).join(", ") + "}"
4399
- : array) +
4400
- "). If you meant to render a collection of children, use an array instead."
4401
- );
4402
4702
  }
4403
- return invokeCallback;
4703
+
4704
+ return '';
4404
4705
  }
4405
- function mapChildren(children, func, context) {
4406
- if (null == children) return children;
4407
- var result = [],
4408
- count = 0;
4409
- mapIntoArray(children, result, "", "", function (child) {
4410
- return func.call(context, child, count++);
4411
- });
4412
- return result;
4706
+
4707
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
4708
+
4709
+ var loggedTypeFailures = {};
4710
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
4711
+
4712
+ function setCurrentlyValidatingElement(element) {
4713
+ {
4714
+ if (element) {
4715
+ var owner = element._owner;
4716
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
4717
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
4718
+ } else {
4719
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
4720
+ }
4721
+ }
4413
4722
  }
4414
- function lazyInitializer(payload) {
4415
- if (-1 === payload._status) {
4416
- var ctor = payload._result;
4417
- ctor = ctor();
4418
- ctor.then(
4419
- function (moduleObject) {
4420
- if (0 === payload._status || -1 === payload._status)
4421
- (payload._status = 1), (payload._result = moduleObject);
4422
- },
4423
- function (error) {
4424
- if (0 === payload._status || -1 === payload._status)
4425
- (payload._status = 2), (payload._result = error);
4723
+
4724
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
4725
+ {
4726
+ // $FlowFixMe This is okay but Flow doesn't know it.
4727
+ var has = Function.call.bind(hasOwnProperty);
4728
+
4729
+ for (var typeSpecName in typeSpecs) {
4730
+ if (has(typeSpecs, typeSpecName)) {
4731
+ var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
4732
+ // fail the render phase where it didn't fail before. So we log it.
4733
+ // After these have been cleaned up, we'll let them throw.
4734
+
4735
+ try {
4736
+ // This is intentionally an invariant that gets caught. It's the same
4737
+ // behavior as without this statement except with a better message.
4738
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
4739
+ // eslint-disable-next-line react-internal/prod-error-codes
4740
+ 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`.');
4741
+ err.name = 'Invariant Violation';
4742
+ throw err;
4743
+ }
4744
+
4745
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
4746
+ } catch (ex) {
4747
+ error$1 = ex;
4748
+ }
4749
+
4750
+ if (error$1 && !(error$1 instanceof Error)) {
4751
+ setCurrentlyValidatingElement(element);
4752
+
4753
+ 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);
4754
+
4755
+ setCurrentlyValidatingElement(null);
4756
+ }
4757
+
4758
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
4759
+ // Only monitor this failure once because there tends to be a lot of the
4760
+ // same error.
4761
+ loggedTypeFailures[error$1.message] = true;
4762
+ setCurrentlyValidatingElement(element);
4763
+
4764
+ error('Failed %s type: %s', location, error$1.message);
4765
+
4766
+ setCurrentlyValidatingElement(null);
4767
+ }
4426
4768
  }
4427
- );
4428
- -1 === payload._status && ((payload._status = 0), (payload._result = ctor));
4769
+ }
4429
4770
  }
4430
- if (1 === payload._status) return payload._result.default;
4431
- throw payload._result;
4432
4771
  }
4433
- var reportGlobalError =
4434
- "function" === typeof reportError
4435
- ? reportError
4436
- : function (error) {
4437
- if (
4438
- "object" === typeof window &&
4439
- "function" === typeof window.ErrorEvent
4440
- ) {
4441
- var event = new window.ErrorEvent("error", {
4442
- bubbles: !0,
4443
- cancelable: !0,
4444
- message:
4445
- "object" === typeof error &&
4446
- null !== error &&
4447
- "string" === typeof error.message
4448
- ? String(error.message)
4449
- : String(error),
4450
- error: error
4451
- });
4452
- if (!window.dispatchEvent(event)) return;
4453
- } else if (
4454
- "object" === typeof process &&
4455
- "function" === typeof process.emit
4456
- ) {
4457
- process.emit("uncaughtException", error);
4458
- return;
4459
- }
4460
- console.error(error);
4461
- };
4462
- function noop() {}
4463
- react_production.Children = {
4464
- map: mapChildren,
4465
- forEach: function (children, forEachFunc, forEachContext) {
4466
- mapChildren(
4467
- children,
4468
- function () {
4469
- forEachFunc.apply(this, arguments);
4470
- },
4471
- forEachContext
4472
- );
4473
- },
4474
- count: function (children) {
4475
- var n = 0;
4476
- mapChildren(children, function () {
4477
- n++;
4478
- });
4479
- return n;
4480
- },
4481
- toArray: function (children) {
4482
- return (
4483
- mapChildren(children, function (child) {
4484
- return child;
4485
- }) || []
4486
- );
4487
- },
4488
- only: function (children) {
4489
- if (!isValidElement(children))
4490
- throw Error(
4491
- "React.Children.only expected to receive a single React element child."
4492
- );
4493
- return children;
4772
+
4773
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
4774
+
4775
+ function isArray(a) {
4776
+ return isArrayImpl(a);
4777
+ }
4778
+
4779
+ /*
4780
+ * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
4781
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
4782
+ *
4783
+ * The functions in this module will throw an easier-to-understand,
4784
+ * easier-to-debug exception with a clear errors message message explaining the
4785
+ * problem. (Instead of a confusing exception thrown inside the implementation
4786
+ * of the `value` object).
4787
+ */
4788
+ // $FlowFixMe only called in DEV, so void return is not possible.
4789
+ function typeName(value) {
4790
+ {
4791
+ // toStringTag is needed for namespaced types like Temporal.Instant
4792
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
4793
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
4794
+ return type;
4494
4795
  }
4495
- };
4496
- react_production.Component = Component;
4497
- react_production.Fragment = REACT_FRAGMENT_TYPE;
4498
- react_production.Profiler = REACT_PROFILER_TYPE;
4499
- react_production.PureComponent = PureComponent;
4500
- react_production.StrictMode = REACT_STRICT_MODE_TYPE;
4501
- react_production.Suspense = REACT_SUSPENSE_TYPE;
4502
- react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
4503
- ReactSharedInternals;
4504
- react_production.__COMPILER_RUNTIME = {
4505
- __proto__: null,
4506
- c: function (size) {
4507
- return ReactSharedInternals.H.useMemoCache(size);
4796
+ } // $FlowFixMe only called in DEV, so void return is not possible.
4797
+
4798
+
4799
+ function willCoercionThrow(value) {
4800
+ {
4801
+ try {
4802
+ testStringCoercion(value);
4803
+ return false;
4804
+ } catch (e) {
4805
+ return true;
4806
+ }
4508
4807
  }
4509
- };
4510
- react_production.cache = function (fn) {
4511
- return function () {
4512
- return fn.apply(null, arguments);
4513
- };
4514
- };
4515
- react_production.cloneElement = function (element, config, children) {
4516
- if (null === element || void 0 === element)
4517
- throw Error(
4518
- "The argument must be a React element, but you passed " + element + "."
4519
- );
4520
- var props = assign({}, element.props),
4521
- key = element.key,
4522
- owner = void 0;
4523
- if (null != config)
4524
- for (propName in (void 0 !== config.ref && (owner = void 0),
4525
- void 0 !== config.key && (key = "" + config.key),
4526
- config))
4527
- !hasOwnProperty.call(config, propName) ||
4528
- "key" === propName ||
4529
- "__self" === propName ||
4530
- "__source" === propName ||
4531
- ("ref" === propName && void 0 === config.ref) ||
4532
- (props[propName] = config[propName]);
4533
- var propName = arguments.length - 2;
4534
- if (1 === propName) props.children = children;
4535
- else if (1 < propName) {
4536
- for (var childArray = Array(propName), i = 0; i < propName; i++)
4537
- childArray[i] = arguments[i + 2];
4538
- props.children = childArray;
4808
+ }
4809
+
4810
+ function testStringCoercion(value) {
4811
+ // If you ended up here by following an exception call stack, here's what's
4812
+ // happened: you supplied an object or symbol value to React (as a prop, key,
4813
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
4814
+ // coerce it to a string using `'' + value`, an exception was thrown.
4815
+ //
4816
+ // The most common types that will cause this exception are `Symbol` instances
4817
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
4818
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
4819
+ // exception. (Library authors do this to prevent users from using built-in
4820
+ // numeric operators like `+` or comparison operators like `>=` because custom
4821
+ // methods are needed to perform accurate arithmetic or comparison.)
4822
+ //
4823
+ // To fix the problem, coerce this object or symbol value to a string before
4824
+ // passing it to React. The most reliable way is usually `String(value)`.
4825
+ //
4826
+ // To find which value is throwing, check the browser or debugger console.
4827
+ // Before this exception was thrown, there should be `console.error` output
4828
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
4829
+ // problem and how that type was used: key, atrribute, input value prop, etc.
4830
+ // In most cases, this console output also shows the component and its
4831
+ // ancestor components where the exception happened.
4832
+ //
4833
+ // eslint-disable-next-line react-internal/safe-string-coercion
4834
+ return '' + value;
4835
+ }
4836
+ function checkKeyStringCoercion(value) {
4837
+ {
4838
+ if (willCoercionThrow(value)) {
4839
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
4840
+
4841
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
4842
+ }
4539
4843
  }
4540
- return ReactElement(element.type, key, void 0, void 0, owner, props);
4541
- };
4542
- react_production.createContext = function (defaultValue) {
4543
- defaultValue = {
4544
- $$typeof: REACT_CONTEXT_TYPE,
4545
- _currentValue: defaultValue,
4546
- _currentValue2: defaultValue,
4547
- _threadCount: 0,
4548
- Provider: null,
4549
- Consumer: null
4550
- };
4551
- defaultValue.Provider = defaultValue;
4552
- defaultValue.Consumer = {
4553
- $$typeof: REACT_CONSUMER_TYPE,
4554
- _context: defaultValue
4555
- };
4556
- return defaultValue;
4844
+ }
4845
+
4846
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
4847
+ var RESERVED_PROPS = {
4848
+ key: true,
4849
+ ref: true,
4850
+ __self: true,
4851
+ __source: true
4557
4852
  };
4558
- react_production.createElement = function (type, config, children) {
4559
- var propName,
4560
- props = {},
4561
- key = null;
4562
- if (null != config)
4563
- for (propName in (void 0 !== config.key && (key = "" + config.key), config))
4564
- hasOwnProperty.call(config, propName) &&
4565
- "key" !== propName &&
4566
- "__self" !== propName &&
4567
- "__source" !== propName &&
4568
- (props[propName] = config[propName]);
4569
- var childrenLength = arguments.length - 2;
4570
- if (1 === childrenLength) props.children = children;
4571
- else if (1 < childrenLength) {
4572
- for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
4573
- childArray[i] = arguments[i + 2];
4574
- props.children = childArray;
4853
+ var specialPropKeyWarningShown;
4854
+ var specialPropRefWarningShown;
4855
+ var didWarnAboutStringRefs;
4856
+
4857
+ {
4858
+ didWarnAboutStringRefs = {};
4859
+ }
4860
+
4861
+ function hasValidRef(config) {
4862
+ {
4863
+ if (hasOwnProperty.call(config, 'ref')) {
4864
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
4865
+
4866
+ if (getter && getter.isReactWarning) {
4867
+ return false;
4868
+ }
4869
+ }
4575
4870
  }
4576
- if (type && type.defaultProps)
4577
- for (propName in ((childrenLength = type.defaultProps), childrenLength))
4578
- void 0 === props[propName] &&
4579
- (props[propName] = childrenLength[propName]);
4580
- return ReactElement(type, key, void 0, void 0, null, props);
4581
- };
4582
- react_production.createRef = function () {
4583
- return { current: null };
4584
- };
4585
- react_production.forwardRef = function (render) {
4586
- return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
4587
- };
4588
- react_production.isValidElement = isValidElement;
4589
- react_production.lazy = function (ctor) {
4590
- return {
4591
- $$typeof: REACT_LAZY_TYPE,
4592
- _payload: { _status: -1, _result: ctor },
4593
- _init: lazyInitializer
4594
- };
4595
- };
4596
- react_production.memo = function (type, compare) {
4597
- return {
4598
- $$typeof: REACT_MEMO_TYPE,
4871
+
4872
+ return config.ref !== undefined;
4873
+ }
4874
+
4875
+ function hasValidKey(config) {
4876
+ {
4877
+ if (hasOwnProperty.call(config, 'key')) {
4878
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
4879
+
4880
+ if (getter && getter.isReactWarning) {
4881
+ return false;
4882
+ }
4883
+ }
4884
+ }
4885
+
4886
+ return config.key !== undefined;
4887
+ }
4888
+
4889
+ function warnIfStringRefCannotBeAutoConverted(config, self) {
4890
+ {
4891
+ if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
4892
+ var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
4893
+
4894
+ if (!didWarnAboutStringRefs[componentName]) {
4895
+ 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);
4896
+
4897
+ didWarnAboutStringRefs[componentName] = true;
4898
+ }
4899
+ }
4900
+ }
4901
+ }
4902
+
4903
+ function defineKeyPropWarningGetter(props, displayName) {
4904
+ {
4905
+ var warnAboutAccessingKey = function () {
4906
+ if (!specialPropKeyWarningShown) {
4907
+ specialPropKeyWarningShown = true;
4908
+
4909
+ 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);
4910
+ }
4911
+ };
4912
+
4913
+ warnAboutAccessingKey.isReactWarning = true;
4914
+ Object.defineProperty(props, 'key', {
4915
+ get: warnAboutAccessingKey,
4916
+ configurable: true
4917
+ });
4918
+ }
4919
+ }
4920
+
4921
+ function defineRefPropWarningGetter(props, displayName) {
4922
+ {
4923
+ var warnAboutAccessingRef = function () {
4924
+ if (!specialPropRefWarningShown) {
4925
+ specialPropRefWarningShown = true;
4926
+
4927
+ 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);
4928
+ }
4929
+ };
4930
+
4931
+ warnAboutAccessingRef.isReactWarning = true;
4932
+ Object.defineProperty(props, 'ref', {
4933
+ get: warnAboutAccessingRef,
4934
+ configurable: true
4935
+ });
4936
+ }
4937
+ }
4938
+ /**
4939
+ * Factory method to create a new React element. This no longer adheres to
4940
+ * the class pattern, so do not use new to call it. Also, instanceof check
4941
+ * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
4942
+ * if something is a React Element.
4943
+ *
4944
+ * @param {*} type
4945
+ * @param {*} props
4946
+ * @param {*} key
4947
+ * @param {string|object} ref
4948
+ * @param {*} owner
4949
+ * @param {*} self A *temporary* helper to detect places where `this` is
4950
+ * different from the `owner` when React.createElement is called, so that we
4951
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
4952
+ * functions, and as long as `this` and owner are the same, there will be no
4953
+ * change in behavior.
4954
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
4955
+ * indicating filename, line number, and/or other information.
4956
+ * @internal
4957
+ */
4958
+
4959
+
4960
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
4961
+ var element = {
4962
+ // This tag allows us to uniquely identify this as a React Element
4963
+ $$typeof: REACT_ELEMENT_TYPE,
4964
+ // Built-in properties that belong on the element
4599
4965
  type: type,
4600
- compare: void 0 === compare ? null : compare
4966
+ key: key,
4967
+ ref: ref,
4968
+ props: props,
4969
+ // Record the component responsible for creating this element.
4970
+ _owner: owner
4601
4971
  };
4602
- };
4603
- react_production.startTransition = function (scope) {
4604
- var prevTransition = ReactSharedInternals.T,
4605
- currentTransition = {};
4606
- ReactSharedInternals.T = currentTransition;
4607
- try {
4608
- var returnValue = scope(),
4609
- onStartTransitionFinish = ReactSharedInternals.S;
4610
- null !== onStartTransitionFinish &&
4611
- onStartTransitionFinish(currentTransition, returnValue);
4612
- "object" === typeof returnValue &&
4613
- null !== returnValue &&
4614
- "function" === typeof returnValue.then &&
4615
- returnValue.then(noop, reportGlobalError);
4616
- } catch (error) {
4617
- reportGlobalError(error);
4618
- } finally {
4619
- ReactSharedInternals.T = prevTransition;
4620
- }
4621
- };
4622
- react_production.unstable_useCacheRefresh = function () {
4623
- return ReactSharedInternals.H.useCacheRefresh();
4624
- };
4625
- react_production.use = function (usable) {
4626
- return ReactSharedInternals.H.use(usable);
4627
- };
4628
- react_production.useActionState = function (action, initialState, permalink) {
4629
- return ReactSharedInternals.H.useActionState(action, initialState, permalink);
4630
- };
4631
- react_production.useCallback = function (callback, deps) {
4632
- return ReactSharedInternals.H.useCallback(callback, deps);
4633
- };
4634
- react_production.useContext = function (Context) {
4635
- return ReactSharedInternals.H.useContext(Context);
4636
- };
4637
- react_production.useDebugValue = function () {};
4638
- react_production.useDeferredValue = function (value, initialValue) {
4639
- return ReactSharedInternals.H.useDeferredValue(value, initialValue);
4640
- };
4641
- react_production.useEffect = function (create, createDeps, update) {
4642
- var dispatcher = ReactSharedInternals.H;
4643
- if ("function" === typeof update)
4644
- throw Error(
4645
- "useEffect CRUD overload is not enabled in this build of React."
4646
- );
4647
- return dispatcher.useEffect(create, createDeps);
4648
- };
4649
- react_production.useId = function () {
4650
- return ReactSharedInternals.H.useId();
4651
- };
4652
- react_production.useImperativeHandle = function (ref, create, deps) {
4653
- return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
4654
- };
4655
- react_production.useInsertionEffect = function (create, deps) {
4656
- return ReactSharedInternals.H.useInsertionEffect(create, deps);
4657
- };
4658
- react_production.useLayoutEffect = function (create, deps) {
4659
- return ReactSharedInternals.H.useLayoutEffect(create, deps);
4660
- };
4661
- react_production.useMemo = function (create, deps) {
4662
- return ReactSharedInternals.H.useMemo(create, deps);
4663
- };
4664
- react_production.useOptimistic = function (passthrough, reducer) {
4665
- return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
4666
- };
4667
- react_production.useReducer = function (reducer, initialArg, init) {
4668
- return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
4669
- };
4670
- react_production.useRef = function (initialValue) {
4671
- return ReactSharedInternals.H.useRef(initialValue);
4672
- };
4673
- react_production.useState = function (initialState) {
4674
- return ReactSharedInternals.H.useState(initialState);
4675
- };
4676
- react_production.useSyncExternalStore = function (
4677
- subscribe,
4678
- getSnapshot,
4679
- getServerSnapshot
4680
- ) {
4681
- return ReactSharedInternals.H.useSyncExternalStore(
4682
- subscribe,
4683
- getSnapshot,
4684
- getServerSnapshot
4685
- );
4686
- };
4687
- react_production.useTransition = function () {
4688
- return ReactSharedInternals.H.useTransition();
4689
- };
4690
- react_production.version = "19.1.1";
4691
- return react_production;
4692
- }
4693
4972
 
4694
- var react_development = {exports: {}};
4973
+ {
4974
+ // The validation flag is currently mutative. We put it on
4975
+ // an external backing store so that we can freeze the whole object.
4976
+ // This can be replaced with a WeakMap once they are implemented in
4977
+ // commonly used development environments.
4978
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
4979
+ // the validation flag non-enumerable (where possible, which should
4980
+ // include every environment we run tests in), so the test framework
4981
+ // ignores it.
4982
+
4983
+ Object.defineProperty(element._store, 'validated', {
4984
+ configurable: false,
4985
+ enumerable: false,
4986
+ writable: true,
4987
+ value: false
4988
+ }); // self and source are DEV only properties.
4989
+
4990
+ Object.defineProperty(element, '_self', {
4991
+ configurable: false,
4992
+ enumerable: false,
4993
+ writable: false,
4994
+ value: self
4995
+ }); // Two elements created in two different places should be considered
4996
+ // equal for testing purposes and therefore we hide it from enumeration.
4997
+
4998
+ Object.defineProperty(element, '_source', {
4999
+ configurable: false,
5000
+ enumerable: false,
5001
+ writable: false,
5002
+ value: source
5003
+ });
5004
+
5005
+ if (Object.freeze) {
5006
+ Object.freeze(element.props);
5007
+ Object.freeze(element);
5008
+ }
5009
+ }
4695
5010
 
4696
- /**
4697
- * @license React
4698
- * react.development.js
4699
- *
4700
- * Copyright (c) Meta Platforms, Inc. and affiliates.
4701
- *
4702
- * This source code is licensed under the MIT license found in the
4703
- * LICENSE file in the root directory of this source tree.
4704
- */
4705
- react_development.exports;
4706
-
4707
- var hasRequiredReact_development;
4708
-
4709
- function requireReact_development () {
4710
- if (hasRequiredReact_development) return react_development.exports;
4711
- hasRequiredReact_development = 1;
4712
- (function (module, exports) {
4713
- "production" !== process.env.NODE_ENV &&
4714
- (function () {
4715
- function defineDeprecationWarning(methodName, info) {
4716
- Object.defineProperty(Component.prototype, methodName, {
4717
- get: function () {
4718
- console.warn(
4719
- "%s(...) is deprecated in plain JavaScript React classes. %s",
4720
- info[0],
4721
- info[1]
4722
- );
4723
- }
4724
- });
4725
- }
4726
- function getIteratorFn(maybeIterable) {
4727
- if (null === maybeIterable || "object" !== typeof maybeIterable)
4728
- return null;
4729
- maybeIterable =
4730
- (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
4731
- maybeIterable["@@iterator"];
4732
- return "function" === typeof maybeIterable ? maybeIterable : null;
4733
- }
4734
- function warnNoop(publicInstance, callerName) {
4735
- publicInstance =
4736
- ((publicInstance = publicInstance.constructor) &&
4737
- (publicInstance.displayName || publicInstance.name)) ||
4738
- "ReactClass";
4739
- var warningKey = publicInstance + "." + callerName;
4740
- didWarnStateUpdateForUnmountedComponent[warningKey] ||
4741
- (console.error(
4742
- "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
4743
- callerName,
4744
- publicInstance
4745
- ),
4746
- (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));
4747
- }
4748
- function Component(props, context, updater) {
4749
- this.props = props;
4750
- this.context = context;
4751
- this.refs = emptyObject;
4752
- this.updater = updater || ReactNoopUpdateQueue;
4753
- }
4754
- function ComponentDummy() {}
4755
- function PureComponent(props, context, updater) {
4756
- this.props = props;
4757
- this.context = context;
4758
- this.refs = emptyObject;
4759
- this.updater = updater || ReactNoopUpdateQueue;
4760
- }
4761
- function testStringCoercion(value) {
4762
- return "" + value;
4763
- }
4764
- function checkKeyStringCoercion(value) {
4765
- try {
4766
- testStringCoercion(value);
4767
- var JSCompiler_inline_result = !1;
4768
- } catch (e) {
4769
- JSCompiler_inline_result = !0;
4770
- }
4771
- if (JSCompiler_inline_result) {
4772
- JSCompiler_inline_result = console;
4773
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
4774
- var JSCompiler_inline_result$jscomp$0 =
4775
- ("function" === typeof Symbol &&
4776
- Symbol.toStringTag &&
4777
- value[Symbol.toStringTag]) ||
4778
- value.constructor.name ||
4779
- "Object";
4780
- JSCompiler_temp_const.call(
4781
- JSCompiler_inline_result,
4782
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
4783
- JSCompiler_inline_result$jscomp$0
4784
- );
4785
- return testStringCoercion(value);
4786
- }
4787
- }
4788
- function getComponentNameFromType(type) {
4789
- if (null == type) return null;
4790
- if ("function" === typeof type)
4791
- return type.$$typeof === REACT_CLIENT_REFERENCE
4792
- ? null
4793
- : type.displayName || type.name || null;
4794
- if ("string" === typeof type) return type;
4795
- switch (type) {
4796
- case REACT_FRAGMENT_TYPE:
4797
- return "Fragment";
4798
- case REACT_PROFILER_TYPE:
4799
- return "Profiler";
4800
- case REACT_STRICT_MODE_TYPE:
4801
- return "StrictMode";
4802
- case REACT_SUSPENSE_TYPE:
4803
- return "Suspense";
4804
- case REACT_SUSPENSE_LIST_TYPE:
4805
- return "SuspenseList";
4806
- case REACT_ACTIVITY_TYPE:
4807
- return "Activity";
4808
- }
4809
- if ("object" === typeof type)
4810
- switch (
4811
- ("number" === typeof type.tag &&
4812
- console.error(
4813
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
4814
- ),
4815
- type.$$typeof)
4816
- ) {
4817
- case REACT_PORTAL_TYPE:
4818
- return "Portal";
4819
- case REACT_CONTEXT_TYPE:
4820
- return (type.displayName || "Context") + ".Provider";
4821
- case REACT_CONSUMER_TYPE:
4822
- return (type._context.displayName || "Context") + ".Consumer";
4823
- case REACT_FORWARD_REF_TYPE:
4824
- var innerType = type.render;
4825
- type = type.displayName;
4826
- type ||
4827
- ((type = innerType.displayName || innerType.name || ""),
4828
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
4829
- return type;
4830
- case REACT_MEMO_TYPE:
4831
- return (
4832
- (innerType = type.displayName || null),
4833
- null !== innerType
4834
- ? innerType
4835
- : getComponentNameFromType(type.type) || "Memo"
4836
- );
4837
- case REACT_LAZY_TYPE:
4838
- innerType = type._payload;
4839
- type = type._init;
4840
- try {
4841
- return getComponentNameFromType(type(innerType));
4842
- } catch (x) {}
4843
- }
4844
- return null;
4845
- }
4846
- function getTaskName(type) {
4847
- if (type === REACT_FRAGMENT_TYPE) return "<>";
4848
- if (
4849
- "object" === typeof type &&
4850
- null !== type &&
4851
- type.$$typeof === REACT_LAZY_TYPE
4852
- )
4853
- return "<...>";
4854
- try {
4855
- var name = getComponentNameFromType(type);
4856
- return name ? "<" + name + ">" : "<...>";
4857
- } catch (x) {
4858
- return "<...>";
4859
- }
4860
- }
4861
- function getOwner() {
4862
- var dispatcher = ReactSharedInternals.A;
4863
- return null === dispatcher ? null : dispatcher.getOwner();
4864
- }
4865
- function UnknownOwner() {
4866
- return Error("react-stack-top-frame");
4867
- }
4868
- function hasValidKey(config) {
4869
- if (hasOwnProperty.call(config, "key")) {
4870
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
4871
- if (getter && getter.isReactWarning) return !1;
4872
- }
4873
- return void 0 !== config.key;
4874
- }
4875
- function defineKeyPropWarningGetter(props, displayName) {
4876
- function warnAboutAccessingKey() {
4877
- specialPropKeyWarningShown ||
4878
- ((specialPropKeyWarningShown = !0),
4879
- console.error(
4880
- "%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)",
4881
- displayName
4882
- ));
4883
- }
4884
- warnAboutAccessingKey.isReactWarning = !0;
4885
- Object.defineProperty(props, "key", {
4886
- get: warnAboutAccessingKey,
4887
- configurable: !0
4888
- });
4889
- }
4890
- function elementRefGetterWithDeprecationWarning() {
4891
- var componentName = getComponentNameFromType(this.type);
4892
- didWarnAboutElementRef[componentName] ||
4893
- ((didWarnAboutElementRef[componentName] = !0),
4894
- console.error(
4895
- "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."
4896
- ));
4897
- componentName = this.props.ref;
4898
- return void 0 !== componentName ? componentName : null;
4899
- }
4900
- function ReactElement(
4901
- type,
4902
- key,
4903
- self,
4904
- source,
4905
- owner,
4906
- props,
4907
- debugStack,
4908
- debugTask
4909
- ) {
4910
- self = props.ref;
4911
- type = {
4912
- $$typeof: REACT_ELEMENT_TYPE,
4913
- type: type,
4914
- key: key,
4915
- props: props,
4916
- _owner: owner
4917
- };
4918
- null !== (void 0 !== self ? self : null)
4919
- ? Object.defineProperty(type, "ref", {
4920
- enumerable: !1,
4921
- get: elementRefGetterWithDeprecationWarning
4922
- })
4923
- : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
4924
- type._store = {};
4925
- Object.defineProperty(type._store, "validated", {
4926
- configurable: !1,
4927
- enumerable: !1,
4928
- writable: !0,
4929
- value: 0
4930
- });
4931
- Object.defineProperty(type, "_debugInfo", {
4932
- configurable: !1,
4933
- enumerable: !1,
4934
- writable: !0,
4935
- value: null
4936
- });
4937
- Object.defineProperty(type, "_debugStack", {
4938
- configurable: !1,
4939
- enumerable: !1,
4940
- writable: !0,
4941
- value: debugStack
4942
- });
4943
- Object.defineProperty(type, "_debugTask", {
4944
- configurable: !1,
4945
- enumerable: !1,
4946
- writable: !0,
4947
- value: debugTask
4948
- });
4949
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
4950
- return type;
4951
- }
4952
- function cloneAndReplaceKey(oldElement, newKey) {
4953
- newKey = ReactElement(
4954
- oldElement.type,
4955
- newKey,
4956
- void 0,
4957
- void 0,
4958
- oldElement._owner,
4959
- oldElement.props,
4960
- oldElement._debugStack,
4961
- oldElement._debugTask
4962
- );
4963
- oldElement._store &&
4964
- (newKey._store.validated = oldElement._store.validated);
4965
- return newKey;
4966
- }
4967
- function isValidElement(object) {
4968
- return (
4969
- "object" === typeof object &&
4970
- null !== object &&
4971
- object.$$typeof === REACT_ELEMENT_TYPE
4972
- );
4973
- }
4974
- function escape(key) {
4975
- var escaperLookup = { "=": "=0", ":": "=2" };
4976
- return (
4977
- "$" +
4978
- key.replace(/[=:]/g, function (match) {
4979
- return escaperLookup[match];
4980
- })
4981
- );
4982
- }
4983
- function getElementKey(element, index) {
4984
- return "object" === typeof element &&
4985
- null !== element &&
4986
- null != element.key
4987
- ? (checkKeyStringCoercion(element.key), escape("" + element.key))
4988
- : index.toString(36);
4989
- }
4990
- function noop$1() {}
4991
- function resolveThenable(thenable) {
4992
- switch (thenable.status) {
4993
- case "fulfilled":
4994
- return thenable.value;
4995
- case "rejected":
4996
- throw thenable.reason;
4997
- default:
4998
- switch (
4999
- ("string" === typeof thenable.status
5000
- ? thenable.then(noop$1, noop$1)
5001
- : ((thenable.status = "pending"),
5002
- thenable.then(
5003
- function (fulfilledValue) {
5004
- "pending" === thenable.status &&
5005
- ((thenable.status = "fulfilled"),
5006
- (thenable.value = fulfilledValue));
5007
- },
5008
- function (error) {
5009
- "pending" === thenable.status &&
5010
- ((thenable.status = "rejected"),
5011
- (thenable.reason = error));
5012
- }
5013
- )),
5014
- thenable.status)
5015
- ) {
5016
- case "fulfilled":
5017
- return thenable.value;
5018
- case "rejected":
5019
- throw thenable.reason;
5020
- }
5021
- }
5022
- throw thenable;
5023
- }
5024
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
5025
- var type = typeof children;
5026
- if ("undefined" === type || "boolean" === type) children = null;
5027
- var invokeCallback = !1;
5028
- if (null === children) invokeCallback = !0;
5029
- else
5030
- switch (type) {
5031
- case "bigint":
5032
- case "string":
5033
- case "number":
5034
- invokeCallback = !0;
5035
- break;
5036
- case "object":
5037
- switch (children.$$typeof) {
5038
- case REACT_ELEMENT_TYPE:
5039
- case REACT_PORTAL_TYPE:
5040
- invokeCallback = !0;
5041
- break;
5042
- case REACT_LAZY_TYPE:
5043
- return (
5044
- (invokeCallback = children._init),
5045
- mapIntoArray(
5046
- invokeCallback(children._payload),
5047
- array,
5048
- escapedPrefix,
5049
- nameSoFar,
5050
- callback
5051
- )
5052
- );
5053
- }
5054
- }
5055
- if (invokeCallback) {
5056
- invokeCallback = children;
5057
- callback = callback(invokeCallback);
5058
- var childKey =
5059
- "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
5060
- isArrayImpl(callback)
5061
- ? ((escapedPrefix = ""),
5062
- null != childKey &&
5063
- (escapedPrefix =
5064
- childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
5065
- mapIntoArray(callback, array, escapedPrefix, "", function (c) {
5066
- return c;
5067
- }))
5068
- : null != callback &&
5069
- (isValidElement(callback) &&
5070
- (null != callback.key &&
5071
- ((invokeCallback && invokeCallback.key === callback.key) ||
5072
- checkKeyStringCoercion(callback.key)),
5073
- (escapedPrefix = cloneAndReplaceKey(
5074
- callback,
5075
- escapedPrefix +
5076
- (null == callback.key ||
5077
- (invokeCallback && invokeCallback.key === callback.key)
5078
- ? ""
5079
- : ("" + callback.key).replace(
5080
- userProvidedKeyEscapeRegex,
5081
- "$&/"
5082
- ) + "/") +
5083
- childKey
5084
- )),
5085
- "" !== nameSoFar &&
5086
- null != invokeCallback &&
5087
- isValidElement(invokeCallback) &&
5088
- null == invokeCallback.key &&
5089
- invokeCallback._store &&
5090
- !invokeCallback._store.validated &&
5091
- (escapedPrefix._store.validated = 2),
5092
- (callback = escapedPrefix)),
5093
- array.push(callback));
5094
- return 1;
5095
- }
5096
- invokeCallback = 0;
5097
- childKey = "" === nameSoFar ? "." : nameSoFar + ":";
5098
- if (isArrayImpl(children))
5099
- for (var i = 0; i < children.length; i++)
5100
- (nameSoFar = children[i]),
5101
- (type = childKey + getElementKey(nameSoFar, i)),
5102
- (invokeCallback += mapIntoArray(
5103
- nameSoFar,
5104
- array,
5105
- escapedPrefix,
5106
- type,
5107
- callback
5108
- ));
5109
- else if (((i = getIteratorFn(children)), "function" === typeof i))
5110
- for (
5111
- i === children.entries &&
5112
- (didWarnAboutMaps ||
5113
- console.warn(
5114
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
5115
- ),
5116
- (didWarnAboutMaps = !0)),
5117
- children = i.call(children),
5118
- i = 0;
5119
- !(nameSoFar = children.next()).done;
5120
-
5121
- )
5122
- (nameSoFar = nameSoFar.value),
5123
- (type = childKey + getElementKey(nameSoFar, i++)),
5124
- (invokeCallback += mapIntoArray(
5125
- nameSoFar,
5126
- array,
5127
- escapedPrefix,
5128
- type,
5129
- callback
5130
- ));
5131
- else if ("object" === type) {
5132
- if ("function" === typeof children.then)
5133
- return mapIntoArray(
5134
- resolveThenable(children),
5135
- array,
5136
- escapedPrefix,
5137
- nameSoFar,
5138
- callback
5139
- );
5140
- array = String(children);
5141
- throw Error(
5142
- "Objects are not valid as a React child (found: " +
5143
- ("[object Object]" === array
5144
- ? "object with keys {" + Object.keys(children).join(", ") + "}"
5145
- : array) +
5146
- "). If you meant to render a collection of children, use an array instead."
5147
- );
5148
- }
5149
- return invokeCallback;
5150
- }
5151
- function mapChildren(children, func, context) {
5152
- if (null == children) return children;
5153
- var result = [],
5154
- count = 0;
5155
- mapIntoArray(children, result, "", "", function (child) {
5156
- return func.call(context, child, count++);
5157
- });
5158
- return result;
5159
- }
5160
- function lazyInitializer(payload) {
5161
- if (-1 === payload._status) {
5162
- var ctor = payload._result;
5163
- ctor = ctor();
5164
- ctor.then(
5165
- function (moduleObject) {
5166
- if (0 === payload._status || -1 === payload._status)
5167
- (payload._status = 1), (payload._result = moduleObject);
5168
- },
5169
- function (error) {
5170
- if (0 === payload._status || -1 === payload._status)
5171
- (payload._status = 2), (payload._result = error);
5172
- }
5173
- );
5174
- -1 === payload._status &&
5175
- ((payload._status = 0), (payload._result = ctor));
5176
- }
5177
- if (1 === payload._status)
5178
- return (
5179
- (ctor = payload._result),
5180
- void 0 === ctor &&
5181
- console.error(
5182
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
5183
- ctor
5184
- ),
5185
- "default" in ctor ||
5186
- console.error(
5187
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
5188
- ctor
5189
- ),
5190
- ctor.default
5191
- );
5192
- throw payload._result;
5193
- }
5194
- function resolveDispatcher() {
5195
- var dispatcher = ReactSharedInternals.H;
5196
- null === dispatcher &&
5197
- console.error(
5198
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
5199
- );
5200
- return dispatcher;
5201
- }
5202
- function noop() {}
5203
- function enqueueTask(task) {
5204
- if (null === enqueueTaskImpl)
5205
- try {
5206
- var requireString = ("require" + Math.random()).slice(0, 7);
5207
- enqueueTaskImpl = (module && module[requireString]).call(
5208
- module,
5209
- "timers"
5210
- ).setImmediate;
5211
- } catch (_err) {
5212
- enqueueTaskImpl = function (callback) {
5213
- !1 === didWarnAboutMessageChannel &&
5214
- ((didWarnAboutMessageChannel = !0),
5215
- "undefined" === typeof MessageChannel &&
5216
- console.error(
5217
- "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
5218
- ));
5219
- var channel = new MessageChannel();
5220
- channel.port1.onmessage = callback;
5221
- channel.port2.postMessage(void 0);
5222
- };
5223
- }
5224
- return enqueueTaskImpl(task);
5225
- }
5226
- function aggregateErrors(errors) {
5227
- return 1 < errors.length && "function" === typeof AggregateError
5228
- ? new AggregateError(errors)
5229
- : errors[0];
5230
- }
5231
- function popActScope(prevActQueue, prevActScopeDepth) {
5232
- prevActScopeDepth !== actScopeDepth - 1 &&
5233
- console.error(
5234
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
5235
- );
5236
- actScopeDepth = prevActScopeDepth;
5237
- }
5238
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
5239
- var queue = ReactSharedInternals.actQueue;
5240
- if (null !== queue)
5241
- if (0 !== queue.length)
5242
- try {
5243
- flushActQueue(queue);
5244
- enqueueTask(function () {
5245
- return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
5246
- });
5247
- return;
5248
- } catch (error) {
5249
- ReactSharedInternals.thrownErrors.push(error);
5250
- }
5251
- else ReactSharedInternals.actQueue = null;
5252
- 0 < ReactSharedInternals.thrownErrors.length
5253
- ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
5254
- (ReactSharedInternals.thrownErrors.length = 0),
5255
- reject(queue))
5256
- : resolve(returnValue);
5257
- }
5258
- function flushActQueue(queue) {
5259
- if (!isFlushing) {
5260
- isFlushing = !0;
5261
- var i = 0;
5262
- try {
5263
- for (; i < queue.length; i++) {
5264
- var callback = queue[i];
5265
- do {
5266
- ReactSharedInternals.didUsePromise = !1;
5267
- var continuation = callback(!1);
5268
- if (null !== continuation) {
5269
- if (ReactSharedInternals.didUsePromise) {
5270
- queue[i] = callback;
5271
- queue.splice(0, i);
5272
- return;
5273
- }
5274
- callback = continuation;
5275
- } else break;
5276
- } while (1);
5277
- }
5278
- queue.length = 0;
5279
- } catch (error) {
5280
- queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
5281
- } finally {
5282
- isFlushing = !1;
5283
- }
5284
- }
5285
- }
5286
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
5287
- "function" ===
5288
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
5289
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
5290
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
5291
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
5292
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
5293
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
5294
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
5295
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
5296
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
5297
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
5298
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
5299
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
5300
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
5301
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
5302
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
5303
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
5304
- didWarnStateUpdateForUnmountedComponent = {},
5305
- ReactNoopUpdateQueue = {
5306
- isMounted: function () {
5307
- return !1;
5308
- },
5309
- enqueueForceUpdate: function (publicInstance) {
5310
- warnNoop(publicInstance, "forceUpdate");
5311
- },
5312
- enqueueReplaceState: function (publicInstance) {
5313
- warnNoop(publicInstance, "replaceState");
5314
- },
5315
- enqueueSetState: function (publicInstance) {
5316
- warnNoop(publicInstance, "setState");
5317
- }
5318
- },
5319
- assign = Object.assign,
5320
- emptyObject = {};
5321
- Object.freeze(emptyObject);
5322
- Component.prototype.isReactComponent = {};
5323
- Component.prototype.setState = function (partialState, callback) {
5324
- if (
5325
- "object" !== typeof partialState &&
5326
- "function" !== typeof partialState &&
5327
- null != partialState
5328
- )
5329
- throw Error(
5330
- "takes an object of state variables to update or a function which returns an object of state variables."
5331
- );
5332
- this.updater.enqueueSetState(this, partialState, callback, "setState");
5333
- };
5334
- Component.prototype.forceUpdate = function (callback) {
5335
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
5336
- };
5337
- var deprecatedAPIs = {
5338
- isMounted: [
5339
- "isMounted",
5340
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
5341
- ],
5342
- replaceState: [
5343
- "replaceState",
5344
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
5345
- ]
5346
- },
5347
- fnName;
5348
- for (fnName in deprecatedAPIs)
5349
- deprecatedAPIs.hasOwnProperty(fnName) &&
5350
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
5351
- ComponentDummy.prototype = Component.prototype;
5352
- deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
5353
- deprecatedAPIs.constructor = PureComponent;
5354
- assign(deprecatedAPIs, Component.prototype);
5355
- deprecatedAPIs.isPureReactComponent = !0;
5356
- var isArrayImpl = Array.isArray,
5357
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
5358
- ReactSharedInternals = {
5359
- H: null,
5360
- A: null,
5361
- T: null,
5362
- S: null,
5363
- V: null,
5364
- actQueue: null,
5365
- isBatchingLegacy: !1,
5366
- didScheduleLegacyUpdate: !1,
5367
- didUsePromise: !1,
5368
- thrownErrors: [],
5369
- getCurrentStack: null,
5370
- recentlyCreatedOwnerStacks: 0
5371
- },
5372
- hasOwnProperty = Object.prototype.hasOwnProperty,
5373
- createTask = console.createTask
5374
- ? console.createTask
5375
- : function () {
5376
- return null;
5377
- };
5378
- deprecatedAPIs = {
5379
- react_stack_bottom_frame: function (callStackForError) {
5380
- return callStackForError();
5381
- }
5382
- };
5383
- var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
5384
- var didWarnAboutElementRef = {};
5385
- var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
5386
- deprecatedAPIs,
5387
- UnknownOwner
5388
- )();
5389
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
5390
- var didWarnAboutMaps = !1,
5391
- userProvidedKeyEscapeRegex = /\/+/g,
5392
- reportGlobalError =
5393
- "function" === typeof reportError
5394
- ? reportError
5395
- : function (error) {
5396
- if (
5397
- "object" === typeof window &&
5398
- "function" === typeof window.ErrorEvent
5399
- ) {
5400
- var event = new window.ErrorEvent("error", {
5401
- bubbles: !0,
5402
- cancelable: !0,
5403
- message:
5404
- "object" === typeof error &&
5405
- null !== error &&
5406
- "string" === typeof error.message
5407
- ? String(error.message)
5408
- : String(error),
5409
- error: error
5410
- });
5411
- if (!window.dispatchEvent(event)) return;
5412
- } else if (
5413
- "object" === typeof process &&
5414
- "function" === typeof process.emit
5415
- ) {
5416
- process.emit("uncaughtException", error);
5417
- return;
5418
- }
5419
- console.error(error);
5420
- },
5421
- didWarnAboutMessageChannel = !1,
5422
- enqueueTaskImpl = null,
5423
- actScopeDepth = 0,
5424
- didWarnNoAwaitAct = !1,
5425
- isFlushing = !1,
5426
- queueSeveralMicrotasks =
5427
- "function" === typeof queueMicrotask
5428
- ? function (callback) {
5429
- queueMicrotask(function () {
5430
- return queueMicrotask(callback);
5431
- });
5432
- }
5433
- : enqueueTask;
5434
- deprecatedAPIs = Object.freeze({
5435
- __proto__: null,
5436
- c: function (size) {
5437
- return resolveDispatcher().useMemoCache(size);
5438
- }
5439
- });
5440
- exports.Children = {
5441
- map: mapChildren,
5442
- forEach: function (children, forEachFunc, forEachContext) {
5443
- mapChildren(
5444
- children,
5445
- function () {
5446
- forEachFunc.apply(this, arguments);
5447
- },
5448
- forEachContext
5449
- );
5450
- },
5451
- count: function (children) {
5452
- var n = 0;
5453
- mapChildren(children, function () {
5454
- n++;
5455
- });
5456
- return n;
5457
- },
5458
- toArray: function (children) {
5459
- return (
5460
- mapChildren(children, function (child) {
5461
- return child;
5462
- }) || []
5463
- );
5464
- },
5465
- only: function (children) {
5466
- if (!isValidElement(children))
5467
- throw Error(
5468
- "React.Children.only expected to receive a single React element child."
5469
- );
5470
- return children;
5471
- }
5472
- };
5473
- exports.Component = Component;
5474
- exports.Fragment = REACT_FRAGMENT_TYPE;
5475
- exports.Profiler = REACT_PROFILER_TYPE;
5476
- exports.PureComponent = PureComponent;
5477
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
5478
- exports.Suspense = REACT_SUSPENSE_TYPE;
5479
- exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
5480
- ReactSharedInternals;
5481
- exports.__COMPILER_RUNTIME = deprecatedAPIs;
5482
- exports.act = function (callback) {
5483
- var prevActQueue = ReactSharedInternals.actQueue,
5484
- prevActScopeDepth = actScopeDepth;
5485
- actScopeDepth++;
5486
- var queue = (ReactSharedInternals.actQueue =
5487
- null !== prevActQueue ? prevActQueue : []),
5488
- didAwaitActCall = !1;
5489
- try {
5490
- var result = callback();
5491
- } catch (error) {
5492
- ReactSharedInternals.thrownErrors.push(error);
5493
- }
5494
- if (0 < ReactSharedInternals.thrownErrors.length)
5495
- throw (
5496
- (popActScope(prevActQueue, prevActScopeDepth),
5497
- (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
5498
- (ReactSharedInternals.thrownErrors.length = 0),
5499
- callback)
5500
- );
5501
- if (
5502
- null !== result &&
5503
- "object" === typeof result &&
5504
- "function" === typeof result.then
5505
- ) {
5506
- var thenable = result;
5507
- queueSeveralMicrotasks(function () {
5508
- didAwaitActCall ||
5509
- didWarnNoAwaitAct ||
5510
- ((didWarnNoAwaitAct = !0),
5511
- console.error(
5512
- "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
5513
- ));
5514
- });
5515
- return {
5516
- then: function (resolve, reject) {
5517
- didAwaitActCall = !0;
5518
- thenable.then(
5519
- function (returnValue) {
5520
- popActScope(prevActQueue, prevActScopeDepth);
5521
- if (0 === prevActScopeDepth) {
5522
- try {
5523
- flushActQueue(queue),
5524
- enqueueTask(function () {
5525
- return recursivelyFlushAsyncActWork(
5526
- returnValue,
5527
- resolve,
5528
- reject
5529
- );
5530
- });
5531
- } catch (error$0) {
5532
- ReactSharedInternals.thrownErrors.push(error$0);
5533
- }
5534
- if (0 < ReactSharedInternals.thrownErrors.length) {
5535
- var _thrownError = aggregateErrors(
5536
- ReactSharedInternals.thrownErrors
5537
- );
5538
- ReactSharedInternals.thrownErrors.length = 0;
5539
- reject(_thrownError);
5540
- }
5541
- } else resolve(returnValue);
5542
- },
5543
- function (error) {
5544
- popActScope(prevActQueue, prevActScopeDepth);
5545
- 0 < ReactSharedInternals.thrownErrors.length
5546
- ? ((error = aggregateErrors(
5547
- ReactSharedInternals.thrownErrors
5548
- )),
5549
- (ReactSharedInternals.thrownErrors.length = 0),
5550
- reject(error))
5551
- : reject(error);
5552
- }
5553
- );
5554
- }
5555
- };
5556
- }
5557
- var returnValue$jscomp$0 = result;
5558
- popActScope(prevActQueue, prevActScopeDepth);
5559
- 0 === prevActScopeDepth &&
5560
- (flushActQueue(queue),
5561
- 0 !== queue.length &&
5562
- queueSeveralMicrotasks(function () {
5563
- didAwaitActCall ||
5564
- didWarnNoAwaitAct ||
5565
- ((didWarnNoAwaitAct = !0),
5566
- console.error(
5567
- "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
5568
- ));
5569
- }),
5570
- (ReactSharedInternals.actQueue = null));
5571
- if (0 < ReactSharedInternals.thrownErrors.length)
5572
- throw (
5573
- ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
5574
- (ReactSharedInternals.thrownErrors.length = 0),
5575
- callback)
5576
- );
5577
- return {
5578
- then: function (resolve, reject) {
5579
- didAwaitActCall = !0;
5580
- 0 === prevActScopeDepth
5581
- ? ((ReactSharedInternals.actQueue = queue),
5582
- enqueueTask(function () {
5583
- return recursivelyFlushAsyncActWork(
5584
- returnValue$jscomp$0,
5585
- resolve,
5586
- reject
5587
- );
5588
- }))
5589
- : resolve(returnValue$jscomp$0);
5590
- }
5591
- };
5592
- };
5593
- exports.cache = function (fn) {
5594
- return function () {
5595
- return fn.apply(null, arguments);
5596
- };
5597
- };
5598
- exports.captureOwnerStack = function () {
5599
- var getCurrentStack = ReactSharedInternals.getCurrentStack;
5600
- return null === getCurrentStack ? null : getCurrentStack();
5601
- };
5602
- exports.cloneElement = function (element, config, children) {
5603
- if (null === element || void 0 === element)
5604
- throw Error(
5605
- "The argument must be a React element, but you passed " +
5606
- element +
5607
- "."
5608
- );
5609
- var props = assign({}, element.props),
5610
- key = element.key,
5611
- owner = element._owner;
5612
- if (null != config) {
5613
- var JSCompiler_inline_result;
5614
- a: {
5615
- if (
5616
- hasOwnProperty.call(config, "ref") &&
5617
- (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
5618
- config,
5619
- "ref"
5620
- ).get) &&
5621
- JSCompiler_inline_result.isReactWarning
5622
- ) {
5623
- JSCompiler_inline_result = !1;
5624
- break a;
5625
- }
5626
- JSCompiler_inline_result = void 0 !== config.ref;
5627
- }
5628
- JSCompiler_inline_result && (owner = getOwner());
5629
- hasValidKey(config) &&
5630
- (checkKeyStringCoercion(config.key), (key = "" + config.key));
5631
- for (propName in config)
5632
- !hasOwnProperty.call(config, propName) ||
5633
- "key" === propName ||
5634
- "__self" === propName ||
5635
- "__source" === propName ||
5636
- ("ref" === propName && void 0 === config.ref) ||
5637
- (props[propName] = config[propName]);
5638
- }
5639
- var propName = arguments.length - 2;
5640
- if (1 === propName) props.children = children;
5641
- else if (1 < propName) {
5642
- JSCompiler_inline_result = Array(propName);
5643
- for (var i = 0; i < propName; i++)
5644
- JSCompiler_inline_result[i] = arguments[i + 2];
5645
- props.children = JSCompiler_inline_result;
5646
- }
5647
- props = ReactElement(
5648
- element.type,
5649
- key,
5650
- void 0,
5651
- void 0,
5652
- owner,
5653
- props,
5654
- element._debugStack,
5655
- element._debugTask
5656
- );
5657
- for (key = 2; key < arguments.length; key++)
5658
- (owner = arguments[key]),
5659
- isValidElement(owner) && owner._store && (owner._store.validated = 1);
5660
- return props;
5661
- };
5662
- exports.createContext = function (defaultValue) {
5663
- defaultValue = {
5664
- $$typeof: REACT_CONTEXT_TYPE,
5665
- _currentValue: defaultValue,
5666
- _currentValue2: defaultValue,
5667
- _threadCount: 0,
5668
- Provider: null,
5669
- Consumer: null
5670
- };
5671
- defaultValue.Provider = defaultValue;
5672
- defaultValue.Consumer = {
5673
- $$typeof: REACT_CONSUMER_TYPE,
5674
- _context: defaultValue
5675
- };
5676
- defaultValue._currentRenderer = null;
5677
- defaultValue._currentRenderer2 = null;
5678
- return defaultValue;
5679
- };
5680
- exports.createElement = function (type, config, children) {
5681
- for (var i = 2; i < arguments.length; i++) {
5682
- var node = arguments[i];
5683
- isValidElement(node) && node._store && (node._store.validated = 1);
5684
- }
5685
- i = {};
5686
- node = null;
5687
- if (null != config)
5688
- for (propName in (didWarnAboutOldJSXRuntime ||
5689
- !("__self" in config) ||
5690
- "key" in config ||
5691
- ((didWarnAboutOldJSXRuntime = !0),
5692
- console.warn(
5693
- "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
5694
- )),
5695
- hasValidKey(config) &&
5696
- (checkKeyStringCoercion(config.key), (node = "" + config.key)),
5697
- config))
5698
- hasOwnProperty.call(config, propName) &&
5699
- "key" !== propName &&
5700
- "__self" !== propName &&
5701
- "__source" !== propName &&
5702
- (i[propName] = config[propName]);
5703
- var childrenLength = arguments.length - 2;
5704
- if (1 === childrenLength) i.children = children;
5705
- else if (1 < childrenLength) {
5706
- for (
5707
- var childArray = Array(childrenLength), _i = 0;
5708
- _i < childrenLength;
5709
- _i++
5710
- )
5711
- childArray[_i] = arguments[_i + 2];
5712
- Object.freeze && Object.freeze(childArray);
5713
- i.children = childArray;
5714
- }
5715
- if (type && type.defaultProps)
5716
- for (propName in ((childrenLength = type.defaultProps), childrenLength))
5717
- void 0 === i[propName] && (i[propName] = childrenLength[propName]);
5718
- node &&
5719
- defineKeyPropWarningGetter(
5720
- i,
5721
- "function" === typeof type
5722
- ? type.displayName || type.name || "Unknown"
5723
- : type
5724
- );
5725
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
5726
- return ReactElement(
5727
- type,
5728
- node,
5729
- void 0,
5730
- void 0,
5731
- getOwner(),
5732
- i,
5733
- propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
5734
- propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
5735
- );
5736
- };
5737
- exports.createRef = function () {
5738
- var refObject = { current: null };
5739
- Object.seal(refObject);
5740
- return refObject;
5741
- };
5742
- exports.forwardRef = function (render) {
5743
- null != render && render.$$typeof === REACT_MEMO_TYPE
5744
- ? console.error(
5745
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
5746
- )
5747
- : "function" !== typeof render
5748
- ? console.error(
5749
- "forwardRef requires a render function but was given %s.",
5750
- null === render ? "null" : typeof render
5751
- )
5752
- : 0 !== render.length &&
5753
- 2 !== render.length &&
5754
- console.error(
5755
- "forwardRef render functions accept exactly two parameters: props and ref. %s",
5756
- 1 === render.length
5757
- ? "Did you forget to use the ref parameter?"
5758
- : "Any additional parameter will be undefined."
5759
- );
5760
- null != render &&
5761
- null != render.defaultProps &&
5762
- console.error(
5763
- "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
5764
- );
5765
- var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
5766
- ownName;
5767
- Object.defineProperty(elementType, "displayName", {
5768
- enumerable: !1,
5769
- configurable: !0,
5770
- get: function () {
5771
- return ownName;
5772
- },
5773
- set: function (name) {
5774
- ownName = name;
5775
- render.name ||
5776
- render.displayName ||
5777
- (Object.defineProperty(render, "name", { value: name }),
5778
- (render.displayName = name));
5779
- }
5780
- });
5781
- return elementType;
5782
- };
5783
- exports.isValidElement = isValidElement;
5784
- exports.lazy = function (ctor) {
5785
- return {
5786
- $$typeof: REACT_LAZY_TYPE,
5787
- _payload: { _status: -1, _result: ctor },
5788
- _init: lazyInitializer
5789
- };
5790
- };
5791
- exports.memo = function (type, compare) {
5792
- null == type &&
5793
- console.error(
5794
- "memo: The first argument must be a component. Instead received: %s",
5795
- null === type ? "null" : typeof type
5796
- );
5797
- compare = {
5798
- $$typeof: REACT_MEMO_TYPE,
5799
- type: type,
5800
- compare: void 0 === compare ? null : compare
5801
- };
5802
- var ownName;
5803
- Object.defineProperty(compare, "displayName", {
5804
- enumerable: !1,
5805
- configurable: !0,
5806
- get: function () {
5807
- return ownName;
5808
- },
5809
- set: function (name) {
5810
- ownName = name;
5811
- type.name ||
5812
- type.displayName ||
5813
- (Object.defineProperty(type, "name", { value: name }),
5814
- (type.displayName = name));
5815
- }
5816
- });
5817
- return compare;
5818
- };
5819
- exports.startTransition = function (scope) {
5820
- var prevTransition = ReactSharedInternals.T,
5821
- currentTransition = {};
5822
- ReactSharedInternals.T = currentTransition;
5823
- currentTransition._updatedFibers = new Set();
5824
- try {
5825
- var returnValue = scope(),
5826
- onStartTransitionFinish = ReactSharedInternals.S;
5827
- null !== onStartTransitionFinish &&
5828
- onStartTransitionFinish(currentTransition, returnValue);
5829
- "object" === typeof returnValue &&
5830
- null !== returnValue &&
5831
- "function" === typeof returnValue.then &&
5832
- returnValue.then(noop, reportGlobalError);
5833
- } catch (error) {
5834
- reportGlobalError(error);
5835
- } finally {
5836
- null === prevTransition &&
5837
- currentTransition._updatedFibers &&
5838
- ((scope = currentTransition._updatedFibers.size),
5839
- currentTransition._updatedFibers.clear(),
5840
- 10 < scope &&
5841
- console.warn(
5842
- "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
5843
- )),
5844
- (ReactSharedInternals.T = prevTransition);
5845
- }
5846
- };
5847
- exports.unstable_useCacheRefresh = function () {
5848
- return resolveDispatcher().useCacheRefresh();
5849
- };
5850
- exports.use = function (usable) {
5851
- return resolveDispatcher().use(usable);
5852
- };
5853
- exports.useActionState = function (action, initialState, permalink) {
5854
- return resolveDispatcher().useActionState(
5855
- action,
5856
- initialState,
5857
- permalink
5858
- );
5859
- };
5860
- exports.useCallback = function (callback, deps) {
5861
- return resolveDispatcher().useCallback(callback, deps);
5862
- };
5863
- exports.useContext = function (Context) {
5864
- var dispatcher = resolveDispatcher();
5865
- Context.$$typeof === REACT_CONSUMER_TYPE &&
5866
- console.error(
5867
- "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
5868
- );
5869
- return dispatcher.useContext(Context);
5870
- };
5871
- exports.useDebugValue = function (value, formatterFn) {
5872
- return resolveDispatcher().useDebugValue(value, formatterFn);
5873
- };
5874
- exports.useDeferredValue = function (value, initialValue) {
5875
- return resolveDispatcher().useDeferredValue(value, initialValue);
5876
- };
5877
- exports.useEffect = function (create, createDeps, update) {
5878
- null == create &&
5879
- console.warn(
5880
- "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
5881
- );
5882
- var dispatcher = resolveDispatcher();
5883
- if ("function" === typeof update)
5884
- throw Error(
5885
- "useEffect CRUD overload is not enabled in this build of React."
5886
- );
5887
- return dispatcher.useEffect(create, createDeps);
5888
- };
5889
- exports.useId = function () {
5890
- return resolveDispatcher().useId();
5891
- };
5892
- exports.useImperativeHandle = function (ref, create, deps) {
5893
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
5894
- };
5895
- exports.useInsertionEffect = function (create, deps) {
5896
- null == create &&
5897
- console.warn(
5898
- "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
5899
- );
5900
- return resolveDispatcher().useInsertionEffect(create, deps);
5901
- };
5902
- exports.useLayoutEffect = function (create, deps) {
5903
- null == create &&
5904
- console.warn(
5905
- "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
5906
- );
5907
- return resolveDispatcher().useLayoutEffect(create, deps);
5908
- };
5909
- exports.useMemo = function (create, deps) {
5910
- return resolveDispatcher().useMemo(create, deps);
5911
- };
5912
- exports.useOptimistic = function (passthrough, reducer) {
5913
- return resolveDispatcher().useOptimistic(passthrough, reducer);
5914
- };
5915
- exports.useReducer = function (reducer, initialArg, init) {
5916
- return resolveDispatcher().useReducer(reducer, initialArg, init);
5917
- };
5918
- exports.useRef = function (initialValue) {
5919
- return resolveDispatcher().useRef(initialValue);
5920
- };
5921
- exports.useState = function (initialState) {
5922
- return resolveDispatcher().useState(initialState);
5923
- };
5924
- exports.useSyncExternalStore = function (
5925
- subscribe,
5926
- getSnapshot,
5927
- getServerSnapshot
5928
- ) {
5929
- return resolveDispatcher().useSyncExternalStore(
5930
- subscribe,
5931
- getSnapshot,
5932
- getServerSnapshot
5933
- );
5934
- };
5935
- exports.useTransition = function () {
5936
- return resolveDispatcher().useTransition();
5937
- };
5938
- exports.version = "19.1.1";
5939
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
5940
- "function" ===
5941
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
5942
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
5943
- })();
5944
- } (react_development, react_development.exports));
5945
- return react_development.exports;
5946
- }
5011
+ return element;
5012
+ };
5013
+ /**
5014
+ * https://github.com/reactjs/rfcs/pull/107
5015
+ * @param {*} type
5016
+ * @param {object} props
5017
+ * @param {string} key
5018
+ */
5019
+
5020
+ function jsxDEV(type, config, maybeKey, source, self) {
5021
+ {
5022
+ var propName; // Reserved names are extracted
5023
+
5024
+ var props = {};
5025
+ var key = null;
5026
+ var ref = null; // Currently, key can be spread in as a prop. This causes a potential
5027
+ // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
5028
+ // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
5029
+ // but as an intermediary step, we will use jsxDEV for everything except
5030
+ // <div {...props} key="Hi" />, because we aren't currently able to tell if
5031
+ // key is explicitly declared to be undefined or not.
5032
+
5033
+ if (maybeKey !== undefined) {
5034
+ {
5035
+ checkKeyStringCoercion(maybeKey);
5036
+ }
5947
5037
 
5948
- if (process.env.NODE_ENV === 'production') {
5949
- react.exports = requireReact_production();
5950
- } else {
5951
- react.exports = requireReact_development();
5952
- }
5038
+ key = '' + maybeKey;
5039
+ }
5953
5040
 
5954
- var reactExports = react.exports;
5041
+ if (hasValidKey(config)) {
5042
+ {
5043
+ checkKeyStringCoercion(config.key);
5044
+ }
5955
5045
 
5956
- /**
5957
- * @license React
5958
- * react-jsx-runtime.development.js
5959
- *
5960
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5961
- *
5962
- * This source code is licensed under the MIT license found in the
5963
- * LICENSE file in the root directory of this source tree.
5964
- */
5046
+ key = '' + config.key;
5047
+ }
5965
5048
 
5966
- var hasRequiredReactJsxRuntime_development;
5049
+ if (hasValidRef(config)) {
5050
+ ref = config.ref;
5051
+ warnIfStringRefCannotBeAutoConverted(config, self);
5052
+ } // Remaining properties are added to a new props object
5967
5053
 
5968
- function requireReactJsxRuntime_development () {
5969
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
5970
- hasRequiredReactJsxRuntime_development = 1;
5971
- "production" !== process.env.NODE_ENV &&
5972
- (function () {
5973
- function getComponentNameFromType(type) {
5974
- if (null == type) return null;
5975
- if ("function" === typeof type)
5976
- return type.$$typeof === REACT_CLIENT_REFERENCE
5977
- ? null
5978
- : type.displayName || type.name || null;
5979
- if ("string" === typeof type) return type;
5980
- switch (type) {
5981
- case REACT_FRAGMENT_TYPE:
5982
- return "Fragment";
5983
- case REACT_PROFILER_TYPE:
5984
- return "Profiler";
5985
- case REACT_STRICT_MODE_TYPE:
5986
- return "StrictMode";
5987
- case REACT_SUSPENSE_TYPE:
5988
- return "Suspense";
5989
- case REACT_SUSPENSE_LIST_TYPE:
5990
- return "SuspenseList";
5991
- case REACT_ACTIVITY_TYPE:
5992
- return "Activity";
5054
+
5055
+ for (propName in config) {
5056
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
5057
+ props[propName] = config[propName];
5993
5058
  }
5994
- if ("object" === typeof type)
5995
- switch (
5996
- ("number" === typeof type.tag &&
5997
- console.error(
5998
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
5999
- ),
6000
- type.$$typeof)
6001
- ) {
6002
- case REACT_PORTAL_TYPE:
6003
- return "Portal";
6004
- case REACT_CONTEXT_TYPE:
6005
- return (type.displayName || "Context") + ".Provider";
6006
- case REACT_CONSUMER_TYPE:
6007
- return (type._context.displayName || "Context") + ".Consumer";
6008
- case REACT_FORWARD_REF_TYPE:
6009
- var innerType = type.render;
6010
- type = type.displayName;
6011
- type ||
6012
- ((type = innerType.displayName || innerType.name || ""),
6013
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
6014
- return type;
6015
- case REACT_MEMO_TYPE:
6016
- return (
6017
- (innerType = type.displayName || null),
6018
- null !== innerType
6019
- ? innerType
6020
- : getComponentNameFromType(type.type) || "Memo"
6021
- );
6022
- case REACT_LAZY_TYPE:
6023
- innerType = type._payload;
6024
- type = type._init;
6025
- try {
6026
- return getComponentNameFromType(type(innerType));
6027
- } catch (x) {}
5059
+ } // Resolve default props
5060
+
5061
+
5062
+ if (type && type.defaultProps) {
5063
+ var defaultProps = type.defaultProps;
5064
+
5065
+ for (propName in defaultProps) {
5066
+ if (props[propName] === undefined) {
5067
+ props[propName] = defaultProps[propName];
6028
5068
  }
6029
- return null;
6030
- }
6031
- function testStringCoercion(value) {
6032
- return "" + value;
6033
- }
6034
- function checkKeyStringCoercion(value) {
6035
- try {
6036
- testStringCoercion(value);
6037
- var JSCompiler_inline_result = !1;
6038
- } catch (e) {
6039
- JSCompiler_inline_result = !0;
6040
- }
6041
- if (JSCompiler_inline_result) {
6042
- JSCompiler_inline_result = console;
6043
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
6044
- var JSCompiler_inline_result$jscomp$0 =
6045
- ("function" === typeof Symbol &&
6046
- Symbol.toStringTag &&
6047
- value[Symbol.toStringTag]) ||
6048
- value.constructor.name ||
6049
- "Object";
6050
- JSCompiler_temp_const.call(
6051
- JSCompiler_inline_result,
6052
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
6053
- JSCompiler_inline_result$jscomp$0
6054
- );
6055
- return testStringCoercion(value);
6056
5069
  }
6057
5070
  }
6058
- function getTaskName(type) {
6059
- if (type === REACT_FRAGMENT_TYPE) return "<>";
6060
- if (
6061
- "object" === typeof type &&
6062
- null !== type &&
6063
- type.$$typeof === REACT_LAZY_TYPE
6064
- )
6065
- return "<...>";
6066
- try {
6067
- var name = getComponentNameFromType(type);
6068
- return name ? "<" + name + ">" : "<...>";
6069
- } catch (x) {
6070
- return "<...>";
5071
+
5072
+ if (key || ref) {
5073
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
5074
+
5075
+ if (key) {
5076
+ defineKeyPropWarningGetter(props, displayName);
6071
5077
  }
6072
- }
6073
- function getOwner() {
6074
- var dispatcher = ReactSharedInternals.A;
6075
- return null === dispatcher ? null : dispatcher.getOwner();
6076
- }
6077
- function UnknownOwner() {
6078
- return Error("react-stack-top-frame");
6079
- }
6080
- function hasValidKey(config) {
6081
- if (hasOwnProperty.call(config, "key")) {
6082
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
6083
- if (getter && getter.isReactWarning) return !1;
5078
+
5079
+ if (ref) {
5080
+ defineRefPropWarningGetter(props, displayName);
6084
5081
  }
6085
- return void 0 !== config.key;
6086
5082
  }
6087
- function defineKeyPropWarningGetter(props, displayName) {
6088
- function warnAboutAccessingKey() {
6089
- specialPropKeyWarningShown ||
6090
- ((specialPropKeyWarningShown = !0),
6091
- console.error(
6092
- "%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)",
6093
- displayName
6094
- ));
6095
- }
6096
- warnAboutAccessingKey.isReactWarning = !0;
6097
- Object.defineProperty(props, "key", {
6098
- get: warnAboutAccessingKey,
6099
- configurable: !0
6100
- });
5083
+
5084
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
5085
+ }
5086
+ }
5087
+
5088
+ var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
5089
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
5090
+
5091
+ function setCurrentlyValidatingElement$1(element) {
5092
+ {
5093
+ if (element) {
5094
+ var owner = element._owner;
5095
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
5096
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
5097
+ } else {
5098
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
6101
5099
  }
6102
- function elementRefGetterWithDeprecationWarning() {
6103
- var componentName = getComponentNameFromType(this.type);
6104
- didWarnAboutElementRef[componentName] ||
6105
- ((didWarnAboutElementRef[componentName] = !0),
6106
- console.error(
6107
- "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."
6108
- ));
6109
- componentName = this.props.ref;
6110
- return void 0 !== componentName ? componentName : null;
5100
+ }
5101
+ }
5102
+
5103
+ var propTypesMisspellWarningShown;
5104
+
5105
+ {
5106
+ propTypesMisspellWarningShown = false;
5107
+ }
5108
+ /**
5109
+ * Verifies the object is a ReactElement.
5110
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
5111
+ * @param {?object} object
5112
+ * @return {boolean} True if `object` is a ReactElement.
5113
+ * @final
5114
+ */
5115
+
5116
+
5117
+ function isValidElement(object) {
5118
+ {
5119
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
5120
+ }
5121
+ }
5122
+
5123
+ function getDeclarationErrorAddendum() {
5124
+ {
5125
+ if (ReactCurrentOwner$1.current) {
5126
+ var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
5127
+
5128
+ if (name) {
5129
+ return '\n\nCheck the render method of `' + name + '`.';
5130
+ }
6111
5131
  }
6112
- function ReactElement(
6113
- type,
6114
- key,
6115
- self,
6116
- source,
6117
- owner,
6118
- props,
6119
- debugStack,
6120
- debugTask
6121
- ) {
6122
- self = props.ref;
6123
- type = {
6124
- $$typeof: REACT_ELEMENT_TYPE,
6125
- type: type,
6126
- key: key,
6127
- props: props,
6128
- _owner: owner
6129
- };
6130
- null !== (void 0 !== self ? self : null)
6131
- ? Object.defineProperty(type, "ref", {
6132
- enumerable: !1,
6133
- get: elementRefGetterWithDeprecationWarning
6134
- })
6135
- : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
6136
- type._store = {};
6137
- Object.defineProperty(type._store, "validated", {
6138
- configurable: !1,
6139
- enumerable: !1,
6140
- writable: !0,
6141
- value: 0
6142
- });
6143
- Object.defineProperty(type, "_debugInfo", {
6144
- configurable: !1,
6145
- enumerable: !1,
6146
- writable: !0,
6147
- value: null
6148
- });
6149
- Object.defineProperty(type, "_debugStack", {
6150
- configurable: !1,
6151
- enumerable: !1,
6152
- writable: !0,
6153
- value: debugStack
6154
- });
6155
- Object.defineProperty(type, "_debugTask", {
6156
- configurable: !1,
6157
- enumerable: !1,
6158
- writable: !0,
6159
- value: debugTask
6160
- });
6161
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
6162
- return type;
5132
+
5133
+ return '';
5134
+ }
5135
+ }
5136
+
5137
+ function getSourceInfoErrorAddendum(source) {
5138
+ {
5139
+ if (source !== undefined) {
5140
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
5141
+ var lineNumber = source.lineNumber;
5142
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
6163
5143
  }
6164
- function jsxDEVImpl(
6165
- type,
6166
- config,
6167
- maybeKey,
6168
- isStaticChildren,
6169
- source,
6170
- self,
6171
- debugStack,
6172
- debugTask
6173
- ) {
6174
- var children = config.children;
6175
- if (void 0 !== children)
6176
- if (isStaticChildren)
6177
- if (isArrayImpl(children)) {
6178
- for (
6179
- isStaticChildren = 0;
6180
- isStaticChildren < children.length;
6181
- isStaticChildren++
6182
- )
6183
- validateChildKeys(children[isStaticChildren]);
6184
- Object.freeze && Object.freeze(children);
6185
- } else
6186
- console.error(
6187
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
6188
- );
6189
- else validateChildKeys(children);
6190
- if (hasOwnProperty.call(config, "key")) {
6191
- children = getComponentNameFromType(type);
6192
- var keys = Object.keys(config).filter(function (k) {
6193
- return "key" !== k;
6194
- });
6195
- isStaticChildren =
6196
- 0 < keys.length
6197
- ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
6198
- : "{key: someKey}";
6199
- didWarnAboutKeySpread[children + isStaticChildren] ||
6200
- ((keys =
6201
- 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
6202
- console.error(
6203
- '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} />',
6204
- isStaticChildren,
6205
- children,
6206
- keys,
6207
- children
6208
- ),
6209
- (didWarnAboutKeySpread[children + isStaticChildren] = !0));
5144
+
5145
+ return '';
5146
+ }
5147
+ }
5148
+ /**
5149
+ * Warn if there's no key explicitly set on dynamic arrays of children or
5150
+ * object keys are not valid. This allows us to keep track of children between
5151
+ * updates.
5152
+ */
5153
+
5154
+
5155
+ var ownerHasKeyUseWarning = {};
5156
+
5157
+ function getCurrentComponentErrorInfo(parentType) {
5158
+ {
5159
+ var info = getDeclarationErrorAddendum();
5160
+
5161
+ if (!info) {
5162
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
5163
+
5164
+ if (parentName) {
5165
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
6210
5166
  }
6211
- children = null;
6212
- void 0 !== maybeKey &&
6213
- (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
6214
- hasValidKey(config) &&
6215
- (checkKeyStringCoercion(config.key), (children = "" + config.key));
6216
- if ("key" in config) {
6217
- maybeKey = {};
6218
- for (var propName in config)
6219
- "key" !== propName && (maybeKey[propName] = config[propName]);
6220
- } else maybeKey = config;
6221
- children &&
6222
- defineKeyPropWarningGetter(
6223
- maybeKey,
6224
- "function" === typeof type
6225
- ? type.displayName || type.name || "Unknown"
6226
- : type
6227
- );
6228
- return ReactElement(
6229
- type,
6230
- children,
6231
- self,
6232
- source,
6233
- getOwner(),
6234
- maybeKey,
6235
- debugStack,
6236
- debugTask
6237
- );
6238
5167
  }
6239
- function validateChildKeys(node) {
6240
- "object" === typeof node &&
6241
- null !== node &&
6242
- node.$$typeof === REACT_ELEMENT_TYPE &&
6243
- node._store &&
6244
- (node._store.validated = 1);
5168
+
5169
+ return info;
5170
+ }
5171
+ }
5172
+ /**
5173
+ * Warn if the element doesn't have an explicit key assigned to it.
5174
+ * This element is in an array. The array could grow and shrink or be
5175
+ * reordered. All children that haven't already been validated are required to
5176
+ * have a "key" property assigned to it. Error statuses are cached so a warning
5177
+ * will only be shown once.
5178
+ *
5179
+ * @internal
5180
+ * @param {ReactElement} element Element that requires a key.
5181
+ * @param {*} parentType element's parent's type.
5182
+ */
5183
+
5184
+
5185
+ function validateExplicitKey(element, parentType) {
5186
+ {
5187
+ if (!element._store || element._store.validated || element.key != null) {
5188
+ return;
6245
5189
  }
6246
- var React = reactExports,
6247
- REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
6248
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
6249
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
6250
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
6251
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
6252
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
6253
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
6254
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
6255
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
6256
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
6257
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
6258
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
6259
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
6260
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
6261
- ReactSharedInternals =
6262
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
6263
- hasOwnProperty = Object.prototype.hasOwnProperty,
6264
- isArrayImpl = Array.isArray,
6265
- createTask = console.createTask
6266
- ? console.createTask
6267
- : function () {
6268
- return null;
6269
- };
6270
- React = {
6271
- react_stack_bottom_frame: function (callStackForError) {
6272
- return callStackForError();
6273
- }
6274
- };
6275
- var specialPropKeyWarningShown;
6276
- var didWarnAboutElementRef = {};
6277
- var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
6278
- React,
6279
- UnknownOwner
6280
- )();
6281
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
6282
- var didWarnAboutKeySpread = {};
6283
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
6284
- reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
6285
- var trackActualOwner =
6286
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
6287
- return jsxDEVImpl(
6288
- type,
6289
- config,
6290
- maybeKey,
6291
- !1,
6292
- source,
6293
- self,
6294
- trackActualOwner
6295
- ? Error("react-stack-top-frame")
6296
- : unknownOwnerDebugStack,
6297
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
6298
- );
6299
- };
6300
- reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
6301
- var trackActualOwner =
6302
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
6303
- return jsxDEVImpl(
6304
- type,
6305
- config,
6306
- maybeKey,
6307
- !0,
6308
- source,
6309
- self,
6310
- trackActualOwner
6311
- ? Error("react-stack-top-frame")
6312
- : unknownOwnerDebugStack,
6313
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
6314
- );
6315
- };
6316
- })();
6317
- return reactJsxRuntime_development;
6318
- }
6319
5190
 
6320
- if (process.env.NODE_ENV === 'production') {
6321
- jsxRuntime.exports = requireReactJsxRuntime_production();
6322
- } else {
6323
- jsxRuntime.exports = requireReactJsxRuntime_development();
6324
- }
5191
+ element._store.validated = true;
5192
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
6325
5193
 
6326
- var jsxRuntimeExports = jsxRuntime.exports;
5194
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
5195
+ return;
5196
+ }
6327
5197
 
6328
- var dist = {};
5198
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
5199
+ // property, it may be the creator of the child that's responsible for
5200
+ // assigning it a key.
6329
5201
 
6330
- var useWebsocket = {};
5202
+ var childOwner = '';
6331
5203
 
6332
- var reactDom = {exports: {}};
5204
+ if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
5205
+ // Give the component that originally created this child.
5206
+ childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
5207
+ }
6333
5208
 
6334
- var reactDom_production = {};
5209
+ setCurrentlyValidatingElement$1(element);
6335
5210
 
6336
- /**
6337
- * @license React
6338
- * react-dom.production.js
6339
- *
6340
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6341
- *
6342
- * This source code is licensed under the MIT license found in the
6343
- * LICENSE file in the root directory of this source tree.
6344
- */
5211
+ 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);
6345
5212
 
6346
- var hasRequiredReactDom_production;
6347
-
6348
- function requireReactDom_production () {
6349
- if (hasRequiredReactDom_production) return reactDom_production;
6350
- hasRequiredReactDom_production = 1;
6351
- var React = reactExports;
6352
- function formatProdErrorMessage(code) {
6353
- var url = "https://react.dev/errors/" + code;
6354
- if (1 < arguments.length) {
6355
- url += "?args[]=" + encodeURIComponent(arguments[1]);
6356
- for (var i = 2; i < arguments.length; i++)
6357
- url += "&args[]=" + encodeURIComponent(arguments[i]);
5213
+ setCurrentlyValidatingElement$1(null);
6358
5214
  }
6359
- return (
6360
- "Minified React error #" +
6361
- code +
6362
- "; visit " +
6363
- url +
6364
- " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
6365
- );
6366
- }
6367
- function noop() {}
6368
- var Internals = {
6369
- d: {
6370
- f: noop,
6371
- r: function () {
6372
- throw Error(formatProdErrorMessage(522));
6373
- },
6374
- D: noop,
6375
- C: noop,
6376
- L: noop,
6377
- m: noop,
6378
- X: noop,
6379
- S: noop,
6380
- M: noop
6381
- },
6382
- p: 0,
6383
- findDOMNode: null
6384
- },
6385
- REACT_PORTAL_TYPE = Symbol.for("react.portal");
6386
- function createPortal$1(children, containerInfo, implementation) {
6387
- var key =
6388
- 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
6389
- return {
6390
- $$typeof: REACT_PORTAL_TYPE,
6391
- key: null == key ? null : "" + key,
6392
- children: children,
6393
- containerInfo: containerInfo,
6394
- implementation: implementation
6395
- };
6396
5215
  }
6397
- var ReactSharedInternals =
6398
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
6399
- function getCrossOriginStringAs(as, input) {
6400
- if ("font" === as) return "";
6401
- if ("string" === typeof input)
6402
- return "use-credentials" === input ? input : "";
6403
- }
6404
- reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
6405
- Internals;
6406
- reactDom_production.createPortal = function (children, container) {
6407
- var key =
6408
- 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
6409
- if (
6410
- !container ||
6411
- (1 !== container.nodeType &&
6412
- 9 !== container.nodeType &&
6413
- 11 !== container.nodeType)
6414
- )
6415
- throw Error(formatProdErrorMessage(299));
6416
- return createPortal$1(children, container, null, key);
6417
- };
6418
- reactDom_production.flushSync = function (fn) {
6419
- var previousTransition = ReactSharedInternals.T,
6420
- previousUpdatePriority = Internals.p;
6421
- try {
6422
- if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();
6423
- } finally {
6424
- (ReactSharedInternals.T = previousTransition),
6425
- (Internals.p = previousUpdatePriority),
6426
- Internals.d.f();
6427
- }
6428
- };
6429
- reactDom_production.preconnect = function (href, options) {
6430
- "string" === typeof href &&
6431
- (options
6432
- ? ((options = options.crossOrigin),
6433
- (options =
6434
- "string" === typeof options
6435
- ? "use-credentials" === options
6436
- ? options
6437
- : ""
6438
- : void 0))
6439
- : (options = null),
6440
- Internals.d.C(href, options));
6441
- };
6442
- reactDom_production.prefetchDNS = function (href) {
6443
- "string" === typeof href && Internals.d.D(href);
6444
- };
6445
- reactDom_production.preinit = function (href, options) {
6446
- if ("string" === typeof href && options && "string" === typeof options.as) {
6447
- var as = options.as,
6448
- crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
6449
- integrity =
6450
- "string" === typeof options.integrity ? options.integrity : void 0,
6451
- fetchPriority =
6452
- "string" === typeof options.fetchPriority
6453
- ? options.fetchPriority
6454
- : void 0;
6455
- "style" === as
6456
- ? Internals.d.S(
6457
- href,
6458
- "string" === typeof options.precedence ? options.precedence : void 0,
6459
- {
6460
- crossOrigin: crossOrigin,
6461
- integrity: integrity,
6462
- fetchPriority: fetchPriority
5216
+ /**
5217
+ * Ensure that every element either is passed in a static location, in an
5218
+ * array with an explicit keys property defined, or in an object literal
5219
+ * with valid key property.
5220
+ *
5221
+ * @internal
5222
+ * @param {ReactNode} node Statically passed child of any type.
5223
+ * @param {*} parentType node's parent's type.
5224
+ */
5225
+
5226
+
5227
+ function validateChildKeys(node, parentType) {
5228
+ {
5229
+ if (typeof node !== 'object') {
5230
+ return;
5231
+ }
5232
+
5233
+ if (isArray(node)) {
5234
+ for (var i = 0; i < node.length; i++) {
5235
+ var child = node[i];
5236
+
5237
+ if (isValidElement(child)) {
5238
+ validateExplicitKey(child, parentType);
5239
+ }
5240
+ }
5241
+ } else if (isValidElement(node)) {
5242
+ // This element was passed in a valid location.
5243
+ if (node._store) {
5244
+ node._store.validated = true;
5245
+ }
5246
+ } else if (node) {
5247
+ var iteratorFn = getIteratorFn(node);
5248
+
5249
+ if (typeof iteratorFn === 'function') {
5250
+ // Entry iterators used to provide implicit keys,
5251
+ // but now we print a separate warning for them later.
5252
+ if (iteratorFn !== node.entries) {
5253
+ var iterator = iteratorFn.call(node);
5254
+ var step;
5255
+
5256
+ while (!(step = iterator.next()).done) {
5257
+ if (isValidElement(step.value)) {
5258
+ validateExplicitKey(step.value, parentType);
5259
+ }
6463
5260
  }
6464
- )
6465
- : "script" === as &&
6466
- Internals.d.X(href, {
6467
- crossOrigin: crossOrigin,
6468
- integrity: integrity,
6469
- fetchPriority: fetchPriority,
6470
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
6471
- });
6472
- }
6473
- };
6474
- reactDom_production.preinitModule = function (href, options) {
6475
- if ("string" === typeof href)
6476
- if ("object" === typeof options && null !== options) {
6477
- if (null == options.as || "script" === options.as) {
6478
- var crossOrigin = getCrossOriginStringAs(
6479
- options.as,
6480
- options.crossOrigin
6481
- );
6482
- Internals.d.M(href, {
6483
- crossOrigin: crossOrigin,
6484
- integrity:
6485
- "string" === typeof options.integrity ? options.integrity : void 0,
6486
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
6487
- });
5261
+ }
6488
5262
  }
6489
- } else null == options && Internals.d.M(href);
6490
- };
6491
- reactDom_production.preload = function (href, options) {
6492
- if (
6493
- "string" === typeof href &&
6494
- "object" === typeof options &&
6495
- null !== options &&
6496
- "string" === typeof options.as
6497
- ) {
6498
- var as = options.as,
6499
- crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
6500
- Internals.d.L(href, as, {
6501
- crossOrigin: crossOrigin,
6502
- integrity:
6503
- "string" === typeof options.integrity ? options.integrity : void 0,
6504
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
6505
- type: "string" === typeof options.type ? options.type : void 0,
6506
- fetchPriority:
6507
- "string" === typeof options.fetchPriority
6508
- ? options.fetchPriority
6509
- : void 0,
6510
- referrerPolicy:
6511
- "string" === typeof options.referrerPolicy
6512
- ? options.referrerPolicy
6513
- : void 0,
6514
- imageSrcSet:
6515
- "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
6516
- imageSizes:
6517
- "string" === typeof options.imageSizes ? options.imageSizes : void 0,
6518
- media: "string" === typeof options.media ? options.media : void 0
6519
- });
5263
+ }
6520
5264
  }
6521
- };
6522
- reactDom_production.preloadModule = function (href, options) {
6523
- if ("string" === typeof href)
6524
- if (options) {
6525
- var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
6526
- Internals.d.m(href, {
6527
- as:
6528
- "string" === typeof options.as && "script" !== options.as
6529
- ? options.as
6530
- : void 0,
6531
- crossOrigin: crossOrigin,
6532
- integrity:
6533
- "string" === typeof options.integrity ? options.integrity : void 0
6534
- });
6535
- } else Internals.d.m(href);
6536
- };
6537
- reactDom_production.requestFormReset = function (form) {
6538
- Internals.d.r(form);
6539
- };
6540
- reactDom_production.unstable_batchedUpdates = function (fn, a) {
6541
- return fn(a);
6542
- };
6543
- reactDom_production.useFormState = function (action, initialState, permalink) {
6544
- return ReactSharedInternals.H.useFormState(action, initialState, permalink);
6545
- };
6546
- reactDom_production.useFormStatus = function () {
6547
- return ReactSharedInternals.H.useHostTransitionStatus();
6548
- };
6549
- reactDom_production.version = "19.1.1";
6550
- return reactDom_production;
6551
- }
6552
-
6553
- var reactDom_development = {};
5265
+ }
5266
+ /**
5267
+ * Given an element, validate that its props follow the propTypes definition,
5268
+ * provided by the type.
5269
+ *
5270
+ * @param {ReactElement} element
5271
+ */
6554
5272
 
6555
- /**
6556
- * @license React
6557
- * react-dom.development.js
6558
- *
6559
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6560
- *
6561
- * This source code is licensed under the MIT license found in the
6562
- * LICENSE file in the root directory of this source tree.
6563
- */
6564
5273
 
6565
- var hasRequiredReactDom_development;
5274
+ function validatePropTypes(element) {
5275
+ {
5276
+ var type = element.type;
6566
5277
 
6567
- function requireReactDom_development () {
6568
- if (hasRequiredReactDom_development) return reactDom_development;
6569
- hasRequiredReactDom_development = 1;
6570
- "production" !== process.env.NODE_ENV &&
6571
- (function () {
6572
- function noop() {}
6573
- function testStringCoercion(value) {
6574
- return "" + value;
5278
+ if (type === null || type === undefined || typeof type === 'string') {
5279
+ return;
6575
5280
  }
6576
- function createPortal$1(children, containerInfo, implementation) {
6577
- var key =
6578
- 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
6579
- try {
6580
- testStringCoercion(key);
6581
- var JSCompiler_inline_result = !1;
6582
- } catch (e) {
6583
- JSCompiler_inline_result = !0;
6584
- }
6585
- JSCompiler_inline_result &&
6586
- (console.error(
6587
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
6588
- ("function" === typeof Symbol &&
6589
- Symbol.toStringTag &&
6590
- key[Symbol.toStringTag]) ||
6591
- key.constructor.name ||
6592
- "Object"
6593
- ),
6594
- testStringCoercion(key));
6595
- return {
6596
- $$typeof: REACT_PORTAL_TYPE,
6597
- key: null == key ? null : "" + key,
6598
- children: children,
6599
- containerInfo: containerInfo,
6600
- implementation: implementation
6601
- };
5281
+
5282
+ var propTypes;
5283
+
5284
+ if (typeof type === 'function') {
5285
+ propTypes = type.propTypes;
5286
+ } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
5287
+ // Inner props are checked in the reconciler.
5288
+ type.$$typeof === REACT_MEMO_TYPE)) {
5289
+ propTypes = type.propTypes;
5290
+ } else {
5291
+ return;
6602
5292
  }
6603
- function getCrossOriginStringAs(as, input) {
6604
- if ("font" === as) return "";
6605
- if ("string" === typeof input)
6606
- return "use-credentials" === input ? input : "";
5293
+
5294
+ if (propTypes) {
5295
+ // Intentionally inside to avoid triggering lazy initializers:
5296
+ var name = getComponentNameFromType(type);
5297
+ checkPropTypes(propTypes, element.props, 'prop', name, element);
5298
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
5299
+ propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
5300
+
5301
+ var _name = getComponentNameFromType(type);
5302
+
5303
+ error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
6607
5304
  }
6608
- function getValueDescriptorExpectingObjectForWarning(thing) {
6609
- return null === thing
6610
- ? "`null`"
6611
- : void 0 === thing
6612
- ? "`undefined`"
6613
- : "" === thing
6614
- ? "an empty string"
6615
- : 'something with type "' + typeof thing + '"';
5305
+
5306
+ if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
5307
+ error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
6616
5308
  }
6617
- function getValueDescriptorExpectingEnumForWarning(thing) {
6618
- return null === thing
6619
- ? "`null`"
6620
- : void 0 === thing
6621
- ? "`undefined`"
6622
- : "" === thing
6623
- ? "an empty string"
6624
- : "string" === typeof thing
6625
- ? JSON.stringify(thing)
6626
- : "number" === typeof thing
6627
- ? "`" + thing + "`"
6628
- : 'something with type "' + typeof thing + '"';
5309
+ }
5310
+ }
5311
+ /**
5312
+ * Given a fragment, validate that it can only be provided with fragment props
5313
+ * @param {ReactElement} fragment
5314
+ */
5315
+
5316
+
5317
+ function validateFragmentProps(fragment) {
5318
+ {
5319
+ var keys = Object.keys(fragment.props);
5320
+
5321
+ for (var i = 0; i < keys.length; i++) {
5322
+ var key = keys[i];
5323
+
5324
+ if (key !== 'children' && key !== 'key') {
5325
+ setCurrentlyValidatingElement$1(fragment);
5326
+
5327
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
5328
+
5329
+ setCurrentlyValidatingElement$1(null);
5330
+ break;
5331
+ }
6629
5332
  }
6630
- function resolveDispatcher() {
6631
- var dispatcher = ReactSharedInternals.H;
6632
- null === dispatcher &&
6633
- console.error(
6634
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
6635
- );
6636
- return dispatcher;
5333
+
5334
+ if (fragment.ref !== null) {
5335
+ setCurrentlyValidatingElement$1(fragment);
5336
+
5337
+ error('Invalid attribute `ref` supplied to `React.Fragment`.');
5338
+
5339
+ setCurrentlyValidatingElement$1(null);
6637
5340
  }
6638
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
6639
- "function" ===
6640
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
6641
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
6642
- var React = reactExports,
6643
- Internals = {
6644
- d: {
6645
- f: noop,
6646
- r: function () {
6647
- throw Error(
6648
- "Invalid form element. requestFormReset must be passed a form that was rendered by React."
6649
- );
6650
- },
6651
- D: noop,
6652
- C: noop,
6653
- L: noop,
6654
- m: noop,
6655
- X: noop,
6656
- S: noop,
6657
- M: noop
6658
- },
6659
- p: 0,
6660
- findDOMNode: null
6661
- },
6662
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
6663
- ReactSharedInternals =
6664
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
6665
- ("function" === typeof Map &&
6666
- null != Map.prototype &&
6667
- "function" === typeof Map.prototype.forEach &&
6668
- "function" === typeof Set &&
6669
- null != Set.prototype &&
6670
- "function" === typeof Set.prototype.clear &&
6671
- "function" === typeof Set.prototype.forEach) ||
6672
- console.error(
6673
- "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
6674
- );
6675
- reactDom_development.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
6676
- Internals;
6677
- reactDom_development.createPortal = function (children, container) {
6678
- var key =
6679
- 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
6680
- if (
6681
- !container ||
6682
- (1 !== container.nodeType &&
6683
- 9 !== container.nodeType &&
6684
- 11 !== container.nodeType)
6685
- )
6686
- throw Error("Target container is not a DOM element.");
6687
- return createPortal$1(children, container, null, key);
6688
- };
6689
- reactDom_development.flushSync = function (fn) {
6690
- var previousTransition = ReactSharedInternals.T,
6691
- previousUpdatePriority = Internals.p;
6692
- try {
6693
- if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
6694
- return fn();
6695
- } finally {
6696
- (ReactSharedInternals.T = previousTransition),
6697
- (Internals.p = previousUpdatePriority),
6698
- Internals.d.f() &&
6699
- console.error(
6700
- "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
6701
- );
5341
+ }
5342
+ }
5343
+
5344
+ var didWarnAboutKeySpread = {};
5345
+ function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
5346
+ {
5347
+ var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
5348
+ // succeed and there will likely be errors in render.
5349
+
5350
+ if (!validType) {
5351
+ var info = '';
5352
+
5353
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
5354
+ 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.";
6702
5355
  }
6703
- };
6704
- reactDom_development.preconnect = function (href, options) {
6705
- "string" === typeof href && href
6706
- ? null != options && "object" !== typeof options
6707
- ? console.error(
6708
- "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
6709
- getValueDescriptorExpectingEnumForWarning(options)
6710
- )
6711
- : null != options &&
6712
- "string" !== typeof options.crossOrigin &&
6713
- console.error(
6714
- "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
6715
- getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
6716
- )
6717
- : console.error(
6718
- "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
6719
- getValueDescriptorExpectingObjectForWarning(href)
6720
- );
6721
- "string" === typeof href &&
6722
- (options
6723
- ? ((options = options.crossOrigin),
6724
- (options =
6725
- "string" === typeof options
6726
- ? "use-credentials" === options
6727
- ? options
6728
- : ""
6729
- : void 0))
6730
- : (options = null),
6731
- Internals.d.C(href, options));
6732
- };
6733
- reactDom_development.prefetchDNS = function (href) {
6734
- if ("string" !== typeof href || !href)
6735
- console.error(
6736
- "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
6737
- getValueDescriptorExpectingObjectForWarning(href)
6738
- );
6739
- else if (1 < arguments.length) {
6740
- var options = arguments[1];
6741
- "object" === typeof options && options.hasOwnProperty("crossOrigin")
6742
- ? console.error(
6743
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
6744
- getValueDescriptorExpectingEnumForWarning(options)
6745
- )
6746
- : console.error(
6747
- "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
6748
- getValueDescriptorExpectingEnumForWarning(options)
6749
- );
5356
+
5357
+ var sourceInfo = getSourceInfoErrorAddendum(source);
5358
+
5359
+ if (sourceInfo) {
5360
+ info += sourceInfo;
5361
+ } else {
5362
+ info += getDeclarationErrorAddendum();
6750
5363
  }
6751
- "string" === typeof href && Internals.d.D(href);
6752
- };
6753
- reactDom_development.preinit = function (href, options) {
6754
- "string" === typeof href && href
6755
- ? null == options || "object" !== typeof options
6756
- ? console.error(
6757
- "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
6758
- getValueDescriptorExpectingEnumForWarning(options)
6759
- )
6760
- : "style" !== options.as &&
6761
- "script" !== options.as &&
6762
- console.error(
6763
- 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
6764
- getValueDescriptorExpectingEnumForWarning(options.as)
6765
- )
6766
- : console.error(
6767
- "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
6768
- getValueDescriptorExpectingObjectForWarning(href)
6769
- );
6770
- if (
6771
- "string" === typeof href &&
6772
- options &&
6773
- "string" === typeof options.as
6774
- ) {
6775
- var as = options.as,
6776
- crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
6777
- integrity =
6778
- "string" === typeof options.integrity ? options.integrity : void 0,
6779
- fetchPriority =
6780
- "string" === typeof options.fetchPriority
6781
- ? options.fetchPriority
6782
- : void 0;
6783
- "style" === as
6784
- ? Internals.d.S(
6785
- href,
6786
- "string" === typeof options.precedence
6787
- ? options.precedence
6788
- : void 0,
6789
- {
6790
- crossOrigin: crossOrigin,
6791
- integrity: integrity,
6792
- fetchPriority: fetchPriority
6793
- }
6794
- )
6795
- : "script" === as &&
6796
- Internals.d.X(href, {
6797
- crossOrigin: crossOrigin,
6798
- integrity: integrity,
6799
- fetchPriority: fetchPriority,
6800
- nonce: "string" === typeof options.nonce ? options.nonce : void 0
6801
- });
5364
+
5365
+ var typeString;
5366
+
5367
+ if (type === null) {
5368
+ typeString = 'null';
5369
+ } else if (isArray(type)) {
5370
+ typeString = 'array';
5371
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
5372
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
5373
+ info = ' Did you accidentally export a JSX literal instead of a component?';
5374
+ } else {
5375
+ typeString = typeof type;
6802
5376
  }
6803
- };
6804
- reactDom_development.preinitModule = function (href, options) {
6805
- var encountered = "";
6806
- ("string" === typeof href && href) ||
6807
- (encountered +=
6808
- " The `href` argument encountered was " +
6809
- getValueDescriptorExpectingObjectForWarning(href) +
6810
- ".");
6811
- void 0 !== options && "object" !== typeof options
6812
- ? (encountered +=
6813
- " The `options` argument encountered was " +
6814
- getValueDescriptorExpectingObjectForWarning(options) +
6815
- ".")
6816
- : options &&
6817
- "as" in options &&
6818
- "script" !== options.as &&
6819
- (encountered +=
6820
- " The `as` option encountered was " +
6821
- getValueDescriptorExpectingEnumForWarning(options.as) +
6822
- ".");
6823
- if (encountered)
6824
- console.error(
6825
- "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
6826
- encountered
6827
- );
6828
- else
6829
- switch (
6830
- ((encountered =
6831
- options && "string" === typeof options.as ? options.as : "script"),
6832
- encountered)
6833
- ) {
6834
- case "script":
6835
- break;
6836
- default:
6837
- (encountered =
6838
- getValueDescriptorExpectingEnumForWarning(encountered)),
6839
- console.error(
6840
- 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
6841
- encountered,
6842
- href
6843
- );
5377
+
5378
+ 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);
5379
+ }
5380
+
5381
+ var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
5382
+ // TODO: Drop this when these are no longer allowed as the type argument.
5383
+
5384
+ if (element == null) {
5385
+ return element;
5386
+ } // Skip key warning if the type isn't valid since our key validation logic
5387
+ // doesn't expect a non-string/function type and can throw confusing errors.
5388
+ // We don't want exception behavior to differ between dev and prod.
5389
+ // (Rendering will throw with a helpful message and as soon as the type is
5390
+ // fixed, the key warnings will appear.)
5391
+
5392
+
5393
+ if (validType) {
5394
+ var children = props.children;
5395
+
5396
+ if (children !== undefined) {
5397
+ if (isStaticChildren) {
5398
+ if (isArray(children)) {
5399
+ for (var i = 0; i < children.length; i++) {
5400
+ validateChildKeys(children[i], type);
5401
+ }
5402
+
5403
+ if (Object.freeze) {
5404
+ Object.freeze(children);
5405
+ }
5406
+ } else {
5407
+ 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.');
5408
+ }
5409
+ } else {
5410
+ validateChildKeys(children, type);
6844
5411
  }
6845
- if ("string" === typeof href)
6846
- if ("object" === typeof options && null !== options) {
6847
- if (null == options.as || "script" === options.as)
6848
- (encountered = getCrossOriginStringAs(
6849
- options.as,
6850
- options.crossOrigin
6851
- )),
6852
- Internals.d.M(href, {
6853
- crossOrigin: encountered,
6854
- integrity:
6855
- "string" === typeof options.integrity
6856
- ? options.integrity
6857
- : void 0,
6858
- nonce:
6859
- "string" === typeof options.nonce ? options.nonce : void 0
6860
- });
6861
- } else null == options && Internals.d.M(href);
6862
- };
6863
- reactDom_development.preload = function (href, options) {
6864
- var encountered = "";
6865
- ("string" === typeof href && href) ||
6866
- (encountered +=
6867
- " The `href` argument encountered was " +
6868
- getValueDescriptorExpectingObjectForWarning(href) +
6869
- ".");
6870
- null == options || "object" !== typeof options
6871
- ? (encountered +=
6872
- " The `options` argument encountered was " +
6873
- getValueDescriptorExpectingObjectForWarning(options) +
6874
- ".")
6875
- : ("string" === typeof options.as && options.as) ||
6876
- (encountered +=
6877
- " The `as` option encountered was " +
6878
- getValueDescriptorExpectingObjectForWarning(options.as) +
6879
- ".");
6880
- encountered &&
6881
- console.error(
6882
- 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
6883
- encountered
6884
- );
6885
- if (
6886
- "string" === typeof href &&
6887
- "object" === typeof options &&
6888
- null !== options &&
6889
- "string" === typeof options.as
6890
- ) {
6891
- encountered = options.as;
6892
- var crossOrigin = getCrossOriginStringAs(
6893
- encountered,
6894
- options.crossOrigin
6895
- );
6896
- Internals.d.L(href, encountered, {
6897
- crossOrigin: crossOrigin,
6898
- integrity:
6899
- "string" === typeof options.integrity ? options.integrity : void 0,
6900
- nonce: "string" === typeof options.nonce ? options.nonce : void 0,
6901
- type: "string" === typeof options.type ? options.type : void 0,
6902
- fetchPriority:
6903
- "string" === typeof options.fetchPriority
6904
- ? options.fetchPriority
6905
- : void 0,
6906
- referrerPolicy:
6907
- "string" === typeof options.referrerPolicy
6908
- ? options.referrerPolicy
6909
- : void 0,
6910
- imageSrcSet:
6911
- "string" === typeof options.imageSrcSet
6912
- ? options.imageSrcSet
6913
- : void 0,
6914
- imageSizes:
6915
- "string" === typeof options.imageSizes
6916
- ? options.imageSizes
6917
- : void 0,
6918
- media: "string" === typeof options.media ? options.media : void 0
5412
+ }
5413
+ }
5414
+
5415
+ {
5416
+ if (hasOwnProperty.call(props, 'key')) {
5417
+ var componentName = getComponentNameFromType(type);
5418
+ var keys = Object.keys(props).filter(function (k) {
5419
+ return k !== 'key';
6919
5420
  });
5421
+ var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
5422
+
5423
+ if (!didWarnAboutKeySpread[componentName + beforeExample]) {
5424
+ var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
5425
+
5426
+ 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);
5427
+
5428
+ didWarnAboutKeySpread[componentName + beforeExample] = true;
5429
+ }
6920
5430
  }
6921
- };
6922
- reactDom_development.preloadModule = function (href, options) {
6923
- var encountered = "";
6924
- ("string" === typeof href && href) ||
6925
- (encountered +=
6926
- " The `href` argument encountered was " +
6927
- getValueDescriptorExpectingObjectForWarning(href) +
6928
- ".");
6929
- void 0 !== options && "object" !== typeof options
6930
- ? (encountered +=
6931
- " The `options` argument encountered was " +
6932
- getValueDescriptorExpectingObjectForWarning(options) +
6933
- ".")
6934
- : options &&
6935
- "as" in options &&
6936
- "string" !== typeof options.as &&
6937
- (encountered +=
6938
- " The `as` option encountered was " +
6939
- getValueDescriptorExpectingObjectForWarning(options.as) +
6940
- ".");
6941
- encountered &&
6942
- console.error(
6943
- 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
6944
- encountered
6945
- );
6946
- "string" === typeof href &&
6947
- (options
6948
- ? ((encountered = getCrossOriginStringAs(
6949
- options.as,
6950
- options.crossOrigin
6951
- )),
6952
- Internals.d.m(href, {
6953
- as:
6954
- "string" === typeof options.as && "script" !== options.as
6955
- ? options.as
6956
- : void 0,
6957
- crossOrigin: encountered,
6958
- integrity:
6959
- "string" === typeof options.integrity
6960
- ? options.integrity
6961
- : void 0
6962
- }))
6963
- : Internals.d.m(href));
6964
- };
6965
- reactDom_development.requestFormReset = function (form) {
6966
- Internals.d.r(form);
6967
- };
6968
- reactDom_development.unstable_batchedUpdates = function (fn, a) {
6969
- return fn(a);
6970
- };
6971
- reactDom_development.useFormState = function (action, initialState, permalink) {
6972
- return resolveDispatcher().useFormState(action, initialState, permalink);
6973
- };
6974
- reactDom_development.useFormStatus = function () {
6975
- return resolveDispatcher().useHostTransitionStatus();
6976
- };
6977
- reactDom_development.version = "19.1.1";
6978
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
6979
- "function" ===
6980
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
6981
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
6982
- })();
6983
- return reactDom_development;
6984
- }
5431
+ }
6985
5432
 
6986
- function checkDCE() {
6987
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
6988
- if (
6989
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
6990
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
6991
- ) {
6992
- return;
6993
- }
6994
- if (process.env.NODE_ENV !== 'production') {
6995
- // This branch is unreachable because this function is only called
6996
- // in production, but the condition is true only in development.
6997
- // Therefore if the branch is still here, dead code elimination wasn't
6998
- // properly applied.
6999
- // Don't change the message. React DevTools relies on it. Also make sure
7000
- // this message doesn't occur elsewhere in this function, or it will cause
7001
- // a false positive.
7002
- throw new Error('^_^');
7003
- }
7004
- try {
7005
- // Verify that the code above has been dead code eliminated (DCE'd).
7006
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
7007
- } catch (err) {
7008
- // DevTools shouldn't crash React, no matter what.
7009
- // We should still report in case we break this code.
7010
- console.error(err);
7011
- }
5433
+ if (type === REACT_FRAGMENT_TYPE) {
5434
+ validateFragmentProps(element);
5435
+ } else {
5436
+ validatePropTypes(element);
5437
+ }
5438
+
5439
+ return element;
5440
+ }
5441
+ } // These two functions exist to still get child warnings in dev
5442
+ // even with the prod transform. This means that jsxDEV is purely
5443
+ // opt-in behavior for better messages but that we won't stop
5444
+ // giving you warnings if you use production apis.
5445
+
5446
+ function jsxWithValidationStatic(type, props, key) {
5447
+ {
5448
+ return jsxWithValidation(type, props, key, true);
5449
+ }
5450
+ }
5451
+ function jsxWithValidationDynamic(type, props, key) {
5452
+ {
5453
+ return jsxWithValidation(type, props, key, false);
5454
+ }
5455
+ }
5456
+
5457
+ var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
5458
+ // for now we can ship identical prod functions
5459
+
5460
+ var jsxs = jsxWithValidationStatic ;
5461
+
5462
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
5463
+ reactJsxRuntime_development.jsx = jsx;
5464
+ reactJsxRuntime_development.jsxs = jsxs;
5465
+ })();
5466
+ }
5467
+ return reactJsxRuntime_development;
7012
5468
  }
7013
5469
 
7014
5470
  if (process.env.NODE_ENV === 'production') {
7015
- // DCE check should happen before ReactDOM bundle executes so that
7016
- // DevTools can report bad minification during injection.
7017
- checkDCE();
7018
- reactDom.exports = requireReactDom_production();
5471
+ jsxRuntime.exports = requireReactJsxRuntime_production_min();
7019
5472
  } else {
7020
- reactDom.exports = requireReactDom_development();
5473
+ jsxRuntime.exports = requireReactJsxRuntime_development();
7021
5474
  }
7022
5475
 
7023
- var reactDomExports = reactDom.exports;
5476
+ var jsxRuntimeExports = jsxRuntime.exports;
5477
+
5478
+ var dist = {};
5479
+
5480
+ var useWebsocket = {};
7024
5481
 
7025
5482
  var constants = {};
7026
5483
 
@@ -7779,8 +6236,8 @@ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || func
7779
6236
  };
7780
6237
  Object.defineProperty(useWebsocket, "__esModule", { value: true });
7781
6238
  useWebsocket.useWebSocket = void 0;
7782
- var react_1$2 = reactExports;
7783
- var react_dom_1 = reactDomExports;
6239
+ var react_1$2 = require$$0;
6240
+ var react_dom_1 = require$$1;
7784
6241
  var constants_1$2 = constants;
7785
6242
  var create_or_join_1 = createOrJoin;
7786
6243
  var get_url_1 = getUrl;
@@ -7945,7 +6402,7 @@ var __assign$1 = (commonjsGlobal && commonjsGlobal.__assign) || function () {
7945
6402
  };
7946
6403
  Object.defineProperty(useSocketIo, "__esModule", { value: true });
7947
6404
  useSocketIo.useSocketIO = void 0;
7948
- var react_1$1 = reactExports;
6405
+ var react_1$1 = require$$0;
7949
6406
  var use_websocket_1$1 = useWebsocket;
7950
6407
  var constants_1$1 = constants;
7951
6408
  var emptyEvent = {
@@ -8014,7 +6471,7 @@ var __rest = (commonjsGlobal && commonjsGlobal.__rest) || function (s, e) {
8014
6471
  };
8015
6472
  Object.defineProperty(useEventSource$1, "__esModule", { value: true });
8016
6473
  useEventSource$1.useEventSource = void 0;
8017
- var react_1 = reactExports;
6474
+ var react_1 = require$$0;
8018
6475
  var use_websocket_1 = useWebsocket;
8019
6476
  var constants_1 = constants;
8020
6477
  var useEventSource = function (url, _a, connect) {
@@ -8084,8 +6541,8 @@ const useUserData = create((set) => ({
8084
6541
 
8085
6542
  const useHyperliquidWebSocket = ({ wsUrl, address }) => {
8086
6543
  const { setTradeHistories, setRawOpenPositions, setOpenOrders, setAccountSummary, clean } = useUserData();
8087
- const [lastError, setLastError] = reactExports.useState(null);
8088
- const [lastSubscribedAddress, setLastSubscribedAddress] = reactExports.useState(null);
6544
+ const [lastError, setLastError] = useState(null);
6545
+ const [lastSubscribedAddress, setLastSubscribedAddress] = useState(null);
8089
6546
  // WebSocket connection
8090
6547
  const { readyState, sendMessage } = useWebSocket(wsUrl, {
8091
6548
  shouldReconnect: () => true,
@@ -8134,7 +6591,7 @@ const useHyperliquidWebSocket = ({ wsUrl, address }) => {
8134
6591
  });
8135
6592
  const isConnected = readyState === dist.ReadyState.OPEN;
8136
6593
  // Handle subscription management
8137
- reactExports.useEffect(() => {
6594
+ useEffect(() => {
8138
6595
  if (isConnected && address && address !== lastSubscribedAddress) {
8139
6596
  // Unsubscribe from previous address if exists
8140
6597
  if (lastSubscribedAddress) {
@@ -8161,7 +6618,7 @@ const useHyperliquidWebSocket = ({ wsUrl, address }) => {
8161
6618
  }
8162
6619
  }, [isConnected, address, lastSubscribedAddress, sendMessage]);
8163
6620
  // Clear data when address changes
8164
- reactExports.useEffect(() => {
6621
+ useEffect(() => {
8165
6622
  if (address !== lastSubscribedAddress) {
8166
6623
  clean();
8167
6624
  setLastError(null);
@@ -8225,12 +6682,12 @@ const useHyperliquidData = create((set, get) => ({
8225
6682
 
8226
6683
  const useHyperliquidNativeWebSocket = ({ address, tokens = [], candleInterval = "1h" }) => {
8227
6684
  const { setWebData2, setAllMids, setActiveAssetData, upsertActiveAssetData, setCandleData, deleteCandleSymbol, deleteActiveAssetData, addCandleData } = useHyperliquidData();
8228
- const [lastError, setLastError] = reactExports.useState(null);
8229
- const [subscribedAddress, setSubscribedAddress] = reactExports.useState(null);
8230
- const [subscribedTokens, setSubscribedTokens] = reactExports.useState([]);
8231
- const [subscribedCandleTokens, setSubscribedCandleTokens] = reactExports.useState([]);
8232
- const [subscribedCandleInterval, setSubscribedCandleInterval] = reactExports.useState(null);
8233
- const pingIntervalRef = reactExports.useRef(null);
6685
+ const [lastError, setLastError] = useState(null);
6686
+ const [subscribedAddress, setSubscribedAddress] = useState(null);
6687
+ const [subscribedTokens, setSubscribedTokens] = useState([]);
6688
+ const [subscribedCandleTokens, setSubscribedCandleTokens] = useState([]);
6689
+ const [subscribedCandleInterval, setSubscribedCandleInterval] = useState(null);
6690
+ const pingIntervalRef = useRef(null);
8234
6691
  const { readyState, sendJsonMessage } = useWebSocket('wss://api.hyperliquid.xyz/ws', {
8235
6692
  shouldReconnect: () => true,
8236
6693
  reconnectAttempts: 5,
@@ -8285,7 +6742,7 @@ const useHyperliquidNativeWebSocket = ({ address, tokens = [], candleInterval =
8285
6742
  });
8286
6743
  const isConnected = readyState === dist.ReadyState.OPEN;
8287
6744
  // Setup ping mechanism
8288
- reactExports.useEffect(() => {
6745
+ useEffect(() => {
8289
6746
  if (isConnected) {
8290
6747
  // Send ping every 30 seconds
8291
6748
  pingIntervalRef.current = setInterval(() => {
@@ -8306,7 +6763,7 @@ const useHyperliquidNativeWebSocket = ({ address, tokens = [], candleInterval =
8306
6763
  };
8307
6764
  }, [isConnected, sendJsonMessage]);
8308
6765
  // Handle address subscription changes
8309
- reactExports.useEffect(() => {
6766
+ useEffect(() => {
8310
6767
  if (!isConnected)
8311
6768
  return;
8312
6769
  const DEFAULT_ADDRESS = '0x0000000000000000000000000000000000000000';
@@ -8348,7 +6805,7 @@ const useHyperliquidNativeWebSocket = ({ address, tokens = [], candleInterval =
8348
6805
  }
8349
6806
  }, [isConnected, address, subscribedAddress, sendJsonMessage, setWebData2]);
8350
6807
  // Handle token subscriptions for activeAssetData
8351
- reactExports.useEffect(() => {
6808
+ useEffect(() => {
8352
6809
  if (!isConnected || !address)
8353
6810
  return;
8354
6811
  const tokensToSubscribe = tokens.filter(token => token && !subscribedTokens.includes(token));
@@ -8383,7 +6840,7 @@ const useHyperliquidNativeWebSocket = ({ address, tokens = [], candleInterval =
8383
6840
  }
8384
6841
  }, [isConnected, address, tokens, subscribedTokens, sendJsonMessage, setActiveAssetData]);
8385
6842
  // Handle candle subscriptions for tokens and interval changes
8386
- reactExports.useEffect(() => {
6843
+ useEffect(() => {
8387
6844
  if (!isConnected)
8388
6845
  return;
8389
6846
  // Unsubscribe from previous candle subscriptions if interval changed
@@ -8442,14 +6899,14 @@ const useHyperliquidNativeWebSocket = ({ address, tokens = [], candleInterval =
8442
6899
  };
8443
6900
  };
8444
6901
 
8445
- const PearHyperliquidContext = reactExports.createContext(undefined);
6902
+ const PearHyperliquidContext = createContext(undefined);
8446
6903
  /**
8447
6904
  * React Provider for PearHyperliquidClient
8448
6905
  */
8449
6906
  const PearHyperliquidProvider = ({ config, wsUrl = 'wss://hl-v2.pearprotocol.io/ws', children, }) => {
8450
- const client = reactExports.useMemo(() => new PearHyperliquidClient(config), [config]);
8451
- const migrationSDK = reactExports.useMemo(() => new PearMigrationSDK(client), [client]);
8452
- const [address, setAddress] = reactExports.useState(null);
6907
+ const client = useMemo(() => new PearHyperliquidClient(config), [config]);
6908
+ const migrationSDK = useMemo(() => new PearMigrationSDK(client), [client]);
6909
+ const [address, setAddress] = useState(null);
8453
6910
  // WebSocket connection and data (Pear API)
8454
6911
  const { connectionStatus, isConnected, lastError } = useHyperliquidWebSocket({
8455
6912
  wsUrl,
@@ -8459,7 +6916,7 @@ const PearHyperliquidProvider = ({ config, wsUrl = 'wss://hl-v2.pearprotocol.io/
8459
6916
  const { connectionStatus: nativeConnectionStatus, isConnected: nativeIsConnected, lastError: nativeLastError } = useHyperliquidNativeWebSocket({
8460
6917
  address,
8461
6918
  });
8462
- const contextValue = reactExports.useMemo(() => ({
6919
+ const contextValue = useMemo(() => ({
8463
6920
  // Existing clients
8464
6921
  client,
8465
6922
  migrationSDK,
@@ -8482,7 +6939,7 @@ const PearHyperliquidProvider = ({ config, wsUrl = 'wss://hl-v2.pearprotocol.io/
8482
6939
  * Hook to use PearHyperliquidClient from context
8483
6940
  */
8484
6941
  const usePearHyperliquidClient = () => {
8485
- const context = reactExports.useContext(PearHyperliquidContext);
6942
+ const context = useContext(PearHyperliquidContext);
8486
6943
  if (!context) {
8487
6944
  throw new Error('usePearHyperliquidClient must be used within a PearHyperliquidProvider');
8488
6945
  }
@@ -8492,7 +6949,7 @@ const usePearHyperliquidClient = () => {
8492
6949
  * Hook to use migration SDK from context
8493
6950
  */
8494
6951
  const useMigrationSDK = () => {
8495
- const context = reactExports.useContext(PearHyperliquidContext);
6952
+ const context = useContext(PearHyperliquidContext);
8496
6953
  if (!context) {
8497
6954
  throw new Error('useMigrationSDK must be used within a PearHyperliquidProvider');
8498
6955
  }
@@ -8503,7 +6960,7 @@ const useMigrationSDK = () => {
8503
6960
  * Hook to manage address (login/logout functionality)
8504
6961
  */
8505
6962
  const useAddress = () => {
8506
- const context = reactExports.useContext(PearHyperliquidContext);
6963
+ const context = useContext(PearHyperliquidContext);
8507
6964
  if (!context) {
8508
6965
  throw new Error('useAddress must be used within a PearHyperliquidProvider');
8509
6966
  }
@@ -8876,86 +7333,71 @@ class PositionProcessor {
8876
7333
  }
8877
7334
 
8878
7335
  const useTradeHistories = () => {
8879
- const context = reactExports.useContext(PearHyperliquidContext);
7336
+ const context = useContext(PearHyperliquidContext);
8880
7337
  if (!context) {
8881
7338
  throw new Error('useTradeHistories must be used within a PearHyperliquidProvider');
8882
7339
  }
8883
7340
  const tradeHistories = useUserData((state) => state.tradeHistories);
8884
- const isLoading = reactExports.useMemo(() => {
7341
+ const isLoading = useMemo(() => {
8885
7342
  return tradeHistories === null && context.isConnected;
8886
7343
  }, [tradeHistories, context.isConnected]);
8887
- return {
8888
- data: tradeHistories,
8889
- isLoading
8890
- };
7344
+ return { data: tradeHistories, isLoading };
8891
7345
  };
8892
7346
  /**
8893
7347
  * Hook to access open positions with real-time calculations and loading state
8894
7348
  */
8895
7349
  const useOpenPositions = () => {
8896
- const context = reactExports.useContext(PearHyperliquidContext);
7350
+ const context = useContext(PearHyperliquidContext);
8897
7351
  if (!context) {
8898
7352
  throw new Error('useOpenPositions must be used within a PearHyperliquidProvider');
8899
7353
  }
8900
7354
  const userOpenPositions = useUserData((state) => state.rawOpenPositions);
8901
7355
  const webData2 = useHyperliquidData((state) => state.webData2);
8902
7356
  const allMids = useHyperliquidData((state) => state.allMids);
8903
- const isLoading = reactExports.useMemo(() => {
7357
+ const isLoading = useMemo(() => {
8904
7358
  return userOpenPositions === null && context.isConnected;
8905
7359
  }, [userOpenPositions, context.isConnected]);
8906
7360
  if (!userOpenPositions || !webData2 || !allMids) {
8907
- return {
8908
- data: null,
8909
- isLoading
8910
- };
7361
+ return { data: null, isLoading };
8911
7362
  }
8912
7363
  const processor = new PositionProcessor(webData2, allMids);
8913
7364
  const processed = processor.execute(userOpenPositions);
8914
- return {
8915
- data: processed,
8916
- isLoading
8917
- };
7365
+ return { data: processed, isLoading };
8918
7366
  };
8919
7367
  /**
8920
7368
  * Hook to access open orders with loading state
8921
7369
  */
8922
7370
  const useOpenOrders = () => {
8923
- const context = reactExports.useContext(PearHyperliquidContext);
7371
+ const context = useContext(PearHyperliquidContext);
8924
7372
  if (!context) {
8925
7373
  throw new Error('useOpenOrders must be used within a PearHyperliquidProvider');
8926
7374
  }
8927
7375
  const openOrders = useUserData((state) => state.openOrders);
8928
- const isLoading = reactExports.useMemo(() => {
7376
+ const isLoading = useMemo(() => {
8929
7377
  return openOrders === null && context.isConnected;
8930
7378
  }, [openOrders, context.isConnected]);
8931
- return {
8932
- data: openOrders,
8933
- isLoading
8934
- };
7379
+ return { data: openOrders, isLoading };
8935
7380
  };
8936
7381
  /**
8937
7382
  * Hook to access account summary with real-time calculations and loading state
8938
7383
  */
8939
7384
  const useAccountSummary = () => {
8940
7385
  var _a, _b;
8941
- const context = reactExports.useContext(PearHyperliquidContext);
7386
+ const context = useContext(PearHyperliquidContext);
8942
7387
  if (!context) {
8943
7388
  throw new Error('useAccountSummary must be used within a PearHyperliquidProvider');
8944
7389
  }
8945
7390
  const openOrders = useUserData((state) => state.openOrders);
8946
7391
  const accountSummary = useUserData((state) => state.accountSummary);
8947
7392
  const webData2 = useHyperliquidData((state) => state.webData2);
8948
- const isLoading = reactExports.useMemo(() => {
7393
+ const isLoading = useMemo(() => {
8949
7394
  // Loading is true initially and becomes false once we get the first data
8950
7395
  return accountSummary === null && context.isConnected;
8951
7396
  }, [accountSummary, context.isConnected]);
8952
7397
  // Create calculator and compute account summary
8953
7398
  const calculator = new AccountSummaryCalculator(webData2);
8954
7399
  const calculated = calculator.calculateAccountSummary(accountSummary, openOrders, (_a = accountSummary === null || accountSummary === void 0 ? void 0 : accountSummary.agentWallet) === null || _a === void 0 ? void 0 : _a.address, (_b = accountSummary === null || accountSummary === void 0 ? void 0 : accountSummary.agentWallet) === null || _b === void 0 ? void 0 : _b.status);
8955
- return {
8956
- data: calculated,
8957
- isLoading
8958
- };
7400
+ return { data: calculated, isLoading };
8959
7401
  };
8960
7402
 
8961
7403
  const DEFAULT_STATE = {
@@ -8976,7 +7418,7 @@ const DEFAULT_STATE = {
8976
7418
  conflicts: [],
8977
7419
  candleInterval: "1h",
8978
7420
  };
8979
- const useUserSelection$1 = create((set, get) => ({
7421
+ const useUserSelection = create((set, get) => ({
8980
7422
  ...DEFAULT_STATE,
8981
7423
  setLongTokens: (tokens) => set((state) => ({ ...state, longTokens: tokens })),
8982
7424
  setShortTokens: (tokens) => set((state) => ({ ...state, shortTokens: tokens })),
@@ -9090,14 +7532,12 @@ const useUserSelection$1 = create((set, get) => ({
9090
7532
  resetToDefaults: () => set((prev) => ({ ...prev, ...DEFAULT_STATE })),
9091
7533
  }));
9092
7534
 
9093
- const useUserSelection = useUserSelection$1;
9094
-
9095
7535
  /**
9096
7536
  * Hook to access webData and native WebSocket state
9097
7537
  */
9098
7538
  const useWebData = () => {
9099
7539
  var _a;
9100
- const context = reactExports.useContext(PearHyperliquidContext);
7540
+ const context = useContext(PearHyperliquidContext);
9101
7541
  if (!context) {
9102
7542
  throw new Error('useWebData must be used within a PearHyperliquidProvider');
9103
7543
  }
@@ -9121,7 +7561,7 @@ const useWebData = () => {
9121
7561
  marketDataBySymbol,
9122
7562
  isConnected: context.nativeIsConnected,
9123
7563
  connectionStatus: context.nativeConnectionStatus,
9124
- error: context.nativeLastError
7564
+ error: context.nativeLastError,
9125
7565
  };
9126
7566
  };
9127
7567
 
@@ -9357,17 +7797,17 @@ const useTokenSelectionMetadataStore = create((set) => ({
9357
7797
  }));
9358
7798
 
9359
7799
  const useTokenSelectionMetadata = () => {
9360
- const context = reactExports.useContext(PearHyperliquidContext);
7800
+ const context = useContext(PearHyperliquidContext);
9361
7801
  if (!context) {
9362
7802
  throw new Error('useTokenSelection must be used within PearHyperliquidProvider');
9363
7803
  }
9364
7804
  const webData2 = useHyperliquidData((state) => state.webData2);
9365
7805
  const allMids = useHyperliquidData((state) => state.allMids);
9366
7806
  const activeAssetData = useHyperliquidData((state) => state.activeAssetData);
9367
- const { longTokens, shortTokens } = useUserSelection$1();
7807
+ const { longTokens, shortTokens } = useUserSelection();
9368
7808
  const { isLoading, isPriceDataReady, longTokensMetadata, shortTokensMetadata, weightedRatio, weightedRatio24h, sumNetFunding, maxLeverage, minMargin, leverageMatched, recompute, } = useTokenSelectionMetadataStore();
9369
7809
  // Recompute derived metadata when inputs change
9370
- reactExports.useEffect(() => {
7810
+ useEffect(() => {
9371
7811
  recompute({
9372
7812
  webData2,
9373
7813
  allMids,
@@ -9495,27 +7935,27 @@ const useHistoricalPriceDataStore = create((set, get) => ({
9495
7935
  }));
9496
7936
 
9497
7937
  const useHistoricalPriceData = () => {
9498
- const context = reactExports.useContext(PearHyperliquidContext);
7938
+ const context = useContext(PearHyperliquidContext);
9499
7939
  if (!context) {
9500
7940
  throw new Error('useHistoricalPriceData must be used within a PearHyperliquidProvider');
9501
7941
  }
9502
7942
  const { client } = context;
9503
- const longTokens = useUserSelection$1((state) => state.longTokens);
9504
- const shortTokens = useUserSelection$1((state) => state.shortTokens);
9505
- const candleInterval = useUserSelection$1((state) => state.candleInterval);
7943
+ const longTokens = useUserSelection((state) => state.longTokens);
7944
+ const shortTokens = useUserSelection((state) => state.shortTokens);
7945
+ const candleInterval = useUserSelection((state) => state.candleInterval);
9506
7946
  // Get real-time candle data from WebSocket
9507
7947
  const candleData = useHyperliquidData((state) => state.candleData);
9508
7948
  // Historical price data store
9509
7949
  const { addHistoricalPriceData, hasHistoricalPriceData: storeHasData, getHistoricalPriceData: storeGetData, setTokenLoading, isTokenLoading, removeTokenPriceData, clearData, } = useHistoricalPriceDataStore();
9510
7950
  // Track previous tokens and interval to detect changes
9511
- const prevTokensRef = reactExports.useRef(new Set());
9512
- const prevIntervalRef = reactExports.useRef(null);
7951
+ const prevTokensRef = useRef(new Set());
7952
+ const prevIntervalRef = useRef(null);
9513
7953
  // Get all tokens from long and short selections
9514
- const getAllTokens = reactExports.useCallback(() => {
7954
+ const getAllTokens = useCallback(() => {
9515
7955
  return [...longTokens, ...shortTokens];
9516
7956
  }, [longTokens, shortTokens]);
9517
7957
  // Track token and interval changes and manage cache accordingly
9518
- reactExports.useEffect(() => {
7958
+ useEffect(() => {
9519
7959
  const currentTokens = new Set(getAllTokens().map(token => token.symbol));
9520
7960
  const prevTokens = prevTokensRef.current;
9521
7961
  const prevInterval = prevIntervalRef.current;
@@ -9535,7 +7975,7 @@ const useHistoricalPriceData = () => {
9535
7975
  prevTokensRef.current = currentTokens;
9536
7976
  prevIntervalRef.current = candleInterval;
9537
7977
  }, [longTokens, shortTokens, candleInterval, removeTokenPriceData, clearData, getAllTokens]);
9538
- reactExports.useEffect(() => {
7978
+ useEffect(() => {
9539
7979
  if (!candleData)
9540
7980
  return;
9541
7981
  const allTokenSymbols = new Set(getAllTokens().map(token => token.symbol));
@@ -9547,13 +7987,13 @@ const useHistoricalPriceData = () => {
9547
7987
  }
9548
7988
  });
9549
7989
  }, [candleData, getAllTokens, candleInterval, addHistoricalPriceData]);
9550
- const hasHistoricalPriceData = reactExports.useCallback((startTime, endTime) => {
7990
+ const hasHistoricalPriceData = useCallback((startTime, endTime) => {
9551
7991
  const allTokens = getAllTokens();
9552
7992
  if (allTokens.length === 0)
9553
7993
  return false;
9554
7994
  return allTokens.every(token => storeHasData(token.symbol, candleInterval, startTime, endTime));
9555
7995
  }, [getAllTokens, candleInterval, storeHasData]);
9556
- const getHistoricalPriceData = reactExports.useCallback((startTime, endTime) => {
7996
+ const getHistoricalPriceData = useCallback((startTime, endTime) => {
9557
7997
  const allTokens = getAllTokens();
9558
7998
  const result = {};
9559
7999
  allTokens.forEach(token => {
@@ -9561,14 +8001,14 @@ const useHistoricalPriceData = () => {
9561
8001
  });
9562
8002
  return result;
9563
8003
  }, [getAllTokens, candleInterval, storeGetData]);
9564
- const isLoading = reactExports.useCallback((symbol) => {
8004
+ const isLoading = useCallback((symbol) => {
9565
8005
  if (symbol) {
9566
8006
  return isTokenLoading(symbol);
9567
8007
  }
9568
8008
  const allTokens = getAllTokens();
9569
8009
  return allTokens.some(token => isTokenLoading(token.symbol));
9570
8010
  }, [getAllTokens, isTokenLoading]);
9571
- const fetchHistoricalPriceData = reactExports.useCallback(async (startTime, endTime, callback) => {
8011
+ const fetchHistoricalPriceData = useCallback(async (startTime, endTime, callback) => {
9572
8012
  const allTokens = getAllTokens();
9573
8013
  if (allTokens.length === 0) {
9574
8014
  const emptyResult = {};
@@ -9619,7 +8059,7 @@ const useHistoricalPriceData = () => {
9619
8059
  client,
9620
8060
  addHistoricalPriceData,
9621
8061
  ]);
9622
- const clearCache = reactExports.useCallback(() => {
8062
+ const clearCache = useCallback(() => {
9623
8063
  clearData();
9624
8064
  }, [clearData]);
9625
8065
  return {
@@ -9827,10 +8267,10 @@ const computeBasketCandles = (longTokens, shortTokens, tokenCandles) => {
9827
8267
  * - Computes and returns weighted basket candles via `computeBasketCandles`.
9828
8268
  */
9829
8269
  const useBasketCandles = () => {
9830
- const longTokens = useUserSelection$1((state) => state.longTokens);
9831
- const shortTokens = useUserSelection$1((state) => state.shortTokens);
8270
+ const longTokens = useUserSelection((state) => state.longTokens);
8271
+ const shortTokens = useUserSelection((state) => state.shortTokens);
9832
8272
  const { fetchHistoricalPriceData, isLoading: tokenLoading } = useHistoricalPriceData();
9833
- const fetchBasketCandles = reactExports.useCallback(async (startTime, endTime) => {
8273
+ const fetchBasketCandles = useCallback(async (startTime, endTime) => {
9834
8274
  const tokenCandles = await fetchHistoricalPriceData(startTime, endTime);
9835
8275
  const basket = computeBasketCandles(longTokens, shortTokens, tokenCandles);
9836
8276
  return basket;
@@ -9861,13 +8301,7 @@ class ConflictDetector {
9861
8301
  }
9862
8302
  // Check long tokens against existing short positions
9863
8303
  longTokens.forEach((token) => {
9864
- const existingShortPosition = openPositions.find((pos) => {
9865
- var _a;
9866
- // Check multiple possible property names and side values
9867
- const symbol = pos.coin || pos.symbol || pos.asset;
9868
- const side = (_a = pos.side) === null || _a === void 0 ? void 0 : _a.toLowerCase();
9869
- return symbol === token.symbol && (side === 'short' || side === 'sell');
9870
- });
8304
+ const existingShortPosition = openPositions.find((pos) => { var _a; return (_a = pos.shortAssets) === null || _a === void 0 ? void 0 : _a.some((asset) => asset.coin === token.symbol); });
9871
8305
  if (existingShortPosition) {
9872
8306
  detectedConflicts.push({
9873
8307
  symbol: token.symbol,
@@ -9878,13 +8312,7 @@ class ConflictDetector {
9878
8312
  });
9879
8313
  // Check short tokens against existing long positions
9880
8314
  shortTokens.forEach((token) => {
9881
- const existingLongPosition = openPositions.find((pos) => {
9882
- var _a;
9883
- // Check multiple possible property names and side values
9884
- const symbol = pos.coin || pos.symbol || pos.asset;
9885
- const side = (_a = pos.side) === null || _a === void 0 ? void 0 : _a.toLowerCase();
9886
- return symbol === token.symbol && (side === 'long' || side === 'buy');
9887
- });
8315
+ const existingLongPosition = openPositions.find((pos) => { var _a; return (_a = pos.longAssets) === null || _a === void 0 ? void 0 : _a.some((asset) => asset.coin === token.symbol); });
9888
8316
  if (existingLongPosition) {
9889
8317
  detectedConflicts.push({
9890
8318
  symbol: token.symbol,