react-dom 16.8.0-alpha.1 → 16.8.0
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/build-info.json +5 -5
- package/cjs/react-dom-server.browser.development.js +102 -45
- package/cjs/react-dom-server.browser.production.min.js +10 -10
- package/cjs/react-dom-server.node.development.js +102 -45
- package/cjs/react-dom-server.node.production.min.js +10 -10
- package/cjs/react-dom-test-utils.development.js +33 -2
- package/cjs/react-dom-test-utils.production.min.js +9 -9
- package/cjs/react-dom-unstable-fire.development.js +4212 -3555
- package/cjs/react-dom-unstable-fire.production.min.js +208 -200
- package/cjs/react-dom-unstable-fire.profiling.min.js +191 -188
- package/cjs/react-dom-unstable-fizz.browser.development.js +1 -1
- package/cjs/react-dom-unstable-fizz.browser.production.min.js +1 -1
- package/cjs/react-dom-unstable-fizz.node.development.js +1 -1
- package/cjs/react-dom-unstable-fizz.node.production.min.js +1 -1
- package/cjs/react-dom-unstable-native-dependencies.development.js +1 -1
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +1 -1
- package/cjs/react-dom.development.js +4504 -3848
- package/cjs/react-dom.production.min.js +208 -200
- package/cjs/react-dom.profiling.min.js +191 -188
- package/package.json +7 -3
- package/umd/react-dom-server.browser.development.js +102 -45
- package/umd/react-dom-server.browser.production.min.js +19 -19
- package/umd/react-dom-test-utils.development.js +33 -2
- package/umd/react-dom-test-utils.production.min.js +21 -21
- package/umd/react-dom-unstable-fire.development.js +4212 -3555
- package/umd/react-dom-unstable-fire.production.min.js +207 -202
- package/umd/react-dom-unstable-fire.profiling.min.js +212 -209
- package/umd/react-dom-unstable-fizz.browser.development.js +1 -1
- package/umd/react-dom-unstable-fizz.browser.production.min.js +1 -1
- package/umd/react-dom-unstable-native-dependencies.development.js +1 -1
- package/umd/react-dom-unstable-native-dependencies.production.min.js +1 -1
- package/umd/react-dom.development.js +4504 -3848
- package/umd/react-dom.production.min.js +207 -202
- package/umd/react-dom.profiling.min.js +212 -209
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dom",
|
|
3
|
-
"version": "16.8.0
|
|
3
|
+
"version": "16.8.0",
|
|
4
4
|
"description": "React package for working with the DOM.",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/facebook/react.git",
|
|
9
|
+
"directory": "packages/react-dom"
|
|
10
|
+
},
|
|
7
11
|
"keywords": [
|
|
8
12
|
"react"
|
|
9
13
|
],
|
|
@@ -16,7 +20,7 @@
|
|
|
16
20
|
"loose-envify": "^1.1.0",
|
|
17
21
|
"object-assign": "^4.1.1",
|
|
18
22
|
"prop-types": "^15.6.2",
|
|
19
|
-
"scheduler": "^0.13.0
|
|
23
|
+
"scheduler": "^0.13.0"
|
|
20
24
|
},
|
|
21
25
|
"peerDependencies": {
|
|
22
26
|
"react": "^16.0.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.8.0
|
|
1
|
+
/** @license React v16.8.0
|
|
2
2
|
* react-dom-server.browser.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -62,7 +62,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
62
62
|
|
|
63
63
|
// TODO: this is special because it gets imported during build.
|
|
64
64
|
|
|
65
|
-
var ReactVersion = '16.8.0
|
|
65
|
+
var ReactVersion = '16.8.0';
|
|
66
66
|
|
|
67
67
|
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
68
68
|
|
|
@@ -312,7 +312,6 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
312
312
|
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
|
313
313
|
};
|
|
314
314
|
|
|
315
|
-
var enableHooks = true;
|
|
316
315
|
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
|
317
316
|
|
|
318
317
|
|
|
@@ -1007,21 +1006,6 @@ function is(x, y) {
|
|
|
1007
1006
|
;
|
|
1008
1007
|
}
|
|
1009
1008
|
|
|
1010
|
-
function areHookInputsEqual(arr1, arr2) {
|
|
1011
|
-
// Don't bother comparing lengths in prod because these arrays should be
|
|
1012
|
-
// passed inline.
|
|
1013
|
-
{
|
|
1014
|
-
!(arr1.length === arr2.length) ? warning$1(false, 'Detected a variable number of hook dependencies. The length of the ' + 'dependencies array should be constant between renders.\n\n' + 'Previous: %s\n' + 'Incoming: %s', arr1.join(', '), arr2.join(', ')) : void 0;
|
|
1015
|
-
}
|
|
1016
|
-
for (var i = 0; i < arr1.length; i++) {
|
|
1017
|
-
if (is(arr1[i], arr2[i])) {
|
|
1018
|
-
continue;
|
|
1019
|
-
}
|
|
1020
|
-
return false;
|
|
1021
|
-
}
|
|
1022
|
-
return true;
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
1009
|
var currentlyRenderingComponent = null;
|
|
1026
1010
|
var firstWorkInProgressHook = null;
|
|
1027
1011
|
var workInProgressHook = null;
|
|
@@ -1035,12 +1019,47 @@ var renderPhaseUpdates = null;
|
|
|
1035
1019
|
var numberOfReRenders = 0;
|
|
1036
1020
|
var RE_RENDER_LIMIT = 25;
|
|
1037
1021
|
|
|
1022
|
+
var isInHookUserCodeInDev = false;
|
|
1023
|
+
|
|
1024
|
+
// In DEV, this is the name of the currently executing primitive hook
|
|
1025
|
+
var currentHookNameInDev = void 0;
|
|
1026
|
+
|
|
1038
1027
|
function resolveCurrentlyRenderingComponent() {
|
|
1039
|
-
!(currentlyRenderingComponent !== null) ? invariant(false, 'Hooks can only be called inside the body of a function component.') : void 0;
|
|
1028
|
+
!(currentlyRenderingComponent !== null) ? invariant(false, 'Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)') : void 0;
|
|
1029
|
+
{
|
|
1030
|
+
!!isInHookUserCodeInDev ? warning$1(false, 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks') : void 0;
|
|
1031
|
+
}
|
|
1040
1032
|
return currentlyRenderingComponent;
|
|
1041
1033
|
}
|
|
1042
1034
|
|
|
1035
|
+
function areHookInputsEqual(nextDeps, prevDeps) {
|
|
1036
|
+
if (prevDeps === null) {
|
|
1037
|
+
{
|
|
1038
|
+
warning$1(false, '%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
|
|
1039
|
+
}
|
|
1040
|
+
return false;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
{
|
|
1044
|
+
// Don't bother comparing lengths in prod because these arrays should be
|
|
1045
|
+
// passed inline.
|
|
1046
|
+
if (nextDeps.length !== prevDeps.length) {
|
|
1047
|
+
warning$1(false, 'The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, '[' + nextDeps.join(', ') + ']', '[' + prevDeps.join(', ') + ']');
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
|
|
1051
|
+
if (is(nextDeps[i], prevDeps[i])) {
|
|
1052
|
+
continue;
|
|
1053
|
+
}
|
|
1054
|
+
return false;
|
|
1055
|
+
}
|
|
1056
|
+
return true;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1043
1059
|
function createHook() {
|
|
1060
|
+
if (numberOfReRenders > 0) {
|
|
1061
|
+
invariant(false, 'Rendered more hooks than during the previous render');
|
|
1062
|
+
}
|
|
1044
1063
|
return {
|
|
1045
1064
|
memoizedState: null,
|
|
1046
1065
|
queue: null,
|
|
@@ -1075,6 +1094,9 @@ function createWorkInProgressHook() {
|
|
|
1075
1094
|
|
|
1076
1095
|
function prepareToUseHooks(componentIdentity) {
|
|
1077
1096
|
currentlyRenderingComponent = componentIdentity;
|
|
1097
|
+
{
|
|
1098
|
+
isInHookUserCodeInDev = false;
|
|
1099
|
+
}
|
|
1078
1100
|
|
|
1079
1101
|
// The following should have already been reset
|
|
1080
1102
|
// didScheduleRenderPhaseUpdate = false;
|
|
@@ -1106,6 +1128,9 @@ function finishHooks(Component, props, children, refOrContext) {
|
|
|
1106
1128
|
numberOfReRenders = 0;
|
|
1107
1129
|
renderPhaseUpdates = null;
|
|
1108
1130
|
workInProgressHook = null;
|
|
1131
|
+
{
|
|
1132
|
+
isInHookUserCodeInDev = false;
|
|
1133
|
+
}
|
|
1109
1134
|
|
|
1110
1135
|
// These were reset above
|
|
1111
1136
|
// currentlyRenderingComponent = null;
|
|
@@ -1121,10 +1146,16 @@ function finishHooks(Component, props, children, refOrContext) {
|
|
|
1121
1146
|
function readContext(context, observedBits) {
|
|
1122
1147
|
var threadID = currentThreadID;
|
|
1123
1148
|
validateContextBounds(context, threadID);
|
|
1149
|
+
{
|
|
1150
|
+
!!isInHookUserCodeInDev ? warning$1(false, 'Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().') : void 0;
|
|
1151
|
+
}
|
|
1124
1152
|
return context[threadID];
|
|
1125
1153
|
}
|
|
1126
1154
|
|
|
1127
1155
|
function useContext(context, observedBits) {
|
|
1156
|
+
{
|
|
1157
|
+
currentHookNameInDev = 'useContext';
|
|
1158
|
+
}
|
|
1128
1159
|
resolveCurrentlyRenderingComponent();
|
|
1129
1160
|
var threadID = currentThreadID;
|
|
1130
1161
|
validateContextBounds(context, threadID);
|
|
@@ -1136,12 +1167,20 @@ function basicStateReducer(state, action) {
|
|
|
1136
1167
|
}
|
|
1137
1168
|
|
|
1138
1169
|
function useState(initialState) {
|
|
1170
|
+
{
|
|
1171
|
+
currentHookNameInDev = 'useState';
|
|
1172
|
+
}
|
|
1139
1173
|
return useReducer(basicStateReducer,
|
|
1140
1174
|
// useReducer has a special case to support lazy useState initializers
|
|
1141
1175
|
initialState);
|
|
1142
1176
|
}
|
|
1143
1177
|
|
|
1144
|
-
function useReducer(reducer,
|
|
1178
|
+
function useReducer(reducer, initialArg, init) {
|
|
1179
|
+
{
|
|
1180
|
+
if (reducer !== basicStateReducer) {
|
|
1181
|
+
currentHookNameInDev = 'useReducer';
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1145
1184
|
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
|
|
1146
1185
|
workInProgressHook = createWorkInProgressHook();
|
|
1147
1186
|
if (isReRender) {
|
|
@@ -1160,7 +1199,13 @@ function useReducer(reducer, initialState, initialAction) {
|
|
|
1160
1199
|
// priority because it will always be the same as the current
|
|
1161
1200
|
// render's.
|
|
1162
1201
|
var _action = update.action;
|
|
1202
|
+
{
|
|
1203
|
+
isInHookUserCodeInDev = true;
|
|
1204
|
+
}
|
|
1163
1205
|
newState = reducer(newState, _action);
|
|
1206
|
+
{
|
|
1207
|
+
isInHookUserCodeInDev = false;
|
|
1208
|
+
}
|
|
1164
1209
|
update = update.next;
|
|
1165
1210
|
} while (update !== null);
|
|
1166
1211
|
|
|
@@ -1171,13 +1216,18 @@ function useReducer(reducer, initialState, initialAction) {
|
|
|
1171
1216
|
}
|
|
1172
1217
|
return [workInProgressHook.memoizedState, _dispatch];
|
|
1173
1218
|
} else {
|
|
1219
|
+
{
|
|
1220
|
+
isInHookUserCodeInDev = true;
|
|
1221
|
+
}
|
|
1222
|
+
var initialState = void 0;
|
|
1174
1223
|
if (reducer === basicStateReducer) {
|
|
1175
1224
|
// Special case for `useState`.
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1225
|
+
initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
|
|
1226
|
+
} else {
|
|
1227
|
+
initialState = init !== undefined ? init(initialArg) : initialArg;
|
|
1228
|
+
}
|
|
1229
|
+
{
|
|
1230
|
+
isInHookUserCodeInDev = false;
|
|
1181
1231
|
}
|
|
1182
1232
|
workInProgressHook.memoizedState = initialState;
|
|
1183
1233
|
var _queue2 = workInProgressHook.queue = {
|
|
@@ -1189,22 +1239,32 @@ function useReducer(reducer, initialState, initialAction) {
|
|
|
1189
1239
|
}
|
|
1190
1240
|
}
|
|
1191
1241
|
|
|
1192
|
-
function useMemo(nextCreate,
|
|
1242
|
+
function useMemo(nextCreate, deps) {
|
|
1193
1243
|
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
|
|
1194
1244
|
workInProgressHook = createWorkInProgressHook();
|
|
1195
1245
|
|
|
1196
|
-
var
|
|
1246
|
+
var nextDeps = deps === undefined ? null : deps;
|
|
1197
1247
|
|
|
1198
|
-
if (workInProgressHook !== null
|
|
1248
|
+
if (workInProgressHook !== null) {
|
|
1199
1249
|
var prevState = workInProgressHook.memoizedState;
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1250
|
+
if (prevState !== null) {
|
|
1251
|
+
if (nextDeps !== null) {
|
|
1252
|
+
var prevDeps = prevState[1];
|
|
1253
|
+
if (areHookInputsEqual(nextDeps, prevDeps)) {
|
|
1254
|
+
return prevState[0];
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1203
1257
|
}
|
|
1204
1258
|
}
|
|
1205
1259
|
|
|
1260
|
+
{
|
|
1261
|
+
isInHookUserCodeInDev = true;
|
|
1262
|
+
}
|
|
1206
1263
|
var nextValue = nextCreate();
|
|
1207
|
-
|
|
1264
|
+
{
|
|
1265
|
+
isInHookUserCodeInDev = false;
|
|
1266
|
+
}
|
|
1267
|
+
workInProgressHook.memoizedState = [nextValue, nextDeps];
|
|
1208
1268
|
return nextValue;
|
|
1209
1269
|
}
|
|
1210
1270
|
|
|
@@ -1225,6 +1285,9 @@ function useRef(initialValue) {
|
|
|
1225
1285
|
}
|
|
1226
1286
|
|
|
1227
1287
|
function useLayoutEffect(create, inputs) {
|
|
1288
|
+
{
|
|
1289
|
+
currentHookNameInDev = 'useLayoutEffect';
|
|
1290
|
+
}
|
|
1228
1291
|
warning$1(false, 'useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client.');
|
|
1229
1292
|
}
|
|
1230
1293
|
|
|
@@ -1261,11 +1324,13 @@ function dispatchAction(componentIdentity, queue, action) {
|
|
|
1261
1324
|
}
|
|
1262
1325
|
}
|
|
1263
1326
|
|
|
1264
|
-
function
|
|
1265
|
-
|
|
1266
|
-
return
|
|
1327
|
+
function useCallback(callback, deps) {
|
|
1328
|
+
// Callbacks are passed as they are in the server environment.
|
|
1329
|
+
return callback;
|
|
1267
1330
|
}
|
|
1268
1331
|
|
|
1332
|
+
function noop() {}
|
|
1333
|
+
|
|
1269
1334
|
var currentThreadID = 0;
|
|
1270
1335
|
|
|
1271
1336
|
function setCurrentThreadID(threadID) {
|
|
@@ -1280,8 +1345,7 @@ var Dispatcher = {
|
|
|
1280
1345
|
useRef: useRef,
|
|
1281
1346
|
useState: useState,
|
|
1282
1347
|
useLayoutEffect: useLayoutEffect,
|
|
1283
|
-
|
|
1284
|
-
useCallback: identity,
|
|
1348
|
+
useCallback: useCallback,
|
|
1285
1349
|
// useImperativeHandle is not run in the server environment
|
|
1286
1350
|
useImperativeHandle: noop,
|
|
1287
1351
|
// Effects are not run in the server environment.
|
|
@@ -1289,9 +1353,6 @@ var Dispatcher = {
|
|
|
1289
1353
|
// Debugging effect
|
|
1290
1354
|
useDebugValue: noop
|
|
1291
1355
|
};
|
|
1292
|
-
var DispatcherWithoutHooks = {
|
|
1293
|
-
readContext: readContext
|
|
1294
|
-
};
|
|
1295
1356
|
|
|
1296
1357
|
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
|
1297
1358
|
var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
@@ -3108,11 +3169,7 @@ var ReactDOMServerRenderer = function () {
|
|
|
3108
3169
|
var prevThreadID = currentThreadID;
|
|
3109
3170
|
setCurrentThreadID(this.threadID);
|
|
3110
3171
|
var prevDispatcher = ReactCurrentDispatcher.current;
|
|
3111
|
-
|
|
3112
|
-
ReactCurrentDispatcher.current = Dispatcher;
|
|
3113
|
-
} else {
|
|
3114
|
-
ReactCurrentDispatcher.current = DispatcherWithoutHooks;
|
|
3115
|
-
}
|
|
3172
|
+
ReactCurrentDispatcher.current = Dispatcher;
|
|
3116
3173
|
try {
|
|
3117
3174
|
// Markup generated within <Suspense> ends up buffered until we know
|
|
3118
3175
|
// nothing in that boundary suspended
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.8.0
|
|
1
|
+
/** @license React v16.8.0
|
|
2
2
|
* react-dom-server.browser.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -8,36 +8,36 @@
|
|
|
8
8
|
*/
|
|
9
9
|
'use strict';(function(v,E){"object"===typeof exports&&"undefined"!==typeof module?module.exports=E(require("react")):"function"===typeof define&&define.amd?define(["react"],E):v.ReactDOMServer=E(v.React)})(this,function(v){function E(a,b,d,c,f,e,h,g){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[d,c,f,e,h,g],u=0;a=Error(b.replace(/%s/g,function(){return k[u++]}));a.name=
|
|
10
10
|
"Invariant Violation"}a.framesToPop=1;throw a;}}function u(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);E(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",d)}function J(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;
|
|
11
|
-
switch(a){case X:return"ConcurrentMode";case
|
|
11
|
+
switch(a){case X:return"ConcurrentMode";case N:return"Fragment";case Y:return"Portal";case Z:return"Profiler";case aa:return"StrictMode";case O:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case ba:return"Context.Consumer";case P:return"Context.Provider";case ca:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case da:return J(a.type);case ea:if(a=1===a._status?a._result:null)return J(a)}return null}function F(a,b){for(var d=a._threadCount|
|
|
12
12
|
0;d<=b;d++)a[d]=a._currentValue2,a._threadCount=d+1}function ua(a,b,d){var c=a.contextType;if("object"===typeof c&&null!==c)return F(c,d),c[d];if(a=a.contextTypes){d={};for(var f in a)d[f]=b[f];b=d}else b=fa;return b}function ha(a){if(ia.call(ja,a))return!0;if(ia.call(ka,a))return!1;if(va.test(a))return ja[a]=!0;ka[a]=!0;return!1}function wa(a,b,d,c){if(null!==d&&0===d.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(c)return!1;if(null!==d)return!d.acceptsBooleans;
|
|
13
13
|
a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function xa(a,b,d,c){if(null===b||"undefined"===typeof b||wa(a,b,d,c))return!0;if(c)return!1;if(null!==d)switch(d.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function t(a,b,d,c,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=f;this.mustUseProperty=d;this.propertyName=a;this.type=b}function C(a){if("boolean"===typeof a||"number"===
|
|
14
|
-
typeof a)return""+a;a=""+a;var b=ya.exec(a);if(b){var d="",c,f=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}f!==c&&(d+=a.substring(f,c));f=c+1;d+=b}a=f!==c?d+a.substring(f,c):d}return a}function K(){null===x?u("
|
|
15
|
-
null===k.next?(G=!1,k=k.next=la()):(G=!0,k=k.next);return k}function ma(a,b,d,c){for(;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"function"
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
typeof a)return""+a;a=""+a;var b=ya.exec(a);if(b){var d="",c,f=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}f!==c&&(d+=a.substring(f,c));f=c+1;d+=b}a=f!==c?d+a.substring(f,c):d}return a}function K(){null===x?u("307"):void 0;return x}function la(){0<L&&u("312");return{memoizedState:null,queue:null,next:null}}function Q(){null===k?null===M?(G=!1,M=k=la()):
|
|
15
|
+
(G=!0,k=M):null===k.next?(G=!1,k=k.next=la()):(G=!0,k=k.next);return k}function ma(a,b,d,c){for(;R;)R=!1,L+=1,k=null,d=a(b,c);M=x=null;L=0;k=A=null;return d}function na(a,b){return"function"===typeof b?b(a):b}function oa(a,b,d){x=K();k=Q();if(G){var c=k.queue;b=c.dispatch;if(null!==A&&(d=A.get(c),void 0!==d)){A.delete(c);c=k.memoizedState;do c=a(c,d.action),d=d.next;while(null!==d);k.memoizedState=c;return[c,b]}return[k.memoizedState,b]}a=a===na?"function"===typeof b?b():b:void 0!==d?d(b):b;k.memoizedState=
|
|
16
|
+
a;a=k.queue={last:null,dispatch:null};a=a.dispatch=za.bind(null,x,a);return[k.memoizedState,a]}function za(a,b,d){25>L?void 0:u("301");if(a===x)if(R=!0,a={action:d,next:null},null===A&&(A=new Map),d=A.get(b),void 0===d)A.set(b,a);else{for(b=d;null!==b.next;)b=b.next;b.next=a}}function S(){}function pa(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Aa(a){if(void 0===a||null===a)return a;
|
|
17
|
+
var b="";v.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function qa(a,b){void 0===a&&u("152",J(b)||"Component")}function Ba(a,b,d){function c(c,f){var e=ua(f,b,d),g=[],h=!1,m={isMounted:function(a){return!1},enqueueForceUpdate:function(a){if(null===g)return null},enqueueReplaceState:function(a,b){h=!0;g=[b]},enqueueSetState:function(a,b){if(null===g)return null;g.push(b)}},l=void 0;if(f.prototype&&f.prototype.isReactComponent){if(l=new f(c.props,e,m),"function"===typeof f.getDerivedStateFromProps){var k=
|
|
18
|
+
f.getDerivedStateFromProps.call(null,c.props,l.state);null!=k&&(l.state=z({},l.state,k))}}else if(x={},l=f(c.props,e,m),l=ma(f,c.props,l,e),null==l||null==l.render){a=l;qa(a,f);return}l.props=c.props;l.context=e;l.updater=m;m=l.state;void 0===m&&(l.state=m=null);if("function"===typeof l.UNSAFE_componentWillMount||"function"===typeof l.componentWillMount)if("function"===typeof l.componentWillMount&&"function"!==typeof f.getDerivedStateFromProps&&l.componentWillMount(),"function"===typeof l.UNSAFE_componentWillMount&&
|
|
19
|
+
"function"!==typeof f.getDerivedStateFromProps&&l.UNSAFE_componentWillMount(),g.length){m=g;var n=h;g=null;h=!1;if(n&&1===m.length)l.state=m[0];else{k=n?m[0]:l.state;var p=!0;for(n=n?1:0;n<m.length;n++){var q=m[n];q="function"===typeof q?q.call(l,k,c.props,e):q;null!=q&&(p?(p=!1,k=z({},k,q)):z(k,q))}l.state=k}}else g=null;a=l.render();qa(a,f);c=void 0;if("function"===typeof l.getChildContext&&(e=f.childContextTypes,"object"===typeof e)){c=l.getChildContext();for(var w in c)w in e?void 0:u("108",J(f)||
|
|
20
|
+
"Unknown",w)}c&&(b=z({},b,c))}for(;v.isValidElement(a);){var f=a,e=f.type;if("function"!==typeof e)break;c(f,e)}return{child:a,context:b}}var z=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,p="function"===typeof Symbol&&Symbol.for,Y=p?Symbol.for("react.portal"):60106,N=p?Symbol.for("react.fragment"):60107,aa=p?Symbol.for("react.strict_mode"):60108,Z=p?Symbol.for("react.profiler"):60114,P=p?Symbol.for("react.provider"):60109,ba=p?Symbol.for("react.context"):60110,X=p?Symbol.for("react.concurrent_mode"):
|
|
21
|
+
60111,ca=p?Symbol.for("react.forward_ref"):60112,O=p?Symbol.for("react.suspense"):60113,da=p?Symbol.for("react.memo"):60115,ea=p?Symbol.for("react.lazy"):60116;p=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;for(var fa={},q=new Uint16Array(16),D=0;15>D;D++)q[D]=D+1;q[15]=0;var va=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
|
|
22
22
|
ia=Object.prototype.hasOwnProperty,ka={},ja={},w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){w[a]=new t(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];w[b]=new t(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){w[a]=new t(a,2,!1,
|
|
23
23
|
a.toLowerCase(),null)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){w[a]=new t(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){w[a]=new t(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){w[a]=new t(a,3,!0,a,null)});["capture",
|
|
24
24
|
"download"].forEach(function(a){w[a]=new t(a,4,!1,a,null)});["cols","rows","size","span"].forEach(function(a){w[a]=new t(a,6,!1,a,null)});["rowSpan","start"].forEach(function(a){w[a]=new t(a,5,!1,a.toLowerCase(),null)});var T=/[\-:]([a-z])/g,U=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
|
|
25
|
-
a.replace(T,U);w[b]=new t(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(T,U);w[b]=new t(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(T,U);w[b]=new t(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});w.tabIndex=new t("tabIndex",1,!1,"tabindex",null);var ya=/["'&<>]/,x=null,
|
|
26
|
-
b){b=H;F(a,b);return a[b]},useContext:function(a,b){K();b=H;F(a,b);return a[b]},useMemo:function(a,b){x=K();k=
|
|
27
|
-
useState:function(a){return oa(na,a)},useLayoutEffect:function(a,b){},useCallback:function(a){return a},useImperativeHandle:S,useEffect:S,useDebugValue:S},ra={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Ea=z({menuitem:!0},ra),I={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,
|
|
28
|
-
flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fa=["Webkit","ms","Moz","O"];Object.keys(I).forEach(function(a){Fa.forEach(function(b){b=
|
|
25
|
+
a.replace(T,U);w[b]=new t(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(T,U);w[b]=new t(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(T,U);w[b]=new t(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});w.tabIndex=new t("tabIndex",1,!1,"tabindex",null);var ya=/["'&<>]/,x=null,M=null,k=null,G=!1,R=!1,A=null,L=0,H=0,Da={readContext:function(a,
|
|
26
|
+
b){b=H;F(a,b);return a[b]},useContext:function(a,b){K();b=H;F(a,b);return a[b]},useMemo:function(a,b){x=K();k=Q();b=void 0===b?null:b;if(null!==k){var d=k.memoizedState;if(null!==d&&null!==b){a:{var c=d[1];if(null===c)c=!1;else{for(var f=0;f<c.length&&f<b.length;f++){var e=b[f],h=c[f];if((e!==h||0===e&&1/e!==1/h)&&(e===e||h===h)){c=!1;break a}}c=!0}}if(c)return d[0]}}a=a();k.memoizedState=[a,b];return a},useReducer:oa,useRef:function(a){x=K();k=Q();var b=k.memoizedState;return null===b?(a={current:a},
|
|
27
|
+
k.memoizedState=a):b},useState:function(a){return oa(na,a)},useLayoutEffect:function(a,b){},useCallback:function(a,b){return a},useImperativeHandle:S,useEffect:S,useDebugValue:S},ra={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Ea=z({menuitem:!0},ra),I={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,
|
|
28
|
+
flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fa=["Webkit","ms","Moz","O"];Object.keys(I).forEach(function(a){Fa.forEach(function(b){b=
|
|
29
29
|
b+a.charAt(0).toUpperCase()+a.substring(1);I[b]=I[a]})});var Ga=/([A-Z])/g,Ha=/^ms-/,B=v.Children.toArray,V=p.ReactCurrentDispatcher,Ia={listing:!0,pre:!0,textarea:!0},Ja=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,sa={},W={},Ka=Object.prototype.hasOwnProperty,La={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},ta=function(){function a(b,d){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");v.isValidElement(b)?b.type!==
|
|
30
|
-
|
|
30
|
+
N?b=[b]:(b=b.props.children,b=v.isValidElement(b)?[b]:B(b)):b=B(b);b={type:null,domNamespace:"http://www.w3.org/1999/xhtml",children:b,childIndex:0,context:fa,footer:""};var c=q[0];if(0===c){var f=q;c=f.length;var e=2*c;65536>=e?void 0:u("304");var h=new Uint16Array(e);h.set(f);q=h;q[0]=c+1;for(f=c;f<e-1;f++)q[f]=f+1;q[e-1]=0}else q[0]=q[c];this.threadID=c;this.stack=[b];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=d;this.suspenseDepth=0;this.contextIndex=
|
|
31
31
|
-1;this.contextStack=[];this.contextValueStack=[]}a.prototype.destroy=function(){if(!this.exhausted){this.exhausted=!0;var a=this.threadID;q[a]=q[0];q[0]=a}};a.prototype.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,f=this.threadID;F(c,f);var e=c[f];this.contextStack[b]=c;this.contextValueStack[b]=e;c[f]=a.props.value};a.prototype.popProvider=function(a){a=this.contextIndex;var b=this.contextStack[a],c=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=
|
|
32
32
|
null;this.contextIndex--;b[this.threadID]=c};a.prototype.read=function(a){if(this.exhausted)return null;var b=H;H=this.threadID;var c=V.current;V.current=Da;try{for(var f=[""],e=!1;f[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var h=this.threadID;q[h]=q[0];q[0]=h;break}var g=this.stack[this.stack.length-1];if(e||g.childIndex>=g.children.length){var k=g.footer;""!==k&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===g.type)this.currentSelectValue=null;else if(null!=g.type&&
|
|
33
|
-
null!=g.type.type&&g.type.type.$$typeof===
|
|
33
|
+
null!=g.type.type&&g.type.type.$$typeof===P)this.popProvider(g.type);else if(g.type===O){this.suspenseDepth--;var p=f.pop();if(e){e=!1;var r=g.fallbackFrame;r?void 0:u("303");this.stack.push(r);continue}else f[this.suspenseDepth]+=p}f[this.suspenseDepth]+=k}else{var m=g.children[g.childIndex++],l="";try{l+=this.render(m,g.context,g.domNamespace)}catch(Ca){throw Ca;}finally{}f.length<=this.suspenseDepth&&f.push("");f[this.suspenseDepth]+=l}}return f[0]}finally{V.current=c,H=b}};a.prototype.render=
|
|
34
34
|
function(a,d,c){if("string"===typeof a||"number"===typeof a){c=""+a;if(""===c)return"";if(this.makeStaticMarkup)return C(c);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+C(c);this.previousWasTextNode=!0;return C(c)}d=Ba(a,d,this.threadID);a=d.child;d=d.context;if(null===a||!1===a)return"";if(!v.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===Y?u("257"):void 0;u("258",b.toString())}a=B(a);this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""});
|
|
35
|
-
return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,d,c);switch(b){case aa:case X:case Z:case
|
|
36
|
-
z({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case
|
|
35
|
+
return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,d,c);switch(b){case aa:case X:case Z:case N:return a=B(a.props.children),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case O:u("294")}if("object"===typeof b&&null!==b)switch(b.$$typeof){case ca:x={};var e=b.render(a.props,a.ref);e=ma(b.render,a.props,e,a.ref);e=B(e);this.stack.push({type:null,domNamespace:c,children:e,childIndex:0,context:d,footer:""});return"";case da:return a=[v.createElement(b.type,
|
|
36
|
+
z({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case P:return b=B(a.props.children),c={type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""},this.pushProvider(a),this.stack.push(c),"";case ba:b=a.type;e=a.props;var h=this.threadID;F(b,h);b=B(e.children(b[h]));this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""});return"";case ea:u("295")}u("130",null==b?b:typeof b,"")};a.prototype.renderDOM=
|
|
37
37
|
function(a,d,c){var b=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===c&&pa(b);sa.hasOwnProperty(b)||(Ja.test(b)?void 0:u("65",b),sa[b]=!0);var e=a.props;if("input"===b)e=z({type:void 0},e,{defaultChecked:void 0,defaultValue:void 0,value:null!=e.value?e.value:e.defaultValue,checked:null!=e.checked?e.checked:e.defaultChecked});else if("textarea"===b){var h=e.value;if(null==h){h=e.defaultValue;var g=e.children;null!=g&&(null!=h?u("92"):void 0,Array.isArray(g)&&(1>=g.length?void 0:u("93"),g=g[0]),
|
|
38
38
|
h=""+g);null==h&&(h="")}e=z({},e,{value:void 0,children:""+h})}else if("select"===b)this.currentSelectValue=null!=e.value?e.value:e.defaultValue,e=z({},e,{value:void 0});else if("option"===b){g=this.currentSelectValue;var k=Aa(e.children);if(null!=g){var p=null!=e.value?e.value+"":k;h=!1;if(Array.isArray(g))for(var r=0;r<g.length;r++){if(""+g[r]===p){h=!0;break}}else h=""+g===p;e=z({selected:void 0,children:void 0},e,{selected:h,children:k})}}if(h=e)Ea[b]&&(null!=h.children||null!=h.dangerouslySetInnerHTML?
|
|
39
39
|
u("137",b,""):void 0),null!=h.dangerouslySetInnerHTML&&(null!=h.children?u("60"):void 0,"object"===typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML?void 0:u("61")),null!=h.style&&"object"!==typeof h.style?u("62",""):void 0;h=e;g=this.makeStaticMarkup;k=1===this.stack.length;p="<"+a.type;for(y in h)if(Ka.call(h,y)){var m=h[y];if(null!=m){if("style"===y){r=void 0;var l="",q="";for(r in m)if(m.hasOwnProperty(r)){var n=0===r.indexOf("--"),t=m[r];if(null!=t){var v=r;if(W.hasOwnProperty(v))v=
|
|
40
40
|
W[v];else{var x=v.replace(Ga,"-$1").toLowerCase().replace(Ha,"-ms-");v=W[v]=x}l+=q+v+":";q=r;n=null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||I.hasOwnProperty(q)&&I[q]?(""+t).trim():t+"px";l+=n;q=";"}}m=l||null}r=null;b:if(n=b,t=h,-1===n.indexOf("-"))n="string"===typeof t.is;else switch(n){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":n=!1;break b;default:n=
|
|
41
41
|
!0}if(n)La.hasOwnProperty(y)||(r=y,r=ha(r)&&null!=m?r+"="+('"'+C(m)+'"'):"");else{n=y;r=m;m=w.hasOwnProperty(n)?w[n]:null;if(t="style"!==n)t=null!==m?0===m.type:!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1]?!1:!0;t||xa(n,r,m,!1)?r="":null!==m?(n=m.attributeName,m=m.type,r=3===m||4===m&&!0===r?n+'=""':n+"="+('"'+C(r)+'"')):r=ha(n)?n+"="+('"'+C(r)+'"'):""}r&&(p+=" "+r)}}g||k&&(p+=' data-reactroot=""');var y=p;h="";ra.hasOwnProperty(b)?y+="/>":(y+=">",h="</"+a.type+">");a:{g=e.dangerouslySetInnerHTML;
|
|
42
42
|
if(null!=g){if(null!=g.__html){g=g.__html;break a}}else if(g=e.children,"string"===typeof g||"number"===typeof g){g=C(g);break a}g=null}null!=g?(e=[],Ia[b]&&"\n"===g.charAt(0)&&(y+="\n"),y+=g):e=B(e.children);a=a.type;c=null==c||"http://www.w3.org/1999/xhtml"===c?pa(a):"http://www.w3.org/2000/svg"===c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c;this.stack.push({domNamespace:c,type:b,children:e,childIndex:0,context:d,footer:h});this.previousWasTextNode=!1;return y};return a}();p={renderToString:function(a){a=
|
|
43
|
-
new ta(a,!1);try{return a.read(Infinity)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=new ta(a,!0);try{return a.read(Infinity)}finally{a.destroy()}},renderToNodeStream:function(){u("207")},renderToStaticNodeStream:function(){u("208")},version:"16.8.0
|
|
43
|
+
new ta(a,!1);try{return a.read(Infinity)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=new ta(a,!0);try{return a.read(Infinity)}finally{a.destroy()}},renderToNodeStream:function(){u("207")},renderToStaticNodeStream:function(){u("208")},version:"16.8.0"};p=(D={default:p},p)||D;return p.default||p});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.8.0
|
|
1
|
+
/** @license React v16.8.0
|
|
2
2
|
* react-dom-test-utils.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -831,6 +831,7 @@ var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel');
|
|
|
831
831
|
// Note that events in this list will *not* be listened to at the top level
|
|
832
832
|
// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
|
|
833
833
|
|
|
834
|
+
// for .act's return value
|
|
834
835
|
var findDOMNode = ReactDOM.findDOMNode;
|
|
835
836
|
// Keep in sync with ReactDOMUnstableNativeDependencies.js
|
|
836
837
|
// and ReactDOM.js:
|
|
@@ -939,6 +940,9 @@ function validateClassInstance(inst, methodName) {
|
|
|
939
940
|
invariant(false, '%s(...): the first argument must be a React class instance. Instead received: %s.', methodName, received);
|
|
940
941
|
}
|
|
941
942
|
|
|
943
|
+
// stub element used by act() when flushing effects
|
|
944
|
+
var actContainerElement = document.createElement('div');
|
|
945
|
+
|
|
942
946
|
/**
|
|
943
947
|
* Utilities for making it easy to test React components.
|
|
944
948
|
*
|
|
@@ -1133,7 +1137,34 @@ var ReactTestUtils = {
|
|
|
1133
1137
|
},
|
|
1134
1138
|
|
|
1135
1139
|
Simulate: null,
|
|
1136
|
-
SimulateNative: {}
|
|
1140
|
+
SimulateNative: {},
|
|
1141
|
+
|
|
1142
|
+
act: function (callback) {
|
|
1143
|
+
// note: keep these warning messages in sync with
|
|
1144
|
+
// createReactNoop.js and ReactTestRenderer.js
|
|
1145
|
+
var result = ReactDOM.unstable_batchedUpdates(callback);
|
|
1146
|
+
{
|
|
1147
|
+
if (result !== undefined) {
|
|
1148
|
+
var addendum = void 0;
|
|
1149
|
+
if (result !== null && typeof result.then === 'function') {
|
|
1150
|
+
addendum = '\n\nIt looks like you wrote ReactTestUtils.act(async () => ...), ' + 'or returned a Promise from the callback passed to it. ' + 'Putting asynchronous logic inside ReactTestUtils.act(...) is not supported.\n';
|
|
1151
|
+
} else {
|
|
1152
|
+
addendum = ' You returned: ' + result;
|
|
1153
|
+
}
|
|
1154
|
+
warningWithoutStack$1(false, 'The callback passed to ReactTestUtils.act(...) function must not return anything.%s', addendum);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
ReactDOM.render(React.createElement('div', null), actContainerElement);
|
|
1158
|
+
// we want the user to not expect a return,
|
|
1159
|
+
// but we want to warn if they use it like they can await on it.
|
|
1160
|
+
return {
|
|
1161
|
+
then: function () {
|
|
1162
|
+
{
|
|
1163
|
+
warningWithoutStack$1(false, 'Do not await the result of calling ReactTestUtils.act(...), it is not a Promise.');
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
};
|
|
1167
|
+
}
|
|
1137
1168
|
};
|
|
1138
1169
|
|
|
1139
1170
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.8.0
|
|
1
|
+
/** @license React v16.8.0
|
|
2
2
|
* react-dom-test-utils.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -6,23 +6,23 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
'use strict';(function(l
|
|
10
|
-
function(){return
|
|
11
|
-
for(;b.return;)if(b=b.return,0!==(b.effectTag&2))return 1}return 3===b.tag?2:3}function
|
|
12
|
-
break}
|
|
13
|
-
(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?v
|
|
14
|
-
b;return c}function
|
|
15
|
-
!a._reactInternalFiber){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;k("286",b,a)}}function N(a){return function(b,c){
|
|
16
|
-
b){return function(c,e){var d=new
|
|
17
|
-
typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=
|
|
18
|
-
Date.now()},defaultPrevented:null,isTrusted:null};
|
|
19
|
-
"AnimationStart"),transitionend:
|
|
20
|
-
Q=
|
|
21
|
-
typeof a.setState},isCompositeComponentWithType:function(a,b){return f.isCompositeComponent(a)?a._reactInternalFiber.type===b:!1},findAllInRenderedTree:function(a,b){
|
|
22
|
-
(void 0===b?k("11"):void 0,b=b.split(/\s+/));return b.every(function(a){return-1!==d.indexOf(a)})}return!1})},findRenderedDOMComponentWithClass:function(a,b){
|
|
23
|
-
a.tagName.toUpperCase()===b.toUpperCase()})},findRenderedDOMComponentWithTag:function(a,b){
|
|
24
|
-
"findRenderedComponentWithType");a=f.scryRenderedComponentsWithType(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]},mockComponent:function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return
|
|
25
|
-
N(a)})();[["abort","abort"],[m,"animationEnd"],[W,"animationIteration"],[X,"animationStart"],["blur","blur"],["canplaythrough","canPlayThrough"],["canplay","canPlay"],["cancel","cancel"],["change","change"],["click","click"],["close","close"],["compositionend","compositionEnd"],["compositionstart","compositionStart"],["compositionupdate","compositionUpdate"],["contextmenu",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
["touchstart","touchStart"],[Y,"transitionEnd"],["volumechange","volumeChange"],["waiting","waiting"],["wheel","wheel"]].forEach(function(a){var b=a[1];f.SimulateNative[b]=U(b,a[0])});m=(m={default:f},f)||m;return m.default||m});
|
|
9
|
+
'use strict';(function(g,l){"object"===typeof exports&&"undefined"!==typeof module?module.exports=l(require("react"),require("react-dom")):"function"===typeof define&&define.amd?define(["react","react-dom"],l):g.ReactTestUtils=l(g.React,g.ReactDOM)})(this,function(g,l){function G(a,b,c,e,d,f,h,I){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var H=[c,e,d,f,h,I],g=0;a=Error(b.replace(/%s/g,
|
|
10
|
+
function(){return H[g++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}function k(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,e=0;e<b;e++)c+="&args[]="+encodeURIComponent(arguments[e+1]);G(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}function z(a){var b=a;if(a.alternate)for(;b.return;)b=b.return;else{if(0!==(b.effectTag&2))return 1;
|
|
11
|
+
for(;b.return;)if(b=b.return,0!==(b.effectTag&2))return 1}return 3===b.tag?2:3}function A(a){2!==z(a)?k("188"):void 0}function J(a){var b=a.alternate;if(!b)return b=z(a),3===b?k("188"):void 0,1===b?null:a;for(var c=a,e=b;;){var d=c.return,f=d?d.alternate:null;if(!d||!f)break;if(d.child===f.child){for(var h=d.child;h;){if(h===c)return A(d),a;if(h===e)return A(d),b;h=h.sibling}k("188")}if(c.return!==e.return)c=d,e=f;else{h=!1;for(var g=d.child;g;){if(g===c){h=!0;c=d;e=f;break}if(g===e){h=!0;e=d;c=f;
|
|
12
|
+
break}g=g.sibling}if(!h){for(g=f.child;g;){if(g===c){h=!0;c=f;e=d;break}if(g===e){h=!0;e=f;c=d;break}g=g.sibling}h?void 0:k("189")}}c.alternate!==e?k("190"):void 0}3!==c.tag?k("188"):void 0;return c.stateNode.current===c?a:b}function u(){return!0}function v(){return!1}function r(a,b,c,e){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var d in a)a.hasOwnProperty(d)&&((b=a[d])?this[d]=b(c):"target"===d?this.target=e:this[d]=c[d]);this.isDefaultPrevented=
|
|
13
|
+
(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?u:v;this.isPropagationStopped=v;return this}function K(a,b,c,e){if(this.eventPool.length){var d=this.eventPool.pop();this.call(d,a,b,c,e);return d}return new this(a,b,c,e)}function L(a){a instanceof this?void 0:k("279");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function B(a){a.eventPool=[];a.getPooled=K;a.release=L}function w(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+
|
|
14
|
+
b;return c}function x(a){if(y[a])return y[a];if(!q[a])return a;var b=q[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in C)return y[a]=b[c];return a}function D(a){}function M(a,b){if(!a)return[];a=J(a);if(!a)return[];for(var c=a,e=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var d=c.stateNode;b(d)&&e.push(d)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return e;for(;!c.sibling;){if(!c.return||c.return===a)return e;c=c.return}c.sibling.return=c.return;c=c.sibling}}}function p(a,b){if(a&&
|
|
15
|
+
!a._reactInternalFiber){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;k("286",b,a)}}function N(a){return function(b,c){g.isValidElement(b)?k("228"):void 0;f.isCompositeComponent(b)?k("229"):void 0;var e=E[a],d=new D;d.target=b;d.type=a.toLowerCase();var m=O(b),h=new r(e,m,d,b);h.persist();t(h,c);e.phasedRegistrationNames?P(h):Q(h);l.unstable_batchedUpdates(function(){R(b);S(h)});T()}}function U(a,
|
|
16
|
+
b){return function(c,e){var d=new D(a);t(d,e);f.isDOMComponent(c)?(c=V(c),d.target=c,F(b,d)):c.tagName&&(d.target=c,F(b,d))}}var t=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign;t(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=u)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==
|
|
17
|
+
typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=u)},persist:function(){this.isPersistent=u},isPersistent:v,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=v;this._dispatchInstances=this._dispatchListeners=null}});r.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||
|
|
18
|
+
Date.now()},defaultPrevented:null,isTrusted:null};r.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,e=function(){};e.prototype=c.prototype;e=new e;t(e,b.prototype);b.prototype=e;b.prototype.constructor=b;b.Interface=t({},c.Interface,a);b.extend=c.extend;B(b);return b};B(r);var m=!("undefined"===typeof window||!window.document||!window.document.createElement),q={animationend:w("Animation","AnimationEnd"),animationiteration:w("Animation","AnimationIteration"),animationstart:w("Animation",
|
|
19
|
+
"AnimationStart"),transitionend:w("Transition","TransitionEnd")},y={},C={};m&&(C=document.createElement("div").style,"AnimationEvent"in window||(delete q.animationend.animation,delete q.animationiteration.animation,delete q.animationstart.animation),"TransitionEvent"in window||delete q.transitionend.transition);m=x("animationend");var W=x("animationiteration"),X=x("animationstart"),Y=x("transitionend"),V=l.findDOMNode,n=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,O=n[0],E=n[4],P=n[5],
|
|
20
|
+
Q=n[6],R=n[7],T=n[8],F=n[9],S=n[10],Z=document.createElement("div"),f={renderIntoDocument:function(a){var b=document.createElement("div");return l.render(a,b)},isElement:function(a){return g.isValidElement(a)},isElementOfType:function(a,b){return g.isValidElement(a)&&a.type===b},isDOMComponent:function(a){return!(!a||1!==a.nodeType||!a.tagName)},isDOMComponentElement:function(a){return!!(a&&g.isValidElement(a)&&a.tagName)},isCompositeComponent:function(a){return f.isDOMComponent(a)?!1:null!=a&&"function"===
|
|
21
|
+
typeof a.render&&"function"===typeof a.setState},isCompositeComponentWithType:function(a,b){return f.isCompositeComponent(a)?a._reactInternalFiber.type===b:!1},findAllInRenderedTree:function(a,b){p(a,"findAllInRenderedTree");return a?M(a._reactInternalFiber,b):[]},scryRenderedDOMComponentsWithClass:function(a,b){p(a,"scryRenderedDOMComponentsWithClass");return f.findAllInRenderedTree(a,function(a){if(f.isDOMComponent(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var d=
|
|
22
|
+
c.split(/\s+/);Array.isArray(b)||(void 0===b?k("11"):void 0,b=b.split(/\s+/));return b.every(function(a){return-1!==d.indexOf(a)})}return!1})},findRenderedDOMComponentWithClass:function(a,b){p(a,"findRenderedDOMComponentWithClass");a=f.scryRenderedDOMComponentsWithClass(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for class:"+b);return a[0]},scryRenderedDOMComponentsWithTag:function(a,b){p(a,"scryRenderedDOMComponentsWithTag");return f.findAllInRenderedTree(a,
|
|
23
|
+
function(a){return f.isDOMComponent(a)&&a.tagName.toUpperCase()===b.toUpperCase()})},findRenderedDOMComponentWithTag:function(a,b){p(a,"findRenderedDOMComponentWithTag");a=f.scryRenderedDOMComponentsWithTag(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]},scryRenderedComponentsWithType:function(a,b){p(a,"scryRenderedComponentsWithType");return f.findAllInRenderedTree(a,function(a){return f.isCompositeComponentWithType(a,b)})},findRenderedComponentWithType:function(a,
|
|
24
|
+
b){p(a,"findRenderedComponentWithType");a=f.scryRenderedComponentsWithType(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]},mockComponent:function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return g.createElement(b,null,this.props.children)});return this},nativeTouchData:function(a,b){return{touches:[{pageX:a,pageY:b}]}},Simulate:null,SimulateNative:{},act:function(a){l.unstable_batchedUpdates(a);
|
|
25
|
+
l.render(g.createElement("div",null),Z);return{then:function(){}}}};(function(){f.Simulate={};var a=void 0;for(a in E)f.Simulate[a]=N(a)})();[["abort","abort"],[m,"animationEnd"],[W,"animationIteration"],[X,"animationStart"],["blur","blur"],["canplaythrough","canPlayThrough"],["canplay","canPlay"],["cancel","cancel"],["change","change"],["click","click"],["close","close"],["compositionend","compositionEnd"],["compositionstart","compositionStart"],["compositionupdate","compositionUpdate"],["contextmenu",
|
|
26
|
+
"contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["dragstart","dragStart"],["drag","drag"],["drop","drop"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["focus","focus"],["input","input"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["loadstart","loadStart"],["loadstart",
|
|
27
|
+
"loadStart"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["mousedown","mouseDown"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["playing","playing"],["progress","progress"],["ratechange","rateChange"],["scroll","scroll"],["seeked","seeked"],["seeking","seeking"],["selectionchange","selectionChange"],["stalled","stalled"],["suspend","suspend"],["textInput","textInput"],
|
|
28
|
+
["timeupdate","timeUpdate"],["toggle","toggle"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchmove","touchMove"],["touchstart","touchStart"],[Y,"transitionEnd"],["volumechange","volumeChange"],["waiting","waiting"],["wheel","wheel"]].forEach(function(a){var b=a[1];f.SimulateNative[b]=U(b,a[0])});m=(m={default:f},f)||m;return m.default||m});
|