@nibssplc/cams-sdk-react 0.0.1-beta.17 → 0.0.1-beta.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/components/ProtectedRoute.d.ts +1 -1
- package/dist/index.cjs.js +357 -1297
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +357 -1297
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -16834,26 +16834,47 @@ function useCAMSMSALAuth(options) {
|
|
|
16834
16834
|
|
|
16835
16835
|
var jsxRuntime = {exports: {}};
|
|
16836
16836
|
|
|
16837
|
-
var
|
|
16837
|
+
var reactJsxRuntime_production = {};
|
|
16838
16838
|
|
|
16839
16839
|
/**
|
|
16840
16840
|
* @license React
|
|
16841
|
-
* react-jsx-runtime.production.
|
|
16841
|
+
* react-jsx-runtime.production.js
|
|
16842
16842
|
*
|
|
16843
|
-
* Copyright (c)
|
|
16843
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
16844
16844
|
*
|
|
16845
16845
|
* This source code is licensed under the MIT license found in the
|
|
16846
16846
|
* LICENSE file in the root directory of this source tree.
|
|
16847
16847
|
*/
|
|
16848
16848
|
|
|
16849
|
-
var
|
|
16850
|
-
|
|
16851
|
-
function
|
|
16852
|
-
if (
|
|
16853
|
-
|
|
16854
|
-
var
|
|
16855
|
-
|
|
16856
|
-
|
|
16849
|
+
var hasRequiredReactJsxRuntime_production;
|
|
16850
|
+
|
|
16851
|
+
function requireReactJsxRuntime_production () {
|
|
16852
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
16853
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
16854
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
16855
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
16856
|
+
function jsxProd(type, config, maybeKey) {
|
|
16857
|
+
var key = null;
|
|
16858
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
16859
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
16860
|
+
if ("key" in config) {
|
|
16861
|
+
maybeKey = {};
|
|
16862
|
+
for (var propName in config)
|
|
16863
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
16864
|
+
} else maybeKey = config;
|
|
16865
|
+
config = maybeKey.ref;
|
|
16866
|
+
return {
|
|
16867
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
16868
|
+
type: type,
|
|
16869
|
+
key: key,
|
|
16870
|
+
ref: void 0 !== config ? config : null,
|
|
16871
|
+
props: maybeKey
|
|
16872
|
+
};
|
|
16873
|
+
}
|
|
16874
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
16875
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
16876
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
16877
|
+
return reactJsxRuntime_production;
|
|
16857
16878
|
}
|
|
16858
16879
|
|
|
16859
16880
|
var reactJsxRuntime_development = {};
|
|
@@ -16862,7 +16883,7 @@ var reactJsxRuntime_development = {};
|
|
|
16862
16883
|
* @license React
|
|
16863
16884
|
* react-jsx-runtime.development.js
|
|
16864
16885
|
*
|
|
16865
|
-
* Copyright (c)
|
|
16886
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
16866
16887
|
*
|
|
16867
16888
|
* This source code is licensed under the MIT license found in the
|
|
16868
16889
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -16873,1314 +16894,357 @@ var hasRequiredReactJsxRuntime_development;
|
|
|
16873
16894
|
function requireReactJsxRuntime_development () {
|
|
16874
16895
|
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
16875
16896
|
hasRequiredReactJsxRuntime_development = 1;
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
16896
|
-
|
|
16897
|
-
|
|
16898
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
16899
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
16900
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
16901
|
-
function getIteratorFn(maybeIterable) {
|
|
16902
|
-
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
16903
|
-
return null;
|
|
16904
|
-
}
|
|
16905
|
-
|
|
16906
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
16907
|
-
|
|
16908
|
-
if (typeof maybeIterator === 'function') {
|
|
16909
|
-
return maybeIterator;
|
|
16910
|
-
}
|
|
16911
|
-
|
|
16912
|
-
return null;
|
|
16913
|
-
}
|
|
16914
|
-
|
|
16915
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
16916
|
-
|
|
16917
|
-
function error(format) {
|
|
16918
|
-
{
|
|
16919
|
-
{
|
|
16920
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
16921
|
-
args[_key2 - 1] = arguments[_key2];
|
|
16897
|
+
"production" !== process.env.NODE_ENV &&
|
|
16898
|
+
(function () {
|
|
16899
|
+
function getComponentNameFromType(type) {
|
|
16900
|
+
if (null == type) return null;
|
|
16901
|
+
if ("function" === typeof type)
|
|
16902
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
16903
|
+
? null
|
|
16904
|
+
: type.displayName || type.name || null;
|
|
16905
|
+
if ("string" === typeof type) return type;
|
|
16906
|
+
switch (type) {
|
|
16907
|
+
case REACT_FRAGMENT_TYPE:
|
|
16908
|
+
return "Fragment";
|
|
16909
|
+
case REACT_PROFILER_TYPE:
|
|
16910
|
+
return "Profiler";
|
|
16911
|
+
case REACT_STRICT_MODE_TYPE:
|
|
16912
|
+
return "StrictMode";
|
|
16913
|
+
case REACT_SUSPENSE_TYPE:
|
|
16914
|
+
return "Suspense";
|
|
16915
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
16916
|
+
return "SuspenseList";
|
|
16917
|
+
case REACT_ACTIVITY_TYPE:
|
|
16918
|
+
return "Activity";
|
|
16922
16919
|
}
|
|
16923
|
-
|
|
16924
|
-
|
|
16925
|
-
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
var enableCacheElement = false;
|
|
16958
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
16959
|
-
|
|
16960
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
16961
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
16962
|
-
// issues in DEV builds.
|
|
16963
|
-
|
|
16964
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
16965
|
-
|
|
16966
|
-
var REACT_MODULE_REFERENCE;
|
|
16967
|
-
|
|
16968
|
-
{
|
|
16969
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
16970
|
-
}
|
|
16971
|
-
|
|
16972
|
-
function isValidElementType(type) {
|
|
16973
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
16974
|
-
return true;
|
|
16975
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
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 ) {
|
|
16979
|
-
return true;
|
|
16980
|
-
}
|
|
16981
|
-
|
|
16982
|
-
if (typeof type === 'object' && type !== null) {
|
|
16983
|
-
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
|
|
16984
|
-
// types supported by any Flight configuration anywhere since
|
|
16985
|
-
// we don't know which Flight build this will end up being used
|
|
16986
|
-
// with.
|
|
16987
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
16988
|
-
return true;
|
|
16989
|
-
}
|
|
16990
|
-
}
|
|
16991
|
-
|
|
16992
|
-
return false;
|
|
16993
|
-
}
|
|
16994
|
-
|
|
16995
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
16996
|
-
var displayName = outerType.displayName;
|
|
16997
|
-
|
|
16998
|
-
if (displayName) {
|
|
16999
|
-
return displayName;
|
|
17000
|
-
}
|
|
17001
|
-
|
|
17002
|
-
var functionName = innerType.displayName || innerType.name || '';
|
|
17003
|
-
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
17004
|
-
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
function getContextName(type) {
|
|
17008
|
-
return type.displayName || 'Context';
|
|
17009
|
-
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
function getComponentNameFromType(type) {
|
|
17013
|
-
if (type == null) {
|
|
17014
|
-
// Host root, text node or just invalid type.
|
|
17015
|
-
return null;
|
|
17016
|
-
}
|
|
17017
|
-
|
|
17018
|
-
{
|
|
17019
|
-
if (typeof type.tag === 'number') {
|
|
17020
|
-
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
17021
|
-
}
|
|
17022
|
-
}
|
|
17023
|
-
|
|
17024
|
-
if (typeof type === 'function') {
|
|
17025
|
-
return type.displayName || type.name || null;
|
|
17026
|
-
}
|
|
17027
|
-
|
|
17028
|
-
if (typeof type === 'string') {
|
|
17029
|
-
return type;
|
|
17030
|
-
}
|
|
17031
|
-
|
|
17032
|
-
switch (type) {
|
|
17033
|
-
case REACT_FRAGMENT_TYPE:
|
|
17034
|
-
return 'Fragment';
|
|
17035
|
-
|
|
17036
|
-
case REACT_PORTAL_TYPE:
|
|
17037
|
-
return 'Portal';
|
|
17038
|
-
|
|
17039
|
-
case REACT_PROFILER_TYPE:
|
|
17040
|
-
return 'Profiler';
|
|
17041
|
-
|
|
17042
|
-
case REACT_STRICT_MODE_TYPE:
|
|
17043
|
-
return 'StrictMode';
|
|
17044
|
-
|
|
17045
|
-
case REACT_SUSPENSE_TYPE:
|
|
17046
|
-
return 'Suspense';
|
|
17047
|
-
|
|
17048
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
17049
|
-
return 'SuspenseList';
|
|
17050
|
-
|
|
17051
|
-
}
|
|
17052
|
-
|
|
17053
|
-
if (typeof type === 'object') {
|
|
17054
|
-
switch (type.$$typeof) {
|
|
17055
|
-
case REACT_CONTEXT_TYPE:
|
|
17056
|
-
var context = type;
|
|
17057
|
-
return getContextName(context) + '.Consumer';
|
|
17058
|
-
|
|
17059
|
-
case REACT_PROVIDER_TYPE:
|
|
17060
|
-
var provider = type;
|
|
17061
|
-
return getContextName(provider._context) + '.Provider';
|
|
17062
|
-
|
|
17063
|
-
case REACT_FORWARD_REF_TYPE:
|
|
17064
|
-
return getWrappedName(type, type.render, 'ForwardRef');
|
|
17065
|
-
|
|
17066
|
-
case REACT_MEMO_TYPE:
|
|
17067
|
-
var outerName = type.displayName || null;
|
|
17068
|
-
|
|
17069
|
-
if (outerName !== null) {
|
|
17070
|
-
return outerName;
|
|
17071
|
-
}
|
|
17072
|
-
|
|
17073
|
-
return getComponentNameFromType(type.type) || 'Memo';
|
|
17074
|
-
|
|
17075
|
-
case REACT_LAZY_TYPE:
|
|
17076
|
-
{
|
|
17077
|
-
var lazyComponent = type;
|
|
17078
|
-
var payload = lazyComponent._payload;
|
|
17079
|
-
var init = lazyComponent._init;
|
|
17080
|
-
|
|
17081
|
-
try {
|
|
17082
|
-
return getComponentNameFromType(init(payload));
|
|
17083
|
-
} catch (x) {
|
|
17084
|
-
return null;
|
|
17085
|
-
}
|
|
16920
|
+
if ("object" === typeof type)
|
|
16921
|
+
switch (
|
|
16922
|
+
("number" === typeof type.tag &&
|
|
16923
|
+
console.error(
|
|
16924
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
16925
|
+
),
|
|
16926
|
+
type.$$typeof)
|
|
16927
|
+
) {
|
|
16928
|
+
case REACT_PORTAL_TYPE:
|
|
16929
|
+
return "Portal";
|
|
16930
|
+
case REACT_CONTEXT_TYPE:
|
|
16931
|
+
return (type.displayName || "Context") + ".Provider";
|
|
16932
|
+
case REACT_CONSUMER_TYPE:
|
|
16933
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
16934
|
+
case REACT_FORWARD_REF_TYPE:
|
|
16935
|
+
var innerType = type.render;
|
|
16936
|
+
type = type.displayName;
|
|
16937
|
+
type ||
|
|
16938
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
16939
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
16940
|
+
return type;
|
|
16941
|
+
case REACT_MEMO_TYPE:
|
|
16942
|
+
return (
|
|
16943
|
+
(innerType = type.displayName || null),
|
|
16944
|
+
null !== innerType
|
|
16945
|
+
? innerType
|
|
16946
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
16947
|
+
);
|
|
16948
|
+
case REACT_LAZY_TYPE:
|
|
16949
|
+
innerType = type._payload;
|
|
16950
|
+
type = type._init;
|
|
16951
|
+
try {
|
|
16952
|
+
return getComponentNameFromType(type(innerType));
|
|
16953
|
+
} catch (x) {}
|
|
17086
16954
|
}
|
|
17087
|
-
|
|
17088
|
-
// eslint-disable-next-line no-fallthrough
|
|
16955
|
+
return null;
|
|
17089
16956
|
}
|
|
17090
|
-
|
|
17091
|
-
|
|
17092
|
-
return null;
|
|
17093
|
-
}
|
|
17094
|
-
|
|
17095
|
-
var assign = Object.assign;
|
|
17096
|
-
|
|
17097
|
-
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
17098
|
-
// replaying on render function. This currently only patches the object
|
|
17099
|
-
// lazily which won't cover if the log function was extracted eagerly.
|
|
17100
|
-
// We could also eagerly patch the method.
|
|
17101
|
-
var disabledDepth = 0;
|
|
17102
|
-
var prevLog;
|
|
17103
|
-
var prevInfo;
|
|
17104
|
-
var prevWarn;
|
|
17105
|
-
var prevError;
|
|
17106
|
-
var prevGroup;
|
|
17107
|
-
var prevGroupCollapsed;
|
|
17108
|
-
var prevGroupEnd;
|
|
17109
|
-
|
|
17110
|
-
function disabledLog() {}
|
|
17111
|
-
|
|
17112
|
-
disabledLog.__reactDisabledLog = true;
|
|
17113
|
-
function disableLogs() {
|
|
17114
|
-
{
|
|
17115
|
-
if (disabledDepth === 0) {
|
|
17116
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
17117
|
-
prevLog = console.log;
|
|
17118
|
-
prevInfo = console.info;
|
|
17119
|
-
prevWarn = console.warn;
|
|
17120
|
-
prevError = console.error;
|
|
17121
|
-
prevGroup = console.group;
|
|
17122
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
17123
|
-
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
17124
|
-
|
|
17125
|
-
var props = {
|
|
17126
|
-
configurable: true,
|
|
17127
|
-
enumerable: true,
|
|
17128
|
-
value: disabledLog,
|
|
17129
|
-
writable: true
|
|
17130
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
17131
|
-
|
|
17132
|
-
Object.defineProperties(console, {
|
|
17133
|
-
info: props,
|
|
17134
|
-
log: props,
|
|
17135
|
-
warn: props,
|
|
17136
|
-
error: props,
|
|
17137
|
-
group: props,
|
|
17138
|
-
groupCollapsed: props,
|
|
17139
|
-
groupEnd: props
|
|
17140
|
-
});
|
|
17141
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
17142
|
-
}
|
|
17143
|
-
|
|
17144
|
-
disabledDepth++;
|
|
17145
|
-
}
|
|
17146
|
-
}
|
|
17147
|
-
function reenableLogs() {
|
|
17148
|
-
{
|
|
17149
|
-
disabledDepth--;
|
|
17150
|
-
|
|
17151
|
-
if (disabledDepth === 0) {
|
|
17152
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
17153
|
-
var props = {
|
|
17154
|
-
configurable: true,
|
|
17155
|
-
enumerable: true,
|
|
17156
|
-
writable: true
|
|
17157
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
17158
|
-
|
|
17159
|
-
Object.defineProperties(console, {
|
|
17160
|
-
log: assign({}, props, {
|
|
17161
|
-
value: prevLog
|
|
17162
|
-
}),
|
|
17163
|
-
info: assign({}, props, {
|
|
17164
|
-
value: prevInfo
|
|
17165
|
-
}),
|
|
17166
|
-
warn: assign({}, props, {
|
|
17167
|
-
value: prevWarn
|
|
17168
|
-
}),
|
|
17169
|
-
error: assign({}, props, {
|
|
17170
|
-
value: prevError
|
|
17171
|
-
}),
|
|
17172
|
-
group: assign({}, props, {
|
|
17173
|
-
value: prevGroup
|
|
17174
|
-
}),
|
|
17175
|
-
groupCollapsed: assign({}, props, {
|
|
17176
|
-
value: prevGroupCollapsed
|
|
17177
|
-
}),
|
|
17178
|
-
groupEnd: assign({}, props, {
|
|
17179
|
-
value: prevGroupEnd
|
|
17180
|
-
})
|
|
17181
|
-
});
|
|
17182
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
16957
|
+
function testStringCoercion(value) {
|
|
16958
|
+
return "" + value;
|
|
17183
16959
|
}
|
|
17184
|
-
|
|
17185
|
-
if (disabledDepth < 0) {
|
|
17186
|
-
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
17187
|
-
}
|
|
17188
|
-
}
|
|
17189
|
-
}
|
|
17190
|
-
|
|
17191
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
17192
|
-
var prefix;
|
|
17193
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
17194
|
-
{
|
|
17195
|
-
if (prefix === undefined) {
|
|
17196
|
-
// Extract the VM specific prefix used by each line.
|
|
16960
|
+
function checkKeyStringCoercion(value) {
|
|
17197
16961
|
try {
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
16962
|
+
testStringCoercion(value);
|
|
16963
|
+
var JSCompiler_inline_result = !1;
|
|
16964
|
+
} catch (e) {
|
|
16965
|
+
JSCompiler_inline_result = true;
|
|
17202
16966
|
}
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
|
|
17212
|
-
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
|
|
17216
|
-
|
|
17217
|
-
|
|
17218
|
-
// If something asked for a stack inside a fake render, it should get ignored.
|
|
17219
|
-
if ( !fn || reentry) {
|
|
17220
|
-
return '';
|
|
17221
|
-
}
|
|
17222
|
-
|
|
17223
|
-
{
|
|
17224
|
-
var frame = componentFrameCache.get(fn);
|
|
17225
|
-
|
|
17226
|
-
if (frame !== undefined) {
|
|
17227
|
-
return frame;
|
|
17228
|
-
}
|
|
17229
|
-
}
|
|
17230
|
-
|
|
17231
|
-
var control;
|
|
17232
|
-
reentry = true;
|
|
17233
|
-
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
17234
|
-
|
|
17235
|
-
Error.prepareStackTrace = undefined;
|
|
17236
|
-
var previousDispatcher;
|
|
17237
|
-
|
|
17238
|
-
{
|
|
17239
|
-
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
17240
|
-
// for warnings.
|
|
17241
|
-
|
|
17242
|
-
ReactCurrentDispatcher.current = null;
|
|
17243
|
-
disableLogs();
|
|
17244
|
-
}
|
|
17245
|
-
|
|
17246
|
-
try {
|
|
17247
|
-
// This should throw.
|
|
17248
|
-
if (construct) {
|
|
17249
|
-
// Something should be setting the props in the constructor.
|
|
17250
|
-
var Fake = function () {
|
|
17251
|
-
throw Error();
|
|
17252
|
-
}; // $FlowFixMe
|
|
17253
|
-
|
|
17254
|
-
|
|
17255
|
-
Object.defineProperty(Fake.prototype, 'props', {
|
|
17256
|
-
set: function () {
|
|
17257
|
-
// We use a throwing setter instead of frozen or non-writable props
|
|
17258
|
-
// because that won't throw in a non-strict mode function.
|
|
17259
|
-
throw Error();
|
|
17260
|
-
}
|
|
17261
|
-
});
|
|
17262
|
-
|
|
17263
|
-
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
17264
|
-
// We construct a different control for this case to include any extra
|
|
17265
|
-
// frames added by the construct call.
|
|
17266
|
-
try {
|
|
17267
|
-
Reflect.construct(Fake, []);
|
|
17268
|
-
} catch (x) {
|
|
17269
|
-
control = x;
|
|
17270
|
-
}
|
|
17271
|
-
|
|
17272
|
-
Reflect.construct(fn, [], Fake);
|
|
17273
|
-
} else {
|
|
17274
|
-
try {
|
|
17275
|
-
Fake.call();
|
|
17276
|
-
} catch (x) {
|
|
17277
|
-
control = x;
|
|
17278
|
-
}
|
|
17279
|
-
|
|
17280
|
-
fn.call(Fake.prototype);
|
|
16967
|
+
if (JSCompiler_inline_result) {
|
|
16968
|
+
JSCompiler_inline_result = console;
|
|
16969
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
16970
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
16971
|
+
("function" === typeof Symbol &&
|
|
16972
|
+
Symbol.toStringTag &&
|
|
16973
|
+
value[Symbol.toStringTag]) ||
|
|
16974
|
+
value.constructor.name ||
|
|
16975
|
+
"Object";
|
|
16976
|
+
JSCompiler_temp_const.call(
|
|
16977
|
+
JSCompiler_inline_result,
|
|
16978
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
16979
|
+
JSCompiler_inline_result$jscomp$0
|
|
16980
|
+
);
|
|
16981
|
+
return testStringCoercion(value);
|
|
17281
16982
|
}
|
|
17282
|
-
}
|
|
16983
|
+
}
|
|
16984
|
+
function getTaskName(type) {
|
|
16985
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
16986
|
+
if (
|
|
16987
|
+
"object" === typeof type &&
|
|
16988
|
+
null !== type &&
|
|
16989
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
16990
|
+
)
|
|
16991
|
+
return "<...>";
|
|
17283
16992
|
try {
|
|
17284
|
-
|
|
16993
|
+
var name = getComponentNameFromType(type);
|
|
16994
|
+
return name ? "<" + name + ">" : "<...>";
|
|
17285
16995
|
} catch (x) {
|
|
17286
|
-
|
|
17287
|
-
}
|
|
17288
|
-
|
|
17289
|
-
fn();
|
|
17290
|
-
}
|
|
17291
|
-
} catch (sample) {
|
|
17292
|
-
// This is inlined manually because closure doesn't do it for us.
|
|
17293
|
-
if (sample && control && typeof sample.stack === 'string') {
|
|
17294
|
-
// This extracts the first frame from the sample that isn't also in the control.
|
|
17295
|
-
// Skipping one frame that we assume is the frame that calls the two.
|
|
17296
|
-
var sampleLines = sample.stack.split('\n');
|
|
17297
|
-
var controlLines = control.stack.split('\n');
|
|
17298
|
-
var s = sampleLines.length - 1;
|
|
17299
|
-
var c = controlLines.length - 1;
|
|
17300
|
-
|
|
17301
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
17302
|
-
// We expect at least one stack frame to be shared.
|
|
17303
|
-
// Typically this will be the root most one. However, stack frames may be
|
|
17304
|
-
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
17305
|
-
// earlier than the other. We assume that the sample is longer or the same
|
|
17306
|
-
// and there for cut off earlier. So we should find the root most frame in
|
|
17307
|
-
// the sample somewhere in the control.
|
|
17308
|
-
c--;
|
|
17309
|
-
}
|
|
17310
|
-
|
|
17311
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
17312
|
-
// Next we find the first one that isn't the same which should be the
|
|
17313
|
-
// frame that called our sample function and the control.
|
|
17314
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
17315
|
-
// In V8, the first line is describing the message but other VMs don't.
|
|
17316
|
-
// If we're about to return the first line, and the control is also on the same
|
|
17317
|
-
// line, that's a pretty good indicator that our sample threw at same line as
|
|
17318
|
-
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
17319
|
-
// This can happen if you passed a class to function component, or non-function.
|
|
17320
|
-
if (s !== 1 || c !== 1) {
|
|
17321
|
-
do {
|
|
17322
|
-
s--;
|
|
17323
|
-
c--; // We may still have similar intermediate frames from the construct call.
|
|
17324
|
-
// The next one that isn't the same should be our match though.
|
|
17325
|
-
|
|
17326
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
17327
|
-
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
17328
|
-
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
17329
|
-
// but we have a user-provided "displayName"
|
|
17330
|
-
// splice it in to make the stack more readable.
|
|
17331
|
-
|
|
17332
|
-
|
|
17333
|
-
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
17334
|
-
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
17335
|
-
}
|
|
17336
|
-
|
|
17337
|
-
{
|
|
17338
|
-
if (typeof fn === 'function') {
|
|
17339
|
-
componentFrameCache.set(fn, _frame);
|
|
17340
|
-
}
|
|
17341
|
-
} // Return the line we found.
|
|
17342
|
-
|
|
17343
|
-
|
|
17344
|
-
return _frame;
|
|
17345
|
-
}
|
|
17346
|
-
} while (s >= 1 && c >= 0);
|
|
17347
|
-
}
|
|
17348
|
-
|
|
17349
|
-
break;
|
|
17350
|
-
}
|
|
16996
|
+
return "<...>";
|
|
17351
16997
|
}
|
|
17352
16998
|
}
|
|
17353
|
-
|
|
17354
|
-
|
|
17355
|
-
|
|
17356
|
-
{
|
|
17357
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
17358
|
-
reenableLogs();
|
|
17359
|
-
}
|
|
17360
|
-
|
|
17361
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
17362
|
-
} // Fallback to just using the name if we couldn't make it throw.
|
|
17363
|
-
|
|
17364
|
-
|
|
17365
|
-
var name = fn ? fn.displayName || fn.name : '';
|
|
17366
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
17367
|
-
|
|
17368
|
-
{
|
|
17369
|
-
if (typeof fn === 'function') {
|
|
17370
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
16999
|
+
function getOwner() {
|
|
17000
|
+
var dispatcher = ReactSharedInternals.A;
|
|
17001
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
17371
17002
|
}
|
|
17372
|
-
|
|
17373
|
-
|
|
17374
|
-
return syntheticFrame;
|
|
17375
|
-
}
|
|
17376
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
17377
|
-
{
|
|
17378
|
-
return describeNativeComponentFrame(fn, false);
|
|
17379
|
-
}
|
|
17380
|
-
}
|
|
17381
|
-
|
|
17382
|
-
function shouldConstruct(Component) {
|
|
17383
|
-
var prototype = Component.prototype;
|
|
17384
|
-
return !!(prototype && prototype.isReactComponent);
|
|
17385
|
-
}
|
|
17386
|
-
|
|
17387
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
17388
|
-
|
|
17389
|
-
if (type == null) {
|
|
17390
|
-
return '';
|
|
17391
|
-
}
|
|
17392
|
-
|
|
17393
|
-
if (typeof type === 'function') {
|
|
17394
|
-
{
|
|
17395
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
17003
|
+
function UnknownOwner() {
|
|
17004
|
+
return Error("react-stack-top-frame");
|
|
17396
17005
|
}
|
|
17397
|
-
|
|
17398
|
-
|
|
17399
|
-
|
|
17400
|
-
|
|
17401
|
-
|
|
17402
|
-
|
|
17403
|
-
switch (type) {
|
|
17404
|
-
case REACT_SUSPENSE_TYPE:
|
|
17405
|
-
return describeBuiltInComponentFrame('Suspense');
|
|
17406
|
-
|
|
17407
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
17408
|
-
return describeBuiltInComponentFrame('SuspenseList');
|
|
17409
|
-
}
|
|
17410
|
-
|
|
17411
|
-
if (typeof type === 'object') {
|
|
17412
|
-
switch (type.$$typeof) {
|
|
17413
|
-
case REACT_FORWARD_REF_TYPE:
|
|
17414
|
-
return describeFunctionComponentFrame(type.render);
|
|
17415
|
-
|
|
17416
|
-
case REACT_MEMO_TYPE:
|
|
17417
|
-
// Memo may contain any component type so we recursively resolve it.
|
|
17418
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
17419
|
-
|
|
17420
|
-
case REACT_LAZY_TYPE:
|
|
17421
|
-
{
|
|
17422
|
-
var lazyComponent = type;
|
|
17423
|
-
var payload = lazyComponent._payload;
|
|
17424
|
-
var init = lazyComponent._init;
|
|
17425
|
-
|
|
17426
|
-
try {
|
|
17427
|
-
// Lazy may contain any component type so we recursively resolve it.
|
|
17428
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
17429
|
-
} catch (x) {}
|
|
17430
|
-
}
|
|
17431
|
-
}
|
|
17432
|
-
}
|
|
17433
|
-
|
|
17434
|
-
return '';
|
|
17435
|
-
}
|
|
17436
|
-
|
|
17437
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
17438
|
-
|
|
17439
|
-
var loggedTypeFailures = {};
|
|
17440
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
17441
|
-
|
|
17442
|
-
function setCurrentlyValidatingElement(element) {
|
|
17443
|
-
{
|
|
17444
|
-
if (element) {
|
|
17445
|
-
var owner = element._owner;
|
|
17446
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
17447
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
17448
|
-
} else {
|
|
17449
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
17006
|
+
function hasValidKey(config) {
|
|
17007
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
17008
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
17009
|
+
if (getter && getter.isReactWarning) return false;
|
|
17010
|
+
}
|
|
17011
|
+
return void 0 !== config.key;
|
|
17450
17012
|
}
|
|
17451
|
-
|
|
17452
|
-
|
|
17453
|
-
|
|
17454
|
-
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
|
|
17459
|
-
for (var typeSpecName in typeSpecs) {
|
|
17460
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
17461
|
-
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
17462
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
17463
|
-
// After these have been cleaned up, we'll let them throw.
|
|
17464
|
-
|
|
17465
|
-
try {
|
|
17466
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
17467
|
-
// behavior as without this statement except with a better message.
|
|
17468
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
17469
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
17470
|
-
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`.');
|
|
17471
|
-
err.name = 'Invariant Violation';
|
|
17472
|
-
throw err;
|
|
17473
|
-
}
|
|
17474
|
-
|
|
17475
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
17476
|
-
} catch (ex) {
|
|
17477
|
-
error$1 = ex;
|
|
17478
|
-
}
|
|
17479
|
-
|
|
17480
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
17481
|
-
setCurrentlyValidatingElement(element);
|
|
17482
|
-
|
|
17483
|
-
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);
|
|
17484
|
-
|
|
17485
|
-
setCurrentlyValidatingElement(null);
|
|
17486
|
-
}
|
|
17487
|
-
|
|
17488
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
17489
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
17490
|
-
// same error.
|
|
17491
|
-
loggedTypeFailures[error$1.message] = true;
|
|
17492
|
-
setCurrentlyValidatingElement(element);
|
|
17493
|
-
|
|
17494
|
-
error('Failed %s type: %s', location, error$1.message);
|
|
17495
|
-
|
|
17496
|
-
setCurrentlyValidatingElement(null);
|
|
17497
|
-
}
|
|
17013
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
17014
|
+
function warnAboutAccessingKey() {
|
|
17015
|
+
specialPropKeyWarningShown ||
|
|
17016
|
+
((specialPropKeyWarningShown = true),
|
|
17017
|
+
console.error(
|
|
17018
|
+
"%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)",
|
|
17019
|
+
displayName
|
|
17020
|
+
));
|
|
17498
17021
|
}
|
|
17022
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
17023
|
+
Object.defineProperty(props, "key", {
|
|
17024
|
+
get: warnAboutAccessingKey,
|
|
17025
|
+
configurable: true
|
|
17026
|
+
});
|
|
17499
17027
|
}
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
|
|
17503
|
-
|
|
17504
|
-
|
|
17505
|
-
|
|
17506
|
-
|
|
17507
|
-
|
|
17508
|
-
|
|
17509
|
-
/*
|
|
17510
|
-
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
17511
|
-
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
17512
|
-
*
|
|
17513
|
-
* The functions in this module will throw an easier-to-understand,
|
|
17514
|
-
* easier-to-debug exception with a clear errors message message explaining the
|
|
17515
|
-
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
17516
|
-
* of the `value` object).
|
|
17517
|
-
*/
|
|
17518
|
-
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
17519
|
-
function typeName(value) {
|
|
17520
|
-
{
|
|
17521
|
-
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
17522
|
-
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
17523
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
17524
|
-
return type;
|
|
17525
|
-
}
|
|
17526
|
-
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
17527
|
-
|
|
17528
|
-
|
|
17529
|
-
function willCoercionThrow(value) {
|
|
17530
|
-
{
|
|
17531
|
-
try {
|
|
17532
|
-
testStringCoercion(value);
|
|
17533
|
-
return false;
|
|
17534
|
-
} catch (e) {
|
|
17535
|
-
return true;
|
|
17028
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
17029
|
+
var componentName = getComponentNameFromType(this.type);
|
|
17030
|
+
didWarnAboutElementRef[componentName] ||
|
|
17031
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
17032
|
+
console.error(
|
|
17033
|
+
"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."
|
|
17034
|
+
));
|
|
17035
|
+
componentName = this.props.ref;
|
|
17036
|
+
return void 0 !== componentName ? componentName : null;
|
|
17536
17037
|
}
|
|
17537
|
-
|
|
17538
|
-
|
|
17539
|
-
|
|
17540
|
-
|
|
17541
|
-
|
|
17542
|
-
|
|
17543
|
-
|
|
17544
|
-
|
|
17545
|
-
|
|
17546
|
-
|
|
17547
|
-
|
|
17548
|
-
|
|
17549
|
-
|
|
17550
|
-
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
17555
|
-
|
|
17556
|
-
|
|
17557
|
-
|
|
17558
|
-
|
|
17559
|
-
|
|
17560
|
-
|
|
17561
|
-
|
|
17562
|
-
|
|
17563
|
-
|
|
17564
|
-
|
|
17565
|
-
|
|
17566
|
-
|
|
17567
|
-
|
|
17568
|
-
|
|
17569
|
-
|
|
17570
|
-
|
|
17571
|
-
|
|
17038
|
+
function ReactElement(
|
|
17039
|
+
type,
|
|
17040
|
+
key,
|
|
17041
|
+
self,
|
|
17042
|
+
source,
|
|
17043
|
+
owner,
|
|
17044
|
+
props,
|
|
17045
|
+
debugStack,
|
|
17046
|
+
debugTask
|
|
17047
|
+
) {
|
|
17048
|
+
self = props.ref;
|
|
17049
|
+
type = {
|
|
17050
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
17051
|
+
type: type,
|
|
17052
|
+
key: key,
|
|
17053
|
+
props: props,
|
|
17054
|
+
_owner: owner
|
|
17055
|
+
};
|
|
17056
|
+
null !== (void 0 !== self ? self : null)
|
|
17057
|
+
? Object.defineProperty(type, "ref", {
|
|
17058
|
+
enumerable: false,
|
|
17059
|
+
get: elementRefGetterWithDeprecationWarning
|
|
17060
|
+
})
|
|
17061
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
17062
|
+
type._store = {};
|
|
17063
|
+
Object.defineProperty(type._store, "validated", {
|
|
17064
|
+
configurable: false,
|
|
17065
|
+
enumerable: false,
|
|
17066
|
+
writable: true,
|
|
17067
|
+
value: 0
|
|
17068
|
+
});
|
|
17069
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
17070
|
+
configurable: false,
|
|
17071
|
+
enumerable: false,
|
|
17072
|
+
writable: true,
|
|
17073
|
+
value: null
|
|
17074
|
+
});
|
|
17075
|
+
Object.defineProperty(type, "_debugStack", {
|
|
17076
|
+
configurable: false,
|
|
17077
|
+
enumerable: false,
|
|
17078
|
+
writable: true,
|
|
17079
|
+
value: debugStack
|
|
17080
|
+
});
|
|
17081
|
+
Object.defineProperty(type, "_debugTask", {
|
|
17082
|
+
configurable: false,
|
|
17083
|
+
enumerable: false,
|
|
17084
|
+
writable: true,
|
|
17085
|
+
value: debugTask
|
|
17086
|
+
});
|
|
17087
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
17088
|
+
return type;
|
|
17572
17089
|
}
|
|
17573
|
-
|
|
17574
|
-
|
|
17575
|
-
|
|
17576
|
-
|
|
17577
|
-
|
|
17578
|
-
|
|
17579
|
-
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17583
|
-
|
|
17584
|
-
|
|
17585
|
-
|
|
17586
|
-
|
|
17587
|
-
|
|
17588
|
-
|
|
17589
|
-
|
|
17590
|
-
|
|
17591
|
-
|
|
17592
|
-
|
|
17090
|
+
function jsxDEVImpl(
|
|
17091
|
+
type,
|
|
17092
|
+
config,
|
|
17093
|
+
maybeKey,
|
|
17094
|
+
isStaticChildren,
|
|
17095
|
+
source,
|
|
17096
|
+
self,
|
|
17097
|
+
debugStack,
|
|
17098
|
+
debugTask
|
|
17099
|
+
) {
|
|
17100
|
+
var children = config.children;
|
|
17101
|
+
if (void 0 !== children)
|
|
17102
|
+
if (isStaticChildren)
|
|
17103
|
+
if (isArrayImpl(children)) {
|
|
17104
|
+
for (
|
|
17105
|
+
isStaticChildren = 0;
|
|
17106
|
+
isStaticChildren < children.length;
|
|
17107
|
+
isStaticChildren++
|
|
17108
|
+
)
|
|
17109
|
+
validateChildKeys(children[isStaticChildren]);
|
|
17110
|
+
Object.freeze && Object.freeze(children);
|
|
17111
|
+
} else
|
|
17112
|
+
console.error(
|
|
17113
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
17114
|
+
);
|
|
17115
|
+
else validateChildKeys(children);
|
|
17116
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
17117
|
+
children = getComponentNameFromType(type);
|
|
17118
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
17119
|
+
return "key" !== k;
|
|
17120
|
+
});
|
|
17121
|
+
isStaticChildren =
|
|
17122
|
+
0 < keys.length
|
|
17123
|
+
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
17124
|
+
: "{key: someKey}";
|
|
17125
|
+
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
17126
|
+
((keys =
|
|
17127
|
+
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
17128
|
+
console.error(
|
|
17129
|
+
'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} />',
|
|
17130
|
+
isStaticChildren,
|
|
17131
|
+
children,
|
|
17132
|
+
keys,
|
|
17133
|
+
children
|
|
17134
|
+
),
|
|
17135
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
17593
17136
|
}
|
|
17137
|
+
children = null;
|
|
17138
|
+
void 0 !== maybeKey &&
|
|
17139
|
+
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
17140
|
+
hasValidKey(config) &&
|
|
17141
|
+
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
17142
|
+
if ("key" in config) {
|
|
17143
|
+
maybeKey = {};
|
|
17144
|
+
for (var propName in config)
|
|
17145
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
17146
|
+
} else maybeKey = config;
|
|
17147
|
+
children &&
|
|
17148
|
+
defineKeyPropWarningGetter(
|
|
17149
|
+
maybeKey,
|
|
17150
|
+
"function" === typeof type
|
|
17151
|
+
? type.displayName || type.name || "Unknown"
|
|
17152
|
+
: type
|
|
17153
|
+
);
|
|
17154
|
+
return ReactElement(
|
|
17155
|
+
type,
|
|
17156
|
+
children,
|
|
17157
|
+
self,
|
|
17158
|
+
source,
|
|
17159
|
+
getOwner(),
|
|
17160
|
+
maybeKey,
|
|
17161
|
+
debugStack,
|
|
17162
|
+
debugTask
|
|
17163
|
+
);
|
|
17594
17164
|
}
|
|
17595
|
-
|
|
17596
|
-
|
|
17597
|
-
|
|
17598
|
-
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
{
|
|
17602
|
-
if (hasOwnProperty.call(config, 'key')) {
|
|
17603
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
17604
|
-
|
|
17605
|
-
if (getter && getter.isReactWarning) {
|
|
17606
|
-
return false;
|
|
17607
|
-
}
|
|
17165
|
+
function validateChildKeys(node) {
|
|
17166
|
+
"object" === typeof node &&
|
|
17167
|
+
null !== node &&
|
|
17168
|
+
node.$$typeof === REACT_ELEMENT_TYPE &&
|
|
17169
|
+
node._store &&
|
|
17170
|
+
(node._store.validated = 1);
|
|
17608
17171
|
}
|
|
17609
|
-
|
|
17610
|
-
|
|
17611
|
-
|
|
17612
|
-
|
|
17613
|
-
|
|
17614
|
-
|
|
17615
|
-
|
|
17616
|
-
|
|
17617
|
-
|
|
17618
|
-
|
|
17619
|
-
|
|
17620
|
-
|
|
17621
|
-
|
|
17622
|
-
|
|
17623
|
-
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
|
|
17172
|
+
var React = React__default__default,
|
|
17173
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
17174
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
17175
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
17176
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
17177
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
17178
|
+
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
17179
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
17180
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
17181
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
17182
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
17183
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
17184
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
17185
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
17186
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
17187
|
+
ReactSharedInternals =
|
|
17188
|
+
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
17189
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
17190
|
+
isArrayImpl = Array.isArray,
|
|
17191
|
+
createTask = console.createTask
|
|
17192
|
+
? console.createTask
|
|
17193
|
+
: function () {
|
|
17194
|
+
return null;
|
|
17195
|
+
};
|
|
17196
|
+
React = {
|
|
17197
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
17198
|
+
return callStackForError();
|
|
17627
17199
|
}
|
|
17628
17200
|
};
|
|
17629
|
-
|
|
17630
|
-
|
|
17631
|
-
|
|
17632
|
-
|
|
17633
|
-
|
|
17634
|
-
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
17639
|
-
|
|
17640
|
-
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
|
|
17644
|
-
|
|
17645
|
-
|
|
17201
|
+
var specialPropKeyWarningShown;
|
|
17202
|
+
var didWarnAboutElementRef = {};
|
|
17203
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
17204
|
+
React,
|
|
17205
|
+
UnknownOwner
|
|
17206
|
+
)();
|
|
17207
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
17208
|
+
var didWarnAboutKeySpread = {};
|
|
17209
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
17210
|
+
reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
|
|
17211
|
+
var trackActualOwner =
|
|
17212
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
17213
|
+
return jsxDEVImpl(
|
|
17214
|
+
type,
|
|
17215
|
+
config,
|
|
17216
|
+
maybeKey,
|
|
17217
|
+
false,
|
|
17218
|
+
source,
|
|
17219
|
+
self,
|
|
17220
|
+
trackActualOwner
|
|
17221
|
+
? Error("react-stack-top-frame")
|
|
17222
|
+
: unknownOwnerDebugStack,
|
|
17223
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
17224
|
+
);
|
|
17225
|
+
};
|
|
17226
|
+
reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
|
|
17227
|
+
var trackActualOwner =
|
|
17228
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
17229
|
+
return jsxDEVImpl(
|
|
17230
|
+
type,
|
|
17231
|
+
config,
|
|
17232
|
+
maybeKey,
|
|
17233
|
+
true,
|
|
17234
|
+
source,
|
|
17235
|
+
self,
|
|
17236
|
+
trackActualOwner
|
|
17237
|
+
? Error("react-stack-top-frame")
|
|
17238
|
+
: unknownOwnerDebugStack,
|
|
17239
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
17240
|
+
);
|
|
17646
17241
|
};
|
|
17647
|
-
|
|
17648
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
17649
|
-
Object.defineProperty(props, 'ref', {
|
|
17650
|
-
get: warnAboutAccessingRef,
|
|
17651
|
-
configurable: true
|
|
17652
|
-
});
|
|
17653
|
-
}
|
|
17654
|
-
}
|
|
17655
|
-
/**
|
|
17656
|
-
* Factory method to create a new React element. This no longer adheres to
|
|
17657
|
-
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
17658
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
17659
|
-
* if something is a React Element.
|
|
17660
|
-
*
|
|
17661
|
-
* @param {*} type
|
|
17662
|
-
* @param {*} props
|
|
17663
|
-
* @param {*} key
|
|
17664
|
-
* @param {string|object} ref
|
|
17665
|
-
* @param {*} owner
|
|
17666
|
-
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
17667
|
-
* different from the `owner` when React.createElement is called, so that we
|
|
17668
|
-
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
17669
|
-
* functions, and as long as `this` and owner are the same, there will be no
|
|
17670
|
-
* change in behavior.
|
|
17671
|
-
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
17672
|
-
* indicating filename, line number, and/or other information.
|
|
17673
|
-
* @internal
|
|
17674
|
-
*/
|
|
17675
|
-
|
|
17676
|
-
|
|
17677
|
-
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
17678
|
-
var element = {
|
|
17679
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
17680
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
17681
|
-
// Built-in properties that belong on the element
|
|
17682
|
-
type: type,
|
|
17683
|
-
key: key,
|
|
17684
|
-
ref: ref,
|
|
17685
|
-
props: props,
|
|
17686
|
-
// Record the component responsible for creating this element.
|
|
17687
|
-
_owner: owner
|
|
17688
|
-
};
|
|
17689
|
-
|
|
17690
|
-
{
|
|
17691
|
-
// The validation flag is currently mutative. We put it on
|
|
17692
|
-
// an external backing store so that we can freeze the whole object.
|
|
17693
|
-
// This can be replaced with a WeakMap once they are implemented in
|
|
17694
|
-
// commonly used development environments.
|
|
17695
|
-
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
17696
|
-
// the validation flag non-enumerable (where possible, which should
|
|
17697
|
-
// include every environment we run tests in), so the test framework
|
|
17698
|
-
// ignores it.
|
|
17699
|
-
|
|
17700
|
-
Object.defineProperty(element._store, 'validated', {
|
|
17701
|
-
configurable: false,
|
|
17702
|
-
enumerable: false,
|
|
17703
|
-
writable: true,
|
|
17704
|
-
value: false
|
|
17705
|
-
}); // self and source are DEV only properties.
|
|
17706
|
-
|
|
17707
|
-
Object.defineProperty(element, '_self', {
|
|
17708
|
-
configurable: false,
|
|
17709
|
-
enumerable: false,
|
|
17710
|
-
writable: false,
|
|
17711
|
-
value: self
|
|
17712
|
-
}); // Two elements created in two different places should be considered
|
|
17713
|
-
// equal for testing purposes and therefore we hide it from enumeration.
|
|
17714
|
-
|
|
17715
|
-
Object.defineProperty(element, '_source', {
|
|
17716
|
-
configurable: false,
|
|
17717
|
-
enumerable: false,
|
|
17718
|
-
writable: false,
|
|
17719
|
-
value: source
|
|
17720
|
-
});
|
|
17721
|
-
|
|
17722
|
-
if (Object.freeze) {
|
|
17723
|
-
Object.freeze(element.props);
|
|
17724
|
-
Object.freeze(element);
|
|
17725
|
-
}
|
|
17726
|
-
}
|
|
17727
|
-
|
|
17728
|
-
return element;
|
|
17729
|
-
};
|
|
17730
|
-
/**
|
|
17731
|
-
* https://github.com/reactjs/rfcs/pull/107
|
|
17732
|
-
* @param {*} type
|
|
17733
|
-
* @param {object} props
|
|
17734
|
-
* @param {string} key
|
|
17735
|
-
*/
|
|
17736
|
-
|
|
17737
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
17738
|
-
{
|
|
17739
|
-
var propName; // Reserved names are extracted
|
|
17740
|
-
|
|
17741
|
-
var props = {};
|
|
17742
|
-
var key = null;
|
|
17743
|
-
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
|
17744
|
-
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
|
17745
|
-
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
|
17746
|
-
// but as an intermediary step, we will use jsxDEV for everything except
|
|
17747
|
-
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
|
17748
|
-
// key is explicitly declared to be undefined or not.
|
|
17749
|
-
|
|
17750
|
-
if (maybeKey !== undefined) {
|
|
17751
|
-
{
|
|
17752
|
-
checkKeyStringCoercion(maybeKey);
|
|
17753
|
-
}
|
|
17754
|
-
|
|
17755
|
-
key = '' + maybeKey;
|
|
17756
|
-
}
|
|
17757
|
-
|
|
17758
|
-
if (hasValidKey(config)) {
|
|
17759
|
-
{
|
|
17760
|
-
checkKeyStringCoercion(config.key);
|
|
17761
|
-
}
|
|
17762
|
-
|
|
17763
|
-
key = '' + config.key;
|
|
17764
|
-
}
|
|
17765
|
-
|
|
17766
|
-
if (hasValidRef(config)) {
|
|
17767
|
-
ref = config.ref;
|
|
17768
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
17769
|
-
} // Remaining properties are added to a new props object
|
|
17770
|
-
|
|
17771
|
-
|
|
17772
|
-
for (propName in config) {
|
|
17773
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
17774
|
-
props[propName] = config[propName];
|
|
17775
|
-
}
|
|
17776
|
-
} // Resolve default props
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
if (type && type.defaultProps) {
|
|
17780
|
-
var defaultProps = type.defaultProps;
|
|
17781
|
-
|
|
17782
|
-
for (propName in defaultProps) {
|
|
17783
|
-
if (props[propName] === undefined) {
|
|
17784
|
-
props[propName] = defaultProps[propName];
|
|
17785
|
-
}
|
|
17786
|
-
}
|
|
17787
|
-
}
|
|
17788
|
-
|
|
17789
|
-
if (key || ref) {
|
|
17790
|
-
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
17791
|
-
|
|
17792
|
-
if (key) {
|
|
17793
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
17794
|
-
}
|
|
17795
|
-
|
|
17796
|
-
if (ref) {
|
|
17797
|
-
defineRefPropWarningGetter(props, displayName);
|
|
17798
|
-
}
|
|
17799
|
-
}
|
|
17800
|
-
|
|
17801
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
17802
|
-
}
|
|
17803
|
-
}
|
|
17804
|
-
|
|
17805
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
17806
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
17807
|
-
|
|
17808
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
17809
|
-
{
|
|
17810
|
-
if (element) {
|
|
17811
|
-
var owner = element._owner;
|
|
17812
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
17813
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
17814
|
-
} else {
|
|
17815
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
17816
|
-
}
|
|
17817
|
-
}
|
|
17818
|
-
}
|
|
17819
|
-
|
|
17820
|
-
var propTypesMisspellWarningShown;
|
|
17821
|
-
|
|
17822
|
-
{
|
|
17823
|
-
propTypesMisspellWarningShown = false;
|
|
17824
|
-
}
|
|
17825
|
-
/**
|
|
17826
|
-
* Verifies the object is a ReactElement.
|
|
17827
|
-
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
17828
|
-
* @param {?object} object
|
|
17829
|
-
* @return {boolean} True if `object` is a ReactElement.
|
|
17830
|
-
* @final
|
|
17831
|
-
*/
|
|
17832
|
-
|
|
17833
|
-
|
|
17834
|
-
function isValidElement(object) {
|
|
17835
|
-
{
|
|
17836
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
17837
|
-
}
|
|
17838
|
-
}
|
|
17839
|
-
|
|
17840
|
-
function getDeclarationErrorAddendum() {
|
|
17841
|
-
{
|
|
17842
|
-
if (ReactCurrentOwner$1.current) {
|
|
17843
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
17844
|
-
|
|
17845
|
-
if (name) {
|
|
17846
|
-
return '\n\nCheck the render method of `' + name + '`.';
|
|
17847
|
-
}
|
|
17848
|
-
}
|
|
17849
|
-
|
|
17850
|
-
return '';
|
|
17851
|
-
}
|
|
17852
|
-
}
|
|
17853
|
-
|
|
17854
|
-
function getSourceInfoErrorAddendum(source) {
|
|
17855
|
-
{
|
|
17856
|
-
|
|
17857
|
-
return '';
|
|
17858
|
-
}
|
|
17859
|
-
}
|
|
17860
|
-
/**
|
|
17861
|
-
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
17862
|
-
* object keys are not valid. This allows us to keep track of children between
|
|
17863
|
-
* updates.
|
|
17864
|
-
*/
|
|
17865
|
-
|
|
17866
|
-
|
|
17867
|
-
var ownerHasKeyUseWarning = {};
|
|
17868
|
-
|
|
17869
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
17870
|
-
{
|
|
17871
|
-
var info = getDeclarationErrorAddendum();
|
|
17872
|
-
|
|
17873
|
-
if (!info) {
|
|
17874
|
-
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
17875
|
-
|
|
17876
|
-
if (parentName) {
|
|
17877
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
17878
|
-
}
|
|
17879
|
-
}
|
|
17880
|
-
|
|
17881
|
-
return info;
|
|
17882
|
-
}
|
|
17883
|
-
}
|
|
17884
|
-
/**
|
|
17885
|
-
* Warn if the element doesn't have an explicit key assigned to it.
|
|
17886
|
-
* This element is in an array. The array could grow and shrink or be
|
|
17887
|
-
* reordered. All children that haven't already been validated are required to
|
|
17888
|
-
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
17889
|
-
* will only be shown once.
|
|
17890
|
-
*
|
|
17891
|
-
* @internal
|
|
17892
|
-
* @param {ReactElement} element Element that requires a key.
|
|
17893
|
-
* @param {*} parentType element's parent's type.
|
|
17894
|
-
*/
|
|
17895
|
-
|
|
17896
|
-
|
|
17897
|
-
function validateExplicitKey(element, parentType) {
|
|
17898
|
-
{
|
|
17899
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
17900
|
-
return;
|
|
17901
|
-
}
|
|
17902
|
-
|
|
17903
|
-
element._store.validated = true;
|
|
17904
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
17905
|
-
|
|
17906
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
17907
|
-
return;
|
|
17908
|
-
}
|
|
17909
|
-
|
|
17910
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
17911
|
-
// property, it may be the creator of the child that's responsible for
|
|
17912
|
-
// assigning it a key.
|
|
17913
|
-
|
|
17914
|
-
var childOwner = '';
|
|
17915
|
-
|
|
17916
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
17917
|
-
// Give the component that originally created this child.
|
|
17918
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
17919
|
-
}
|
|
17920
|
-
|
|
17921
|
-
setCurrentlyValidatingElement$1(element);
|
|
17922
|
-
|
|
17923
|
-
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);
|
|
17924
|
-
|
|
17925
|
-
setCurrentlyValidatingElement$1(null);
|
|
17926
|
-
}
|
|
17927
|
-
}
|
|
17928
|
-
/**
|
|
17929
|
-
* Ensure that every element either is passed in a static location, in an
|
|
17930
|
-
* array with an explicit keys property defined, or in an object literal
|
|
17931
|
-
* with valid key property.
|
|
17932
|
-
*
|
|
17933
|
-
* @internal
|
|
17934
|
-
* @param {ReactNode} node Statically passed child of any type.
|
|
17935
|
-
* @param {*} parentType node's parent's type.
|
|
17936
|
-
*/
|
|
17937
|
-
|
|
17938
|
-
|
|
17939
|
-
function validateChildKeys(node, parentType) {
|
|
17940
|
-
{
|
|
17941
|
-
if (typeof node !== 'object') {
|
|
17942
|
-
return;
|
|
17943
|
-
}
|
|
17944
|
-
|
|
17945
|
-
if (isArray(node)) {
|
|
17946
|
-
for (var i = 0; i < node.length; i++) {
|
|
17947
|
-
var child = node[i];
|
|
17948
|
-
|
|
17949
|
-
if (isValidElement(child)) {
|
|
17950
|
-
validateExplicitKey(child, parentType);
|
|
17951
|
-
}
|
|
17952
|
-
}
|
|
17953
|
-
} else if (isValidElement(node)) {
|
|
17954
|
-
// This element was passed in a valid location.
|
|
17955
|
-
if (node._store) {
|
|
17956
|
-
node._store.validated = true;
|
|
17957
|
-
}
|
|
17958
|
-
} else if (node) {
|
|
17959
|
-
var iteratorFn = getIteratorFn(node);
|
|
17960
|
-
|
|
17961
|
-
if (typeof iteratorFn === 'function') {
|
|
17962
|
-
// Entry iterators used to provide implicit keys,
|
|
17963
|
-
// but now we print a separate warning for them later.
|
|
17964
|
-
if (iteratorFn !== node.entries) {
|
|
17965
|
-
var iterator = iteratorFn.call(node);
|
|
17966
|
-
var step;
|
|
17967
|
-
|
|
17968
|
-
while (!(step = iterator.next()).done) {
|
|
17969
|
-
if (isValidElement(step.value)) {
|
|
17970
|
-
validateExplicitKey(step.value, parentType);
|
|
17971
|
-
}
|
|
17972
|
-
}
|
|
17973
|
-
}
|
|
17974
|
-
}
|
|
17975
|
-
}
|
|
17976
|
-
}
|
|
17977
|
-
}
|
|
17978
|
-
/**
|
|
17979
|
-
* Given an element, validate that its props follow the propTypes definition,
|
|
17980
|
-
* provided by the type.
|
|
17981
|
-
*
|
|
17982
|
-
* @param {ReactElement} element
|
|
17983
|
-
*/
|
|
17984
|
-
|
|
17985
|
-
|
|
17986
|
-
function validatePropTypes(element) {
|
|
17987
|
-
{
|
|
17988
|
-
var type = element.type;
|
|
17989
|
-
|
|
17990
|
-
if (type === null || type === undefined || typeof type === 'string') {
|
|
17991
|
-
return;
|
|
17992
|
-
}
|
|
17993
|
-
|
|
17994
|
-
var propTypes;
|
|
17995
|
-
|
|
17996
|
-
if (typeof type === 'function') {
|
|
17997
|
-
propTypes = type.propTypes;
|
|
17998
|
-
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
17999
|
-
// Inner props are checked in the reconciler.
|
|
18000
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
18001
|
-
propTypes = type.propTypes;
|
|
18002
|
-
} else {
|
|
18003
|
-
return;
|
|
18004
|
-
}
|
|
18005
|
-
|
|
18006
|
-
if (propTypes) {
|
|
18007
|
-
// Intentionally inside to avoid triggering lazy initializers:
|
|
18008
|
-
var name = getComponentNameFromType(type);
|
|
18009
|
-
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
18010
|
-
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
18011
|
-
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
18012
|
-
|
|
18013
|
-
var _name = getComponentNameFromType(type);
|
|
18014
|
-
|
|
18015
|
-
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
18016
|
-
}
|
|
18017
|
-
|
|
18018
|
-
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
18019
|
-
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
18020
|
-
}
|
|
18021
|
-
}
|
|
18022
|
-
}
|
|
18023
|
-
/**
|
|
18024
|
-
* Given a fragment, validate that it can only be provided with fragment props
|
|
18025
|
-
* @param {ReactElement} fragment
|
|
18026
|
-
*/
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
function validateFragmentProps(fragment) {
|
|
18030
|
-
{
|
|
18031
|
-
var keys = Object.keys(fragment.props);
|
|
18032
|
-
|
|
18033
|
-
for (var i = 0; i < keys.length; i++) {
|
|
18034
|
-
var key = keys[i];
|
|
18035
|
-
|
|
18036
|
-
if (key !== 'children' && key !== 'key') {
|
|
18037
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
18038
|
-
|
|
18039
|
-
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
18040
|
-
|
|
18041
|
-
setCurrentlyValidatingElement$1(null);
|
|
18042
|
-
break;
|
|
18043
|
-
}
|
|
18044
|
-
}
|
|
18045
|
-
|
|
18046
|
-
if (fragment.ref !== null) {
|
|
18047
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
18048
|
-
|
|
18049
|
-
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
18050
|
-
|
|
18051
|
-
setCurrentlyValidatingElement$1(null);
|
|
18052
|
-
}
|
|
18053
|
-
}
|
|
18054
|
-
}
|
|
18055
|
-
|
|
18056
|
-
var didWarnAboutKeySpread = {};
|
|
18057
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
18058
|
-
{
|
|
18059
|
-
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
18060
|
-
// succeed and there will likely be errors in render.
|
|
18061
|
-
|
|
18062
|
-
if (!validType) {
|
|
18063
|
-
var info = '';
|
|
18064
|
-
|
|
18065
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
18066
|
-
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.";
|
|
18067
|
-
}
|
|
18068
|
-
|
|
18069
|
-
var sourceInfo = getSourceInfoErrorAddendum();
|
|
18070
|
-
|
|
18071
|
-
if (sourceInfo) {
|
|
18072
|
-
info += sourceInfo;
|
|
18073
|
-
} else {
|
|
18074
|
-
info += getDeclarationErrorAddendum();
|
|
18075
|
-
}
|
|
18076
|
-
|
|
18077
|
-
var typeString;
|
|
18078
|
-
|
|
18079
|
-
if (type === null) {
|
|
18080
|
-
typeString = 'null';
|
|
18081
|
-
} else if (isArray(type)) {
|
|
18082
|
-
typeString = 'array';
|
|
18083
|
-
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
18084
|
-
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
18085
|
-
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
18086
|
-
} else {
|
|
18087
|
-
typeString = typeof type;
|
|
18088
|
-
}
|
|
18089
|
-
|
|
18090
|
-
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);
|
|
18091
|
-
}
|
|
18092
|
-
|
|
18093
|
-
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
|
18094
|
-
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
18095
|
-
|
|
18096
|
-
if (element == null) {
|
|
18097
|
-
return element;
|
|
18098
|
-
} // Skip key warning if the type isn't valid since our key validation logic
|
|
18099
|
-
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
18100
|
-
// We don't want exception behavior to differ between dev and prod.
|
|
18101
|
-
// (Rendering will throw with a helpful message and as soon as the type is
|
|
18102
|
-
// fixed, the key warnings will appear.)
|
|
18103
|
-
|
|
18104
|
-
|
|
18105
|
-
if (validType) {
|
|
18106
|
-
var children = props.children;
|
|
18107
|
-
|
|
18108
|
-
if (children !== undefined) {
|
|
18109
|
-
if (isStaticChildren) {
|
|
18110
|
-
if (isArray(children)) {
|
|
18111
|
-
for (var i = 0; i < children.length; i++) {
|
|
18112
|
-
validateChildKeys(children[i], type);
|
|
18113
|
-
}
|
|
18114
|
-
|
|
18115
|
-
if (Object.freeze) {
|
|
18116
|
-
Object.freeze(children);
|
|
18117
|
-
}
|
|
18118
|
-
} else {
|
|
18119
|
-
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.');
|
|
18120
|
-
}
|
|
18121
|
-
} else {
|
|
18122
|
-
validateChildKeys(children, type);
|
|
18123
|
-
}
|
|
18124
|
-
}
|
|
18125
|
-
}
|
|
18126
|
-
|
|
18127
|
-
{
|
|
18128
|
-
if (hasOwnProperty.call(props, 'key')) {
|
|
18129
|
-
var componentName = getComponentNameFromType(type);
|
|
18130
|
-
var keys = Object.keys(props).filter(function (k) {
|
|
18131
|
-
return k !== 'key';
|
|
18132
|
-
});
|
|
18133
|
-
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
|
|
18134
|
-
|
|
18135
|
-
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
18136
|
-
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
|
|
18137
|
-
|
|
18138
|
-
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);
|
|
18139
|
-
|
|
18140
|
-
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
18141
|
-
}
|
|
18142
|
-
}
|
|
18143
|
-
}
|
|
18144
|
-
|
|
18145
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
18146
|
-
validateFragmentProps(element);
|
|
18147
|
-
} else {
|
|
18148
|
-
validatePropTypes(element);
|
|
18149
|
-
}
|
|
18150
|
-
|
|
18151
|
-
return element;
|
|
18152
|
-
}
|
|
18153
|
-
} // These two functions exist to still get child warnings in dev
|
|
18154
|
-
// even with the prod transform. This means that jsxDEV is purely
|
|
18155
|
-
// opt-in behavior for better messages but that we won't stop
|
|
18156
|
-
// giving you warnings if you use production apis.
|
|
18157
|
-
|
|
18158
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
18159
|
-
{
|
|
18160
|
-
return jsxWithValidation(type, props, key, true);
|
|
18161
|
-
}
|
|
18162
|
-
}
|
|
18163
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
18164
|
-
{
|
|
18165
|
-
return jsxWithValidation(type, props, key, false);
|
|
18166
|
-
}
|
|
18167
|
-
}
|
|
18168
|
-
|
|
18169
|
-
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
|
|
18170
|
-
// for now we can ship identical prod functions
|
|
18171
|
-
|
|
18172
|
-
var jsxs = jsxWithValidationStatic ;
|
|
18173
|
-
|
|
18174
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
18175
|
-
reactJsxRuntime_development.jsx = jsx;
|
|
18176
|
-
reactJsxRuntime_development.jsxs = jsxs;
|
|
18177
17242
|
})();
|
|
18178
|
-
}
|
|
18179
17243
|
return reactJsxRuntime_development;
|
|
18180
17244
|
}
|
|
18181
17245
|
|
|
18182
17246
|
if (process.env.NODE_ENV === 'production') {
|
|
18183
|
-
jsxRuntime.exports =
|
|
17247
|
+
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
18184
17248
|
} else {
|
|
18185
17249
|
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
18186
17250
|
}
|
|
@@ -18191,18 +17255,14 @@ var CAMSContext = createContext(null);
|
|
|
18191
17255
|
function CAMSProvider(_a) {
|
|
18192
17256
|
var children = _a.children, defaultConfig = _a.defaultConfig, authOptions = __rest(_a, ["children", "defaultConfig"]);
|
|
18193
17257
|
var _b = useState(false), mounted = _b[0], setMounted = _b[1];
|
|
17258
|
+
var auth = useCAMSAuth(authOptions);
|
|
18194
17259
|
useEffect(function () {
|
|
18195
17260
|
setMounted(true);
|
|
18196
17261
|
}, []);
|
|
17262
|
+
var value = useMemo(function () { return (__assign(__assign({}, auth), { defaultConfig: defaultConfig })); }, [auth, defaultConfig]);
|
|
18197
17263
|
if (!mounted) {
|
|
18198
17264
|
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children });
|
|
18199
17265
|
}
|
|
18200
|
-
return jsxRuntimeExports.jsx(CAMSProviderInner, __assign({ defaultConfig: defaultConfig }, authOptions, { children: children }));
|
|
18201
|
-
}
|
|
18202
|
-
function CAMSProviderInner(_a) {
|
|
18203
|
-
var children = _a.children, defaultConfig = _a.defaultConfig, authOptions = __rest(_a, ["children", "defaultConfig"]);
|
|
18204
|
-
var auth = useCAMSAuth(authOptions);
|
|
18205
|
-
var value = useMemo(function () { return (__assign(__assign({}, auth), { defaultConfig: defaultConfig })); }, [auth, defaultConfig]);
|
|
18206
17266
|
return (jsxRuntimeExports.jsx(CAMSContext.Provider, { value: value, children: children }));
|
|
18207
17267
|
}
|
|
18208
17268
|
function useCAMSContext() {
|