@vxrn/react-native-prebuilt 1.2.46 → 1.2.48
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/cjs/index.cjs +1 -1
- package/dist/cjs/index.js +12 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/index.js +12 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +23 -8
- package/types/index.d.ts.map +1 -1
- package/vendor/react-18.3.1/index.js +2030 -1717
- package/vendor/react-jsx-runtime-18.3.1/index.js +964 -796
- package/vendor/react-native-0.74.1/index.js +112929 -79202
- package/vendor/rn-react-19-support/ReactFabric-dev.js +6202 -7742
- package/vendor/rn-react-19-support/ReactFabric-prod.js +3859 -4777
- package/vendor/rn-react-19-support/ReactNativeRenderer-dev.js +6299 -7872
- package/vendor/rn-react-19-support/ReactNativeRenderer-prod.js +3970 -4898
|
@@ -1,1892 +1,2206 @@
|
|
|
1
|
+
const run = () => {
|
|
2
|
+
'use strict'
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
4
|
+
var __commonJS = (cb, mod) =>
|
|
5
|
+
function __require() {
|
|
6
|
+
return (
|
|
7
|
+
mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod),
|
|
8
|
+
mod.exports
|
|
9
|
+
)
|
|
10
|
+
}
|
|
1
11
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
12
|
+
// ../../node_modules/react/cjs/react.development.js
|
|
13
|
+
var require_react_development = __commonJS({
|
|
14
|
+
'../../node_modules/react/cjs/react.development.js'(exports2, module2) {
|
|
15
|
+
'use strict'
|
|
16
|
+
if (true) {
|
|
17
|
+
;(function () {
|
|
18
|
+
'use strict'
|
|
19
|
+
if (
|
|
20
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
21
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
|
|
22
|
+
'function'
|
|
23
|
+
) {
|
|
24
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error())
|
|
25
|
+
}
|
|
26
|
+
var ReactVersion = '18.3.1'
|
|
27
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element')
|
|
28
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal')
|
|
29
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment')
|
|
30
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode')
|
|
31
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler')
|
|
32
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider')
|
|
33
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context')
|
|
34
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref')
|
|
35
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense')
|
|
36
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list')
|
|
37
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo')
|
|
38
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy')
|
|
39
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen')
|
|
40
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator
|
|
41
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'
|
|
42
|
+
function getIteratorFn(maybeIterable) {
|
|
43
|
+
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
44
|
+
return null
|
|
45
|
+
}
|
|
46
|
+
var maybeIterator =
|
|
47
|
+
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
48
|
+
maybeIterable[FAUX_ITERATOR_SYMBOL]
|
|
49
|
+
if (typeof maybeIterator === 'function') {
|
|
50
|
+
return maybeIterator
|
|
51
|
+
}
|
|
52
|
+
return null
|
|
53
|
+
}
|
|
54
|
+
var ReactCurrentDispatcher = {
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @type {ReactComponent}
|
|
58
|
+
*/
|
|
59
|
+
current: null,
|
|
60
|
+
}
|
|
61
|
+
var ReactCurrentBatchConfig = {
|
|
62
|
+
transition: null,
|
|
63
|
+
}
|
|
64
|
+
var ReactCurrentActQueue = {
|
|
65
|
+
current: null,
|
|
66
|
+
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
|
|
67
|
+
isBatchingLegacy: false,
|
|
68
|
+
didScheduleLegacyUpdate: false,
|
|
69
|
+
}
|
|
70
|
+
var ReactCurrentOwner = {
|
|
71
|
+
/**
|
|
72
|
+
* @internal
|
|
73
|
+
* @type {ReactComponent}
|
|
74
|
+
*/
|
|
75
|
+
current: null,
|
|
76
|
+
}
|
|
77
|
+
var ReactDebugCurrentFrame = {}
|
|
78
|
+
var currentExtraStackFrame = null
|
|
79
|
+
function setExtraStackFrame(stack) {
|
|
80
|
+
{
|
|
81
|
+
currentExtraStackFrame = stack
|
|
82
|
+
}
|
|
83
|
+
}
|
|
71
84
|
{
|
|
72
|
-
|
|
85
|
+
ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
|
|
86
|
+
{
|
|
87
|
+
currentExtraStackFrame = stack
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
ReactDebugCurrentFrame.getCurrentStack = null
|
|
91
|
+
ReactDebugCurrentFrame.getStackAddendum = function () {
|
|
92
|
+
var stack = ''
|
|
93
|
+
if (currentExtraStackFrame) {
|
|
94
|
+
stack += currentExtraStackFrame
|
|
95
|
+
}
|
|
96
|
+
var impl = ReactDebugCurrentFrame.getCurrentStack
|
|
97
|
+
if (impl) {
|
|
98
|
+
stack += impl() || ''
|
|
99
|
+
}
|
|
100
|
+
return stack
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
var enableScopeAPI = false
|
|
104
|
+
var enableCacheElement = false
|
|
105
|
+
var enableTransitionTracing = false
|
|
106
|
+
var enableLegacyHidden = false
|
|
107
|
+
var enableDebugTracing = false
|
|
108
|
+
var ReactSharedInternals = {
|
|
109
|
+
ReactCurrentDispatcher,
|
|
110
|
+
ReactCurrentBatchConfig,
|
|
111
|
+
ReactCurrentOwner,
|
|
73
112
|
}
|
|
74
|
-
}
|
|
75
|
-
{
|
|
76
|
-
ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
|
|
77
|
-
{
|
|
78
|
-
currentExtraStackFrame = stack;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
ReactDebugCurrentFrame.getCurrentStack = null;
|
|
82
|
-
ReactDebugCurrentFrame.getStackAddendum = function() {
|
|
83
|
-
var stack = "";
|
|
84
|
-
if (currentExtraStackFrame) {
|
|
85
|
-
stack += currentExtraStackFrame;
|
|
86
|
-
}
|
|
87
|
-
var impl = ReactDebugCurrentFrame.getCurrentStack;
|
|
88
|
-
if (impl) {
|
|
89
|
-
stack += impl() || "";
|
|
90
|
-
}
|
|
91
|
-
return stack;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
var enableScopeAPI = false;
|
|
95
|
-
var enableCacheElement = false;
|
|
96
|
-
var enableTransitionTracing = false;
|
|
97
|
-
var enableLegacyHidden = false;
|
|
98
|
-
var enableDebugTracing = false;
|
|
99
|
-
var ReactSharedInternals = {
|
|
100
|
-
ReactCurrentDispatcher,
|
|
101
|
-
ReactCurrentBatchConfig,
|
|
102
|
-
ReactCurrentOwner
|
|
103
|
-
};
|
|
104
|
-
{
|
|
105
|
-
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
|
|
106
|
-
ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
|
|
107
|
-
}
|
|
108
|
-
function warn(format) {
|
|
109
113
|
{
|
|
114
|
+
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame
|
|
115
|
+
ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue
|
|
116
|
+
}
|
|
117
|
+
function warn(format) {
|
|
110
118
|
{
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
{
|
|
120
|
+
for (
|
|
121
|
+
var _len = arguments.length,
|
|
122
|
+
args = new Array(_len > 1 ? _len - 1 : 0),
|
|
123
|
+
_key = 1;
|
|
124
|
+
_key < _len;
|
|
125
|
+
_key++
|
|
126
|
+
) {
|
|
127
|
+
args[_key - 1] = arguments[_key]
|
|
128
|
+
}
|
|
129
|
+
printWarning('warn', format, args)
|
|
113
130
|
}
|
|
114
|
-
printWarning("warn", format, args);
|
|
115
131
|
}
|
|
116
132
|
}
|
|
117
|
-
|
|
118
|
-
function error(format) {
|
|
119
|
-
{
|
|
133
|
+
function error(format) {
|
|
120
134
|
{
|
|
121
|
-
|
|
122
|
-
|
|
135
|
+
{
|
|
136
|
+
for (
|
|
137
|
+
var _len2 = arguments.length,
|
|
138
|
+
args = new Array(_len2 > 1 ? _len2 - 1 : 0),
|
|
139
|
+
_key2 = 1;
|
|
140
|
+
_key2 < _len2;
|
|
141
|
+
_key2++
|
|
142
|
+
) {
|
|
143
|
+
args[_key2 - 1] = arguments[_key2]
|
|
144
|
+
}
|
|
145
|
+
printWarning('error', format, args)
|
|
123
146
|
}
|
|
124
|
-
printWarning("error", format, args);
|
|
125
147
|
}
|
|
126
148
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
};
|
|
235
|
-
Component.prototype.forceUpdate = function(callback) {
|
|
236
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
237
|
-
};
|
|
238
|
-
{
|
|
239
|
-
var deprecatedAPIs = {
|
|
240
|
-
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
241
|
-
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
242
|
-
};
|
|
243
|
-
var defineDeprecationWarning = function(methodName, info) {
|
|
244
|
-
Object.defineProperty(Component.prototype, methodName, {
|
|
245
|
-
get: function() {
|
|
246
|
-
warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
|
|
247
|
-
return void 0;
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
};
|
|
251
|
-
for (var fnName in deprecatedAPIs) {
|
|
252
|
-
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
253
|
-
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
function ComponentDummy() {
|
|
258
|
-
}
|
|
259
|
-
ComponentDummy.prototype = Component.prototype;
|
|
260
|
-
function PureComponent(props, context, updater) {
|
|
261
|
-
this.props = props;
|
|
262
|
-
this.context = context;
|
|
263
|
-
this.refs = emptyObject;
|
|
264
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
265
|
-
}
|
|
266
|
-
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
267
|
-
pureComponentPrototype.constructor = PureComponent;
|
|
268
|
-
assign(pureComponentPrototype, Component.prototype);
|
|
269
|
-
pureComponentPrototype.isPureReactComponent = true;
|
|
270
|
-
function createRef() {
|
|
271
|
-
var refObject = {
|
|
272
|
-
current: null
|
|
273
|
-
};
|
|
274
|
-
{
|
|
275
|
-
Object.seal(refObject);
|
|
276
|
-
}
|
|
277
|
-
return refObject;
|
|
278
|
-
}
|
|
279
|
-
var isArrayImpl = Array.isArray;
|
|
280
|
-
function isArray(a) {
|
|
281
|
-
return isArrayImpl(a);
|
|
282
|
-
}
|
|
283
|
-
function typeName(value) {
|
|
149
|
+
function printWarning(level, format, args) {
|
|
150
|
+
{
|
|
151
|
+
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame
|
|
152
|
+
var stack = ReactDebugCurrentFrame2.getStackAddendum()
|
|
153
|
+
if (stack !== '') {
|
|
154
|
+
format += '%s'
|
|
155
|
+
args = args.concat([stack])
|
|
156
|
+
}
|
|
157
|
+
var argsWithFormat = args.map(function (item) {
|
|
158
|
+
return String(item)
|
|
159
|
+
})
|
|
160
|
+
argsWithFormat.unshift('Warning: ' + format)
|
|
161
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
var didWarnStateUpdateForUnmountedComponent = {}
|
|
165
|
+
function warnNoop(publicInstance, callerName) {
|
|
166
|
+
{
|
|
167
|
+
var _constructor = publicInstance.constructor
|
|
168
|
+
var componentName =
|
|
169
|
+
(_constructor && (_constructor.displayName || _constructor.name)) ||
|
|
170
|
+
'ReactClass'
|
|
171
|
+
var warningKey = componentName + '.' + callerName
|
|
172
|
+
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
173
|
+
return
|
|
174
|
+
}
|
|
175
|
+
error(
|
|
176
|
+
"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.",
|
|
177
|
+
callerName,
|
|
178
|
+
componentName
|
|
179
|
+
)
|
|
180
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] = true
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
var ReactNoopUpdateQueue = {
|
|
184
|
+
/**
|
|
185
|
+
* Checks whether or not this composite component is mounted.
|
|
186
|
+
* @param {ReactClass} publicInstance The instance we want to test.
|
|
187
|
+
* @return {boolean} True if mounted, false otherwise.
|
|
188
|
+
* @protected
|
|
189
|
+
* @final
|
|
190
|
+
*/
|
|
191
|
+
isMounted: function (publicInstance) {
|
|
192
|
+
return false
|
|
193
|
+
},
|
|
194
|
+
/**
|
|
195
|
+
* Forces an update. This should only be invoked when it is known with
|
|
196
|
+
* certainty that we are **not** in a DOM transaction.
|
|
197
|
+
*
|
|
198
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
199
|
+
* component's state has changed but `setState` was not called.
|
|
200
|
+
*
|
|
201
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
202
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
203
|
+
*
|
|
204
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
205
|
+
* @param {?function} callback Called after component is updated.
|
|
206
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
enqueueForceUpdate: function (publicInstance, callback, callerName) {
|
|
210
|
+
warnNoop(publicInstance, 'forceUpdate')
|
|
211
|
+
},
|
|
212
|
+
/**
|
|
213
|
+
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
214
|
+
* You should treat `this.state` as immutable.
|
|
215
|
+
*
|
|
216
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
217
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
218
|
+
*
|
|
219
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
220
|
+
* @param {object} completeState Next state.
|
|
221
|
+
* @param {?function} callback Called after component is updated.
|
|
222
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
enqueueReplaceState: function (
|
|
226
|
+
publicInstance,
|
|
227
|
+
completeState,
|
|
228
|
+
callback,
|
|
229
|
+
callerName
|
|
230
|
+
) {
|
|
231
|
+
warnNoop(publicInstance, 'replaceState')
|
|
232
|
+
},
|
|
233
|
+
/**
|
|
234
|
+
* Sets a subset of the state. This only exists because _pendingState is
|
|
235
|
+
* internal. This provides a merging strategy that is not available to deep
|
|
236
|
+
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
237
|
+
* during the merge.
|
|
238
|
+
*
|
|
239
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
240
|
+
* @param {object} partialState Next partial state to be merged with state.
|
|
241
|
+
* @param {?function} callback Called after component is updated.
|
|
242
|
+
* @param {?string} Name of the calling function in the public API.
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
245
|
+
enqueueSetState: function (
|
|
246
|
+
publicInstance,
|
|
247
|
+
partialState,
|
|
248
|
+
callback,
|
|
249
|
+
callerName
|
|
250
|
+
) {
|
|
251
|
+
warnNoop(publicInstance, 'setState')
|
|
252
|
+
},
|
|
253
|
+
}
|
|
254
|
+
var assign = Object.assign
|
|
255
|
+
var emptyObject = {}
|
|
284
256
|
{
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
257
|
+
Object.freeze(emptyObject)
|
|
258
|
+
}
|
|
259
|
+
function Component(props, context, updater) {
|
|
260
|
+
this.props = props
|
|
261
|
+
this.context = context
|
|
262
|
+
this.refs = emptyObject
|
|
263
|
+
this.updater = updater || ReactNoopUpdateQueue
|
|
264
|
+
}
|
|
265
|
+
Component.prototype.isReactComponent = {}
|
|
266
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
267
|
+
if (
|
|
268
|
+
typeof partialState !== 'object' &&
|
|
269
|
+
typeof partialState !== 'function' &&
|
|
270
|
+
partialState != null
|
|
271
|
+
) {
|
|
272
|
+
throw new Error(
|
|
273
|
+
'setState(...): takes an object of state variables to update or a function which returns an object of state variables.'
|
|
274
|
+
)
|
|
275
|
+
}
|
|
276
|
+
this.updater.enqueueSetState(this, partialState, callback, 'setState')
|
|
277
|
+
}
|
|
278
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
279
|
+
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate')
|
|
288
280
|
}
|
|
289
|
-
}
|
|
290
|
-
function willCoercionThrow(value) {
|
|
291
281
|
{
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
282
|
+
var deprecatedAPIs = {
|
|
283
|
+
isMounted: [
|
|
284
|
+
'isMounted',
|
|
285
|
+
'Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.',
|
|
286
|
+
],
|
|
287
|
+
replaceState: [
|
|
288
|
+
'replaceState',
|
|
289
|
+
'Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).',
|
|
290
|
+
],
|
|
291
|
+
}
|
|
292
|
+
var defineDeprecationWarning = function (methodName, info) {
|
|
293
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
294
|
+
get: function () {
|
|
295
|
+
warn(
|
|
296
|
+
'%s(...) is deprecated in plain JavaScript React classes. %s',
|
|
297
|
+
info[0],
|
|
298
|
+
info[1]
|
|
299
|
+
)
|
|
300
|
+
return void 0
|
|
301
|
+
},
|
|
302
|
+
})
|
|
303
|
+
}
|
|
304
|
+
for (var fnName in deprecatedAPIs) {
|
|
305
|
+
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
306
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName])
|
|
307
|
+
}
|
|
297
308
|
}
|
|
298
309
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
307
|
-
return testStringCoercion(value);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
312
|
-
var displayName = outerType.displayName;
|
|
313
|
-
if (displayName) {
|
|
314
|
-
return displayName;
|
|
315
|
-
}
|
|
316
|
-
var functionName = innerType.displayName || innerType.name || "";
|
|
317
|
-
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
318
|
-
}
|
|
319
|
-
function getContextName(type) {
|
|
320
|
-
return type.displayName || "Context";
|
|
321
|
-
}
|
|
322
|
-
function getComponentNameFromType(type) {
|
|
323
|
-
if (type == null) {
|
|
324
|
-
return null;
|
|
310
|
+
function ComponentDummy() {}
|
|
311
|
+
ComponentDummy.prototype = Component.prototype
|
|
312
|
+
function PureComponent(props, context, updater) {
|
|
313
|
+
this.props = props
|
|
314
|
+
this.context = context
|
|
315
|
+
this.refs = emptyObject
|
|
316
|
+
this.updater = updater || ReactNoopUpdateQueue
|
|
325
317
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
return getWrappedName(type, type.render, "ForwardRef");
|
|
361
|
-
case REACT_MEMO_TYPE:
|
|
362
|
-
var outerName = type.displayName || null;
|
|
363
|
-
if (outerName !== null) {
|
|
364
|
-
return outerName;
|
|
365
|
-
}
|
|
366
|
-
return getComponentNameFromType(type.type) || "Memo";
|
|
367
|
-
case REACT_LAZY_TYPE: {
|
|
368
|
-
var lazyComponent = type;
|
|
369
|
-
var payload = lazyComponent._payload;
|
|
370
|
-
var init = lazyComponent._init;
|
|
371
|
-
try {
|
|
372
|
-
return getComponentNameFromType(init(payload));
|
|
373
|
-
} catch (x) {
|
|
374
|
-
return null;
|
|
375
|
-
}
|
|
318
|
+
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy())
|
|
319
|
+
pureComponentPrototype.constructor = PureComponent
|
|
320
|
+
assign(pureComponentPrototype, Component.prototype)
|
|
321
|
+
pureComponentPrototype.isPureReactComponent = true
|
|
322
|
+
function createRef() {
|
|
323
|
+
var refObject = {
|
|
324
|
+
current: null,
|
|
325
|
+
}
|
|
326
|
+
{
|
|
327
|
+
Object.seal(refObject)
|
|
328
|
+
}
|
|
329
|
+
return refObject
|
|
330
|
+
}
|
|
331
|
+
var isArrayImpl = Array.isArray
|
|
332
|
+
function isArray(a) {
|
|
333
|
+
return isArrayImpl(a)
|
|
334
|
+
}
|
|
335
|
+
function typeName(value) {
|
|
336
|
+
{
|
|
337
|
+
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag
|
|
338
|
+
var type =
|
|
339
|
+
(hasToStringTag && value[Symbol.toStringTag]) ||
|
|
340
|
+
value.constructor.name ||
|
|
341
|
+
'Object'
|
|
342
|
+
return type
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
function willCoercionThrow(value) {
|
|
346
|
+
{
|
|
347
|
+
try {
|
|
348
|
+
testStringCoercion(value)
|
|
349
|
+
return false
|
|
350
|
+
} catch (e) {
|
|
351
|
+
return true
|
|
376
352
|
}
|
|
377
353
|
}
|
|
378
354
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
didWarnAboutStringRefs = {};
|
|
391
|
-
}
|
|
392
|
-
function hasValidRef(config) {
|
|
393
|
-
{
|
|
394
|
-
if (hasOwnProperty.call(config, "ref")) {
|
|
395
|
-
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
396
|
-
if (getter && getter.isReactWarning) {
|
|
397
|
-
return false;
|
|
355
|
+
function testStringCoercion(value) {
|
|
356
|
+
return '' + value
|
|
357
|
+
}
|
|
358
|
+
function checkKeyStringCoercion(value) {
|
|
359
|
+
{
|
|
360
|
+
if (willCoercionThrow(value)) {
|
|
361
|
+
error(
|
|
362
|
+
'The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.',
|
|
363
|
+
typeName(value)
|
|
364
|
+
)
|
|
365
|
+
return testStringCoercion(value)
|
|
398
366
|
}
|
|
399
367
|
}
|
|
400
368
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
369
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
370
|
+
var displayName = outerType.displayName
|
|
371
|
+
if (displayName) {
|
|
372
|
+
return displayName
|
|
373
|
+
}
|
|
374
|
+
var functionName = innerType.displayName || innerType.name || ''
|
|
375
|
+
return functionName !== ''
|
|
376
|
+
? wrapperName + '(' + functionName + ')'
|
|
377
|
+
: wrapperName
|
|
378
|
+
}
|
|
379
|
+
function getContextName(type) {
|
|
380
|
+
return type.displayName || 'Context'
|
|
381
|
+
}
|
|
382
|
+
function getComponentNameFromType(type) {
|
|
383
|
+
if (type == null) {
|
|
384
|
+
return null
|
|
385
|
+
}
|
|
386
|
+
{
|
|
387
|
+
if (typeof type.tag === 'number') {
|
|
388
|
+
error(
|
|
389
|
+
'Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.'
|
|
390
|
+
)
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
if (typeof type === 'function') {
|
|
394
|
+
return type.displayName || type.name || null
|
|
395
|
+
}
|
|
396
|
+
if (typeof type === 'string') {
|
|
397
|
+
return type
|
|
398
|
+
}
|
|
399
|
+
switch (type) {
|
|
400
|
+
case REACT_FRAGMENT_TYPE:
|
|
401
|
+
return 'Fragment'
|
|
402
|
+
case REACT_PORTAL_TYPE:
|
|
403
|
+
return 'Portal'
|
|
404
|
+
case REACT_PROFILER_TYPE:
|
|
405
|
+
return 'Profiler'
|
|
406
|
+
case REACT_STRICT_MODE_TYPE:
|
|
407
|
+
return 'StrictMode'
|
|
408
|
+
case REACT_SUSPENSE_TYPE:
|
|
409
|
+
return 'Suspense'
|
|
410
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
411
|
+
return 'SuspenseList'
|
|
412
|
+
}
|
|
413
|
+
if (typeof type === 'object') {
|
|
414
|
+
switch (type.$$typeof) {
|
|
415
|
+
case REACT_CONTEXT_TYPE:
|
|
416
|
+
var context = type
|
|
417
|
+
return getContextName(context) + '.Consumer'
|
|
418
|
+
case REACT_PROVIDER_TYPE:
|
|
419
|
+
var provider = type
|
|
420
|
+
return getContextName(provider._context) + '.Provider'
|
|
421
|
+
case REACT_FORWARD_REF_TYPE:
|
|
422
|
+
return getWrappedName(type, type.render, 'ForwardRef')
|
|
423
|
+
case REACT_MEMO_TYPE:
|
|
424
|
+
var outerName = type.displayName || null
|
|
425
|
+
if (outerName !== null) {
|
|
426
|
+
return outerName
|
|
427
|
+
}
|
|
428
|
+
return getComponentNameFromType(type.type) || 'Memo'
|
|
429
|
+
case REACT_LAZY_TYPE: {
|
|
430
|
+
var lazyComponent = type
|
|
431
|
+
var payload = lazyComponent._payload
|
|
432
|
+
var init = lazyComponent._init
|
|
433
|
+
try {
|
|
434
|
+
return getComponentNameFromType(init(payload))
|
|
435
|
+
} catch (x) {
|
|
436
|
+
return null
|
|
437
|
+
}
|
|
438
|
+
}
|
|
409
439
|
}
|
|
410
440
|
}
|
|
441
|
+
return null
|
|
442
|
+
}
|
|
443
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty
|
|
444
|
+
var RESERVED_PROPS = {
|
|
445
|
+
key: true,
|
|
446
|
+
ref: true,
|
|
447
|
+
__self: true,
|
|
448
|
+
__source: true,
|
|
449
|
+
}
|
|
450
|
+
var specialPropKeyWarningShown,
|
|
451
|
+
specialPropRefWarningShown,
|
|
452
|
+
didWarnAboutStringRefs
|
|
453
|
+
{
|
|
454
|
+
didWarnAboutStringRefs = {}
|
|
411
455
|
}
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
415
|
-
var warnAboutAccessingKey = function() {
|
|
456
|
+
function hasValidRef(config) {
|
|
416
457
|
{
|
|
417
|
-
if (
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
430
|
-
var warnAboutAccessingRef = function() {
|
|
458
|
+
if (hasOwnProperty.call(config, 'ref')) {
|
|
459
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get
|
|
460
|
+
if (getter && getter.isReactWarning) {
|
|
461
|
+
return false
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return config.ref !== void 0
|
|
466
|
+
}
|
|
467
|
+
function hasValidKey(config) {
|
|
431
468
|
{
|
|
432
|
-
if (
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
function warnIfStringRefCannotBeAutoConverted(config) {
|
|
445
|
-
{
|
|
446
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
|
|
447
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
448
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
449
|
-
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', componentName, config.ref);
|
|
450
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
456
|
-
var element = {
|
|
457
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
458
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
459
|
-
// Built-in properties that belong on the element
|
|
460
|
-
type,
|
|
461
|
-
key,
|
|
462
|
-
ref,
|
|
463
|
-
props,
|
|
464
|
-
// Record the component responsible for creating this element.
|
|
465
|
-
_owner: owner
|
|
466
|
-
};
|
|
467
|
-
{
|
|
468
|
-
element._store = {};
|
|
469
|
-
Object.defineProperty(element._store, "validated", {
|
|
470
|
-
configurable: false,
|
|
471
|
-
enumerable: false,
|
|
472
|
-
writable: true,
|
|
473
|
-
value: false
|
|
474
|
-
});
|
|
475
|
-
Object.defineProperty(element, "_self", {
|
|
476
|
-
configurable: false,
|
|
477
|
-
enumerable: false,
|
|
478
|
-
writable: false,
|
|
479
|
-
value: self
|
|
480
|
-
});
|
|
481
|
-
Object.defineProperty(element, "_source", {
|
|
482
|
-
configurable: false,
|
|
483
|
-
enumerable: false,
|
|
484
|
-
writable: false,
|
|
485
|
-
value: source
|
|
486
|
-
});
|
|
487
|
-
if (Object.freeze) {
|
|
488
|
-
Object.freeze(element.props);
|
|
489
|
-
Object.freeze(element);
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
return element;
|
|
493
|
-
};
|
|
494
|
-
function createElement(type, config, children) {
|
|
495
|
-
var propName;
|
|
496
|
-
var props = {};
|
|
497
|
-
var key = null;
|
|
498
|
-
var ref = null;
|
|
499
|
-
var self = null;
|
|
500
|
-
var source = null;
|
|
501
|
-
if (config != null) {
|
|
502
|
-
if (hasValidRef(config)) {
|
|
503
|
-
ref = config.ref;
|
|
469
|
+
if (hasOwnProperty.call(config, 'key')) {
|
|
470
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'key').get
|
|
471
|
+
if (getter && getter.isReactWarning) {
|
|
472
|
+
return false
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return config.key !== void 0
|
|
477
|
+
}
|
|
478
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
479
|
+
var warnAboutAccessingKey = function () {
|
|
504
480
|
{
|
|
505
|
-
|
|
481
|
+
if (!specialPropKeyWarningShown) {
|
|
482
|
+
specialPropKeyWarningShown = true
|
|
483
|
+
error(
|
|
484
|
+
'%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)',
|
|
485
|
+
displayName
|
|
486
|
+
)
|
|
487
|
+
}
|
|
506
488
|
}
|
|
507
489
|
}
|
|
508
|
-
|
|
490
|
+
warnAboutAccessingKey.isReactWarning = true
|
|
491
|
+
Object.defineProperty(props, 'key', {
|
|
492
|
+
get: warnAboutAccessingKey,
|
|
493
|
+
configurable: true,
|
|
494
|
+
})
|
|
495
|
+
}
|
|
496
|
+
function defineRefPropWarningGetter(props, displayName) {
|
|
497
|
+
var warnAboutAccessingRef = function () {
|
|
509
498
|
{
|
|
510
|
-
|
|
499
|
+
if (!specialPropRefWarningShown) {
|
|
500
|
+
specialPropRefWarningShown = true
|
|
501
|
+
error(
|
|
502
|
+
'%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)',
|
|
503
|
+
displayName
|
|
504
|
+
)
|
|
505
|
+
}
|
|
511
506
|
}
|
|
512
|
-
key = "" + config.key;
|
|
513
507
|
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
508
|
+
warnAboutAccessingRef.isReactWarning = true
|
|
509
|
+
Object.defineProperty(props, 'ref', {
|
|
510
|
+
get: warnAboutAccessingRef,
|
|
511
|
+
configurable: true,
|
|
512
|
+
})
|
|
513
|
+
}
|
|
514
|
+
function warnIfStringRefCannotBeAutoConverted(config) {
|
|
515
|
+
{
|
|
516
|
+
if (
|
|
517
|
+
typeof config.ref === 'string' &&
|
|
518
|
+
ReactCurrentOwner.current &&
|
|
519
|
+
config.__self &&
|
|
520
|
+
ReactCurrentOwner.current.stateNode !== config.__self
|
|
521
|
+
) {
|
|
522
|
+
var componentName = getComponentNameFromType(
|
|
523
|
+
ReactCurrentOwner.current.type
|
|
524
|
+
)
|
|
525
|
+
if (!didWarnAboutStringRefs[componentName]) {
|
|
526
|
+
error(
|
|
527
|
+
'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',
|
|
528
|
+
componentName,
|
|
529
|
+
config.ref
|
|
530
|
+
)
|
|
531
|
+
didWarnAboutStringRefs[componentName] = true
|
|
532
|
+
}
|
|
519
533
|
}
|
|
520
534
|
}
|
|
521
535
|
}
|
|
522
|
-
var
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
536
|
+
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
537
|
+
var element = {
|
|
538
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
539
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
540
|
+
// Built-in properties that belong on the element
|
|
541
|
+
type,
|
|
542
|
+
key,
|
|
543
|
+
ref,
|
|
544
|
+
props,
|
|
545
|
+
// Record the component responsible for creating this element.
|
|
546
|
+
_owner: owner,
|
|
529
547
|
}
|
|
530
548
|
{
|
|
549
|
+
element._store = {}
|
|
550
|
+
Object.defineProperty(element._store, 'validated', {
|
|
551
|
+
configurable: false,
|
|
552
|
+
enumerable: false,
|
|
553
|
+
writable: true,
|
|
554
|
+
value: false,
|
|
555
|
+
})
|
|
556
|
+
Object.defineProperty(element, '_self', {
|
|
557
|
+
configurable: false,
|
|
558
|
+
enumerable: false,
|
|
559
|
+
writable: false,
|
|
560
|
+
value: self,
|
|
561
|
+
})
|
|
562
|
+
Object.defineProperty(element, '_source', {
|
|
563
|
+
configurable: false,
|
|
564
|
+
enumerable: false,
|
|
565
|
+
writable: false,
|
|
566
|
+
value: source,
|
|
567
|
+
})
|
|
531
568
|
if (Object.freeze) {
|
|
532
|
-
Object.freeze(
|
|
569
|
+
Object.freeze(element.props)
|
|
570
|
+
Object.freeze(element)
|
|
533
571
|
}
|
|
534
572
|
}
|
|
535
|
-
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
var
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
573
|
+
return element
|
|
574
|
+
}
|
|
575
|
+
function createElement(type, config, children) {
|
|
576
|
+
var propName
|
|
577
|
+
var props = {}
|
|
578
|
+
var key = null
|
|
579
|
+
var ref = null
|
|
580
|
+
var self = null
|
|
581
|
+
var source = null
|
|
582
|
+
if (config != null) {
|
|
583
|
+
if (hasValidRef(config)) {
|
|
584
|
+
ref = config.ref
|
|
585
|
+
{
|
|
586
|
+
warnIfStringRefCannotBeAutoConverted(config)
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
if (hasValidKey(config)) {
|
|
590
|
+
{
|
|
591
|
+
checkKeyStringCoercion(config.key)
|
|
592
|
+
}
|
|
593
|
+
key = '' + config.key
|
|
594
|
+
}
|
|
595
|
+
self = config.__self === void 0 ? null : config.__self
|
|
596
|
+
source = config.__source === void 0 ? null : config.__source
|
|
597
|
+
for (propName in config) {
|
|
598
|
+
if (
|
|
599
|
+
hasOwnProperty.call(config, propName) &&
|
|
600
|
+
!RESERVED_PROPS.hasOwnProperty(propName)
|
|
601
|
+
) {
|
|
602
|
+
props[propName] = config[propName]
|
|
603
|
+
}
|
|
542
604
|
}
|
|
543
605
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
defineRefPropWarningGetter(props, displayName);
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
557
|
-
}
|
|
558
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
559
|
-
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
560
|
-
return newElement;
|
|
561
|
-
}
|
|
562
|
-
function cloneElement(element, config, children) {
|
|
563
|
-
if (element === null || element === void 0) {
|
|
564
|
-
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
|
|
565
|
-
}
|
|
566
|
-
var propName;
|
|
567
|
-
var props = assign({}, element.props);
|
|
568
|
-
var key = element.key;
|
|
569
|
-
var ref = element.ref;
|
|
570
|
-
var self = element._self;
|
|
571
|
-
var source = element._source;
|
|
572
|
-
var owner = element._owner;
|
|
573
|
-
if (config != null) {
|
|
574
|
-
if (hasValidRef(config)) {
|
|
575
|
-
ref = config.ref;
|
|
576
|
-
owner = ReactCurrentOwner.current;
|
|
577
|
-
}
|
|
578
|
-
if (hasValidKey(config)) {
|
|
606
|
+
var childrenLength = arguments.length - 2
|
|
607
|
+
if (childrenLength === 1) {
|
|
608
|
+
props.children = children
|
|
609
|
+
} else if (childrenLength > 1) {
|
|
610
|
+
var childArray = Array(childrenLength)
|
|
611
|
+
for (var i = 0; i < childrenLength; i++) {
|
|
612
|
+
childArray[i] = arguments[i + 2]
|
|
613
|
+
}
|
|
579
614
|
{
|
|
580
|
-
|
|
615
|
+
if (Object.freeze) {
|
|
616
|
+
Object.freeze(childArray)
|
|
617
|
+
}
|
|
581
618
|
}
|
|
582
|
-
|
|
619
|
+
props.children = childArray
|
|
583
620
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
590
|
-
if (config[propName] === void 0 && defaultProps !== void 0) {
|
|
591
|
-
props[propName] = defaultProps[propName];
|
|
592
|
-
} else {
|
|
593
|
-
props[propName] = config[propName];
|
|
621
|
+
if (type && type.defaultProps) {
|
|
622
|
+
var defaultProps = type.defaultProps
|
|
623
|
+
for (propName in defaultProps) {
|
|
624
|
+
if (props[propName] === void 0) {
|
|
625
|
+
props[propName] = defaultProps[propName]
|
|
594
626
|
}
|
|
595
627
|
}
|
|
596
628
|
}
|
|
597
|
-
}
|
|
598
|
-
var childrenLength = arguments.length - 2;
|
|
599
|
-
if (childrenLength === 1) {
|
|
600
|
-
props.children = children;
|
|
601
|
-
} else if (childrenLength > 1) {
|
|
602
|
-
var childArray = Array(childrenLength);
|
|
603
|
-
for (var i = 0; i < childrenLength; i++) {
|
|
604
|
-
childArray[i] = arguments[i + 2];
|
|
605
|
-
}
|
|
606
|
-
props.children = childArray;
|
|
607
|
-
}
|
|
608
|
-
return ReactElement(element.type, key, ref, self, source, owner, props);
|
|
609
|
-
}
|
|
610
|
-
function isValidElement(object) {
|
|
611
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
612
|
-
}
|
|
613
|
-
var SEPARATOR = ".";
|
|
614
|
-
var SUBSEPARATOR = ":";
|
|
615
|
-
function escape(key) {
|
|
616
|
-
var escapeRegex = /[=:]/g;
|
|
617
|
-
var escaperLookup = {
|
|
618
|
-
"=": "=0",
|
|
619
|
-
":": "=2"
|
|
620
|
-
};
|
|
621
|
-
var escapedString = key.replace(escapeRegex, function(match) {
|
|
622
|
-
return escaperLookup[match];
|
|
623
|
-
});
|
|
624
|
-
return "$" + escapedString;
|
|
625
|
-
}
|
|
626
|
-
var didWarnAboutMaps = false;
|
|
627
|
-
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
628
|
-
function escapeUserProvidedKey(text) {
|
|
629
|
-
return text.replace(userProvidedKeyEscapeRegex, "$&/");
|
|
630
|
-
}
|
|
631
|
-
function getElementKey(element, index) {
|
|
632
|
-
if (typeof element === "object" && element !== null && element.key != null) {
|
|
633
629
|
{
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}
|
|
645
|
-
var invokeCallback = false;
|
|
646
|
-
if (children === null) {
|
|
647
|
-
invokeCallback = true;
|
|
648
|
-
} else {
|
|
649
|
-
switch (type) {
|
|
650
|
-
case "string":
|
|
651
|
-
case "number":
|
|
652
|
-
invokeCallback = true;
|
|
653
|
-
break;
|
|
654
|
-
case "object":
|
|
655
|
-
switch (children.$$typeof) {
|
|
656
|
-
case REACT_ELEMENT_TYPE:
|
|
657
|
-
case REACT_PORTAL_TYPE:
|
|
658
|
-
invokeCallback = true;
|
|
630
|
+
if (key || ref) {
|
|
631
|
+
var displayName =
|
|
632
|
+
typeof type === 'function'
|
|
633
|
+
? type.displayName || type.name || 'Unknown'
|
|
634
|
+
: type
|
|
635
|
+
if (key) {
|
|
636
|
+
defineKeyPropWarningGetter(props, displayName)
|
|
637
|
+
}
|
|
638
|
+
if (ref) {
|
|
639
|
+
defineRefPropWarningGetter(props, displayName)
|
|
659
640
|
}
|
|
641
|
+
}
|
|
660
642
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
643
|
+
return ReactElement(
|
|
644
|
+
type,
|
|
645
|
+
key,
|
|
646
|
+
ref,
|
|
647
|
+
self,
|
|
648
|
+
source,
|
|
649
|
+
ReactCurrentOwner.current,
|
|
650
|
+
props
|
|
651
|
+
)
|
|
652
|
+
}
|
|
653
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
654
|
+
var newElement = ReactElement(
|
|
655
|
+
oldElement.type,
|
|
656
|
+
newKey,
|
|
657
|
+
oldElement.ref,
|
|
658
|
+
oldElement._self,
|
|
659
|
+
oldElement._source,
|
|
660
|
+
oldElement._owner,
|
|
661
|
+
oldElement.props
|
|
662
|
+
)
|
|
663
|
+
return newElement
|
|
664
|
+
}
|
|
665
|
+
function cloneElement(element, config, children) {
|
|
666
|
+
if (element === null || element === void 0) {
|
|
667
|
+
throw new Error(
|
|
668
|
+
'React.cloneElement(...): The argument must be a React element, but you passed ' +
|
|
669
|
+
element +
|
|
670
|
+
'.'
|
|
671
|
+
)
|
|
672
|
+
}
|
|
673
|
+
var propName
|
|
674
|
+
var props = assign({}, element.props)
|
|
675
|
+
var key = element.key
|
|
676
|
+
var ref = element.ref
|
|
677
|
+
var self = element._self
|
|
678
|
+
var source = element._source
|
|
679
|
+
var owner = element._owner
|
|
680
|
+
if (config != null) {
|
|
681
|
+
if (hasValidRef(config)) {
|
|
682
|
+
ref = config.ref
|
|
683
|
+
owner = ReactCurrentOwner.current
|
|
684
|
+
}
|
|
685
|
+
if (hasValidKey(config)) {
|
|
676
686
|
{
|
|
677
|
-
|
|
678
|
-
|
|
687
|
+
checkKeyStringCoercion(config.key)
|
|
688
|
+
}
|
|
689
|
+
key = '' + config.key
|
|
690
|
+
}
|
|
691
|
+
var defaultProps
|
|
692
|
+
if (element.type && element.type.defaultProps) {
|
|
693
|
+
defaultProps = element.type.defaultProps
|
|
694
|
+
}
|
|
695
|
+
for (propName in config) {
|
|
696
|
+
if (
|
|
697
|
+
hasOwnProperty.call(config, propName) &&
|
|
698
|
+
!RESERVED_PROPS.hasOwnProperty(propName)
|
|
699
|
+
) {
|
|
700
|
+
if (config[propName] === void 0 && defaultProps !== void 0) {
|
|
701
|
+
props[propName] = defaultProps[propName]
|
|
702
|
+
} else {
|
|
703
|
+
props[propName] = config[propName]
|
|
679
704
|
}
|
|
680
705
|
}
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
var childrenLength = arguments.length - 2
|
|
709
|
+
if (childrenLength === 1) {
|
|
710
|
+
props.children = children
|
|
711
|
+
} else if (childrenLength > 1) {
|
|
712
|
+
var childArray = Array(childrenLength)
|
|
713
|
+
for (var i = 0; i < childrenLength; i++) {
|
|
714
|
+
childArray[i] = arguments[i + 2]
|
|
715
|
+
}
|
|
716
|
+
props.children = childArray
|
|
717
|
+
}
|
|
718
|
+
return ReactElement(element.type, key, ref, self, source, owner, props)
|
|
719
|
+
}
|
|
720
|
+
function isValidElement(object) {
|
|
721
|
+
return (
|
|
722
|
+
typeof object === 'object' &&
|
|
723
|
+
object !== null &&
|
|
724
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
725
|
+
)
|
|
726
|
+
}
|
|
727
|
+
var SEPARATOR = '.'
|
|
728
|
+
var SUBSEPARATOR = ':'
|
|
729
|
+
function escape(key) {
|
|
730
|
+
var escapeRegex = /[=:]/g
|
|
731
|
+
var escaperLookup = {
|
|
732
|
+
'=': '=0',
|
|
733
|
+
':': '=2',
|
|
734
|
+
}
|
|
735
|
+
var escapedString = key.replace(escapeRegex, function (match) {
|
|
736
|
+
return escaperLookup[match]
|
|
737
|
+
})
|
|
738
|
+
return '$' + escapedString
|
|
739
|
+
}
|
|
740
|
+
var didWarnAboutMaps = false
|
|
741
|
+
var userProvidedKeyEscapeRegex = /\/+/g
|
|
742
|
+
function escapeUserProvidedKey(text) {
|
|
743
|
+
return text.replace(userProvidedKeyEscapeRegex, '$&/')
|
|
744
|
+
}
|
|
745
|
+
function getElementKey(element, index) {
|
|
746
|
+
if (typeof element === 'object' && element !== null && element.key != null) {
|
|
711
747
|
{
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
748
|
+
checkKeyStringCoercion(element.key)
|
|
749
|
+
}
|
|
750
|
+
return escape('' + element.key)
|
|
751
|
+
}
|
|
752
|
+
return index.toString(36)
|
|
753
|
+
}
|
|
754
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
755
|
+
var type = typeof children
|
|
756
|
+
if (type === 'undefined' || type === 'boolean') {
|
|
757
|
+
children = null
|
|
758
|
+
}
|
|
759
|
+
var invokeCallback = false
|
|
760
|
+
if (children === null) {
|
|
761
|
+
invokeCallback = true
|
|
762
|
+
} else {
|
|
763
|
+
switch (type) {
|
|
764
|
+
case 'string':
|
|
765
|
+
case 'number':
|
|
766
|
+
invokeCallback = true
|
|
767
|
+
break
|
|
768
|
+
case 'object':
|
|
769
|
+
switch (children.$$typeof) {
|
|
770
|
+
case REACT_ELEMENT_TYPE:
|
|
771
|
+
case REACT_PORTAL_TYPE:
|
|
772
|
+
invokeCallback = true
|
|
715
773
|
}
|
|
716
|
-
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
if (invokeCallback) {
|
|
777
|
+
var _child = children
|
|
778
|
+
var mappedChild = callback(_child)
|
|
779
|
+
var childKey =
|
|
780
|
+
nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar
|
|
781
|
+
if (isArray(mappedChild)) {
|
|
782
|
+
var escapedChildKey = ''
|
|
783
|
+
if (childKey != null) {
|
|
784
|
+
escapedChildKey = escapeUserProvidedKey(childKey) + '/'
|
|
717
785
|
}
|
|
786
|
+
mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
|
|
787
|
+
return c
|
|
788
|
+
})
|
|
789
|
+
} else if (mappedChild != null) {
|
|
790
|
+
if (isValidElement(mappedChild)) {
|
|
791
|
+
{
|
|
792
|
+
if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
|
|
793
|
+
checkKeyStringCoercion(mappedChild.key)
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
mappedChild = cloneAndReplaceKey(
|
|
797
|
+
mappedChild,
|
|
798
|
+
// Keep both the (mapped) and old keys if they differ, just as
|
|
799
|
+
// traverseAllChildren used to do for objects as children
|
|
800
|
+
escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
801
|
+
(mappedChild.key && (!_child || _child.key !== mappedChild.key)
|
|
802
|
+
? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
|
803
|
+
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
804
|
+
escapeUserProvidedKey('' + mappedChild.key) + '/'
|
|
805
|
+
: '') +
|
|
806
|
+
childKey
|
|
807
|
+
)
|
|
808
|
+
}
|
|
809
|
+
array.push(mappedChild)
|
|
718
810
|
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
});
|
|
750
|
-
return n;
|
|
751
|
-
}
|
|
752
|
-
function forEachChildren(children, forEachFunc, forEachContext) {
|
|
753
|
-
mapChildren(children, function() {
|
|
754
|
-
forEachFunc.apply(this, arguments);
|
|
755
|
-
}, forEachContext);
|
|
756
|
-
}
|
|
757
|
-
function toArray(children) {
|
|
758
|
-
return mapChildren(children, function(child) {
|
|
759
|
-
return child;
|
|
760
|
-
}) || [];
|
|
761
|
-
}
|
|
762
|
-
function onlyChild(children) {
|
|
763
|
-
if (!isValidElement(children)) {
|
|
764
|
-
throw new Error("React.Children.only expected to receive a single React element child.");
|
|
765
|
-
}
|
|
766
|
-
return children;
|
|
767
|
-
}
|
|
768
|
-
function createContext(defaultValue) {
|
|
769
|
-
var context = {
|
|
770
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
771
|
-
// As a workaround to support multiple concurrent renderers, we categorize
|
|
772
|
-
// some renderers as primary and others as secondary. We only expect
|
|
773
|
-
// there to be two concurrent renderers at most: React Native (primary) and
|
|
774
|
-
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
775
|
-
// Secondary renderers store their context values on separate fields.
|
|
776
|
-
_currentValue: defaultValue,
|
|
777
|
-
_currentValue2: defaultValue,
|
|
778
|
-
// Used to track how many concurrent renderers this context currently
|
|
779
|
-
// supports within in a single renderer. Such as parallel server rendering.
|
|
780
|
-
_threadCount: 0,
|
|
781
|
-
// These are circular
|
|
782
|
-
Provider: null,
|
|
783
|
-
Consumer: null,
|
|
784
|
-
// Add these to use same hidden class in VM as ServerContext
|
|
785
|
-
_defaultValue: null,
|
|
786
|
-
_globalName: null
|
|
787
|
-
};
|
|
788
|
-
context.Provider = {
|
|
789
|
-
$$typeof: REACT_PROVIDER_TYPE,
|
|
790
|
-
_context: context
|
|
791
|
-
};
|
|
792
|
-
var hasWarnedAboutUsingNestedContextConsumers = false;
|
|
793
|
-
var hasWarnedAboutUsingConsumerProvider = false;
|
|
794
|
-
var hasWarnedAboutDisplayNameOnConsumer = false;
|
|
795
|
-
{
|
|
796
|
-
var Consumer = {
|
|
797
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
798
|
-
_context: context
|
|
799
|
-
};
|
|
800
|
-
Object.defineProperties(Consumer, {
|
|
801
|
-
Provider: {
|
|
802
|
-
get: function() {
|
|
803
|
-
if (!hasWarnedAboutUsingConsumerProvider) {
|
|
804
|
-
hasWarnedAboutUsingConsumerProvider = true;
|
|
805
|
-
error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
|
|
811
|
+
return 1
|
|
812
|
+
}
|
|
813
|
+
var child
|
|
814
|
+
var nextName
|
|
815
|
+
var subtreeCount = 0
|
|
816
|
+
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR
|
|
817
|
+
if (isArray(children)) {
|
|
818
|
+
for (var i = 0; i < children.length; i++) {
|
|
819
|
+
child = children[i]
|
|
820
|
+
nextName = nextNamePrefix + getElementKey(child, i)
|
|
821
|
+
subtreeCount += mapIntoArray(
|
|
822
|
+
child,
|
|
823
|
+
array,
|
|
824
|
+
escapedPrefix,
|
|
825
|
+
nextName,
|
|
826
|
+
callback
|
|
827
|
+
)
|
|
828
|
+
}
|
|
829
|
+
} else {
|
|
830
|
+
var iteratorFn = getIteratorFn(children)
|
|
831
|
+
if (typeof iteratorFn === 'function') {
|
|
832
|
+
var iterableChildren = children
|
|
833
|
+
{
|
|
834
|
+
if (iteratorFn === iterableChildren.entries) {
|
|
835
|
+
if (!didWarnAboutMaps) {
|
|
836
|
+
warn(
|
|
837
|
+
'Using Maps as children is not supported. Use an array of keyed ReactElements instead.'
|
|
838
|
+
)
|
|
839
|
+
}
|
|
840
|
+
didWarnAboutMaps = true
|
|
806
841
|
}
|
|
807
|
-
return context.Provider;
|
|
808
|
-
},
|
|
809
|
-
set: function(_Provider) {
|
|
810
|
-
context.Provider = _Provider;
|
|
811
842
|
}
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
843
|
+
var iterator = iteratorFn.call(iterableChildren)
|
|
844
|
+
var step
|
|
845
|
+
var ii = 0
|
|
846
|
+
while (!(step = iterator.next()).done) {
|
|
847
|
+
child = step.value
|
|
848
|
+
nextName = nextNamePrefix + getElementKey(child, ii++)
|
|
849
|
+
subtreeCount += mapIntoArray(
|
|
850
|
+
child,
|
|
851
|
+
array,
|
|
852
|
+
escapedPrefix,
|
|
853
|
+
nextName,
|
|
854
|
+
callback
|
|
855
|
+
)
|
|
819
856
|
}
|
|
857
|
+
} else if (type === 'object') {
|
|
858
|
+
var childrenString = String(children)
|
|
859
|
+
throw new Error(
|
|
860
|
+
'Objects are not valid as a React child (found: ' +
|
|
861
|
+
(childrenString === '[object Object]'
|
|
862
|
+
? 'object with keys {' + Object.keys(children).join(', ') + '}'
|
|
863
|
+
: childrenString) +
|
|
864
|
+
'). If you meant to render a collection of children, use an array instead.'
|
|
865
|
+
)
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
return subtreeCount
|
|
869
|
+
}
|
|
870
|
+
function mapChildren(children, func, context) {
|
|
871
|
+
if (children == null) {
|
|
872
|
+
return children
|
|
873
|
+
}
|
|
874
|
+
var result = []
|
|
875
|
+
var count = 0
|
|
876
|
+
mapIntoArray(children, result, '', '', function (child) {
|
|
877
|
+
return func.call(context, child, count++)
|
|
878
|
+
})
|
|
879
|
+
return result
|
|
880
|
+
}
|
|
881
|
+
function countChildren(children) {
|
|
882
|
+
var n = 0
|
|
883
|
+
mapChildren(children, function () {
|
|
884
|
+
n++
|
|
885
|
+
})
|
|
886
|
+
return n
|
|
887
|
+
}
|
|
888
|
+
function forEachChildren(children, forEachFunc, forEachContext) {
|
|
889
|
+
mapChildren(
|
|
890
|
+
children,
|
|
891
|
+
function () {
|
|
892
|
+
forEachFunc.apply(this, arguments)
|
|
820
893
|
},
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
894
|
+
forEachContext
|
|
895
|
+
)
|
|
896
|
+
}
|
|
897
|
+
function toArray(children) {
|
|
898
|
+
return (
|
|
899
|
+
mapChildren(children, function (child) {
|
|
900
|
+
return child
|
|
901
|
+
}) || []
|
|
902
|
+
)
|
|
903
|
+
}
|
|
904
|
+
function onlyChild(children) {
|
|
905
|
+
if (!isValidElement(children)) {
|
|
906
|
+
throw new Error(
|
|
907
|
+
'React.Children.only expected to receive a single React element child.'
|
|
908
|
+
)
|
|
909
|
+
}
|
|
910
|
+
return children
|
|
911
|
+
}
|
|
912
|
+
function createContext(defaultValue) {
|
|
913
|
+
var context = {
|
|
914
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
915
|
+
// As a workaround to support multiple concurrent renderers, we categorize
|
|
916
|
+
// some renderers as primary and others as secondary. We only expect
|
|
917
|
+
// there to be two concurrent renderers at most: React Native (primary) and
|
|
918
|
+
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
919
|
+
// Secondary renderers store their context values on separate fields.
|
|
920
|
+
_currentValue: defaultValue,
|
|
921
|
+
_currentValue2: defaultValue,
|
|
922
|
+
// Used to track how many concurrent renderers this context currently
|
|
923
|
+
// supports within in a single renderer. Such as parallel server rendering.
|
|
924
|
+
_threadCount: 0,
|
|
925
|
+
// These are circular
|
|
926
|
+
Provider: null,
|
|
927
|
+
Consumer: null,
|
|
928
|
+
// Add these to use same hidden class in VM as ServerContext
|
|
929
|
+
_defaultValue: null,
|
|
930
|
+
_globalName: null,
|
|
931
|
+
}
|
|
932
|
+
context.Provider = {
|
|
933
|
+
$$typeof: REACT_PROVIDER_TYPE,
|
|
934
|
+
_context: context,
|
|
935
|
+
}
|
|
936
|
+
var hasWarnedAboutUsingNestedContextConsumers = false
|
|
937
|
+
var hasWarnedAboutUsingConsumerProvider = false
|
|
938
|
+
var hasWarnedAboutDisplayNameOnConsumer = false
|
|
939
|
+
{
|
|
940
|
+
var Consumer = {
|
|
941
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
942
|
+
_context: context,
|
|
943
|
+
}
|
|
944
|
+
Object.defineProperties(Consumer, {
|
|
945
|
+
Provider: {
|
|
946
|
+
get: function () {
|
|
947
|
+
if (!hasWarnedAboutUsingConsumerProvider) {
|
|
948
|
+
hasWarnedAboutUsingConsumerProvider = true
|
|
949
|
+
error(
|
|
950
|
+
'Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?'
|
|
951
|
+
)
|
|
952
|
+
}
|
|
953
|
+
return context.Provider
|
|
954
|
+
},
|
|
955
|
+
set: function (_Provider) {
|
|
956
|
+
context.Provider = _Provider
|
|
957
|
+
},
|
|
824
958
|
},
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
959
|
+
_currentValue: {
|
|
960
|
+
get: function () {
|
|
961
|
+
return context._currentValue
|
|
962
|
+
},
|
|
963
|
+
set: function (_currentValue) {
|
|
964
|
+
context._currentValue = _currentValue
|
|
965
|
+
},
|
|
832
966
|
},
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
967
|
+
_currentValue2: {
|
|
968
|
+
get: function () {
|
|
969
|
+
return context._currentValue2
|
|
970
|
+
},
|
|
971
|
+
set: function (_currentValue2) {
|
|
972
|
+
context._currentValue2 = _currentValue2
|
|
973
|
+
},
|
|
974
|
+
},
|
|
975
|
+
_threadCount: {
|
|
976
|
+
get: function () {
|
|
977
|
+
return context._threadCount
|
|
978
|
+
},
|
|
979
|
+
set: function (_threadCount) {
|
|
980
|
+
context._threadCount = _threadCount
|
|
981
|
+
},
|
|
982
|
+
},
|
|
983
|
+
Consumer: {
|
|
984
|
+
get: function () {
|
|
985
|
+
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
|
986
|
+
hasWarnedAboutUsingNestedContextConsumers = true
|
|
987
|
+
error(
|
|
988
|
+
'Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?'
|
|
989
|
+
)
|
|
990
|
+
}
|
|
991
|
+
return context.Consumer
|
|
992
|
+
},
|
|
993
|
+
},
|
|
994
|
+
displayName: {
|
|
995
|
+
get: function () {
|
|
996
|
+
return context.displayName
|
|
997
|
+
},
|
|
998
|
+
set: function (displayName) {
|
|
999
|
+
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
|
1000
|
+
warn(
|
|
1001
|
+
"Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",
|
|
1002
|
+
displayName
|
|
1003
|
+
)
|
|
1004
|
+
hasWarnedAboutDisplayNameOnConsumer = true
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
},
|
|
1008
|
+
})
|
|
1009
|
+
context.Consumer = Consumer
|
|
1010
|
+
}
|
|
1011
|
+
{
|
|
1012
|
+
context._currentRenderer = null
|
|
1013
|
+
context._currentRenderer2 = null
|
|
1014
|
+
}
|
|
1015
|
+
return context
|
|
1016
|
+
}
|
|
1017
|
+
var Uninitialized = -1
|
|
1018
|
+
var Pending = 0
|
|
1019
|
+
var Resolved = 1
|
|
1020
|
+
var Rejected = 2
|
|
1021
|
+
function lazyInitializer(payload) {
|
|
1022
|
+
if (payload._status === Uninitialized) {
|
|
1023
|
+
var ctor = payload._result
|
|
1024
|
+
var thenable = ctor()
|
|
1025
|
+
thenable.then(
|
|
1026
|
+
function (moduleObject2) {
|
|
1027
|
+
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
1028
|
+
var resolved = payload
|
|
1029
|
+
resolved._status = Resolved
|
|
1030
|
+
resolved._result = moduleObject2
|
|
842
1031
|
}
|
|
843
|
-
return context.Consumer;
|
|
844
|
-
}
|
|
845
|
-
},
|
|
846
|
-
displayName: {
|
|
847
|
-
get: function() {
|
|
848
|
-
return context.displayName;
|
|
849
1032
|
},
|
|
850
|
-
|
|
851
|
-
if (
|
|
852
|
-
|
|
853
|
-
|
|
1033
|
+
function (error2) {
|
|
1034
|
+
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
1035
|
+
var rejected = payload
|
|
1036
|
+
rejected._status = Rejected
|
|
1037
|
+
rejected._result = error2
|
|
854
1038
|
}
|
|
855
1039
|
}
|
|
1040
|
+
)
|
|
1041
|
+
if (payload._status === Uninitialized) {
|
|
1042
|
+
var pending = payload
|
|
1043
|
+
pending._status = Pending
|
|
1044
|
+
pending._result = thenable
|
|
856
1045
|
}
|
|
857
|
-
}
|
|
858
|
-
|
|
1046
|
+
}
|
|
1047
|
+
if (payload._status === Resolved) {
|
|
1048
|
+
var moduleObject = payload._result
|
|
1049
|
+
{
|
|
1050
|
+
if (moduleObject === void 0) {
|
|
1051
|
+
error(
|
|
1052
|
+
"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?",
|
|
1053
|
+
moduleObject
|
|
1054
|
+
)
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
{
|
|
1058
|
+
if (!('default' in moduleObject)) {
|
|
1059
|
+
error(
|
|
1060
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
1061
|
+
moduleObject
|
|
1062
|
+
)
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
return moduleObject.default
|
|
1066
|
+
} else {
|
|
1067
|
+
throw payload._result
|
|
1068
|
+
}
|
|
859
1069
|
}
|
|
860
|
-
{
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
}
|
|
866
|
-
var Uninitialized = -1;
|
|
867
|
-
var Pending = 0;
|
|
868
|
-
var Resolved = 1;
|
|
869
|
-
var Rejected = 2;
|
|
870
|
-
function lazyInitializer(payload) {
|
|
871
|
-
if (payload._status === Uninitialized) {
|
|
872
|
-
var ctor = payload._result;
|
|
873
|
-
var thenable = ctor();
|
|
874
|
-
thenable.then(function(moduleObject2) {
|
|
875
|
-
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
876
|
-
var resolved = payload;
|
|
877
|
-
resolved._status = Resolved;
|
|
878
|
-
resolved._result = moduleObject2;
|
|
879
|
-
}
|
|
880
|
-
}, function(error2) {
|
|
881
|
-
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
882
|
-
var rejected = payload;
|
|
883
|
-
rejected._status = Rejected;
|
|
884
|
-
rejected._result = error2;
|
|
885
|
-
}
|
|
886
|
-
});
|
|
887
|
-
if (payload._status === Uninitialized) {
|
|
888
|
-
var pending = payload;
|
|
889
|
-
pending._status = Pending;
|
|
890
|
-
pending._result = thenable;
|
|
1070
|
+
function lazy(ctor) {
|
|
1071
|
+
var payload = {
|
|
1072
|
+
// We use these fields to store the result.
|
|
1073
|
+
_status: Uninitialized,
|
|
1074
|
+
_result: ctor,
|
|
891
1075
|
}
|
|
1076
|
+
var lazyType = {
|
|
1077
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
1078
|
+
_payload: payload,
|
|
1079
|
+
_init: lazyInitializer,
|
|
1080
|
+
}
|
|
1081
|
+
{
|
|
1082
|
+
var defaultProps
|
|
1083
|
+
var propTypes
|
|
1084
|
+
Object.defineProperties(lazyType, {
|
|
1085
|
+
defaultProps: {
|
|
1086
|
+
configurable: true,
|
|
1087
|
+
get: function () {
|
|
1088
|
+
return defaultProps
|
|
1089
|
+
},
|
|
1090
|
+
set: function (newDefaultProps) {
|
|
1091
|
+
error(
|
|
1092
|
+
'React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.'
|
|
1093
|
+
)
|
|
1094
|
+
defaultProps = newDefaultProps
|
|
1095
|
+
Object.defineProperty(lazyType, 'defaultProps', {
|
|
1096
|
+
enumerable: true,
|
|
1097
|
+
})
|
|
1098
|
+
},
|
|
1099
|
+
},
|
|
1100
|
+
propTypes: {
|
|
1101
|
+
configurable: true,
|
|
1102
|
+
get: function () {
|
|
1103
|
+
return propTypes
|
|
1104
|
+
},
|
|
1105
|
+
set: function (newPropTypes) {
|
|
1106
|
+
error(
|
|
1107
|
+
'React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.'
|
|
1108
|
+
)
|
|
1109
|
+
propTypes = newPropTypes
|
|
1110
|
+
Object.defineProperty(lazyType, 'propTypes', {
|
|
1111
|
+
enumerable: true,
|
|
1112
|
+
})
|
|
1113
|
+
},
|
|
1114
|
+
},
|
|
1115
|
+
})
|
|
1116
|
+
}
|
|
1117
|
+
return lazyType
|
|
892
1118
|
}
|
|
893
|
-
|
|
894
|
-
var moduleObject = payload._result;
|
|
1119
|
+
function forwardRef(render) {
|
|
895
1120
|
{
|
|
896
|
-
if (
|
|
897
|
-
error(
|
|
1121
|
+
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
|
1122
|
+
error(
|
|
1123
|
+
'forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).'
|
|
1124
|
+
)
|
|
1125
|
+
} else if (typeof render !== 'function') {
|
|
1126
|
+
error(
|
|
1127
|
+
'forwardRef requires a render function but was given %s.',
|
|
1128
|
+
render === null ? 'null' : typeof render
|
|
1129
|
+
)
|
|
1130
|
+
} else {
|
|
1131
|
+
if (render.length !== 0 && render.length !== 2) {
|
|
1132
|
+
error(
|
|
1133
|
+
'forwardRef render functions accept exactly two parameters: props and ref. %s',
|
|
1134
|
+
render.length === 1
|
|
1135
|
+
? 'Did you forget to use the ref parameter?'
|
|
1136
|
+
: 'Any additional parameter will be undefined.'
|
|
1137
|
+
)
|
|
1138
|
+
}
|
|
898
1139
|
}
|
|
1140
|
+
if (render != null) {
|
|
1141
|
+
if (render.defaultProps != null || render.propTypes != null) {
|
|
1142
|
+
error(
|
|
1143
|
+
'forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?'
|
|
1144
|
+
)
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
var elementType = {
|
|
1149
|
+
$$typeof: REACT_FORWARD_REF_TYPE,
|
|
1150
|
+
render,
|
|
899
1151
|
}
|
|
900
1152
|
{
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
}
|
|
905
|
-
return moduleObject.default;
|
|
906
|
-
} else {
|
|
907
|
-
throw payload._result;
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
function lazy(ctor) {
|
|
911
|
-
var payload = {
|
|
912
|
-
// We use these fields to store the result.
|
|
913
|
-
_status: Uninitialized,
|
|
914
|
-
_result: ctor
|
|
915
|
-
};
|
|
916
|
-
var lazyType = {
|
|
917
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
918
|
-
_payload: payload,
|
|
919
|
-
_init: lazyInitializer
|
|
920
|
-
};
|
|
921
|
-
{
|
|
922
|
-
var defaultProps;
|
|
923
|
-
var propTypes;
|
|
924
|
-
Object.defineProperties(lazyType, {
|
|
925
|
-
defaultProps: {
|
|
1153
|
+
var ownName
|
|
1154
|
+
Object.defineProperty(elementType, 'displayName', {
|
|
1155
|
+
enumerable: false,
|
|
926
1156
|
configurable: true,
|
|
927
|
-
get: function() {
|
|
928
|
-
return
|
|
1157
|
+
get: function () {
|
|
1158
|
+
return ownName
|
|
929
1159
|
},
|
|
930
|
-
set: function(
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
},
|
|
938
|
-
propTypes: {
|
|
939
|
-
configurable: true,
|
|
940
|
-
get: function() {
|
|
941
|
-
return propTypes;
|
|
1160
|
+
set: function (name) {
|
|
1161
|
+
ownName = name
|
|
1162
|
+
if (!render.name && !render.displayName) {
|
|
1163
|
+
render.displayName = name
|
|
1164
|
+
}
|
|
942
1165
|
},
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
Object.defineProperty(lazyType, "propTypes", {
|
|
947
|
-
enumerable: true
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
});
|
|
1166
|
+
})
|
|
1167
|
+
}
|
|
1168
|
+
return elementType
|
|
952
1169
|
}
|
|
953
|
-
|
|
954
|
-
}
|
|
955
|
-
function forwardRef(render) {
|
|
1170
|
+
var REACT_MODULE_REFERENCE
|
|
956
1171
|
{
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1172
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference')
|
|
1173
|
+
}
|
|
1174
|
+
function isValidElementType(type) {
|
|
1175
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
1176
|
+
return true
|
|
1177
|
+
}
|
|
1178
|
+
if (
|
|
1179
|
+
type === REACT_FRAGMENT_TYPE ||
|
|
1180
|
+
type === REACT_PROFILER_TYPE ||
|
|
1181
|
+
enableDebugTracing ||
|
|
1182
|
+
type === REACT_STRICT_MODE_TYPE ||
|
|
1183
|
+
type === REACT_SUSPENSE_TYPE ||
|
|
1184
|
+
type === REACT_SUSPENSE_LIST_TYPE ||
|
|
1185
|
+
enableLegacyHidden ||
|
|
1186
|
+
type === REACT_OFFSCREEN_TYPE ||
|
|
1187
|
+
enableScopeAPI ||
|
|
1188
|
+
enableCacheElement ||
|
|
1189
|
+
enableTransitionTracing
|
|
1190
|
+
) {
|
|
1191
|
+
return true
|
|
1192
|
+
}
|
|
1193
|
+
if (typeof type === 'object' && type !== null) {
|
|
1194
|
+
if (
|
|
1195
|
+
type.$$typeof === REACT_LAZY_TYPE ||
|
|
1196
|
+
type.$$typeof === REACT_MEMO_TYPE ||
|
|
1197
|
+
type.$$typeof === REACT_PROVIDER_TYPE ||
|
|
1198
|
+
type.$$typeof === REACT_CONTEXT_TYPE ||
|
|
1199
|
+
type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
1200
|
+
// types supported by any Flight configuration anywhere since
|
|
1201
|
+
// we don't know which Flight build this will end up being used
|
|
1202
|
+
// with.
|
|
1203
|
+
type.$$typeof === REACT_MODULE_REFERENCE ||
|
|
1204
|
+
type.getModuleId !== void 0
|
|
1205
|
+
) {
|
|
1206
|
+
return true
|
|
964
1207
|
}
|
|
965
1208
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1209
|
+
return false
|
|
1210
|
+
}
|
|
1211
|
+
function memo(type, compare) {
|
|
1212
|
+
{
|
|
1213
|
+
if (!isValidElementType(type)) {
|
|
1214
|
+
error(
|
|
1215
|
+
'memo: The first argument must be a component. Instead received: %s',
|
|
1216
|
+
type === null ? 'null' : typeof type
|
|
1217
|
+
)
|
|
969
1218
|
}
|
|
970
1219
|
}
|
|
1220
|
+
var elementType = {
|
|
1221
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
1222
|
+
type,
|
|
1223
|
+
compare: compare === void 0 ? null : compare,
|
|
1224
|
+
}
|
|
1225
|
+
{
|
|
1226
|
+
var ownName
|
|
1227
|
+
Object.defineProperty(elementType, 'displayName', {
|
|
1228
|
+
enumerable: false,
|
|
1229
|
+
configurable: true,
|
|
1230
|
+
get: function () {
|
|
1231
|
+
return ownName
|
|
1232
|
+
},
|
|
1233
|
+
set: function (name) {
|
|
1234
|
+
ownName = name
|
|
1235
|
+
if (!type.name && !type.displayName) {
|
|
1236
|
+
type.displayName = name
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
})
|
|
1240
|
+
}
|
|
1241
|
+
return elementType
|
|
971
1242
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
enumerable: false,
|
|
980
|
-
configurable: true,
|
|
981
|
-
get: function() {
|
|
982
|
-
return ownName;
|
|
983
|
-
},
|
|
984
|
-
set: function(name) {
|
|
985
|
-
ownName = name;
|
|
986
|
-
if (!render.name && !render.displayName) {
|
|
987
|
-
render.displayName = name;
|
|
988
|
-
}
|
|
1243
|
+
function resolveDispatcher() {
|
|
1244
|
+
var dispatcher = ReactCurrentDispatcher.current
|
|
1245
|
+
{
|
|
1246
|
+
if (dispatcher === null) {
|
|
1247
|
+
error(
|
|
1248
|
+
'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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.'
|
|
1249
|
+
)
|
|
989
1250
|
}
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
return elementType;
|
|
993
|
-
}
|
|
994
|
-
var REACT_MODULE_REFERENCE;
|
|
995
|
-
{
|
|
996
|
-
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
997
|
-
}
|
|
998
|
-
function isValidElementType(type) {
|
|
999
|
-
if (typeof type === "string" || typeof type === "function") {
|
|
1000
|
-
return true;
|
|
1001
|
-
}
|
|
1002
|
-
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) {
|
|
1003
|
-
return true;
|
|
1004
|
-
}
|
|
1005
|
-
if (typeof type === "object" && type !== null) {
|
|
1006
|
-
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
|
|
1007
|
-
// types supported by any Flight configuration anywhere since
|
|
1008
|
-
// we don't know which Flight build this will end up being used
|
|
1009
|
-
// with.
|
|
1010
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
1011
|
-
return true;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
return false;
|
|
1015
|
-
}
|
|
1016
|
-
function memo(type, compare) {
|
|
1017
|
-
{
|
|
1018
|
-
if (!isValidElementType(type)) {
|
|
1019
|
-
error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
|
|
1020
1251
|
}
|
|
1252
|
+
return dispatcher
|
|
1021
1253
|
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
set: function(name) {
|
|
1036
|
-
ownName = name;
|
|
1037
|
-
if (!type.name && !type.displayName) {
|
|
1038
|
-
type.displayName = name;
|
|
1254
|
+
function useContext(Context) {
|
|
1255
|
+
var dispatcher = resolveDispatcher()
|
|
1256
|
+
{
|
|
1257
|
+
if (Context._context !== void 0) {
|
|
1258
|
+
var realContext = Context._context
|
|
1259
|
+
if (realContext.Consumer === Context) {
|
|
1260
|
+
error(
|
|
1261
|
+
'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?'
|
|
1262
|
+
)
|
|
1263
|
+
} else if (realContext.Provider === Context) {
|
|
1264
|
+
error(
|
|
1265
|
+
'Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?'
|
|
1266
|
+
)
|
|
1039
1267
|
}
|
|
1040
1268
|
}
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
return elementType;
|
|
1044
|
-
}
|
|
1045
|
-
function resolveDispatcher() {
|
|
1046
|
-
var dispatcher = ReactCurrentDispatcher.current;
|
|
1047
|
-
{
|
|
1048
|
-
if (dispatcher === null) {
|
|
1049
|
-
error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
|
|
1050
1269
|
}
|
|
1270
|
+
return dispatcher.useContext(Context)
|
|
1051
1271
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
{
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
var
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
var
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
configurable: true,
|
|
1149
|
-
enumerable: true,
|
|
1150
|
-
value: disabledLog,
|
|
1151
|
-
writable: true
|
|
1152
|
-
};
|
|
1153
|
-
Object.defineProperties(console, {
|
|
1154
|
-
info: props,
|
|
1155
|
-
log: props,
|
|
1156
|
-
warn: props,
|
|
1157
|
-
error: props,
|
|
1158
|
-
group: props,
|
|
1159
|
-
groupCollapsed: props,
|
|
1160
|
-
groupEnd: props
|
|
1161
|
-
});
|
|
1162
|
-
}
|
|
1163
|
-
disabledDepth++;
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
function reenableLogs() {
|
|
1167
|
-
{
|
|
1168
|
-
disabledDepth--;
|
|
1169
|
-
if (disabledDepth === 0) {
|
|
1170
|
-
var props = {
|
|
1171
|
-
configurable: true,
|
|
1172
|
-
enumerable: true,
|
|
1173
|
-
writable: true
|
|
1174
|
-
};
|
|
1175
|
-
Object.defineProperties(console, {
|
|
1176
|
-
log: assign({}, props, {
|
|
1177
|
-
value: prevLog
|
|
1178
|
-
}),
|
|
1179
|
-
info: assign({}, props, {
|
|
1180
|
-
value: prevInfo
|
|
1181
|
-
}),
|
|
1182
|
-
warn: assign({}, props, {
|
|
1183
|
-
value: prevWarn
|
|
1184
|
-
}),
|
|
1185
|
-
error: assign({}, props, {
|
|
1186
|
-
value: prevError
|
|
1187
|
-
}),
|
|
1188
|
-
group: assign({}, props, {
|
|
1189
|
-
value: prevGroup
|
|
1190
|
-
}),
|
|
1191
|
-
groupCollapsed: assign({}, props, {
|
|
1192
|
-
value: prevGroupCollapsed
|
|
1193
|
-
}),
|
|
1194
|
-
groupEnd: assign({}, props, {
|
|
1195
|
-
value: prevGroupEnd
|
|
1272
|
+
function useState(initialState) {
|
|
1273
|
+
var dispatcher = resolveDispatcher()
|
|
1274
|
+
return dispatcher.useState(initialState)
|
|
1275
|
+
}
|
|
1276
|
+
function useReducer(reducer, initialArg, init) {
|
|
1277
|
+
var dispatcher = resolveDispatcher()
|
|
1278
|
+
return dispatcher.useReducer(reducer, initialArg, init)
|
|
1279
|
+
}
|
|
1280
|
+
function useRef(initialValue) {
|
|
1281
|
+
var dispatcher = resolveDispatcher()
|
|
1282
|
+
return dispatcher.useRef(initialValue)
|
|
1283
|
+
}
|
|
1284
|
+
function useEffect(create, deps) {
|
|
1285
|
+
var dispatcher = resolveDispatcher()
|
|
1286
|
+
return dispatcher.useEffect(create, deps)
|
|
1287
|
+
}
|
|
1288
|
+
function useInsertionEffect(create, deps) {
|
|
1289
|
+
var dispatcher = resolveDispatcher()
|
|
1290
|
+
return dispatcher.useInsertionEffect(create, deps)
|
|
1291
|
+
}
|
|
1292
|
+
function useLayoutEffect(create, deps) {
|
|
1293
|
+
var dispatcher = resolveDispatcher()
|
|
1294
|
+
return dispatcher.useLayoutEffect(create, deps)
|
|
1295
|
+
}
|
|
1296
|
+
function useCallback(callback, deps) {
|
|
1297
|
+
var dispatcher = resolveDispatcher()
|
|
1298
|
+
return dispatcher.useCallback(callback, deps)
|
|
1299
|
+
}
|
|
1300
|
+
function useMemo(create, deps) {
|
|
1301
|
+
var dispatcher = resolveDispatcher()
|
|
1302
|
+
return dispatcher.useMemo(create, deps)
|
|
1303
|
+
}
|
|
1304
|
+
function useImperativeHandle(ref, create, deps) {
|
|
1305
|
+
var dispatcher = resolveDispatcher()
|
|
1306
|
+
return dispatcher.useImperativeHandle(ref, create, deps)
|
|
1307
|
+
}
|
|
1308
|
+
function useDebugValue(value, formatterFn) {
|
|
1309
|
+
{
|
|
1310
|
+
var dispatcher = resolveDispatcher()
|
|
1311
|
+
return dispatcher.useDebugValue(value, formatterFn)
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
function useTransition() {
|
|
1315
|
+
var dispatcher = resolveDispatcher()
|
|
1316
|
+
return dispatcher.useTransition()
|
|
1317
|
+
}
|
|
1318
|
+
function useDeferredValue(value) {
|
|
1319
|
+
var dispatcher = resolveDispatcher()
|
|
1320
|
+
return dispatcher.useDeferredValue(value)
|
|
1321
|
+
}
|
|
1322
|
+
function useId() {
|
|
1323
|
+
var dispatcher = resolveDispatcher()
|
|
1324
|
+
return dispatcher.useId()
|
|
1325
|
+
}
|
|
1326
|
+
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
1327
|
+
var dispatcher = resolveDispatcher()
|
|
1328
|
+
return dispatcher.useSyncExternalStore(
|
|
1329
|
+
subscribe,
|
|
1330
|
+
getSnapshot,
|
|
1331
|
+
getServerSnapshot
|
|
1332
|
+
)
|
|
1333
|
+
}
|
|
1334
|
+
var disabledDepth = 0
|
|
1335
|
+
var prevLog
|
|
1336
|
+
var prevInfo
|
|
1337
|
+
var prevWarn
|
|
1338
|
+
var prevError
|
|
1339
|
+
var prevGroup
|
|
1340
|
+
var prevGroupCollapsed
|
|
1341
|
+
var prevGroupEnd
|
|
1342
|
+
function disabledLog() {}
|
|
1343
|
+
disabledLog.__reactDisabledLog = true
|
|
1344
|
+
function disableLogs() {
|
|
1345
|
+
{
|
|
1346
|
+
if (disabledDepth === 0) {
|
|
1347
|
+
prevLog = console.log
|
|
1348
|
+
prevInfo = console.info
|
|
1349
|
+
prevWarn = console.warn
|
|
1350
|
+
prevError = console.error
|
|
1351
|
+
prevGroup = console.group
|
|
1352
|
+
prevGroupCollapsed = console.groupCollapsed
|
|
1353
|
+
prevGroupEnd = console.groupEnd
|
|
1354
|
+
var props = {
|
|
1355
|
+
configurable: true,
|
|
1356
|
+
enumerable: true,
|
|
1357
|
+
value: disabledLog,
|
|
1358
|
+
writable: true,
|
|
1359
|
+
}
|
|
1360
|
+
Object.defineProperties(console, {
|
|
1361
|
+
info: props,
|
|
1362
|
+
log: props,
|
|
1363
|
+
warn: props,
|
|
1364
|
+
error: props,
|
|
1365
|
+
group: props,
|
|
1366
|
+
groupCollapsed: props,
|
|
1367
|
+
groupEnd: props,
|
|
1196
1368
|
})
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
if (disabledDepth < 0) {
|
|
1200
|
-
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1369
|
+
}
|
|
1370
|
+
disabledDepth++
|
|
1201
1371
|
}
|
|
1202
1372
|
}
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1373
|
+
function reenableLogs() {
|
|
1374
|
+
{
|
|
1375
|
+
disabledDepth--
|
|
1376
|
+
if (disabledDepth === 0) {
|
|
1377
|
+
var props = {
|
|
1378
|
+
configurable: true,
|
|
1379
|
+
enumerable: true,
|
|
1380
|
+
writable: true,
|
|
1381
|
+
}
|
|
1382
|
+
Object.defineProperties(console, {
|
|
1383
|
+
log: assign({}, props, {
|
|
1384
|
+
value: prevLog,
|
|
1385
|
+
}),
|
|
1386
|
+
info: assign({}, props, {
|
|
1387
|
+
value: prevInfo,
|
|
1388
|
+
}),
|
|
1389
|
+
warn: assign({}, props, {
|
|
1390
|
+
value: prevWarn,
|
|
1391
|
+
}),
|
|
1392
|
+
error: assign({}, props, {
|
|
1393
|
+
value: prevError,
|
|
1394
|
+
}),
|
|
1395
|
+
group: assign({}, props, {
|
|
1396
|
+
value: prevGroup,
|
|
1397
|
+
}),
|
|
1398
|
+
groupCollapsed: assign({}, props, {
|
|
1399
|
+
value: prevGroupCollapsed,
|
|
1400
|
+
}),
|
|
1401
|
+
groupEnd: assign({}, props, {
|
|
1402
|
+
value: prevGroupEnd,
|
|
1403
|
+
}),
|
|
1404
|
+
})
|
|
1405
|
+
}
|
|
1406
|
+
if (disabledDepth < 0) {
|
|
1407
|
+
error(
|
|
1408
|
+
'disabledDepth fell below zero. This is a bug in React. Please file an issue.'
|
|
1409
|
+
)
|
|
1214
1410
|
}
|
|
1215
1411
|
}
|
|
1216
|
-
return "\n" + prefix + name;
|
|
1217
1412
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
if (frame !== void 0) {
|
|
1232
|
-
return frame;
|
|
1413
|
+
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher
|
|
1414
|
+
var prefix
|
|
1415
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
1416
|
+
{
|
|
1417
|
+
if (prefix === void 0) {
|
|
1418
|
+
try {
|
|
1419
|
+
throw Error()
|
|
1420
|
+
} catch (x) {
|
|
1421
|
+
var match = x.stack.trim().match(/\n( *(at )?)/)
|
|
1422
|
+
prefix = (match && match[1]) || ''
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
return '\n' + prefix + name
|
|
1233
1426
|
}
|
|
1234
1427
|
}
|
|
1235
|
-
var
|
|
1236
|
-
|
|
1237
|
-
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
1238
|
-
Error.prepareStackTrace = void 0;
|
|
1239
|
-
var previousDispatcher;
|
|
1428
|
+
var reentry = false
|
|
1429
|
+
var componentFrameCache
|
|
1240
1430
|
{
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1431
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map
|
|
1432
|
+
componentFrameCache = new PossiblyWeakMap()
|
|
1433
|
+
}
|
|
1434
|
+
function describeNativeComponentFrame(fn, construct) {
|
|
1435
|
+
if (!fn || reentry) {
|
|
1436
|
+
return ''
|
|
1437
|
+
}
|
|
1438
|
+
{
|
|
1439
|
+
var frame = componentFrameCache.get(fn)
|
|
1440
|
+
if (frame !== void 0) {
|
|
1441
|
+
return frame
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
var control
|
|
1445
|
+
reentry = true
|
|
1446
|
+
var previousPrepareStackTrace = Error.prepareStackTrace
|
|
1447
|
+
Error.prepareStackTrace = void 0
|
|
1448
|
+
var previousDispatcher
|
|
1449
|
+
{
|
|
1450
|
+
previousDispatcher = ReactCurrentDispatcher$1.current
|
|
1451
|
+
ReactCurrentDispatcher$1.current = null
|
|
1452
|
+
disableLogs()
|
|
1453
|
+
}
|
|
1454
|
+
try {
|
|
1455
|
+
if (construct) {
|
|
1456
|
+
var Fake = function () {
|
|
1457
|
+
throw Error()
|
|
1253
1458
|
}
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1459
|
+
Object.defineProperty(Fake.prototype, 'props', {
|
|
1460
|
+
set: function () {
|
|
1461
|
+
throw Error()
|
|
1462
|
+
},
|
|
1463
|
+
})
|
|
1464
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
1465
|
+
try {
|
|
1466
|
+
Reflect.construct(Fake, [])
|
|
1467
|
+
} catch (x) {
|
|
1468
|
+
control = x
|
|
1469
|
+
}
|
|
1470
|
+
Reflect.construct(fn, [], Fake)
|
|
1471
|
+
} else {
|
|
1472
|
+
try {
|
|
1473
|
+
Fake.call()
|
|
1474
|
+
} catch (x) {
|
|
1475
|
+
control = x
|
|
1476
|
+
}
|
|
1477
|
+
fn.call(Fake.prototype)
|
|
1260
1478
|
}
|
|
1261
|
-
Reflect.construct(fn, [], Fake);
|
|
1262
1479
|
} else {
|
|
1263
1480
|
try {
|
|
1264
|
-
|
|
1481
|
+
throw Error()
|
|
1265
1482
|
} catch (x) {
|
|
1266
|
-
control = x
|
|
1483
|
+
control = x
|
|
1267
1484
|
}
|
|
1268
|
-
fn
|
|
1485
|
+
fn()
|
|
1269
1486
|
}
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
if (s !== 1 || c !== 1) {
|
|
1290
|
-
do {
|
|
1291
|
-
s--;
|
|
1292
|
-
c--;
|
|
1293
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
1294
|
-
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
|
1295
|
-
if (fn.displayName && _frame.includes("<anonymous>")) {
|
|
1296
|
-
_frame = _frame.replace("<anonymous>", fn.displayName);
|
|
1297
|
-
}
|
|
1298
|
-
{
|
|
1299
|
-
if (typeof fn === "function") {
|
|
1300
|
-
componentFrameCache.set(fn, _frame);
|
|
1487
|
+
} catch (sample) {
|
|
1488
|
+
if (sample && control && typeof sample.stack === 'string') {
|
|
1489
|
+
var sampleLines = sample.stack.split('\n')
|
|
1490
|
+
var controlLines = control.stack.split('\n')
|
|
1491
|
+
var s = sampleLines.length - 1
|
|
1492
|
+
var c = controlLines.length - 1
|
|
1493
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
1494
|
+
c--
|
|
1495
|
+
}
|
|
1496
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
|
1497
|
+
if (sampleLines[s] !== controlLines[c]) {
|
|
1498
|
+
if (s !== 1 || c !== 1) {
|
|
1499
|
+
do {
|
|
1500
|
+
s--
|
|
1501
|
+
c--
|
|
1502
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
1503
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ')
|
|
1504
|
+
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
1505
|
+
_frame = _frame.replace('<anonymous>', fn.displayName)
|
|
1301
1506
|
}
|
|
1507
|
+
{
|
|
1508
|
+
if (typeof fn === 'function') {
|
|
1509
|
+
componentFrameCache.set(fn, _frame)
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
return _frame
|
|
1302
1513
|
}
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1514
|
+
} while (s >= 1 && c >= 0)
|
|
1515
|
+
}
|
|
1516
|
+
break
|
|
1306
1517
|
}
|
|
1307
|
-
break;
|
|
1308
1518
|
}
|
|
1309
1519
|
}
|
|
1520
|
+
} finally {
|
|
1521
|
+
reentry = false
|
|
1522
|
+
{
|
|
1523
|
+
ReactCurrentDispatcher$1.current = previousDispatcher
|
|
1524
|
+
reenableLogs()
|
|
1525
|
+
}
|
|
1526
|
+
Error.prepareStackTrace = previousPrepareStackTrace
|
|
1310
1527
|
}
|
|
1311
|
-
|
|
1312
|
-
|
|
1528
|
+
var name = fn ? fn.displayName || fn.name : ''
|
|
1529
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''
|
|
1313
1530
|
{
|
|
1314
|
-
|
|
1315
|
-
|
|
1531
|
+
if (typeof fn === 'function') {
|
|
1532
|
+
componentFrameCache.set(fn, syntheticFrame)
|
|
1533
|
+
}
|
|
1316
1534
|
}
|
|
1317
|
-
|
|
1535
|
+
return syntheticFrame
|
|
1318
1536
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
if (typeof fn === "function") {
|
|
1323
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
1537
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
1538
|
+
{
|
|
1539
|
+
return describeNativeComponentFrame(fn, false)
|
|
1324
1540
|
}
|
|
1325
1541
|
}
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
{
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
try {
|
|
1366
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
1367
|
-
} catch (x) {
|
|
1542
|
+
function shouldConstruct(Component2) {
|
|
1543
|
+
var prototype = Component2.prototype
|
|
1544
|
+
return !!(prototype && prototype.isReactComponent)
|
|
1545
|
+
}
|
|
1546
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
1547
|
+
if (type == null) {
|
|
1548
|
+
return ''
|
|
1549
|
+
}
|
|
1550
|
+
if (typeof type === 'function') {
|
|
1551
|
+
{
|
|
1552
|
+
return describeNativeComponentFrame(type, shouldConstruct(type))
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
if (typeof type === 'string') {
|
|
1556
|
+
return describeBuiltInComponentFrame(type)
|
|
1557
|
+
}
|
|
1558
|
+
switch (type) {
|
|
1559
|
+
case REACT_SUSPENSE_TYPE:
|
|
1560
|
+
return describeBuiltInComponentFrame('Suspense')
|
|
1561
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1562
|
+
return describeBuiltInComponentFrame('SuspenseList')
|
|
1563
|
+
}
|
|
1564
|
+
if (typeof type === 'object') {
|
|
1565
|
+
switch (type.$$typeof) {
|
|
1566
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1567
|
+
return describeFunctionComponentFrame(type.render)
|
|
1568
|
+
case REACT_MEMO_TYPE:
|
|
1569
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn)
|
|
1570
|
+
case REACT_LAZY_TYPE: {
|
|
1571
|
+
var lazyComponent = type
|
|
1572
|
+
var payload = lazyComponent._payload
|
|
1573
|
+
var init = lazyComponent._init
|
|
1574
|
+
try {
|
|
1575
|
+
return describeUnknownElementTypeFrameInDEV(
|
|
1576
|
+
init(payload),
|
|
1577
|
+
source,
|
|
1578
|
+
ownerFn
|
|
1579
|
+
)
|
|
1580
|
+
} catch (x) {}
|
|
1368
1581
|
}
|
|
1369
1582
|
}
|
|
1370
1583
|
}
|
|
1584
|
+
return ''
|
|
1371
1585
|
}
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1586
|
+
var loggedTypeFailures = {}
|
|
1587
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame
|
|
1588
|
+
function setCurrentlyValidatingElement(element) {
|
|
1589
|
+
{
|
|
1590
|
+
if (element) {
|
|
1591
|
+
var owner = element._owner
|
|
1592
|
+
var stack = describeUnknownElementTypeFrameInDEV(
|
|
1593
|
+
element.type,
|
|
1594
|
+
element._source,
|
|
1595
|
+
owner ? owner.type : null
|
|
1596
|
+
)
|
|
1597
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack)
|
|
1598
|
+
} else {
|
|
1599
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null)
|
|
1600
|
+
}
|
|
1384
1601
|
}
|
|
1385
1602
|
}
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1603
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
1604
|
+
{
|
|
1605
|
+
var has = Function.call.bind(hasOwnProperty)
|
|
1606
|
+
for (var typeSpecName in typeSpecs) {
|
|
1607
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
1608
|
+
var error$1 = void 0
|
|
1609
|
+
try {
|
|
1610
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1611
|
+
var err = Error(
|
|
1612
|
+
(componentName || 'React class') +
|
|
1613
|
+
': ' +
|
|
1614
|
+
location +
|
|
1615
|
+
' type `' +
|
|
1616
|
+
typeSpecName +
|
|
1617
|
+
'` is invalid; it must be a function, usually from the `prop-types` package, but received `' +
|
|
1618
|
+
typeof typeSpecs[typeSpecName] +
|
|
1619
|
+
'`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
1620
|
+
)
|
|
1621
|
+
err.name = 'Invariant Violation'
|
|
1622
|
+
throw err
|
|
1623
|
+
}
|
|
1624
|
+
error$1 = typeSpecs[typeSpecName](
|
|
1625
|
+
values,
|
|
1626
|
+
typeSpecName,
|
|
1627
|
+
componentName,
|
|
1628
|
+
location,
|
|
1629
|
+
null,
|
|
1630
|
+
'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'
|
|
1631
|
+
)
|
|
1632
|
+
} catch (ex) {
|
|
1633
|
+
error$1 = ex
|
|
1634
|
+
}
|
|
1635
|
+
if (error$1 && !(error$1 instanceof Error)) {
|
|
1636
|
+
setCurrentlyValidatingElement(element)
|
|
1637
|
+
error(
|
|
1638
|
+
'%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).',
|
|
1639
|
+
componentName || 'React class',
|
|
1640
|
+
location,
|
|
1641
|
+
typeSpecName,
|
|
1642
|
+
typeof error$1
|
|
1643
|
+
)
|
|
1644
|
+
setCurrentlyValidatingElement(null)
|
|
1645
|
+
}
|
|
1646
|
+
if (
|
|
1647
|
+
error$1 instanceof Error &&
|
|
1648
|
+
!(error$1.message in loggedTypeFailures)
|
|
1649
|
+
) {
|
|
1650
|
+
loggedTypeFailures[error$1.message] = true
|
|
1651
|
+
setCurrentlyValidatingElement(element)
|
|
1652
|
+
error('Failed %s type: %s', location, error$1.message)
|
|
1653
|
+
setCurrentlyValidatingElement(null)
|
|
1398
1654
|
}
|
|
1399
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1400
|
-
} catch (ex) {
|
|
1401
|
-
error$1 = ex;
|
|
1402
|
-
}
|
|
1403
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
1404
|
-
setCurrentlyValidatingElement(element);
|
|
1405
|
-
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);
|
|
1406
|
-
setCurrentlyValidatingElement(null);
|
|
1407
|
-
}
|
|
1408
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
1409
|
-
loggedTypeFailures[error$1.message] = true;
|
|
1410
|
-
setCurrentlyValidatingElement(element);
|
|
1411
|
-
error("Failed %s type: %s", location, error$1.message);
|
|
1412
|
-
setCurrentlyValidatingElement(null);
|
|
1413
1655
|
}
|
|
1414
1656
|
}
|
|
1415
1657
|
}
|
|
1416
1658
|
}
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
propTypesMisspellWarningShown = false;
|
|
1432
|
-
}
|
|
1433
|
-
function getDeclarationErrorAddendum() {
|
|
1434
|
-
if (ReactCurrentOwner.current) {
|
|
1435
|
-
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
1436
|
-
if (name) {
|
|
1437
|
-
return "\n\nCheck the render method of `" + name + "`.";
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
return "";
|
|
1441
|
-
}
|
|
1442
|
-
function getSourceInfoErrorAddendum(source) {
|
|
1443
|
-
if (source !== void 0) {
|
|
1444
|
-
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
|
1445
|
-
var lineNumber = source.lineNumber;
|
|
1446
|
-
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
|
1447
|
-
}
|
|
1448
|
-
return "";
|
|
1449
|
-
}
|
|
1450
|
-
function getSourceInfoErrorAddendumForProps(elementProps) {
|
|
1451
|
-
if (elementProps !== null && elementProps !== void 0) {
|
|
1452
|
-
return getSourceInfoErrorAddendum(elementProps.__source);
|
|
1453
|
-
}
|
|
1454
|
-
return "";
|
|
1455
|
-
}
|
|
1456
|
-
var ownerHasKeyUseWarning = {};
|
|
1457
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1458
|
-
var info = getDeclarationErrorAddendum();
|
|
1459
|
-
if (!info) {
|
|
1460
|
-
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
|
1461
|
-
if (parentName) {
|
|
1462
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
return info;
|
|
1466
|
-
}
|
|
1467
|
-
function validateExplicitKey(element, parentType) {
|
|
1468
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
1469
|
-
return;
|
|
1470
|
-
}
|
|
1471
|
-
element._store.validated = true;
|
|
1472
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1473
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1474
|
-
return;
|
|
1475
|
-
}
|
|
1476
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
|
1477
|
-
var childOwner = "";
|
|
1478
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
|
1479
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
1659
|
+
function setCurrentlyValidatingElement$1(element) {
|
|
1660
|
+
{
|
|
1661
|
+
if (element) {
|
|
1662
|
+
var owner = element._owner
|
|
1663
|
+
var stack = describeUnknownElementTypeFrameInDEV(
|
|
1664
|
+
element.type,
|
|
1665
|
+
element._source,
|
|
1666
|
+
owner ? owner.type : null
|
|
1667
|
+
)
|
|
1668
|
+
setExtraStackFrame(stack)
|
|
1669
|
+
} else {
|
|
1670
|
+
setExtraStackFrame(null)
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1480
1673
|
}
|
|
1674
|
+
var propTypesMisspellWarningShown
|
|
1481
1675
|
{
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1676
|
+
propTypesMisspellWarningShown = false
|
|
1677
|
+
}
|
|
1678
|
+
function getDeclarationErrorAddendum() {
|
|
1679
|
+
if (ReactCurrentOwner.current) {
|
|
1680
|
+
var name = getComponentNameFromType(ReactCurrentOwner.current.type)
|
|
1681
|
+
if (name) {
|
|
1682
|
+
return '\n\nCheck the render method of `' + name + '`.'
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
return ''
|
|
1686
|
+
}
|
|
1687
|
+
function getSourceInfoErrorAddendum(source) {
|
|
1688
|
+
if (source !== void 0) {
|
|
1689
|
+
var fileName = source.fileName.replace(/^.*[\\\/]/, '')
|
|
1690
|
+
var lineNumber = source.lineNumber
|
|
1691
|
+
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'
|
|
1692
|
+
}
|
|
1693
|
+
return ''
|
|
1694
|
+
}
|
|
1695
|
+
function getSourceInfoErrorAddendumForProps(elementProps) {
|
|
1696
|
+
if (elementProps !== null && elementProps !== void 0) {
|
|
1697
|
+
return getSourceInfoErrorAddendum(elementProps.__source)
|
|
1698
|
+
}
|
|
1699
|
+
return ''
|
|
1700
|
+
}
|
|
1701
|
+
var ownerHasKeyUseWarning = {}
|
|
1702
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
1703
|
+
var info = getDeclarationErrorAddendum()
|
|
1704
|
+
if (!info) {
|
|
1705
|
+
var parentName =
|
|
1706
|
+
typeof parentType === 'string'
|
|
1707
|
+
? parentType
|
|
1708
|
+
: parentType.displayName || parentType.name
|
|
1709
|
+
if (parentName) {
|
|
1710
|
+
info = '\n\nCheck the top-level render call using <' + parentName + '>.'
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
return info
|
|
1714
|
+
}
|
|
1715
|
+
function validateExplicitKey(element, parentType) {
|
|
1716
|
+
if (!element._store || element._store.validated || element.key != null) {
|
|
1717
|
+
return
|
|
1718
|
+
}
|
|
1719
|
+
element._store.validated = true
|
|
1720
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType)
|
|
1721
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1722
|
+
return
|
|
1723
|
+
}
|
|
1724
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = true
|
|
1725
|
+
var childOwner = ''
|
|
1726
|
+
if (
|
|
1727
|
+
element &&
|
|
1728
|
+
element._owner &&
|
|
1729
|
+
element._owner !== ReactCurrentOwner.current
|
|
1730
|
+
) {
|
|
1731
|
+
childOwner =
|
|
1732
|
+
' It was passed a child from ' +
|
|
1733
|
+
getComponentNameFromType(element._owner.type) +
|
|
1734
|
+
'.'
|
|
1735
|
+
}
|
|
1736
|
+
{
|
|
1737
|
+
setCurrentlyValidatingElement$1(element)
|
|
1738
|
+
error(
|
|
1739
|
+
'Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',
|
|
1740
|
+
currentComponentErrorInfo,
|
|
1741
|
+
childOwner
|
|
1742
|
+
)
|
|
1743
|
+
setCurrentlyValidatingElement$1(null)
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
function validateChildKeys(node, parentType) {
|
|
1747
|
+
if (typeof node !== 'object') {
|
|
1748
|
+
return
|
|
1749
|
+
}
|
|
1750
|
+
if (isArray(node)) {
|
|
1751
|
+
for (var i = 0; i < node.length; i++) {
|
|
1752
|
+
var child = node[i]
|
|
1753
|
+
if (isValidElement(child)) {
|
|
1754
|
+
validateExplicitKey(child, parentType)
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
} else if (isValidElement(node)) {
|
|
1758
|
+
if (node._store) {
|
|
1759
|
+
node._store.validated = true
|
|
1760
|
+
}
|
|
1761
|
+
} else if (node) {
|
|
1762
|
+
var iteratorFn = getIteratorFn(node)
|
|
1763
|
+
if (typeof iteratorFn === 'function') {
|
|
1764
|
+
if (iteratorFn !== node.entries) {
|
|
1765
|
+
var iterator = iteratorFn.call(node)
|
|
1766
|
+
var step
|
|
1767
|
+
while (!(step = iterator.next()).done) {
|
|
1768
|
+
if (isValidElement(step.value)) {
|
|
1769
|
+
validateExplicitKey(step.value, parentType)
|
|
1770
|
+
}
|
|
1511
1771
|
}
|
|
1512
1772
|
}
|
|
1513
1773
|
}
|
|
1514
1774
|
}
|
|
1515
1775
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1776
|
+
function validatePropTypes(element) {
|
|
1777
|
+
{
|
|
1778
|
+
var type = element.type
|
|
1779
|
+
if (type === null || type === void 0 || typeof type === 'string') {
|
|
1780
|
+
return
|
|
1781
|
+
}
|
|
1782
|
+
var propTypes
|
|
1783
|
+
if (typeof type === 'function') {
|
|
1784
|
+
propTypes = type.propTypes
|
|
1785
|
+
} else if (
|
|
1786
|
+
typeof type === 'object' &&
|
|
1787
|
+
(type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1788
|
+
// Inner props are checked in the reconciler.
|
|
1789
|
+
type.$$typeof === REACT_MEMO_TYPE)
|
|
1790
|
+
) {
|
|
1791
|
+
propTypes = type.propTypes
|
|
1792
|
+
} else {
|
|
1793
|
+
return
|
|
1794
|
+
}
|
|
1795
|
+
if (propTypes) {
|
|
1796
|
+
var name = getComponentNameFromType(type)
|
|
1797
|
+
checkPropTypes(propTypes, element.props, 'prop', name, element)
|
|
1798
|
+
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
1799
|
+
propTypesMisspellWarningShown = true
|
|
1800
|
+
var _name = getComponentNameFromType(type)
|
|
1801
|
+
error(
|
|
1802
|
+
'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?',
|
|
1803
|
+
_name || 'Unknown'
|
|
1804
|
+
)
|
|
1805
|
+
}
|
|
1806
|
+
if (
|
|
1807
|
+
typeof type.getDefaultProps === 'function' &&
|
|
1808
|
+
!type.getDefaultProps.isReactClassApproved
|
|
1809
|
+
) {
|
|
1810
|
+
error(
|
|
1811
|
+
'getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.'
|
|
1812
|
+
)
|
|
1813
|
+
}
|
|
1540
1814
|
}
|
|
1541
|
-
|
|
1542
|
-
|
|
1815
|
+
}
|
|
1816
|
+
function validateFragmentProps(fragment) {
|
|
1817
|
+
{
|
|
1818
|
+
var keys = Object.keys(fragment.props)
|
|
1819
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1820
|
+
var key = keys[i]
|
|
1821
|
+
if (key !== 'children' && key !== 'key') {
|
|
1822
|
+
setCurrentlyValidatingElement$1(fragment)
|
|
1823
|
+
error(
|
|
1824
|
+
'Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.',
|
|
1825
|
+
key
|
|
1826
|
+
)
|
|
1827
|
+
setCurrentlyValidatingElement$1(null)
|
|
1828
|
+
break
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
if (fragment.ref !== null) {
|
|
1832
|
+
setCurrentlyValidatingElement$1(fragment)
|
|
1833
|
+
error('Invalid attribute `ref` supplied to `React.Fragment`.')
|
|
1834
|
+
setCurrentlyValidatingElement$1(null)
|
|
1835
|
+
}
|
|
1543
1836
|
}
|
|
1544
1837
|
}
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1838
|
+
function createElementWithValidation(type, props, children) {
|
|
1839
|
+
var validType = isValidElementType(type)
|
|
1840
|
+
if (!validType) {
|
|
1841
|
+
var info = ''
|
|
1842
|
+
if (
|
|
1843
|
+
type === void 0 ||
|
|
1844
|
+
(typeof type === 'object' &&
|
|
1845
|
+
type !== null &&
|
|
1846
|
+
Object.keys(type).length === 0)
|
|
1847
|
+
) {
|
|
1848
|
+
info +=
|
|
1849
|
+
" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."
|
|
1850
|
+
}
|
|
1851
|
+
var sourceInfo = getSourceInfoErrorAddendumForProps(props)
|
|
1852
|
+
if (sourceInfo) {
|
|
1853
|
+
info += sourceInfo
|
|
1854
|
+
} else {
|
|
1855
|
+
info += getDeclarationErrorAddendum()
|
|
1856
|
+
}
|
|
1857
|
+
var typeString
|
|
1858
|
+
if (type === null) {
|
|
1859
|
+
typeString = 'null'
|
|
1860
|
+
} else if (isArray(type)) {
|
|
1861
|
+
typeString = 'array'
|
|
1862
|
+
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1863
|
+
typeString =
|
|
1864
|
+
'<' + (getComponentNameFromType(type.type) || 'Unknown') + ' />'
|
|
1865
|
+
info =
|
|
1866
|
+
' Did you accidentally export a JSX literal instead of a component?'
|
|
1867
|
+
} else {
|
|
1868
|
+
typeString = typeof type
|
|
1869
|
+
}
|
|
1870
|
+
{
|
|
1871
|
+
error(
|
|
1872
|
+
'React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s',
|
|
1873
|
+
typeString,
|
|
1874
|
+
info
|
|
1875
|
+
)
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
var element = createElement.apply(this, arguments)
|
|
1879
|
+
if (element == null) {
|
|
1880
|
+
return element
|
|
1881
|
+
}
|
|
1882
|
+
if (validType) {
|
|
1883
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
1884
|
+
validateChildKeys(arguments[i], type)
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
1888
|
+
validateFragmentProps(element)
|
|
1586
1889
|
} else {
|
|
1587
|
-
|
|
1890
|
+
validatePropTypes(element)
|
|
1588
1891
|
}
|
|
1892
|
+
return element
|
|
1893
|
+
}
|
|
1894
|
+
var didWarnAboutDeprecatedCreateFactory = false
|
|
1895
|
+
function createFactoryWithValidation(type) {
|
|
1896
|
+
var validatedFactory = createElementWithValidation.bind(null, type)
|
|
1897
|
+
validatedFactory.type = type
|
|
1589
1898
|
{
|
|
1590
|
-
|
|
1899
|
+
if (!didWarnAboutDeprecatedCreateFactory) {
|
|
1900
|
+
didWarnAboutDeprecatedCreateFactory = true
|
|
1901
|
+
warn(
|
|
1902
|
+
'React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.'
|
|
1903
|
+
)
|
|
1904
|
+
}
|
|
1905
|
+
Object.defineProperty(validatedFactory, 'type', {
|
|
1906
|
+
enumerable: false,
|
|
1907
|
+
get: function () {
|
|
1908
|
+
warn(
|
|
1909
|
+
'Factory.type is deprecated. Access the class directly before passing it to createFactory.'
|
|
1910
|
+
)
|
|
1911
|
+
Object.defineProperty(this, 'type', {
|
|
1912
|
+
value: type,
|
|
1913
|
+
})
|
|
1914
|
+
return type
|
|
1915
|
+
},
|
|
1916
|
+
})
|
|
1591
1917
|
}
|
|
1918
|
+
return validatedFactory
|
|
1592
1919
|
}
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
return element;
|
|
1596
|
-
}
|
|
1597
|
-
if (validType) {
|
|
1920
|
+
function cloneElementWithValidation(element, props, children) {
|
|
1921
|
+
var newElement = cloneElement.apply(this, arguments)
|
|
1598
1922
|
for (var i = 2; i < arguments.length; i++) {
|
|
1599
|
-
validateChildKeys(arguments[i], type)
|
|
1923
|
+
validateChildKeys(arguments[i], newElement.type)
|
|
1600
1924
|
}
|
|
1925
|
+
validatePropTypes(newElement)
|
|
1926
|
+
return newElement
|
|
1601
1927
|
}
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
}
|
|
1607
|
-
return element;
|
|
1608
|
-
}
|
|
1609
|
-
var didWarnAboutDeprecatedCreateFactory = false;
|
|
1610
|
-
function createFactoryWithValidation(type) {
|
|
1611
|
-
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
1612
|
-
validatedFactory.type = type;
|
|
1613
|
-
{
|
|
1614
|
-
if (!didWarnAboutDeprecatedCreateFactory) {
|
|
1615
|
-
didWarnAboutDeprecatedCreateFactory = true;
|
|
1616
|
-
warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
|
|
1617
|
-
}
|
|
1618
|
-
Object.defineProperty(validatedFactory, "type", {
|
|
1619
|
-
enumerable: false,
|
|
1620
|
-
get: function() {
|
|
1621
|
-
warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
|
|
1622
|
-
Object.defineProperty(this, "type", {
|
|
1623
|
-
value: type
|
|
1624
|
-
});
|
|
1625
|
-
return type;
|
|
1626
|
-
}
|
|
1627
|
-
});
|
|
1628
|
-
}
|
|
1629
|
-
return validatedFactory;
|
|
1630
|
-
}
|
|
1631
|
-
function cloneElementWithValidation(element, props, children) {
|
|
1632
|
-
var newElement = cloneElement.apply(this, arguments);
|
|
1633
|
-
for (var i = 2; i < arguments.length; i++) {
|
|
1634
|
-
validateChildKeys(arguments[i], newElement.type);
|
|
1635
|
-
}
|
|
1636
|
-
validatePropTypes(newElement);
|
|
1637
|
-
return newElement;
|
|
1638
|
-
}
|
|
1639
|
-
function startTransition(scope, options) {
|
|
1640
|
-
var prevTransition = ReactCurrentBatchConfig.transition;
|
|
1641
|
-
ReactCurrentBatchConfig.transition = {};
|
|
1642
|
-
var currentTransition = ReactCurrentBatchConfig.transition;
|
|
1643
|
-
{
|
|
1644
|
-
ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
|
|
1645
|
-
}
|
|
1646
|
-
try {
|
|
1647
|
-
scope();
|
|
1648
|
-
} finally {
|
|
1649
|
-
ReactCurrentBatchConfig.transition = prevTransition;
|
|
1928
|
+
function startTransition(scope, options) {
|
|
1929
|
+
var prevTransition = ReactCurrentBatchConfig.transition
|
|
1930
|
+
ReactCurrentBatchConfig.transition = {}
|
|
1931
|
+
var currentTransition = ReactCurrentBatchConfig.transition
|
|
1650
1932
|
{
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1933
|
+
ReactCurrentBatchConfig.transition._updatedFibers =
|
|
1934
|
+
/* @__PURE__ */ new Set()
|
|
1935
|
+
}
|
|
1936
|
+
try {
|
|
1937
|
+
scope()
|
|
1938
|
+
} finally {
|
|
1939
|
+
ReactCurrentBatchConfig.transition = prevTransition
|
|
1940
|
+
{
|
|
1941
|
+
if (prevTransition === null && currentTransition._updatedFibers) {
|
|
1942
|
+
var updatedFibersCount = currentTransition._updatedFibers.size
|
|
1943
|
+
if (updatedFibersCount > 10) {
|
|
1944
|
+
warn(
|
|
1945
|
+
'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.'
|
|
1946
|
+
)
|
|
1947
|
+
}
|
|
1948
|
+
currentTransition._updatedFibers.clear()
|
|
1655
1949
|
}
|
|
1656
|
-
currentTransition._updatedFibers.clear();
|
|
1657
1950
|
}
|
|
1658
1951
|
}
|
|
1659
1952
|
}
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1953
|
+
var didWarnAboutMessageChannel = false
|
|
1954
|
+
var enqueueTaskImpl = null
|
|
1955
|
+
function enqueueTask(task) {
|
|
1956
|
+
if (enqueueTaskImpl === null) {
|
|
1957
|
+
try {
|
|
1958
|
+
var requireString = ('require' + Math.random()).slice(0, 7)
|
|
1959
|
+
var nodeRequire = module2 && module2[requireString]
|
|
1960
|
+
enqueueTaskImpl = nodeRequire.call(module2, 'timers').setImmediate
|
|
1961
|
+
} catch (_err) {
|
|
1962
|
+
enqueueTaskImpl = function (callback) {
|
|
1963
|
+
{
|
|
1964
|
+
if (didWarnAboutMessageChannel === false) {
|
|
1965
|
+
didWarnAboutMessageChannel = true
|
|
1966
|
+
if (typeof MessageChannel === 'undefined') {
|
|
1967
|
+
error(
|
|
1968
|
+
'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.'
|
|
1969
|
+
)
|
|
1970
|
+
}
|
|
1676
1971
|
}
|
|
1677
1972
|
}
|
|
1973
|
+
var channel = new MessageChannel()
|
|
1974
|
+
channel.port1.onmessage = callback
|
|
1975
|
+
channel.port2.postMessage(void 0)
|
|
1678
1976
|
}
|
|
1679
|
-
|
|
1680
|
-
channel.port1.onmessage = callback;
|
|
1681
|
-
channel.port2.postMessage(void 0);
|
|
1682
|
-
};
|
|
1977
|
+
}
|
|
1683
1978
|
}
|
|
1979
|
+
return enqueueTaskImpl(task)
|
|
1684
1980
|
}
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
if (ReactCurrentActQueue.current === null) {
|
|
1694
|
-
ReactCurrentActQueue.current = [];
|
|
1695
|
-
}
|
|
1696
|
-
var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
|
|
1697
|
-
var result;
|
|
1698
|
-
try {
|
|
1699
|
-
ReactCurrentActQueue.isBatchingLegacy = true;
|
|
1700
|
-
result = callback();
|
|
1701
|
-
if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
|
|
1702
|
-
var queue = ReactCurrentActQueue.current;
|
|
1703
|
-
if (queue !== null) {
|
|
1704
|
-
ReactCurrentActQueue.didScheduleLegacyUpdate = false;
|
|
1705
|
-
flushActQueue(queue);
|
|
1706
|
-
}
|
|
1981
|
+
var actScopeDepth = 0
|
|
1982
|
+
var didWarnNoAwaitAct = false
|
|
1983
|
+
function act(callback) {
|
|
1984
|
+
{
|
|
1985
|
+
var prevActScopeDepth = actScopeDepth
|
|
1986
|
+
actScopeDepth++
|
|
1987
|
+
if (ReactCurrentActQueue.current === null) {
|
|
1988
|
+
ReactCurrentActQueue.current = []
|
|
1707
1989
|
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
if (actScopeDepth === 0) {
|
|
1723
|
-
recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
|
|
1724
|
-
} else {
|
|
1725
|
-
resolve(returnValue2);
|
|
1726
|
-
}
|
|
1727
|
-
}, function(error2) {
|
|
1728
|
-
popActScope(prevActScopeDepth);
|
|
1729
|
-
reject(error2);
|
|
1730
|
-
});
|
|
1731
|
-
}
|
|
1732
|
-
};
|
|
1733
|
-
{
|
|
1734
|
-
if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
|
|
1735
|
-
Promise.resolve().then(function() {
|
|
1736
|
-
}).then(function() {
|
|
1737
|
-
if (!wasAwaited) {
|
|
1738
|
-
didWarnNoAwaitAct = true;
|
|
1739
|
-
error("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 () => ...);");
|
|
1740
|
-
}
|
|
1741
|
-
});
|
|
1990
|
+
var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy
|
|
1991
|
+
var result
|
|
1992
|
+
try {
|
|
1993
|
+
ReactCurrentActQueue.isBatchingLegacy = true
|
|
1994
|
+
result = callback()
|
|
1995
|
+
if (
|
|
1996
|
+
!prevIsBatchingLegacy &&
|
|
1997
|
+
ReactCurrentActQueue.didScheduleLegacyUpdate
|
|
1998
|
+
) {
|
|
1999
|
+
var queue = ReactCurrentActQueue.current
|
|
2000
|
+
if (queue !== null) {
|
|
2001
|
+
ReactCurrentActQueue.didScheduleLegacyUpdate = false
|
|
2002
|
+
flushActQueue(queue)
|
|
2003
|
+
}
|
|
1742
2004
|
}
|
|
2005
|
+
} catch (error2) {
|
|
2006
|
+
popActScope(prevActScopeDepth)
|
|
2007
|
+
throw error2
|
|
2008
|
+
} finally {
|
|
2009
|
+
ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy
|
|
1743
2010
|
}
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
var
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
2011
|
+
if (
|
|
2012
|
+
result !== null &&
|
|
2013
|
+
typeof result === 'object' &&
|
|
2014
|
+
typeof result.then === 'function'
|
|
2015
|
+
) {
|
|
2016
|
+
var thenableResult = result
|
|
2017
|
+
var wasAwaited = false
|
|
2018
|
+
var thenable = {
|
|
2019
|
+
then: function (resolve, reject) {
|
|
2020
|
+
wasAwaited = true
|
|
2021
|
+
thenableResult.then(
|
|
2022
|
+
function (returnValue2) {
|
|
2023
|
+
popActScope(prevActScopeDepth)
|
|
2024
|
+
if (actScopeDepth === 0) {
|
|
2025
|
+
recursivelyFlushAsyncActWork(returnValue2, resolve, reject)
|
|
2026
|
+
} else {
|
|
2027
|
+
resolve(returnValue2)
|
|
2028
|
+
}
|
|
2029
|
+
},
|
|
2030
|
+
function (error2) {
|
|
2031
|
+
popActScope(prevActScopeDepth)
|
|
2032
|
+
reject(error2)
|
|
2033
|
+
}
|
|
2034
|
+
)
|
|
2035
|
+
},
|
|
1753
2036
|
}
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
2037
|
+
{
|
|
2038
|
+
if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
|
|
2039
|
+
Promise.resolve()
|
|
2040
|
+
.then(function () {})
|
|
2041
|
+
.then(function () {
|
|
2042
|
+
if (!wasAwaited) {
|
|
2043
|
+
didWarnNoAwaitAct = true
|
|
2044
|
+
error(
|
|
2045
|
+
'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 () => ...);'
|
|
2046
|
+
)
|
|
2047
|
+
}
|
|
2048
|
+
})
|
|
1762
2049
|
}
|
|
1763
|
-
}
|
|
1764
|
-
return
|
|
2050
|
+
}
|
|
2051
|
+
return thenable
|
|
1765
2052
|
} else {
|
|
1766
|
-
var
|
|
1767
|
-
|
|
1768
|
-
|
|
2053
|
+
var returnValue = result
|
|
2054
|
+
popActScope(prevActScopeDepth)
|
|
2055
|
+
if (actScopeDepth === 0) {
|
|
2056
|
+
var _queue = ReactCurrentActQueue.current
|
|
2057
|
+
if (_queue !== null) {
|
|
2058
|
+
flushActQueue(_queue)
|
|
2059
|
+
ReactCurrentActQueue.current = null
|
|
2060
|
+
}
|
|
2061
|
+
var _thenable = {
|
|
2062
|
+
then: function (resolve, reject) {
|
|
2063
|
+
if (ReactCurrentActQueue.current === null) {
|
|
2064
|
+
ReactCurrentActQueue.current = []
|
|
2065
|
+
recursivelyFlushAsyncActWork(returnValue, resolve, reject)
|
|
2066
|
+
} else {
|
|
2067
|
+
resolve(returnValue)
|
|
2068
|
+
}
|
|
2069
|
+
},
|
|
1769
2070
|
}
|
|
1770
|
-
|
|
1771
|
-
|
|
2071
|
+
return _thenable
|
|
2072
|
+
} else {
|
|
2073
|
+
var _thenable2 = {
|
|
2074
|
+
then: function (resolve, reject) {
|
|
2075
|
+
resolve(returnValue)
|
|
2076
|
+
},
|
|
2077
|
+
}
|
|
2078
|
+
return _thenable2
|
|
2079
|
+
}
|
|
1772
2080
|
}
|
|
1773
2081
|
}
|
|
1774
2082
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
2083
|
+
function popActScope(prevActScopeDepth) {
|
|
2084
|
+
{
|
|
2085
|
+
if (prevActScopeDepth !== actScopeDepth - 1) {
|
|
2086
|
+
error(
|
|
2087
|
+
'You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. '
|
|
2088
|
+
)
|
|
2089
|
+
}
|
|
2090
|
+
actScopeDepth = prevActScopeDepth
|
|
1780
2091
|
}
|
|
1781
|
-
actScopeDepth = prevActScopeDepth;
|
|
1782
2092
|
}
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
}
|
|
1797
|
-
})
|
|
1798
|
-
|
|
1799
|
-
|
|
2093
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
2094
|
+
{
|
|
2095
|
+
var queue = ReactCurrentActQueue.current
|
|
2096
|
+
if (queue !== null) {
|
|
2097
|
+
try {
|
|
2098
|
+
flushActQueue(queue)
|
|
2099
|
+
enqueueTask(function () {
|
|
2100
|
+
if (queue.length === 0) {
|
|
2101
|
+
ReactCurrentActQueue.current = null
|
|
2102
|
+
resolve(returnValue)
|
|
2103
|
+
} else {
|
|
2104
|
+
recursivelyFlushAsyncActWork(returnValue, resolve, reject)
|
|
2105
|
+
}
|
|
2106
|
+
})
|
|
2107
|
+
} catch (error2) {
|
|
2108
|
+
reject(error2)
|
|
2109
|
+
}
|
|
2110
|
+
} else {
|
|
2111
|
+
resolve(returnValue)
|
|
1800
2112
|
}
|
|
1801
|
-
} else {
|
|
1802
|
-
resolve(returnValue);
|
|
1803
2113
|
}
|
|
1804
2114
|
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
callback
|
|
1817
|
-
}
|
|
2115
|
+
var isFlushing = false
|
|
2116
|
+
function flushActQueue(queue) {
|
|
2117
|
+
{
|
|
2118
|
+
if (!isFlushing) {
|
|
2119
|
+
isFlushing = true
|
|
2120
|
+
var i = 0
|
|
2121
|
+
try {
|
|
2122
|
+
for (; i < queue.length; i++) {
|
|
2123
|
+
var callback = queue[i]
|
|
2124
|
+
do {
|
|
2125
|
+
callback = callback(true)
|
|
2126
|
+
} while (callback !== null)
|
|
2127
|
+
}
|
|
2128
|
+
queue.length = 0
|
|
2129
|
+
} catch (error2) {
|
|
2130
|
+
queue = queue.slice(i + 1)
|
|
2131
|
+
throw error2
|
|
2132
|
+
} finally {
|
|
2133
|
+
isFlushing = false
|
|
1818
2134
|
}
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
}
|
|
1881
|
-
});
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
var createElement$1 = createElementWithValidation
|
|
2139
|
+
var cloneElement$1 = cloneElementWithValidation
|
|
2140
|
+
var createFactory = createFactoryWithValidation
|
|
2141
|
+
var Children = {
|
|
2142
|
+
map: mapChildren,
|
|
2143
|
+
forEach: forEachChildren,
|
|
2144
|
+
count: countChildren,
|
|
2145
|
+
toArray,
|
|
2146
|
+
only: onlyChild,
|
|
2147
|
+
}
|
|
2148
|
+
exports2.Children = Children
|
|
2149
|
+
exports2.Component = Component
|
|
2150
|
+
exports2.Fragment = REACT_FRAGMENT_TYPE
|
|
2151
|
+
exports2.Profiler = REACT_PROFILER_TYPE
|
|
2152
|
+
exports2.PureComponent = PureComponent
|
|
2153
|
+
exports2.StrictMode = REACT_STRICT_MODE_TYPE
|
|
2154
|
+
exports2.Suspense = REACT_SUSPENSE_TYPE
|
|
2155
|
+
exports2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =
|
|
2156
|
+
ReactSharedInternals
|
|
2157
|
+
exports2.act = act
|
|
2158
|
+
exports2.cloneElement = cloneElement$1
|
|
2159
|
+
exports2.createContext = createContext
|
|
2160
|
+
exports2.createElement = createElement$1
|
|
2161
|
+
exports2.createFactory = createFactory
|
|
2162
|
+
exports2.createRef = createRef
|
|
2163
|
+
exports2.forwardRef = forwardRef
|
|
2164
|
+
exports2.isValidElement = isValidElement
|
|
2165
|
+
exports2.lazy = lazy
|
|
2166
|
+
exports2.memo = memo
|
|
2167
|
+
exports2.startTransition = startTransition
|
|
2168
|
+
exports2.unstable_act = act
|
|
2169
|
+
exports2.useCallback = useCallback
|
|
2170
|
+
exports2.useContext = useContext
|
|
2171
|
+
exports2.useDebugValue = useDebugValue
|
|
2172
|
+
exports2.useDeferredValue = useDeferredValue
|
|
2173
|
+
exports2.useEffect = useEffect
|
|
2174
|
+
exports2.useId = useId
|
|
2175
|
+
exports2.useImperativeHandle = useImperativeHandle
|
|
2176
|
+
exports2.useInsertionEffect = useInsertionEffect
|
|
2177
|
+
exports2.useLayoutEffect = useLayoutEffect
|
|
2178
|
+
exports2.useMemo = useMemo
|
|
2179
|
+
exports2.useReducer = useReducer
|
|
2180
|
+
exports2.useRef = useRef
|
|
2181
|
+
exports2.useState = useState
|
|
2182
|
+
exports2.useSyncExternalStore = useSyncExternalStore
|
|
2183
|
+
exports2.useTransition = useTransition
|
|
2184
|
+
exports2.version = ReactVersion
|
|
2185
|
+
if (
|
|
2186
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
2187
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
|
|
2188
|
+
'function'
|
|
2189
|
+
) {
|
|
2190
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error())
|
|
2191
|
+
}
|
|
2192
|
+
})()
|
|
2193
|
+
}
|
|
2194
|
+
},
|
|
2195
|
+
})
|
|
1882
2196
|
|
|
1883
|
-
// ../../node_modules/react/index.js
|
|
1884
|
-
if (false) {
|
|
1885
|
-
|
|
1886
|
-
} else {
|
|
1887
|
-
|
|
1888
|
-
}
|
|
1889
|
-
/*! Bundled license information:
|
|
2197
|
+
// ../../node_modules/react/index.js
|
|
2198
|
+
if (false) {
|
|
2199
|
+
module.exports = null
|
|
2200
|
+
} else {
|
|
2201
|
+
return require_react_development()
|
|
2202
|
+
}
|
|
2203
|
+
/*! Bundled license information:
|
|
1890
2204
|
|
|
1891
2205
|
react/cjs/react.development.js:
|
|
1892
2206
|
(**
|
|
@@ -1899,17 +2213,17 @@ react/cjs/react.development.js:
|
|
|
1899
2213
|
* LICENSE file in the root directory of this source tree.
|
|
1900
2214
|
*)
|
|
1901
2215
|
*/
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
export const Children = __mod__.Children
|
|
2216
|
+
}
|
|
2217
|
+
const __mod__ = run()
|
|
2218
|
+
export const Children = __mod__.Children
|
|
1906
2219
|
export const Component = __mod__.Component
|
|
1907
2220
|
export const Fragment = __mod__.Fragment
|
|
1908
2221
|
export const Profiler = __mod__.Profiler
|
|
1909
2222
|
export const PureComponent = __mod__.PureComponent
|
|
1910
2223
|
export const StrictMode = __mod__.StrictMode
|
|
1911
2224
|
export const Suspense = __mod__.Suspense
|
|
1912
|
-
export const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =
|
|
2225
|
+
export const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED =
|
|
2226
|
+
__mod__.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
|
|
1913
2227
|
export const cloneElement = __mod__.cloneElement
|
|
1914
2228
|
export const createContext = __mod__.createContext
|
|
1915
2229
|
export const createElement = __mod__.createElement
|
|
@@ -1937,5 +2251,4 @@ export const useState = __mod__.useState
|
|
|
1937
2251
|
export const useSyncExternalStore = __mod__.useSyncExternalStore
|
|
1938
2252
|
export const useTransition = __mod__.useTransition
|
|
1939
2253
|
export const version = __mod__.version
|
|
1940
|
-
|
|
1941
|
-
|
|
2254
|
+
export default __mod__
|