@hot-updater/react-native 0.12.4 → 0.12.6
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/LICENSE +21 -0
- package/dist/index.js +19 -1595
- package/dist/index.mjs +13 -1586
- package/dist/store.d.ts +1 -1
- package/package.json +7 -4
- package/src/store.ts +8 -4
- package/src/wrap.tsx +1 -1
- package/dist/index.js.LICENSE.txt +0 -19
- package/dist/index.mjs.LICENSE.txt +0 -19
package/dist/index.mjs
CHANGED
|
@@ -1,1569 +1,8 @@
|
|
|
1
|
-
/*! For license information please see index.mjs.LICENSE.txt */
|
|
2
1
|
import * as __WEBPACK_EXTERNAL_MODULE_react_native_4af9217e__ from "react-native";
|
|
3
2
|
import * as __WEBPACK_EXTERNAL_MODULE__hot_updater_js_db235456__ from "@hot-updater/js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_use_sync_external_store_shim_with_selector_83d70c15__ from "use-sync-external-store/shim/with-selector";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
4
5
|
var __webpack_modules__ = {
|
|
5
|
-
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js": function(module, exports, __webpack_require__) {
|
|
6
|
-
module = __webpack_require__.nmd(module);
|
|
7
|
-
/**
|
|
8
|
-
* @license React
|
|
9
|
-
* react.development.js
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/ if ("production" !== process.env.NODE_ENV) (function() {
|
|
16
|
-
'use strict';
|
|
17
|
-
if ('undefined' != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && 'function' == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart) __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
18
|
-
var ReactVersion = '18.3.1';
|
|
19
|
-
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
20
|
-
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
21
|
-
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
22
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
23
|
-
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
24
|
-
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
25
|
-
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
26
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
27
|
-
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
28
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
29
|
-
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
30
|
-
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
31
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
32
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
33
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
34
|
-
function getIteratorFn(maybeIterable) {
|
|
35
|
-
if (null === maybeIterable || 'object' != typeof maybeIterable) return null;
|
|
36
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
37
|
-
if ('function' == typeof maybeIterator) return maybeIterator;
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
var ReactCurrentDispatcher = {
|
|
41
|
-
current: null
|
|
42
|
-
};
|
|
43
|
-
var ReactCurrentBatchConfig = {
|
|
44
|
-
transition: null
|
|
45
|
-
};
|
|
46
|
-
var ReactCurrentActQueue = {
|
|
47
|
-
current: null,
|
|
48
|
-
isBatchingLegacy: false,
|
|
49
|
-
didScheduleLegacyUpdate: false
|
|
50
|
-
};
|
|
51
|
-
var ReactCurrentOwner = {
|
|
52
|
-
current: null
|
|
53
|
-
};
|
|
54
|
-
var ReactDebugCurrentFrame = {};
|
|
55
|
-
var currentExtraStackFrame = null;
|
|
56
|
-
function setExtraStackFrame(stack) {
|
|
57
|
-
currentExtraStackFrame = stack;
|
|
58
|
-
}
|
|
59
|
-
ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
|
|
60
|
-
currentExtraStackFrame = stack;
|
|
61
|
-
};
|
|
62
|
-
ReactDebugCurrentFrame.getCurrentStack = null;
|
|
63
|
-
ReactDebugCurrentFrame.getStackAddendum = function() {
|
|
64
|
-
var stack = '';
|
|
65
|
-
if (currentExtraStackFrame) stack += currentExtraStackFrame;
|
|
66
|
-
var impl = ReactDebugCurrentFrame.getCurrentStack;
|
|
67
|
-
if (impl) stack += impl() || '';
|
|
68
|
-
return stack;
|
|
69
|
-
};
|
|
70
|
-
var enableScopeAPI = false;
|
|
71
|
-
var enableCacheElement = false;
|
|
72
|
-
var enableTransitionTracing = false;
|
|
73
|
-
var enableLegacyHidden = false;
|
|
74
|
-
var enableDebugTracing = false;
|
|
75
|
-
var ReactSharedInternals = {
|
|
76
|
-
ReactCurrentDispatcher: ReactCurrentDispatcher,
|
|
77
|
-
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
|
78
|
-
ReactCurrentOwner: ReactCurrentOwner
|
|
79
|
-
};
|
|
80
|
-
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
|
|
81
|
-
ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
|
|
82
|
-
function warn(format) {
|
|
83
|
-
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)args[_key - 1] = arguments[_key];
|
|
84
|
-
printWarning('warn', format, args);
|
|
85
|
-
}
|
|
86
|
-
function error(format) {
|
|
87
|
-
for(var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++)args[_key2 - 1] = arguments[_key2];
|
|
88
|
-
printWarning('error', format, args);
|
|
89
|
-
}
|
|
90
|
-
function printWarning(level, format, args) {
|
|
91
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
92
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
93
|
-
if ('' !== stack) {
|
|
94
|
-
format += '%s';
|
|
95
|
-
args = args.concat([
|
|
96
|
-
stack
|
|
97
|
-
]);
|
|
98
|
-
}
|
|
99
|
-
var argsWithFormat = args.map(function(item) {
|
|
100
|
-
return String(item);
|
|
101
|
-
});
|
|
102
|
-
argsWithFormat.unshift('Warning: ' + format);
|
|
103
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
104
|
-
}
|
|
105
|
-
var didWarnStateUpdateForUnmountedComponent = {};
|
|
106
|
-
function warnNoop(publicInstance, callerName) {
|
|
107
|
-
var _constructor = publicInstance.constructor;
|
|
108
|
-
var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
|
|
109
|
-
var warningKey = componentName + "." + callerName;
|
|
110
|
-
if (didWarnStateUpdateForUnmountedComponent[warningKey]) return;
|
|
111
|
-
error("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.", callerName, componentName);
|
|
112
|
-
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
113
|
-
}
|
|
114
|
-
var ReactNoopUpdateQueue = {
|
|
115
|
-
isMounted: function(publicInstance) {
|
|
116
|
-
return false;
|
|
117
|
-
},
|
|
118
|
-
enqueueForceUpdate: function(publicInstance, callback, callerName) {
|
|
119
|
-
warnNoop(publicInstance, 'forceUpdate');
|
|
120
|
-
},
|
|
121
|
-
enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
|
|
122
|
-
warnNoop(publicInstance, 'replaceState');
|
|
123
|
-
},
|
|
124
|
-
enqueueSetState: function(publicInstance, partialState, callback, callerName) {
|
|
125
|
-
warnNoop(publicInstance, 'setState');
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
var assign = Object.assign;
|
|
129
|
-
var emptyObject = {};
|
|
130
|
-
Object.freeze(emptyObject);
|
|
131
|
-
function Component(props, context, updater) {
|
|
132
|
-
this.props = props;
|
|
133
|
-
this.context = context;
|
|
134
|
-
this.refs = emptyObject;
|
|
135
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
136
|
-
}
|
|
137
|
-
Component.prototype.isReactComponent = {};
|
|
138
|
-
Component.prototype.setState = function(partialState, callback) {
|
|
139
|
-
if ('object' != typeof partialState && 'function' != typeof partialState && null != partialState) throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
140
|
-
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
141
|
-
};
|
|
142
|
-
Component.prototype.forceUpdate = function(callback) {
|
|
143
|
-
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
|
|
144
|
-
};
|
|
145
|
-
var deprecatedAPIs = {
|
|
146
|
-
isMounted: [
|
|
147
|
-
'isMounted',
|
|
148
|
-
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
149
|
-
],
|
|
150
|
-
replaceState: [
|
|
151
|
-
'replaceState',
|
|
152
|
-
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
153
|
-
]
|
|
154
|
-
};
|
|
155
|
-
var defineDeprecationWarning = function(methodName, info) {
|
|
156
|
-
Object.defineProperty(Component.prototype, methodName, {
|
|
157
|
-
get: function() {
|
|
158
|
-
warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
};
|
|
162
|
-
for(var fnName in deprecatedAPIs)if (deprecatedAPIs.hasOwnProperty(fnName)) defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
163
|
-
function ComponentDummy() {}
|
|
164
|
-
ComponentDummy.prototype = Component.prototype;
|
|
165
|
-
function PureComponent(props, context, updater) {
|
|
166
|
-
this.props = props;
|
|
167
|
-
this.context = context;
|
|
168
|
-
this.refs = emptyObject;
|
|
169
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
170
|
-
}
|
|
171
|
-
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
172
|
-
pureComponentPrototype.constructor = PureComponent;
|
|
173
|
-
assign(pureComponentPrototype, Component.prototype);
|
|
174
|
-
pureComponentPrototype.isPureReactComponent = true;
|
|
175
|
-
function createRef() {
|
|
176
|
-
var refObject = {
|
|
177
|
-
current: null
|
|
178
|
-
};
|
|
179
|
-
Object.seal(refObject);
|
|
180
|
-
return refObject;
|
|
181
|
-
}
|
|
182
|
-
var isArrayImpl = Array.isArray;
|
|
183
|
-
function isArray(a) {
|
|
184
|
-
return isArrayImpl(a);
|
|
185
|
-
}
|
|
186
|
-
function typeName(value) {
|
|
187
|
-
var hasToStringTag = 'function' == typeof Symbol && Symbol.toStringTag;
|
|
188
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
189
|
-
return type;
|
|
190
|
-
}
|
|
191
|
-
function willCoercionThrow(value) {
|
|
192
|
-
try {
|
|
193
|
-
testStringCoercion(value);
|
|
194
|
-
return false;
|
|
195
|
-
} catch (e) {
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
function testStringCoercion(value) {
|
|
200
|
-
return '' + value;
|
|
201
|
-
}
|
|
202
|
-
function checkKeyStringCoercion(value) {
|
|
203
|
-
if (willCoercionThrow(value)) {
|
|
204
|
-
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
205
|
-
return testStringCoercion(value);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
209
|
-
var displayName = outerType.displayName;
|
|
210
|
-
if (displayName) return displayName;
|
|
211
|
-
var functionName = innerType.displayName || innerType.name || '';
|
|
212
|
-
return '' !== functionName ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
213
|
-
}
|
|
214
|
-
function getContextName(type) {
|
|
215
|
-
return type.displayName || 'Context';
|
|
216
|
-
}
|
|
217
|
-
function getComponentNameFromType(type) {
|
|
218
|
-
if (null == type) return null;
|
|
219
|
-
if ('number' == typeof type.tag) error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
|
220
|
-
if ('function' == typeof type) return type.displayName || type.name || null;
|
|
221
|
-
if ('string' == typeof type) return type;
|
|
222
|
-
switch(type){
|
|
223
|
-
case REACT_FRAGMENT_TYPE:
|
|
224
|
-
return 'Fragment';
|
|
225
|
-
case REACT_PORTAL_TYPE:
|
|
226
|
-
return 'Portal';
|
|
227
|
-
case REACT_PROFILER_TYPE:
|
|
228
|
-
return 'Profiler';
|
|
229
|
-
case REACT_STRICT_MODE_TYPE:
|
|
230
|
-
return 'StrictMode';
|
|
231
|
-
case REACT_SUSPENSE_TYPE:
|
|
232
|
-
return 'Suspense';
|
|
233
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
234
|
-
return 'SuspenseList';
|
|
235
|
-
}
|
|
236
|
-
if ('object' == typeof type) switch(type.$$typeof){
|
|
237
|
-
case REACT_CONTEXT_TYPE:
|
|
238
|
-
var context = type;
|
|
239
|
-
return getContextName(context) + '.Consumer';
|
|
240
|
-
case REACT_PROVIDER_TYPE:
|
|
241
|
-
var provider = type;
|
|
242
|
-
return getContextName(provider._context) + '.Provider';
|
|
243
|
-
case REACT_FORWARD_REF_TYPE:
|
|
244
|
-
return getWrappedName(type, type.render, 'ForwardRef');
|
|
245
|
-
case REACT_MEMO_TYPE:
|
|
246
|
-
var outerName = type.displayName || null;
|
|
247
|
-
if (null !== outerName) return outerName;
|
|
248
|
-
return getComponentNameFromType(type.type) || 'Memo';
|
|
249
|
-
case REACT_LAZY_TYPE:
|
|
250
|
-
var lazyComponent = type;
|
|
251
|
-
var payload = lazyComponent._payload;
|
|
252
|
-
var init = lazyComponent._init;
|
|
253
|
-
try {
|
|
254
|
-
return getComponentNameFromType(init(payload));
|
|
255
|
-
} catch (x) {
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
return null;
|
|
260
|
-
}
|
|
261
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
262
|
-
var RESERVED_PROPS = {
|
|
263
|
-
key: true,
|
|
264
|
-
ref: true,
|
|
265
|
-
__self: true,
|
|
266
|
-
__source: true
|
|
267
|
-
};
|
|
268
|
-
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
|
|
269
|
-
didWarnAboutStringRefs = {};
|
|
270
|
-
function hasValidRef(config) {
|
|
271
|
-
if (hasOwnProperty.call(config, 'ref')) {
|
|
272
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
273
|
-
if (getter && getter.isReactWarning) return false;
|
|
274
|
-
}
|
|
275
|
-
return void 0 !== config.ref;
|
|
276
|
-
}
|
|
277
|
-
function hasValidKey(config) {
|
|
278
|
-
if (hasOwnProperty.call(config, 'key')) {
|
|
279
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
280
|
-
if (getter && getter.isReactWarning) return false;
|
|
281
|
-
}
|
|
282
|
-
return void 0 !== config.key;
|
|
283
|
-
}
|
|
284
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
285
|
-
var warnAboutAccessingKey = function() {
|
|
286
|
-
if (!specialPropKeyWarningShown) {
|
|
287
|
-
specialPropKeyWarningShown = true;
|
|
288
|
-
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
292
|
-
Object.defineProperty(props, 'key', {
|
|
293
|
-
get: warnAboutAccessingKey,
|
|
294
|
-
configurable: true
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
298
|
-
var warnAboutAccessingRef = function() {
|
|
299
|
-
if (!specialPropRefWarningShown) {
|
|
300
|
-
specialPropRefWarningShown = true;
|
|
301
|
-
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
|
302
|
-
}
|
|
303
|
-
};
|
|
304
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
305
|
-
Object.defineProperty(props, 'ref', {
|
|
306
|
-
get: warnAboutAccessingRef,
|
|
307
|
-
configurable: true
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
function warnIfStringRefCannotBeAutoConverted(config) {
|
|
311
|
-
if ('string' == typeof config.ref && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
|
|
312
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
313
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
314
|
-
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);
|
|
315
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
320
|
-
var element = {
|
|
321
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
322
|
-
type: type,
|
|
323
|
-
key: key,
|
|
324
|
-
ref: ref,
|
|
325
|
-
props: props,
|
|
326
|
-
_owner: owner
|
|
327
|
-
};
|
|
328
|
-
element._store = {};
|
|
329
|
-
Object.defineProperty(element._store, 'validated', {
|
|
330
|
-
configurable: false,
|
|
331
|
-
enumerable: false,
|
|
332
|
-
writable: true,
|
|
333
|
-
value: false
|
|
334
|
-
});
|
|
335
|
-
Object.defineProperty(element, '_self', {
|
|
336
|
-
configurable: false,
|
|
337
|
-
enumerable: false,
|
|
338
|
-
writable: false,
|
|
339
|
-
value: self
|
|
340
|
-
});
|
|
341
|
-
Object.defineProperty(element, '_source', {
|
|
342
|
-
configurable: false,
|
|
343
|
-
enumerable: false,
|
|
344
|
-
writable: false,
|
|
345
|
-
value: source
|
|
346
|
-
});
|
|
347
|
-
if (Object.freeze) {
|
|
348
|
-
Object.freeze(element.props);
|
|
349
|
-
Object.freeze(element);
|
|
350
|
-
}
|
|
351
|
-
return element;
|
|
352
|
-
};
|
|
353
|
-
function createElement(type, config, children) {
|
|
354
|
-
var propName;
|
|
355
|
-
var props = {};
|
|
356
|
-
var key = null;
|
|
357
|
-
var ref = null;
|
|
358
|
-
var self = null;
|
|
359
|
-
var source = null;
|
|
360
|
-
if (null != config) {
|
|
361
|
-
if (hasValidRef(config)) {
|
|
362
|
-
ref = config.ref;
|
|
363
|
-
warnIfStringRefCannotBeAutoConverted(config);
|
|
364
|
-
}
|
|
365
|
-
if (hasValidKey(config)) {
|
|
366
|
-
checkKeyStringCoercion(config.key);
|
|
367
|
-
key = '' + config.key;
|
|
368
|
-
}
|
|
369
|
-
self = void 0 === config.__self ? null : config.__self;
|
|
370
|
-
source = void 0 === config.__source ? null : config.__source;
|
|
371
|
-
for(propName in config)if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) props[propName] = config[propName];
|
|
372
|
-
}
|
|
373
|
-
var childrenLength = arguments.length - 2;
|
|
374
|
-
if (1 === childrenLength) props.children = children;
|
|
375
|
-
else if (childrenLength > 1) {
|
|
376
|
-
var childArray = Array(childrenLength);
|
|
377
|
-
for(var i = 0; i < childrenLength; i++)childArray[i] = arguments[i + 2];
|
|
378
|
-
if (Object.freeze) Object.freeze(childArray);
|
|
379
|
-
props.children = childArray;
|
|
380
|
-
}
|
|
381
|
-
if (type && type.defaultProps) {
|
|
382
|
-
var defaultProps = type.defaultProps;
|
|
383
|
-
for(propName in defaultProps)if (void 0 === props[propName]) props[propName] = defaultProps[propName];
|
|
384
|
-
}
|
|
385
|
-
if (key || ref) {
|
|
386
|
-
var displayName = 'function' == typeof type ? type.displayName || type.name || 'Unknown' : type;
|
|
387
|
-
if (key) defineKeyPropWarningGetter(props, displayName);
|
|
388
|
-
if (ref) defineRefPropWarningGetter(props, displayName);
|
|
389
|
-
}
|
|
390
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
391
|
-
}
|
|
392
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
393
|
-
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
394
|
-
return newElement;
|
|
395
|
-
}
|
|
396
|
-
function cloneElement(element, config, children) {
|
|
397
|
-
if (null == element) throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
|
|
398
|
-
var propName;
|
|
399
|
-
var props = assign({}, element.props);
|
|
400
|
-
var key = element.key;
|
|
401
|
-
var ref = element.ref;
|
|
402
|
-
var self = element._self;
|
|
403
|
-
var source = element._source;
|
|
404
|
-
var owner = element._owner;
|
|
405
|
-
if (null != config) {
|
|
406
|
-
if (hasValidRef(config)) {
|
|
407
|
-
ref = config.ref;
|
|
408
|
-
owner = ReactCurrentOwner.current;
|
|
409
|
-
}
|
|
410
|
-
if (hasValidKey(config)) {
|
|
411
|
-
checkKeyStringCoercion(config.key);
|
|
412
|
-
key = '' + config.key;
|
|
413
|
-
}
|
|
414
|
-
var defaultProps;
|
|
415
|
-
if (element.type && element.type.defaultProps) defaultProps = element.type.defaultProps;
|
|
416
|
-
for(propName in config)if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
417
|
-
if (void 0 === config[propName] && void 0 !== defaultProps) props[propName] = defaultProps[propName];
|
|
418
|
-
else props[propName] = config[propName];
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
var childrenLength = arguments.length - 2;
|
|
422
|
-
if (1 === childrenLength) props.children = children;
|
|
423
|
-
else if (childrenLength > 1) {
|
|
424
|
-
var childArray = Array(childrenLength);
|
|
425
|
-
for(var i = 0; i < childrenLength; i++)childArray[i] = arguments[i + 2];
|
|
426
|
-
props.children = childArray;
|
|
427
|
-
}
|
|
428
|
-
return ReactElement(element.type, key, ref, self, source, owner, props);
|
|
429
|
-
}
|
|
430
|
-
function isValidElement(object) {
|
|
431
|
-
return 'object' == typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
432
|
-
}
|
|
433
|
-
var SEPARATOR = '.';
|
|
434
|
-
var SUBSEPARATOR = ':';
|
|
435
|
-
function escape(key) {
|
|
436
|
-
var escapeRegex = /[=:]/g;
|
|
437
|
-
var escaperLookup = {
|
|
438
|
-
'=': '=0',
|
|
439
|
-
':': '=2'
|
|
440
|
-
};
|
|
441
|
-
var escapedString = key.replace(escapeRegex, function(match) {
|
|
442
|
-
return escaperLookup[match];
|
|
443
|
-
});
|
|
444
|
-
return '$' + escapedString;
|
|
445
|
-
}
|
|
446
|
-
var didWarnAboutMaps = false;
|
|
447
|
-
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
448
|
-
function escapeUserProvidedKey(text) {
|
|
449
|
-
return text.replace(userProvidedKeyEscapeRegex, '$&/');
|
|
450
|
-
}
|
|
451
|
-
function getElementKey(element, index) {
|
|
452
|
-
if ('object' == typeof element && null !== element && null != element.key) {
|
|
453
|
-
checkKeyStringCoercion(element.key);
|
|
454
|
-
return escape('' + element.key);
|
|
455
|
-
}
|
|
456
|
-
return index.toString(36);
|
|
457
|
-
}
|
|
458
|
-
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
459
|
-
var type = typeof children;
|
|
460
|
-
if ('undefined' === type || 'boolean' === type) children = null;
|
|
461
|
-
var invokeCallback = false;
|
|
462
|
-
if (null === children) invokeCallback = true;
|
|
463
|
-
else switch(type){
|
|
464
|
-
case 'string':
|
|
465
|
-
case 'number':
|
|
466
|
-
invokeCallback = true;
|
|
467
|
-
break;
|
|
468
|
-
case 'object':
|
|
469
|
-
switch(children.$$typeof){
|
|
470
|
-
case REACT_ELEMENT_TYPE:
|
|
471
|
-
case REACT_PORTAL_TYPE:
|
|
472
|
-
invokeCallback = true;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
if (invokeCallback) {
|
|
476
|
-
var _child = children;
|
|
477
|
-
var mappedChild = callback(_child);
|
|
478
|
-
var childKey = '' === nameSoFar ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
|
|
479
|
-
if (isArray(mappedChild)) {
|
|
480
|
-
var escapedChildKey = '';
|
|
481
|
-
if (null != childKey) escapedChildKey = escapeUserProvidedKey(childKey) + '/';
|
|
482
|
-
mapIntoArray(mappedChild, array, escapedChildKey, '', function(c) {
|
|
483
|
-
return c;
|
|
484
|
-
});
|
|
485
|
-
} else if (null != mappedChild) {
|
|
486
|
-
if (isValidElement(mappedChild)) {
|
|
487
|
-
if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) checkKeyStringCoercion(mappedChild.key);
|
|
488
|
-
mappedChild = cloneAndReplaceKey(mappedChild, escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
|
|
489
|
-
}
|
|
490
|
-
array.push(mappedChild);
|
|
491
|
-
}
|
|
492
|
-
return 1;
|
|
493
|
-
}
|
|
494
|
-
var child;
|
|
495
|
-
var nextName;
|
|
496
|
-
var subtreeCount = 0;
|
|
497
|
-
var nextNamePrefix = '' === nameSoFar ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
498
|
-
if (isArray(children)) for(var i = 0; i < children.length; i++){
|
|
499
|
-
child = children[i];
|
|
500
|
-
nextName = nextNamePrefix + getElementKey(child, i);
|
|
501
|
-
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
var iteratorFn = getIteratorFn(children);
|
|
505
|
-
if ('function' == typeof iteratorFn) {
|
|
506
|
-
var iterableChildren = children;
|
|
507
|
-
if (iteratorFn === iterableChildren.entries) {
|
|
508
|
-
if (!didWarnAboutMaps) warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
|
|
509
|
-
didWarnAboutMaps = true;
|
|
510
|
-
}
|
|
511
|
-
var iterator = iteratorFn.call(iterableChildren);
|
|
512
|
-
var step;
|
|
513
|
-
var ii = 0;
|
|
514
|
-
while(!(step = iterator.next()).done){
|
|
515
|
-
child = step.value;
|
|
516
|
-
nextName = nextNamePrefix + getElementKey(child, ii++);
|
|
517
|
-
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
|
518
|
-
}
|
|
519
|
-
} else if ('object' === type) {
|
|
520
|
-
var childrenString = String(children);
|
|
521
|
-
throw new Error("Objects are not valid as a React child (found: " + ('[object Object]' === childrenString ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). If you meant to render a collection of children, use an array instead.");
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
return subtreeCount;
|
|
525
|
-
}
|
|
526
|
-
function mapChildren(children, func, context) {
|
|
527
|
-
if (null == children) return children;
|
|
528
|
-
var result = [];
|
|
529
|
-
var count = 0;
|
|
530
|
-
mapIntoArray(children, result, '', '', function(child) {
|
|
531
|
-
return func.call(context, child, count++);
|
|
532
|
-
});
|
|
533
|
-
return result;
|
|
534
|
-
}
|
|
535
|
-
function countChildren(children) {
|
|
536
|
-
var n = 0;
|
|
537
|
-
mapChildren(children, function() {
|
|
538
|
-
n++;
|
|
539
|
-
});
|
|
540
|
-
return n;
|
|
541
|
-
}
|
|
542
|
-
function forEachChildren(children, forEachFunc, forEachContext) {
|
|
543
|
-
mapChildren(children, function() {
|
|
544
|
-
forEachFunc.apply(this, arguments);
|
|
545
|
-
}, forEachContext);
|
|
546
|
-
}
|
|
547
|
-
function toArray(children) {
|
|
548
|
-
return mapChildren(children, function(child) {
|
|
549
|
-
return child;
|
|
550
|
-
}) || [];
|
|
551
|
-
}
|
|
552
|
-
function onlyChild(children) {
|
|
553
|
-
if (!isValidElement(children)) throw new Error('React.Children.only expected to receive a single React element child.');
|
|
554
|
-
return children;
|
|
555
|
-
}
|
|
556
|
-
function createContext(defaultValue) {
|
|
557
|
-
var context = {
|
|
558
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
559
|
-
_currentValue: defaultValue,
|
|
560
|
-
_currentValue2: defaultValue,
|
|
561
|
-
_threadCount: 0,
|
|
562
|
-
Provider: null,
|
|
563
|
-
Consumer: null,
|
|
564
|
-
_defaultValue: null,
|
|
565
|
-
_globalName: null
|
|
566
|
-
};
|
|
567
|
-
context.Provider = {
|
|
568
|
-
$$typeof: REACT_PROVIDER_TYPE,
|
|
569
|
-
_context: context
|
|
570
|
-
};
|
|
571
|
-
var hasWarnedAboutUsingNestedContextConsumers = false;
|
|
572
|
-
var hasWarnedAboutUsingConsumerProvider = false;
|
|
573
|
-
var hasWarnedAboutDisplayNameOnConsumer = false;
|
|
574
|
-
var Consumer = {
|
|
575
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
576
|
-
_context: context
|
|
577
|
-
};
|
|
578
|
-
Object.defineProperties(Consumer, {
|
|
579
|
-
Provider: {
|
|
580
|
-
get: function() {
|
|
581
|
-
if (!hasWarnedAboutUsingConsumerProvider) {
|
|
582
|
-
hasWarnedAboutUsingConsumerProvider = true;
|
|
583
|
-
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?");
|
|
584
|
-
}
|
|
585
|
-
return context.Provider;
|
|
586
|
-
},
|
|
587
|
-
set: function(_Provider) {
|
|
588
|
-
context.Provider = _Provider;
|
|
589
|
-
}
|
|
590
|
-
},
|
|
591
|
-
_currentValue: {
|
|
592
|
-
get: function() {
|
|
593
|
-
return context._currentValue;
|
|
594
|
-
},
|
|
595
|
-
set: function(_currentValue) {
|
|
596
|
-
context._currentValue = _currentValue;
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
_currentValue2: {
|
|
600
|
-
get: function() {
|
|
601
|
-
return context._currentValue2;
|
|
602
|
-
},
|
|
603
|
-
set: function(_currentValue2) {
|
|
604
|
-
context._currentValue2 = _currentValue2;
|
|
605
|
-
}
|
|
606
|
-
},
|
|
607
|
-
_threadCount: {
|
|
608
|
-
get: function() {
|
|
609
|
-
return context._threadCount;
|
|
610
|
-
},
|
|
611
|
-
set: function(_threadCount) {
|
|
612
|
-
context._threadCount = _threadCount;
|
|
613
|
-
}
|
|
614
|
-
},
|
|
615
|
-
Consumer: {
|
|
616
|
-
get: function() {
|
|
617
|
-
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
|
618
|
-
hasWarnedAboutUsingNestedContextConsumers = true;
|
|
619
|
-
error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
|
|
620
|
-
}
|
|
621
|
-
return context.Consumer;
|
|
622
|
-
}
|
|
623
|
-
},
|
|
624
|
-
displayName: {
|
|
625
|
-
get: function() {
|
|
626
|
-
return context.displayName;
|
|
627
|
-
},
|
|
628
|
-
set: function(displayName) {
|
|
629
|
-
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
|
630
|
-
warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
|
|
631
|
-
hasWarnedAboutDisplayNameOnConsumer = true;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
});
|
|
636
|
-
context.Consumer = Consumer;
|
|
637
|
-
context._currentRenderer = null;
|
|
638
|
-
context._currentRenderer2 = null;
|
|
639
|
-
return context;
|
|
640
|
-
}
|
|
641
|
-
var Uninitialized = -1;
|
|
642
|
-
var Pending = 0;
|
|
643
|
-
var Resolved = 1;
|
|
644
|
-
var Rejected = 2;
|
|
645
|
-
function lazyInitializer(payload) {
|
|
646
|
-
if (payload._status === Uninitialized) {
|
|
647
|
-
var ctor = payload._result;
|
|
648
|
-
var thenable = ctor();
|
|
649
|
-
thenable.then(function(moduleObject) {
|
|
650
|
-
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
651
|
-
var resolved = payload;
|
|
652
|
-
resolved._status = Resolved;
|
|
653
|
-
resolved._result = moduleObject;
|
|
654
|
-
}
|
|
655
|
-
}, function(error) {
|
|
656
|
-
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
657
|
-
var rejected = payload;
|
|
658
|
-
rejected._status = Rejected;
|
|
659
|
-
rejected._result = error;
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
if (payload._status === Uninitialized) {
|
|
663
|
-
var pending = payload;
|
|
664
|
-
pending._status = Pending;
|
|
665
|
-
pending._result = thenable;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
if (payload._status === Resolved) {
|
|
669
|
-
var moduleObject = payload._result;
|
|
670
|
-
if (void 0 === moduleObject) error("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?", moduleObject);
|
|
671
|
-
if (!('default' in moduleObject)) error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
|
|
672
|
-
return moduleObject.default;
|
|
673
|
-
}
|
|
674
|
-
throw payload._result;
|
|
675
|
-
}
|
|
676
|
-
function lazy(ctor) {
|
|
677
|
-
var payload = {
|
|
678
|
-
_status: Uninitialized,
|
|
679
|
-
_result: ctor
|
|
680
|
-
};
|
|
681
|
-
var lazyType = {
|
|
682
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
683
|
-
_payload: payload,
|
|
684
|
-
_init: lazyInitializer
|
|
685
|
-
};
|
|
686
|
-
var defaultProps;
|
|
687
|
-
var propTypes;
|
|
688
|
-
Object.defineProperties(lazyType, {
|
|
689
|
-
defaultProps: {
|
|
690
|
-
configurable: true,
|
|
691
|
-
get: function() {
|
|
692
|
-
return defaultProps;
|
|
693
|
-
},
|
|
694
|
-
set: function(newDefaultProps) {
|
|
695
|
-
error("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.");
|
|
696
|
-
defaultProps = newDefaultProps;
|
|
697
|
-
Object.defineProperty(lazyType, 'defaultProps', {
|
|
698
|
-
enumerable: true
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
},
|
|
702
|
-
propTypes: {
|
|
703
|
-
configurable: true,
|
|
704
|
-
get: function() {
|
|
705
|
-
return propTypes;
|
|
706
|
-
},
|
|
707
|
-
set: function(newPropTypes) {
|
|
708
|
-
error("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.");
|
|
709
|
-
propTypes = newPropTypes;
|
|
710
|
-
Object.defineProperty(lazyType, 'propTypes', {
|
|
711
|
-
enumerable: true
|
|
712
|
-
});
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
});
|
|
716
|
-
return lazyType;
|
|
717
|
-
}
|
|
718
|
-
function forwardRef(render) {
|
|
719
|
-
if (null != render && render.$$typeof === REACT_MEMO_TYPE) error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
|
|
720
|
-
else if ('function' != typeof render) error('forwardRef requires a render function but was given %s.', null === render ? 'null' : typeof render);
|
|
721
|
-
else if (0 !== render.length && 2 !== render.length) error('forwardRef render functions accept exactly two parameters: props and ref. %s', 1 === render.length ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
|
|
722
|
-
if (null != render) {
|
|
723
|
-
if (null != render.defaultProps || null != render.propTypes) error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
724
|
-
}
|
|
725
|
-
var elementType = {
|
|
726
|
-
$$typeof: REACT_FORWARD_REF_TYPE,
|
|
727
|
-
render: render
|
|
728
|
-
};
|
|
729
|
-
var ownName;
|
|
730
|
-
Object.defineProperty(elementType, 'displayName', {
|
|
731
|
-
enumerable: false,
|
|
732
|
-
configurable: true,
|
|
733
|
-
get: function() {
|
|
734
|
-
return ownName;
|
|
735
|
-
},
|
|
736
|
-
set: function(name) {
|
|
737
|
-
ownName = name;
|
|
738
|
-
if (!render.name && !render.displayName) render.displayName = name;
|
|
739
|
-
}
|
|
740
|
-
});
|
|
741
|
-
return elementType;
|
|
742
|
-
}
|
|
743
|
-
var REACT_MODULE_REFERENCE;
|
|
744
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
745
|
-
function isValidElementType(type) {
|
|
746
|
-
if ('string' == typeof type || 'function' == typeof type) return true;
|
|
747
|
-
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) return true;
|
|
748
|
-
if ('object' == typeof type && null !== type) {
|
|
749
|
-
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 || type.$$typeof === REACT_MODULE_REFERENCE || void 0 !== type.getModuleId) return true;
|
|
750
|
-
}
|
|
751
|
-
return false;
|
|
752
|
-
}
|
|
753
|
-
function memo(type, compare) {
|
|
754
|
-
if (!isValidElementType(type)) error("memo: The first argument must be a component. Instead received: %s", null === type ? 'null' : typeof type);
|
|
755
|
-
var elementType = {
|
|
756
|
-
$$typeof: REACT_MEMO_TYPE,
|
|
757
|
-
type: type,
|
|
758
|
-
compare: void 0 === compare ? null : compare
|
|
759
|
-
};
|
|
760
|
-
var ownName;
|
|
761
|
-
Object.defineProperty(elementType, 'displayName', {
|
|
762
|
-
enumerable: false,
|
|
763
|
-
configurable: true,
|
|
764
|
-
get: function() {
|
|
765
|
-
return ownName;
|
|
766
|
-
},
|
|
767
|
-
set: function(name) {
|
|
768
|
-
ownName = name;
|
|
769
|
-
if (!type.name && !type.displayName) type.displayName = name;
|
|
770
|
-
}
|
|
771
|
-
});
|
|
772
|
-
return elementType;
|
|
773
|
-
}
|
|
774
|
-
function resolveDispatcher() {
|
|
775
|
-
var dispatcher = ReactCurrentDispatcher.current;
|
|
776
|
-
if (null === dispatcher) 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.");
|
|
777
|
-
return dispatcher;
|
|
778
|
-
}
|
|
779
|
-
function useContext(Context) {
|
|
780
|
-
var dispatcher = resolveDispatcher();
|
|
781
|
-
if (void 0 !== Context._context) {
|
|
782
|
-
var realContext = Context._context;
|
|
783
|
-
if (realContext.Consumer === Context) error("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?");
|
|
784
|
-
else if (realContext.Provider === Context) error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
|
|
785
|
-
}
|
|
786
|
-
return dispatcher.useContext(Context);
|
|
787
|
-
}
|
|
788
|
-
function useState(initialState) {
|
|
789
|
-
var dispatcher = resolveDispatcher();
|
|
790
|
-
return dispatcher.useState(initialState);
|
|
791
|
-
}
|
|
792
|
-
function useReducer(reducer, initialArg, init) {
|
|
793
|
-
var dispatcher = resolveDispatcher();
|
|
794
|
-
return dispatcher.useReducer(reducer, initialArg, init);
|
|
795
|
-
}
|
|
796
|
-
function useRef(initialValue) {
|
|
797
|
-
var dispatcher = resolveDispatcher();
|
|
798
|
-
return dispatcher.useRef(initialValue);
|
|
799
|
-
}
|
|
800
|
-
function useEffect(create, deps) {
|
|
801
|
-
var dispatcher = resolveDispatcher();
|
|
802
|
-
return dispatcher.useEffect(create, deps);
|
|
803
|
-
}
|
|
804
|
-
function useInsertionEffect(create, deps) {
|
|
805
|
-
var dispatcher = resolveDispatcher();
|
|
806
|
-
return dispatcher.useInsertionEffect(create, deps);
|
|
807
|
-
}
|
|
808
|
-
function useLayoutEffect(create, deps) {
|
|
809
|
-
var dispatcher = resolveDispatcher();
|
|
810
|
-
return dispatcher.useLayoutEffect(create, deps);
|
|
811
|
-
}
|
|
812
|
-
function useCallback(callback, deps) {
|
|
813
|
-
var dispatcher = resolveDispatcher();
|
|
814
|
-
return dispatcher.useCallback(callback, deps);
|
|
815
|
-
}
|
|
816
|
-
function useMemo(create, deps) {
|
|
817
|
-
var dispatcher = resolveDispatcher();
|
|
818
|
-
return dispatcher.useMemo(create, deps);
|
|
819
|
-
}
|
|
820
|
-
function useImperativeHandle(ref, create, deps) {
|
|
821
|
-
var dispatcher = resolveDispatcher();
|
|
822
|
-
return dispatcher.useImperativeHandle(ref, create, deps);
|
|
823
|
-
}
|
|
824
|
-
function useDebugValue(value, formatterFn) {
|
|
825
|
-
var dispatcher = resolveDispatcher();
|
|
826
|
-
return dispatcher.useDebugValue(value, formatterFn);
|
|
827
|
-
}
|
|
828
|
-
function useTransition() {
|
|
829
|
-
var dispatcher = resolveDispatcher();
|
|
830
|
-
return dispatcher.useTransition();
|
|
831
|
-
}
|
|
832
|
-
function useDeferredValue(value) {
|
|
833
|
-
var dispatcher = resolveDispatcher();
|
|
834
|
-
return dispatcher.useDeferredValue(value);
|
|
835
|
-
}
|
|
836
|
-
function useId() {
|
|
837
|
-
var dispatcher = resolveDispatcher();
|
|
838
|
-
return dispatcher.useId();
|
|
839
|
-
}
|
|
840
|
-
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
841
|
-
var dispatcher = resolveDispatcher();
|
|
842
|
-
return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
843
|
-
}
|
|
844
|
-
var disabledDepth = 0;
|
|
845
|
-
var prevLog;
|
|
846
|
-
var prevInfo;
|
|
847
|
-
var prevWarn;
|
|
848
|
-
var prevError;
|
|
849
|
-
var prevGroup;
|
|
850
|
-
var prevGroupCollapsed;
|
|
851
|
-
var prevGroupEnd;
|
|
852
|
-
function disabledLog() {}
|
|
853
|
-
disabledLog.__reactDisabledLog = true;
|
|
854
|
-
function disableLogs() {
|
|
855
|
-
if (0 === disabledDepth) {
|
|
856
|
-
prevLog = console.log;
|
|
857
|
-
prevInfo = console.info;
|
|
858
|
-
prevWarn = console.warn;
|
|
859
|
-
prevError = console.error;
|
|
860
|
-
prevGroup = console.group;
|
|
861
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
862
|
-
prevGroupEnd = console.groupEnd;
|
|
863
|
-
var props = {
|
|
864
|
-
configurable: true,
|
|
865
|
-
enumerable: true,
|
|
866
|
-
value: disabledLog,
|
|
867
|
-
writable: true
|
|
868
|
-
};
|
|
869
|
-
Object.defineProperties(console, {
|
|
870
|
-
info: props,
|
|
871
|
-
log: props,
|
|
872
|
-
warn: props,
|
|
873
|
-
error: props,
|
|
874
|
-
group: props,
|
|
875
|
-
groupCollapsed: props,
|
|
876
|
-
groupEnd: props
|
|
877
|
-
});
|
|
878
|
-
}
|
|
879
|
-
disabledDepth++;
|
|
880
|
-
}
|
|
881
|
-
function reenableLogs() {
|
|
882
|
-
disabledDepth--;
|
|
883
|
-
if (0 === disabledDepth) {
|
|
884
|
-
var props = {
|
|
885
|
-
configurable: true,
|
|
886
|
-
enumerable: true,
|
|
887
|
-
writable: true
|
|
888
|
-
};
|
|
889
|
-
Object.defineProperties(console, {
|
|
890
|
-
log: assign({}, props, {
|
|
891
|
-
value: prevLog
|
|
892
|
-
}),
|
|
893
|
-
info: assign({}, props, {
|
|
894
|
-
value: prevInfo
|
|
895
|
-
}),
|
|
896
|
-
warn: assign({}, props, {
|
|
897
|
-
value: prevWarn
|
|
898
|
-
}),
|
|
899
|
-
error: assign({}, props, {
|
|
900
|
-
value: prevError
|
|
901
|
-
}),
|
|
902
|
-
group: assign({}, props, {
|
|
903
|
-
value: prevGroup
|
|
904
|
-
}),
|
|
905
|
-
groupCollapsed: assign({}, props, {
|
|
906
|
-
value: prevGroupCollapsed
|
|
907
|
-
}),
|
|
908
|
-
groupEnd: assign({}, props, {
|
|
909
|
-
value: prevGroupEnd
|
|
910
|
-
})
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
if (disabledDepth < 0) error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
914
|
-
}
|
|
915
|
-
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
|
|
916
|
-
var prefix;
|
|
917
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
918
|
-
if (void 0 === prefix) try {
|
|
919
|
-
throw Error();
|
|
920
|
-
} catch (x) {
|
|
921
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
922
|
-
prefix = match && match[1] || '';
|
|
923
|
-
}
|
|
924
|
-
return '\n' + prefix + name;
|
|
925
|
-
}
|
|
926
|
-
var reentry = false;
|
|
927
|
-
var componentFrameCache;
|
|
928
|
-
var PossiblyWeakMap = 'function' == typeof WeakMap ? WeakMap : Map;
|
|
929
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
930
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
931
|
-
if (!fn || reentry) return '';
|
|
932
|
-
var frame = componentFrameCache.get(fn);
|
|
933
|
-
if (void 0 !== frame) return frame;
|
|
934
|
-
var control;
|
|
935
|
-
reentry = true;
|
|
936
|
-
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
937
|
-
Error.prepareStackTrace = void 0;
|
|
938
|
-
var previousDispatcher;
|
|
939
|
-
previousDispatcher = ReactCurrentDispatcher$1.current;
|
|
940
|
-
ReactCurrentDispatcher$1.current = null;
|
|
941
|
-
disableLogs();
|
|
942
|
-
try {
|
|
943
|
-
if (construct) {
|
|
944
|
-
var Fake = function() {
|
|
945
|
-
throw Error();
|
|
946
|
-
};
|
|
947
|
-
Object.defineProperty(Fake.prototype, 'props', {
|
|
948
|
-
set: function() {
|
|
949
|
-
throw Error();
|
|
950
|
-
}
|
|
951
|
-
});
|
|
952
|
-
if ('object' == typeof Reflect && Reflect.construct) {
|
|
953
|
-
try {
|
|
954
|
-
Reflect.construct(Fake, []);
|
|
955
|
-
} catch (x) {
|
|
956
|
-
control = x;
|
|
957
|
-
}
|
|
958
|
-
Reflect.construct(fn, [], Fake);
|
|
959
|
-
} else {
|
|
960
|
-
try {
|
|
961
|
-
Fake.call();
|
|
962
|
-
} catch (x) {
|
|
963
|
-
control = x;
|
|
964
|
-
}
|
|
965
|
-
fn.call(Fake.prototype);
|
|
966
|
-
}
|
|
967
|
-
} else {
|
|
968
|
-
try {
|
|
969
|
-
throw Error();
|
|
970
|
-
} catch (x) {
|
|
971
|
-
control = x;
|
|
972
|
-
}
|
|
973
|
-
fn();
|
|
974
|
-
}
|
|
975
|
-
} catch (sample) {
|
|
976
|
-
if (sample && control && 'string' == typeof sample.stack) {
|
|
977
|
-
var sampleLines = sample.stack.split('\n');
|
|
978
|
-
var controlLines = control.stack.split('\n');
|
|
979
|
-
var s = sampleLines.length - 1;
|
|
980
|
-
var c = controlLines.length - 1;
|
|
981
|
-
while(s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c])c--;
|
|
982
|
-
for(; s >= 1 && c >= 0; s--, c--)if (sampleLines[s] !== controlLines[c]) {
|
|
983
|
-
if (1 !== s || 1 !== c) do {
|
|
984
|
-
s--;
|
|
985
|
-
c--;
|
|
986
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
987
|
-
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
|
|
988
|
-
if (fn.displayName && _frame.includes('<anonymous>')) _frame = _frame.replace('<anonymous>', fn.displayName);
|
|
989
|
-
if ('function' == typeof fn) componentFrameCache.set(fn, _frame);
|
|
990
|
-
return _frame;
|
|
991
|
-
}
|
|
992
|
-
}while (s >= 1 && c >= 0);
|
|
993
|
-
break;
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
} finally{
|
|
997
|
-
reentry = false;
|
|
998
|
-
ReactCurrentDispatcher$1.current = previousDispatcher;
|
|
999
|
-
reenableLogs();
|
|
1000
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
1001
|
-
}
|
|
1002
|
-
var name = fn ? fn.displayName || fn.name : '';
|
|
1003
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
1004
|
-
if ('function' == typeof fn) componentFrameCache.set(fn, syntheticFrame);
|
|
1005
|
-
return syntheticFrame;
|
|
1006
|
-
}
|
|
1007
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
1008
|
-
return describeNativeComponentFrame(fn, false);
|
|
1009
|
-
}
|
|
1010
|
-
function shouldConstruct(Component) {
|
|
1011
|
-
var prototype = Component.prototype;
|
|
1012
|
-
return !!(prototype && prototype.isReactComponent);
|
|
1013
|
-
}
|
|
1014
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
1015
|
-
if (null == type) return '';
|
|
1016
|
-
if ('function' == typeof type) return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
1017
|
-
if ('string' == typeof type) return describeBuiltInComponentFrame(type);
|
|
1018
|
-
switch(type){
|
|
1019
|
-
case REACT_SUSPENSE_TYPE:
|
|
1020
|
-
return describeBuiltInComponentFrame('Suspense');
|
|
1021
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
1022
|
-
return describeBuiltInComponentFrame('SuspenseList');
|
|
1023
|
-
}
|
|
1024
|
-
if ('object' == typeof type) switch(type.$$typeof){
|
|
1025
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1026
|
-
return describeFunctionComponentFrame(type.render);
|
|
1027
|
-
case REACT_MEMO_TYPE:
|
|
1028
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
1029
|
-
case REACT_LAZY_TYPE:
|
|
1030
|
-
var lazyComponent = type;
|
|
1031
|
-
var payload = lazyComponent._payload;
|
|
1032
|
-
var init = lazyComponent._init;
|
|
1033
|
-
try {
|
|
1034
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
1035
|
-
} catch (x) {}
|
|
1036
|
-
}
|
|
1037
|
-
return '';
|
|
1038
|
-
}
|
|
1039
|
-
var loggedTypeFailures = {};
|
|
1040
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1041
|
-
function setCurrentlyValidatingElement(element) {
|
|
1042
|
-
if (element) {
|
|
1043
|
-
var owner = element._owner;
|
|
1044
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1045
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
1046
|
-
} else ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
1047
|
-
}
|
|
1048
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
1049
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
1050
|
-
for(var typeSpecName in typeSpecs)if (has(typeSpecs, typeSpecName)) {
|
|
1051
|
-
var error$1 = void 0;
|
|
1052
|
-
try {
|
|
1053
|
-
if ('function' != typeof typeSpecs[typeSpecName]) {
|
|
1054
|
-
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1055
|
-
err.name = 'Invariant Violation';
|
|
1056
|
-
throw err;
|
|
1057
|
-
}
|
|
1058
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
1059
|
-
} catch (ex) {
|
|
1060
|
-
error$1 = ex;
|
|
1061
|
-
}
|
|
1062
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
1063
|
-
setCurrentlyValidatingElement(element);
|
|
1064
|
-
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);
|
|
1065
|
-
setCurrentlyValidatingElement(null);
|
|
1066
|
-
}
|
|
1067
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
1068
|
-
loggedTypeFailures[error$1.message] = true;
|
|
1069
|
-
setCurrentlyValidatingElement(element);
|
|
1070
|
-
error('Failed %s type: %s', location, error$1.message);
|
|
1071
|
-
setCurrentlyValidatingElement(null);
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
1076
|
-
if (element) {
|
|
1077
|
-
var owner = element._owner;
|
|
1078
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1079
|
-
setExtraStackFrame(stack);
|
|
1080
|
-
} else setExtraStackFrame(null);
|
|
1081
|
-
}
|
|
1082
|
-
var propTypesMisspellWarningShown;
|
|
1083
|
-
propTypesMisspellWarningShown = false;
|
|
1084
|
-
function getDeclarationErrorAddendum() {
|
|
1085
|
-
if (ReactCurrentOwner.current) {
|
|
1086
|
-
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
1087
|
-
if (name) return '\n\nCheck the render method of `' + name + '`.';
|
|
1088
|
-
}
|
|
1089
|
-
return '';
|
|
1090
|
-
}
|
|
1091
|
-
function getSourceInfoErrorAddendum(source) {
|
|
1092
|
-
if (void 0 !== source) {
|
|
1093
|
-
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
1094
|
-
var lineNumber = source.lineNumber;
|
|
1095
|
-
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
|
1096
|
-
}
|
|
1097
|
-
return '';
|
|
1098
|
-
}
|
|
1099
|
-
function getSourceInfoErrorAddendumForProps(elementProps) {
|
|
1100
|
-
if (null != elementProps) return getSourceInfoErrorAddendum(elementProps.__source);
|
|
1101
|
-
return '';
|
|
1102
|
-
}
|
|
1103
|
-
var ownerHasKeyUseWarning = {};
|
|
1104
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1105
|
-
var info = getDeclarationErrorAddendum();
|
|
1106
|
-
if (!info) {
|
|
1107
|
-
var parentName = 'string' == typeof parentType ? parentType : parentType.displayName || parentType.name;
|
|
1108
|
-
if (parentName) info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1109
|
-
}
|
|
1110
|
-
return info;
|
|
1111
|
-
}
|
|
1112
|
-
function validateExplicitKey(element, parentType) {
|
|
1113
|
-
if (!element._store || element._store.validated || null != element.key) return;
|
|
1114
|
-
element._store.validated = true;
|
|
1115
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1116
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) return;
|
|
1117
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
|
1118
|
-
var childOwner = '';
|
|
1119
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner.current) childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
1120
|
-
setCurrentlyValidatingElement$1(element);
|
|
1121
|
-
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
1122
|
-
setCurrentlyValidatingElement$1(null);
|
|
1123
|
-
}
|
|
1124
|
-
function validateChildKeys(node, parentType) {
|
|
1125
|
-
if ('object' != typeof node) return;
|
|
1126
|
-
if (isArray(node)) for(var i = 0; i < node.length; i++){
|
|
1127
|
-
var child = node[i];
|
|
1128
|
-
if (isValidElement(child)) validateExplicitKey(child, parentType);
|
|
1129
|
-
}
|
|
1130
|
-
else if (isValidElement(node)) {
|
|
1131
|
-
if (node._store) node._store.validated = true;
|
|
1132
|
-
} else if (node) {
|
|
1133
|
-
var iteratorFn = getIteratorFn(node);
|
|
1134
|
-
if ('function' == typeof iteratorFn) {
|
|
1135
|
-
if (iteratorFn !== node.entries) {
|
|
1136
|
-
var iterator = iteratorFn.call(node);
|
|
1137
|
-
var step;
|
|
1138
|
-
while(!(step = iterator.next()).done)if (isValidElement(step.value)) validateExplicitKey(step.value, parentType);
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
function validatePropTypes(element) {
|
|
1144
|
-
var type = element.type;
|
|
1145
|
-
if (null == type || 'string' == typeof type) return;
|
|
1146
|
-
var propTypes;
|
|
1147
|
-
if ('function' == typeof type) propTypes = type.propTypes;
|
|
1148
|
-
else {
|
|
1149
|
-
if ('object' != typeof type || type.$$typeof !== REACT_FORWARD_REF_TYPE && type.$$typeof !== REACT_MEMO_TYPE) return;
|
|
1150
|
-
propTypes = type.propTypes;
|
|
1151
|
-
}
|
|
1152
|
-
if (propTypes) {
|
|
1153
|
-
var name = getComponentNameFromType(type);
|
|
1154
|
-
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
1155
|
-
} else if (void 0 !== type.PropTypes && !propTypesMisspellWarningShown) {
|
|
1156
|
-
propTypesMisspellWarningShown = true;
|
|
1157
|
-
var _name = getComponentNameFromType(type);
|
|
1158
|
-
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
1159
|
-
}
|
|
1160
|
-
if ('function' == typeof type.getDefaultProps && !type.getDefaultProps.isReactClassApproved) error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1161
|
-
}
|
|
1162
|
-
function validateFragmentProps(fragment) {
|
|
1163
|
-
var keys = Object.keys(fragment.props);
|
|
1164
|
-
for(var i = 0; i < keys.length; i++){
|
|
1165
|
-
var key = keys[i];
|
|
1166
|
-
if ('children' !== key && 'key' !== key) {
|
|
1167
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1168
|
-
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
1169
|
-
setCurrentlyValidatingElement$1(null);
|
|
1170
|
-
break;
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
if (null !== fragment.ref) {
|
|
1174
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1175
|
-
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
1176
|
-
setCurrentlyValidatingElement$1(null);
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
function createElementWithValidation(type, props, children) {
|
|
1180
|
-
var validType = isValidElementType(type);
|
|
1181
|
-
if (!validType) {
|
|
1182
|
-
var info = '';
|
|
1183
|
-
if (void 0 === type || 'object' == typeof type && null !== type && 0 === Object.keys(type).length) info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
1184
|
-
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
|
|
1185
|
-
if (sourceInfo) info += sourceInfo;
|
|
1186
|
-
else info += getDeclarationErrorAddendum();
|
|
1187
|
-
var typeString;
|
|
1188
|
-
if (null === type) typeString = 'null';
|
|
1189
|
-
else if (isArray(type)) typeString = 'array';
|
|
1190
|
-
else if (void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1191
|
-
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
1192
|
-
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
1193
|
-
} else typeString = typeof type;
|
|
1194
|
-
error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
1195
|
-
}
|
|
1196
|
-
var element = createElement.apply(this, arguments);
|
|
1197
|
-
if (null == element) return element;
|
|
1198
|
-
if (validType) for(var i = 2; i < arguments.length; i++)validateChildKeys(arguments[i], type);
|
|
1199
|
-
if (type === REACT_FRAGMENT_TYPE) validateFragmentProps(element);
|
|
1200
|
-
else validatePropTypes(element);
|
|
1201
|
-
return element;
|
|
1202
|
-
}
|
|
1203
|
-
var didWarnAboutDeprecatedCreateFactory = false;
|
|
1204
|
-
function createFactoryWithValidation(type) {
|
|
1205
|
-
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
1206
|
-
validatedFactory.type = type;
|
|
1207
|
-
if (!didWarnAboutDeprecatedCreateFactory) {
|
|
1208
|
-
didWarnAboutDeprecatedCreateFactory = true;
|
|
1209
|
-
warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
|
|
1210
|
-
}
|
|
1211
|
-
Object.defineProperty(validatedFactory, 'type', {
|
|
1212
|
-
enumerable: false,
|
|
1213
|
-
get: function() {
|
|
1214
|
-
warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
|
|
1215
|
-
Object.defineProperty(this, 'type', {
|
|
1216
|
-
value: type
|
|
1217
|
-
});
|
|
1218
|
-
return type;
|
|
1219
|
-
}
|
|
1220
|
-
});
|
|
1221
|
-
return validatedFactory;
|
|
1222
|
-
}
|
|
1223
|
-
function cloneElementWithValidation(element, props, children) {
|
|
1224
|
-
var newElement = cloneElement.apply(this, arguments);
|
|
1225
|
-
for(var i = 2; i < arguments.length; i++)validateChildKeys(arguments[i], newElement.type);
|
|
1226
|
-
validatePropTypes(newElement);
|
|
1227
|
-
return newElement;
|
|
1228
|
-
}
|
|
1229
|
-
function startTransition(scope, options) {
|
|
1230
|
-
var prevTransition = ReactCurrentBatchConfig.transition;
|
|
1231
|
-
ReactCurrentBatchConfig.transition = {};
|
|
1232
|
-
var currentTransition = ReactCurrentBatchConfig.transition;
|
|
1233
|
-
ReactCurrentBatchConfig.transition._updatedFibers = new Set();
|
|
1234
|
-
try {
|
|
1235
|
-
scope();
|
|
1236
|
-
} finally{
|
|
1237
|
-
ReactCurrentBatchConfig.transition = prevTransition;
|
|
1238
|
-
if (null === prevTransition && currentTransition._updatedFibers) {
|
|
1239
|
-
var updatedFibersCount = currentTransition._updatedFibers.size;
|
|
1240
|
-
if (updatedFibersCount > 10) warn("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.");
|
|
1241
|
-
currentTransition._updatedFibers.clear();
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
var didWarnAboutMessageChannel = false;
|
|
1246
|
-
var enqueueTaskImpl = null;
|
|
1247
|
-
function enqueueTask(task) {
|
|
1248
|
-
if (null === enqueueTaskImpl) try {
|
|
1249
|
-
var requireString = ('require' + Math.random()).slice(0, 7);
|
|
1250
|
-
var nodeRequire = module && module[requireString];
|
|
1251
|
-
enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
|
|
1252
|
-
} catch (_err) {
|
|
1253
|
-
enqueueTaskImpl = function(callback) {
|
|
1254
|
-
if (false === didWarnAboutMessageChannel) {
|
|
1255
|
-
didWarnAboutMessageChannel = true;
|
|
1256
|
-
if ('undefined' == typeof MessageChannel) error("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.");
|
|
1257
|
-
}
|
|
1258
|
-
var channel = new MessageChannel();
|
|
1259
|
-
channel.port1.onmessage = callback;
|
|
1260
|
-
channel.port2.postMessage(void 0);
|
|
1261
|
-
};
|
|
1262
|
-
}
|
|
1263
|
-
return enqueueTaskImpl(task);
|
|
1264
|
-
}
|
|
1265
|
-
var actScopeDepth = 0;
|
|
1266
|
-
var didWarnNoAwaitAct = false;
|
|
1267
|
-
function act(callback) {
|
|
1268
|
-
var prevActScopeDepth = actScopeDepth;
|
|
1269
|
-
actScopeDepth++;
|
|
1270
|
-
if (null === ReactCurrentActQueue.current) ReactCurrentActQueue.current = [];
|
|
1271
|
-
var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
|
|
1272
|
-
var result;
|
|
1273
|
-
try {
|
|
1274
|
-
ReactCurrentActQueue.isBatchingLegacy = true;
|
|
1275
|
-
result = callback();
|
|
1276
|
-
if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
|
|
1277
|
-
var queue = ReactCurrentActQueue.current;
|
|
1278
|
-
if (null !== queue) {
|
|
1279
|
-
ReactCurrentActQueue.didScheduleLegacyUpdate = false;
|
|
1280
|
-
flushActQueue(queue);
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
} catch (error) {
|
|
1284
|
-
popActScope(prevActScopeDepth);
|
|
1285
|
-
throw error;
|
|
1286
|
-
} finally{
|
|
1287
|
-
ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
|
|
1288
|
-
}
|
|
1289
|
-
if (null !== result && 'object' == typeof result && 'function' == typeof result.then) {
|
|
1290
|
-
var thenableResult = result;
|
|
1291
|
-
var wasAwaited = false;
|
|
1292
|
-
var thenable = {
|
|
1293
|
-
then: function(resolve, reject) {
|
|
1294
|
-
wasAwaited = true;
|
|
1295
|
-
thenableResult.then(function(returnValue) {
|
|
1296
|
-
popActScope(prevActScopeDepth);
|
|
1297
|
-
if (0 === actScopeDepth) recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
1298
|
-
else resolve(returnValue);
|
|
1299
|
-
}, function(error) {
|
|
1300
|
-
popActScope(prevActScopeDepth);
|
|
1301
|
-
reject(error);
|
|
1302
|
-
});
|
|
1303
|
-
}
|
|
1304
|
-
};
|
|
1305
|
-
if (!didWarnNoAwaitAct && 'undefined' != typeof Promise) Promise.resolve().then(function() {}).then(function() {
|
|
1306
|
-
if (!wasAwaited) {
|
|
1307
|
-
didWarnNoAwaitAct = true;
|
|
1308
|
-
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 () => ...);");
|
|
1309
|
-
}
|
|
1310
|
-
});
|
|
1311
|
-
return thenable;
|
|
1312
|
-
}
|
|
1313
|
-
var returnValue = result;
|
|
1314
|
-
popActScope(prevActScopeDepth);
|
|
1315
|
-
if (0 === actScopeDepth) {
|
|
1316
|
-
var _queue = ReactCurrentActQueue.current;
|
|
1317
|
-
if (null !== _queue) {
|
|
1318
|
-
flushActQueue(_queue);
|
|
1319
|
-
ReactCurrentActQueue.current = null;
|
|
1320
|
-
}
|
|
1321
|
-
var _thenable = {
|
|
1322
|
-
then: function(resolve, reject) {
|
|
1323
|
-
if (null === ReactCurrentActQueue.current) {
|
|
1324
|
-
ReactCurrentActQueue.current = [];
|
|
1325
|
-
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
1326
|
-
} else resolve(returnValue);
|
|
1327
|
-
}
|
|
1328
|
-
};
|
|
1329
|
-
return _thenable;
|
|
1330
|
-
}
|
|
1331
|
-
var _thenable2 = {
|
|
1332
|
-
then: function(resolve, reject) {
|
|
1333
|
-
resolve(returnValue);
|
|
1334
|
-
}
|
|
1335
|
-
};
|
|
1336
|
-
return _thenable2;
|
|
1337
|
-
}
|
|
1338
|
-
function popActScope(prevActScopeDepth) {
|
|
1339
|
-
if (prevActScopeDepth !== actScopeDepth - 1) error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
|
|
1340
|
-
actScopeDepth = prevActScopeDepth;
|
|
1341
|
-
}
|
|
1342
|
-
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
1343
|
-
var queue = ReactCurrentActQueue.current;
|
|
1344
|
-
if (null !== queue) try {
|
|
1345
|
-
flushActQueue(queue);
|
|
1346
|
-
enqueueTask(function() {
|
|
1347
|
-
if (0 === queue.length) {
|
|
1348
|
-
ReactCurrentActQueue.current = null;
|
|
1349
|
-
resolve(returnValue);
|
|
1350
|
-
} else recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
1351
|
-
});
|
|
1352
|
-
} catch (error) {
|
|
1353
|
-
reject(error);
|
|
1354
|
-
}
|
|
1355
|
-
else resolve(returnValue);
|
|
1356
|
-
}
|
|
1357
|
-
var isFlushing = false;
|
|
1358
|
-
function flushActQueue(queue) {
|
|
1359
|
-
if (!isFlushing) {
|
|
1360
|
-
isFlushing = true;
|
|
1361
|
-
var i = 0;
|
|
1362
|
-
try {
|
|
1363
|
-
for(; i < queue.length; i++){
|
|
1364
|
-
var callback = queue[i];
|
|
1365
|
-
do callback = callback(true);
|
|
1366
|
-
while (null !== callback);
|
|
1367
|
-
}
|
|
1368
|
-
queue.length = 0;
|
|
1369
|
-
} catch (error) {
|
|
1370
|
-
queue = queue.slice(i + 1);
|
|
1371
|
-
throw error;
|
|
1372
|
-
} finally{
|
|
1373
|
-
isFlushing = false;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
var createElement$1 = createElementWithValidation;
|
|
1378
|
-
var cloneElement$1 = cloneElementWithValidation;
|
|
1379
|
-
var createFactory = createFactoryWithValidation;
|
|
1380
|
-
var Children = {
|
|
1381
|
-
map: mapChildren,
|
|
1382
|
-
forEach: forEachChildren,
|
|
1383
|
-
count: countChildren,
|
|
1384
|
-
toArray: toArray,
|
|
1385
|
-
only: onlyChild
|
|
1386
|
-
};
|
|
1387
|
-
exports.Children = Children;
|
|
1388
|
-
exports.Component = Component;
|
|
1389
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1390
|
-
exports.Profiler = REACT_PROFILER_TYPE;
|
|
1391
|
-
exports.PureComponent = PureComponent;
|
|
1392
|
-
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1393
|
-
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
1394
|
-
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
|
1395
|
-
exports.act = act;
|
|
1396
|
-
exports.cloneElement = cloneElement$1;
|
|
1397
|
-
exports.createContext = createContext;
|
|
1398
|
-
exports.createElement = createElement$1;
|
|
1399
|
-
exports.createFactory = createFactory;
|
|
1400
|
-
exports.createRef = createRef;
|
|
1401
|
-
exports.forwardRef = forwardRef;
|
|
1402
|
-
exports.isValidElement = isValidElement;
|
|
1403
|
-
exports.lazy = lazy;
|
|
1404
|
-
exports.memo = memo;
|
|
1405
|
-
exports.startTransition = startTransition;
|
|
1406
|
-
exports.unstable_act = act;
|
|
1407
|
-
exports.useCallback = useCallback;
|
|
1408
|
-
exports.useContext = useContext;
|
|
1409
|
-
exports.useDebugValue = useDebugValue;
|
|
1410
|
-
exports.useDeferredValue = useDeferredValue;
|
|
1411
|
-
exports.useEffect = useEffect;
|
|
1412
|
-
exports.useId = useId;
|
|
1413
|
-
exports.useImperativeHandle = useImperativeHandle;
|
|
1414
|
-
exports.useInsertionEffect = useInsertionEffect;
|
|
1415
|
-
exports.useLayoutEffect = useLayoutEffect;
|
|
1416
|
-
exports.useMemo = useMemo;
|
|
1417
|
-
exports.useReducer = useReducer;
|
|
1418
|
-
exports.useRef = useRef;
|
|
1419
|
-
exports.useState = useState;
|
|
1420
|
-
exports.useSyncExternalStore = useSyncExternalStore;
|
|
1421
|
-
exports.useTransition = useTransition;
|
|
1422
|
-
exports.version = ReactVersion;
|
|
1423
|
-
if ('undefined' != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && 'function' == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop) __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
1424
|
-
})();
|
|
1425
|
-
},
|
|
1426
|
-
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js": function(__unused_webpack_module, exports) {
|
|
1427
|
-
/**
|
|
1428
|
-
* @license React
|
|
1429
|
-
* react.production.min.js
|
|
1430
|
-
*
|
|
1431
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1432
|
-
*
|
|
1433
|
-
* This source code is licensed under the MIT license found in the
|
|
1434
|
-
* LICENSE file in the root directory of this source tree.
|
|
1435
|
-
*/ var l = Symbol.for("react.element"), n = Symbol.for("react.portal"), z = (Symbol.for("react.fragment"), Symbol.for("react.strict_mode"), Symbol.for("react.profiler"), Symbol.for("react.provider"), Symbol.for("react.context"), Symbol.for("react.forward_ref"), Symbol.for("react.suspense"), Symbol.for("react.memo"), Symbol.for("react.lazy"), Symbol.iterator);
|
|
1436
|
-
function A(a) {
|
|
1437
|
-
if (null === a || "object" != typeof a) return null;
|
|
1438
|
-
a = z && a[z] || a["@@iterator"];
|
|
1439
|
-
return "function" == typeof a ? a : null;
|
|
1440
|
-
}
|
|
1441
|
-
var B = {
|
|
1442
|
-
isMounted: function() {
|
|
1443
|
-
return !1;
|
|
1444
|
-
},
|
|
1445
|
-
enqueueForceUpdate: function() {},
|
|
1446
|
-
enqueueReplaceState: function() {},
|
|
1447
|
-
enqueueSetState: function() {}
|
|
1448
|
-
}, C = Object.assign, D = {};
|
|
1449
|
-
function E(a, b, e) {
|
|
1450
|
-
this.props = a;
|
|
1451
|
-
this.context = b;
|
|
1452
|
-
this.refs = D;
|
|
1453
|
-
this.updater = e || B;
|
|
1454
|
-
}
|
|
1455
|
-
E.prototype.isReactComponent = {};
|
|
1456
|
-
E.prototype.setState = function(a, b) {
|
|
1457
|
-
if ("object" != typeof a && "function" != typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
1458
|
-
this.updater.enqueueSetState(this, a, b, "setState");
|
|
1459
|
-
};
|
|
1460
|
-
E.prototype.forceUpdate = function(a) {
|
|
1461
|
-
this.updater.enqueueForceUpdate(this, a, "forceUpdate");
|
|
1462
|
-
};
|
|
1463
|
-
function F() {}
|
|
1464
|
-
F.prototype = E.prototype;
|
|
1465
|
-
function G(a, b, e) {
|
|
1466
|
-
this.props = a;
|
|
1467
|
-
this.context = b;
|
|
1468
|
-
this.refs = D;
|
|
1469
|
-
this.updater = e || B;
|
|
1470
|
-
}
|
|
1471
|
-
var H = G.prototype = new F;
|
|
1472
|
-
H.constructor = G;
|
|
1473
|
-
C(H, E.prototype);
|
|
1474
|
-
H.isPureReactComponent = !0;
|
|
1475
|
-
var I = Array.isArray, J = Object.prototype.hasOwnProperty, K = {
|
|
1476
|
-
current: null
|
|
1477
|
-
}, L = {
|
|
1478
|
-
key: !0,
|
|
1479
|
-
ref: !0,
|
|
1480
|
-
__self: !0,
|
|
1481
|
-
__source: !0
|
|
1482
|
-
};
|
|
1483
|
-
function N(a, b) {
|
|
1484
|
-
return {
|
|
1485
|
-
$$typeof: l,
|
|
1486
|
-
type: a.type,
|
|
1487
|
-
key: b,
|
|
1488
|
-
ref: a.ref,
|
|
1489
|
-
props: a.props,
|
|
1490
|
-
_owner: a._owner
|
|
1491
|
-
};
|
|
1492
|
-
}
|
|
1493
|
-
function O(a) {
|
|
1494
|
-
return "object" == typeof a && null !== a && a.$$typeof === l;
|
|
1495
|
-
}
|
|
1496
|
-
function escape(a) {
|
|
1497
|
-
var b = {
|
|
1498
|
-
"=": "=0",
|
|
1499
|
-
":": "=2"
|
|
1500
|
-
};
|
|
1501
|
-
return "$" + a.replace(/[=:]/g, function(a) {
|
|
1502
|
-
return b[a];
|
|
1503
|
-
});
|
|
1504
|
-
}
|
|
1505
|
-
var P = /\/+/g;
|
|
1506
|
-
function Q(a, b) {
|
|
1507
|
-
return "object" == typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
|
|
1508
|
-
}
|
|
1509
|
-
function R(a, b, e, d, c) {
|
|
1510
|
-
var k = typeof a;
|
|
1511
|
-
if ("undefined" === k || "boolean" === k) a = null;
|
|
1512
|
-
var h = !1;
|
|
1513
|
-
if (null === a) h = !0;
|
|
1514
|
-
else switch(k){
|
|
1515
|
-
case "string":
|
|
1516
|
-
case "number":
|
|
1517
|
-
h = !0;
|
|
1518
|
-
break;
|
|
1519
|
-
case "object":
|
|
1520
|
-
switch(a.$$typeof){
|
|
1521
|
-
case l:
|
|
1522
|
-
case n:
|
|
1523
|
-
h = !0;
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
if (h) return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a) {
|
|
1527
|
-
return a;
|
|
1528
|
-
})) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
|
|
1529
|
-
h = 0;
|
|
1530
|
-
d = "" === d ? "." : d + ":";
|
|
1531
|
-
if (I(a)) for(var g = 0; g < a.length; g++){
|
|
1532
|
-
k = a[g];
|
|
1533
|
-
var f = d + Q(k, g);
|
|
1534
|
-
h += R(k, b, e, f, c);
|
|
1535
|
-
}
|
|
1536
|
-
else if (f = A(a), "function" == typeof f) for(a = f.call(a), g = 0; !(k = a.next()).done;)k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c);
|
|
1537
|
-
else if ("object" === k) throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
|
|
1538
|
-
return h;
|
|
1539
|
-
}
|
|
1540
|
-
var U = {
|
|
1541
|
-
current: null
|
|
1542
|
-
};
|
|
1543
|
-
exports.useCallback = function(a, b) {
|
|
1544
|
-
return U.current.useCallback(a, b);
|
|
1545
|
-
};
|
|
1546
|
-
exports.useEffect = function(a, b) {
|
|
1547
|
-
return U.current.useEffect(a, b);
|
|
1548
|
-
};
|
|
1549
|
-
exports.useLayoutEffect = function(a, b) {
|
|
1550
|
-
return U.current.useLayoutEffect(a, b);
|
|
1551
|
-
};
|
|
1552
|
-
exports.useRef = function(a) {
|
|
1553
|
-
return U.current.useRef(a);
|
|
1554
|
-
};
|
|
1555
|
-
exports.useState = function(a) {
|
|
1556
|
-
return U.current.useState(a);
|
|
1557
|
-
};
|
|
1558
|
-
exports.useSyncExternalStore = function(a, b, e) {
|
|
1559
|
-
return U.current.useSyncExternalStore(a, b, e);
|
|
1560
|
-
};
|
|
1561
|
-
"18.3.1";
|
|
1562
|
-
},
|
|
1563
|
-
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
1564
|
-
if ('production' === process.env.NODE_ENV) module.exports = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js");
|
|
1565
|
-
else module.exports = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js");
|
|
1566
|
-
},
|
|
1567
6
|
"./src/specs/NativeHotUpdater.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1568
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
1569
8
|
Z: ()=>NativeHotUpdater
|
|
@@ -1580,16 +19,13 @@ function __webpack_require__(moduleId) {
|
|
|
1580
19
|
var cachedModule = __webpack_module_cache__[moduleId];
|
|
1581
20
|
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
1582
21
|
var module = __webpack_module_cache__[moduleId] = {
|
|
1583
|
-
id: moduleId,
|
|
1584
|
-
loaded: false,
|
|
1585
22
|
exports: {}
|
|
1586
23
|
};
|
|
1587
24
|
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
1588
|
-
module.loaded = true;
|
|
1589
25
|
return module.exports;
|
|
1590
26
|
}
|
|
1591
27
|
(()=>{
|
|
1592
|
-
__webpack_require__.d =
|
|
28
|
+
__webpack_require__.d = (exports, definition)=>{
|
|
1593
29
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
1594
30
|
enumerable: true,
|
|
1595
31
|
get: definition[key]
|
|
@@ -1597,16 +33,7 @@ function __webpack_require__(moduleId) {
|
|
|
1597
33
|
};
|
|
1598
34
|
})();
|
|
1599
35
|
(()=>{
|
|
1600
|
-
__webpack_require__.o =
|
|
1601
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1602
|
-
};
|
|
1603
|
-
})();
|
|
1604
|
-
(()=>{
|
|
1605
|
-
__webpack_require__.nmd = function(module) {
|
|
1606
|
-
module.paths = [];
|
|
1607
|
-
if (!module.children) module.children = [];
|
|
1608
|
-
return module;
|
|
1609
|
-
};
|
|
36
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1610
37
|
})();
|
|
1611
38
|
var external_react_native_ = __webpack_require__("react-native");
|
|
1612
39
|
const ensureUpdateInfo = async (source, { appVersion, bundleId, platform }, requestHeaders)=>{
|
|
@@ -1703,7 +130,7 @@ const runUpdateProcess = async ({ reloadOnForceUpdate = true, ...checkForUpdateC
|
|
|
1703
130
|
id: updateInfo.id
|
|
1704
131
|
};
|
|
1705
132
|
};
|
|
1706
|
-
|
|
133
|
+
const { useSyncExternalStoreWithSelector } = __WEBPACK_EXTERNAL_MODULE_use_sync_external_store_shim_with_selector_83d70c15__["default"];
|
|
1707
134
|
const createHotUpdaterStore = ()=>{
|
|
1708
135
|
let state = {
|
|
1709
136
|
progress: 0,
|
|
@@ -1732,17 +159,17 @@ const createHotUpdaterStore = ()=>{
|
|
|
1732
159
|
};
|
|
1733
160
|
};
|
|
1734
161
|
const hotUpdaterStore = createHotUpdaterStore();
|
|
1735
|
-
const useHotUpdaterStore = ()=>
|
|
162
|
+
const useHotUpdaterStore = (selector = (snapshot)=>snapshot)=>useSyncExternalStoreWithSelector(hotUpdaterStore.subscribe, hotUpdaterStore.getSnapshot, hotUpdaterStore.getSnapshot, selector);
|
|
1736
163
|
function useEventCallback(fn) {
|
|
1737
|
-
const callbackRef = (0,
|
|
164
|
+
const callbackRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(()=>{
|
|
1738
165
|
throw new Error("Cannot call an event handler while rendering.");
|
|
1739
166
|
});
|
|
1740
|
-
(0,
|
|
167
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
|
|
1741
168
|
callbackRef.current = fn;
|
|
1742
169
|
}, [
|
|
1743
170
|
fn
|
|
1744
171
|
]);
|
|
1745
|
-
return (0,
|
|
172
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((...args)=>callbackRef.current?.(...args), [
|
|
1746
173
|
callbackRef
|
|
1747
174
|
]);
|
|
1748
175
|
}
|
|
@@ -1750,8 +177,8 @@ function wrap(config) {
|
|
|
1750
177
|
const { reloadOnForceUpdate = true, ...restConfig } = config;
|
|
1751
178
|
return (WrappedComponent)=>{
|
|
1752
179
|
const HotUpdaterHOC = ()=>{
|
|
1753
|
-
const
|
|
1754
|
-
const [updateStatus, setUpdateStatus] = (0,
|
|
180
|
+
const progress = useHotUpdaterStore((state)=>state.progress);
|
|
181
|
+
const [updateStatus, setUpdateStatus] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)("CHECK_FOR_UPDATE");
|
|
1755
182
|
const initHotUpdater = useEventCallback(async ()=>{
|
|
1756
183
|
try {
|
|
1757
184
|
setUpdateStatus("CHECK_FOR_UPDATE");
|
|
@@ -1792,12 +219,12 @@ function wrap(config) {
|
|
|
1792
219
|
throw error;
|
|
1793
220
|
}
|
|
1794
221
|
});
|
|
1795
|
-
(0,
|
|
222
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
1796
223
|
restConfig.onProgress?.(progress);
|
|
1797
224
|
}, [
|
|
1798
225
|
progress
|
|
1799
226
|
]);
|
|
1800
|
-
(0,
|
|
227
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
|
|
1801
228
|
initHotUpdater();
|
|
1802
229
|
}, []);
|
|
1803
230
|
if (restConfig.fallbackComponent && "UPDATE_PROCESS_COMPLETED" !== updateStatus) {
|