@vitejs/plugin-rsc 0.5.33 → 0.5.35
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/README.md +18 -2
- package/dist/browser.d.ts +1 -1
- package/dist/{cjs-AWVWfddx.js → cjs-DhDj_zQT.js} +2 -2
- package/dist/client-Dq3oGLRS.d.ts +8 -0
- package/dist/{client-reference-DEZtXTv1.d.ts → client-reference-Bk5pzNGN.d.ts} +1 -1
- package/dist/client.node-BEQT2PT-.d.ts +9 -0
- package/dist/client.shared-D1HxyClg.js +10 -0
- package/dist/client.shared-VT232QCM.d.ts +16 -0
- package/dist/core/browser.js +1 -1
- package/dist/core/plugin.d.ts +2 -3
- package/dist/core/rsc.d.ts +1 -1
- package/dist/core/rsc.js +1 -1
- package/dist/core/ssr.d.ts +1 -7
- package/dist/core/ssr.js +1 -1
- package/dist/{index-C5IY2S-e.d.ts → index-CROaL0MT.d.ts} +34 -8
- package/dist/index.js +1 -1
- package/dist/{picocolors-D28_L_A0.js → picocolors-DCTC64Zv.js} +1 -1
- package/dist/{plugin-DarRieDr.js → plugin-CLvIS10V.js} +38 -32
- package/dist/plugin.js +1 -1
- package/dist/plugins/cjs.d.ts +2 -3
- package/dist/plugins/cjs.js +1 -1
- package/dist/react/browser.d.ts +10 -10
- package/dist/react/rsc/client.d.ts +1 -1
- package/dist/react/rsc/client.js +2 -5
- package/dist/react/rsc/client.node.d.ts +2 -0
- package/dist/react/rsc/client.node.js +16 -0
- package/dist/react/rsc/server.d.ts +2 -2
- package/dist/react/rsc/server.node.d.ts +3 -0
- package/dist/react/rsc/server.node.js +24 -0
- package/dist/react/rsc/static.d.ts +4 -5
- package/dist/react/rsc/static.node.d.ts +6 -0
- package/dist/react/rsc/static.node.js +11 -0
- package/dist/react/rsc.d.ts +3 -3
- package/dist/react/ssr.d.ts +9 -9
- package/dist/react/ssr.node.d.ts +12 -0
- package/dist/react/ssr.node.js +21 -0
- package/dist/rsc/client.d.ts +1 -1
- package/dist/rsc/client.node.d.ts +2 -0
- package/dist/rsc/client.node.js +3 -0
- package/dist/rsc/server.d.ts +5 -5
- package/dist/rsc/server.node.d.ts +19 -0
- package/dist/rsc/server.node.js +13 -0
- package/dist/rsc/static.d.ts +4 -5
- package/dist/rsc/static.node.d.ts +16 -0
- package/dist/rsc/static.node.js +12 -0
- package/dist/{rsc-C3UdJLOW.d.ts → rsc-D8UlANI2.d.ts} +1 -1
- package/dist/rsc.d.ts +3 -3
- package/dist/rsc.node.d.ts +6 -0
- package/dist/rsc.node.js +7 -0
- package/dist/{scope-Bdx33sQv.js → scope-Ck0n25my.js} +2 -4
- package/dist/{server-ZBjqNTqU.d.ts → server-YwgjVtsE.d.ts} +2 -2
- package/dist/server.node-DU77AeKU.d.ts +15 -0
- package/dist/shared-BWJvctW6.js +34 -0
- package/dist/shared-CXQb6hk9.js +89 -0
- package/dist/shared-DJBuYpZL.d.ts +20 -0
- package/dist/ssr-C-U7jY5S.d.ts +8 -0
- package/dist/ssr.d.ts +3 -21
- package/dist/ssr.js +1 -87
- package/dist/ssr.node.d.ts +5 -0
- package/dist/ssr.node.js +4 -0
- package/dist/transforms/index.js +91 -62
- package/dist/utils/encryption-runtime.d.ts +3 -4
- package/dist/utils/encryption-runtime.js +4 -2
- package/dist/utils/rpc.d.ts +3 -4
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.development.js +909 -495
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.production.js +399 -265
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.edge.development.js +901 -477
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.edge.production.js +380 -219
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.development.js +925 -484
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.node.production.js +385 -221
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.development.js +726 -388
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.production.js +566 -397
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.development.js +734 -397
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.edge.production.js +477 -238
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.development.js +1029 -620
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.production.js +481 -261
- package/dist/vendor/react-server-dom/esm/react-server-dom-webpack-node-loader.production.js +2 -2
- package/dist/vendor/react-server-dom/package.json +3 -3
- package/package.json +15 -15
- package/dist/client-Bhch3O41.d.ts +0 -19
- package/dist/dist-uqdtSkzK.js +0 -64
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.browser.development.js
CHANGED
|
@@ -12,27 +12,6 @@
|
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
14
|
function voidHandler() {}
|
|
15
|
-
function _defineProperty(obj, key, value) {
|
|
16
|
-
a: if ("object" == typeof key && key) {
|
|
17
|
-
var e = key[Symbol.toPrimitive];
|
|
18
|
-
if (void 0 !== e) {
|
|
19
|
-
key = e.call(key, "string");
|
|
20
|
-
if ("object" != typeof key) break a;
|
|
21
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
22
|
-
}
|
|
23
|
-
key = String(key);
|
|
24
|
-
}
|
|
25
|
-
key = "symbol" == typeof key ? key : key + "";
|
|
26
|
-
key in obj
|
|
27
|
-
? Object.defineProperty(obj, key, {
|
|
28
|
-
value: value,
|
|
29
|
-
enumerable: !0,
|
|
30
|
-
configurable: !0,
|
|
31
|
-
writable: !0
|
|
32
|
-
})
|
|
33
|
-
: (obj[key] = value);
|
|
34
|
-
return obj;
|
|
35
|
-
}
|
|
36
15
|
function scheduleWork(callback) {
|
|
37
16
|
taskQueue.push(callback);
|
|
38
17
|
channel.port2.postMessage(null);
|
|
@@ -42,7 +21,7 @@
|
|
|
42
21
|
throw error;
|
|
43
22
|
});
|
|
44
23
|
}
|
|
45
|
-
function
|
|
24
|
+
function writeChunk(destination, chunk) {
|
|
46
25
|
if (0 !== chunk.byteLength)
|
|
47
26
|
if (2048 < chunk.byteLength)
|
|
48
27
|
0 < writtenBytes &&
|
|
@@ -68,6 +47,9 @@
|
|
|
68
47
|
currentView.set(chunk, writtenBytes);
|
|
69
48
|
writtenBytes += chunk.byteLength;
|
|
70
49
|
}
|
|
50
|
+
}
|
|
51
|
+
function writeChunkAndReturn(destination, chunk) {
|
|
52
|
+
writeChunk(destination, chunk);
|
|
71
53
|
return !0;
|
|
72
54
|
}
|
|
73
55
|
function completeWriting(destination) {
|
|
@@ -355,7 +337,7 @@
|
|
|
355
337
|
});
|
|
356
338
|
break;
|
|
357
339
|
case "stylesheet":
|
|
358
|
-
preload(srcSet, "
|
|
340
|
+
preload(srcSet, "style", {
|
|
359
341
|
crossOrigin: props.crossOrigin,
|
|
360
342
|
integrity: props.integrity,
|
|
361
343
|
nonce: props.nonce,
|
|
@@ -529,7 +511,12 @@
|
|
|
529
511
|
case "fulfilled":
|
|
530
512
|
return thenable.value;
|
|
531
513
|
case "rejected":
|
|
532
|
-
|
|
514
|
+
thenableState = thenable.reason;
|
|
515
|
+
if (void 0 === thenableState && !("reason" in thenable))
|
|
516
|
+
throw Error(
|
|
517
|
+
"A rejected Promise was passed to React without a `reason` property. React threw a generic error from where the Promise was used to assist in identifying the problematic Promise. Make sure that instrumented Promises correctly set the `reason` property when setting `status` to `'rejected'`."
|
|
518
|
+
);
|
|
519
|
+
throw thenableState;
|
|
533
520
|
default:
|
|
534
521
|
"string" === typeof thenable.status
|
|
535
522
|
? thenable.then(noop, noop)
|
|
@@ -668,6 +655,8 @@
|
|
|
668
655
|
return "Suspense";
|
|
669
656
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
670
657
|
return "SuspenseList";
|
|
658
|
+
case REACT_VIEW_TRANSITION_TYPE:
|
|
659
|
+
return "ViewTransition";
|
|
671
660
|
}
|
|
672
661
|
if ("object" === typeof type)
|
|
673
662
|
switch (type.$$typeof) {
|
|
@@ -976,11 +965,11 @@
|
|
|
976
965
|
model,
|
|
977
966
|
bundlerConfig,
|
|
978
967
|
onError,
|
|
979
|
-
onPostpone,
|
|
980
968
|
onAllReady,
|
|
981
969
|
onFatalError,
|
|
982
970
|
identifierPrefix,
|
|
983
971
|
temporaryReferences,
|
|
972
|
+
debugStartTime,
|
|
984
973
|
environmentName,
|
|
985
974
|
filterStackFrame,
|
|
986
975
|
keepDebugAlive
|
|
@@ -998,7 +987,7 @@
|
|
|
998
987
|
pingedTasks = [],
|
|
999
988
|
hints = new Set();
|
|
1000
989
|
this.type = type;
|
|
1001
|
-
this.status =
|
|
990
|
+
this.status = OPENING;
|
|
1002
991
|
this.flushScheduled = !1;
|
|
1003
992
|
this.destination = this.fatalError = null;
|
|
1004
993
|
this.bundlerConfig = bundlerConfig;
|
|
@@ -1016,13 +1005,13 @@
|
|
|
1016
1005
|
this.writtenClientReferences = new Map();
|
|
1017
1006
|
this.writtenServerReferences = new Map();
|
|
1018
1007
|
this.writtenObjects = new WeakMap();
|
|
1008
|
+
this.writtenImportStrings = new Map();
|
|
1009
|
+
this.writtenImportStringsSize = 0;
|
|
1019
1010
|
this.temporaryReferences = temporaryReferences;
|
|
1020
1011
|
this.identifierPrefix = identifierPrefix || "";
|
|
1021
1012
|
this.identifierCount = 1;
|
|
1022
1013
|
this.taintCleanupQueue = [];
|
|
1023
1014
|
this.onError = void 0 === onError ? defaultErrorHandler : onError;
|
|
1024
|
-
this.onPostpone =
|
|
1025
|
-
void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
|
|
1026
1015
|
this.onAllReady = onAllReady;
|
|
1027
1016
|
this.onFatalError = onFatalError;
|
|
1028
1017
|
this.pendingDebugChunks = 0;
|
|
@@ -1047,7 +1036,10 @@
|
|
|
1047
1036
|
this.deferredDebugObjects = keepDebugAlive
|
|
1048
1037
|
? { retained: new Map(), existing: new Map() }
|
|
1049
1038
|
: null;
|
|
1050
|
-
type =
|
|
1039
|
+
type =
|
|
1040
|
+
"number" === typeof debugStartTime
|
|
1041
|
+
? (this.timeOrigin = debugStartTime - performance.timeOrigin)
|
|
1042
|
+
: (this.timeOrigin = performance.now());
|
|
1051
1043
|
emitTimeOriginChunk(this, type + performance.timeOrigin);
|
|
1052
1044
|
this.abortTime = -0;
|
|
1053
1045
|
model = createTask(
|
|
@@ -1069,8 +1061,8 @@
|
|
|
1069
1061
|
bundlerConfig,
|
|
1070
1062
|
onError,
|
|
1071
1063
|
identifierPrefix,
|
|
1072
|
-
onPostpone,
|
|
1073
1064
|
temporaryReferences,
|
|
1065
|
+
debugStartTime,
|
|
1074
1066
|
environmentName,
|
|
1075
1067
|
filterStackFrame,
|
|
1076
1068
|
keepDebugAlive
|
|
@@ -1081,11 +1073,11 @@
|
|
|
1081
1073
|
model,
|
|
1082
1074
|
bundlerConfig,
|
|
1083
1075
|
onError,
|
|
1084
|
-
onPostpone,
|
|
1085
1076
|
noop,
|
|
1086
1077
|
noop,
|
|
1087
1078
|
identifierPrefix,
|
|
1088
1079
|
temporaryReferences,
|
|
1080
|
+
debugStartTime,
|
|
1089
1081
|
environmentName,
|
|
1090
1082
|
filterStackFrame,
|
|
1091
1083
|
keepDebugAlive
|
|
@@ -1098,23 +1090,23 @@
|
|
|
1098
1090
|
onFatalError,
|
|
1099
1091
|
onError,
|
|
1100
1092
|
identifierPrefix,
|
|
1101
|
-
onPostpone,
|
|
1102
1093
|
temporaryReferences,
|
|
1094
|
+
debugStartTime,
|
|
1103
1095
|
environmentName,
|
|
1104
1096
|
filterStackFrame,
|
|
1105
1097
|
keepDebugAlive
|
|
1106
1098
|
) {
|
|
1107
1099
|
resetOwnerStackLimit();
|
|
1108
1100
|
return new RequestInstance(
|
|
1109
|
-
|
|
1101
|
+
PRERENDER,
|
|
1110
1102
|
model,
|
|
1111
1103
|
bundlerConfig,
|
|
1112
1104
|
onError,
|
|
1113
|
-
onPostpone,
|
|
1114
1105
|
onAllReady,
|
|
1115
1106
|
onFatalError,
|
|
1116
1107
|
identifierPrefix,
|
|
1117
1108
|
temporaryReferences,
|
|
1109
|
+
debugStartTime,
|
|
1118
1110
|
environmentName,
|
|
1119
1111
|
filterStackFrame,
|
|
1120
1112
|
keepDebugAlive
|
|
@@ -1156,7 +1148,23 @@
|
|
|
1156
1148
|
((cancelled = !0),
|
|
1157
1149
|
request.status === ABORTING
|
|
1158
1150
|
? emitDebugHaltChunk(request, id)
|
|
1159
|
-
:
|
|
1151
|
+
: (isArrayImpl(value) && 200 < value.length) ||
|
|
1152
|
+
((value instanceof ArrayBuffer ||
|
|
1153
|
+
value instanceof Int8Array ||
|
|
1154
|
+
value instanceof Uint8Array ||
|
|
1155
|
+
value instanceof Uint8ClampedArray ||
|
|
1156
|
+
value instanceof Int16Array ||
|
|
1157
|
+
value instanceof Uint16Array ||
|
|
1158
|
+
value instanceof Int32Array ||
|
|
1159
|
+
value instanceof Uint32Array ||
|
|
1160
|
+
value instanceof Float32Array ||
|
|
1161
|
+
value instanceof Float64Array ||
|
|
1162
|
+
value instanceof BigInt64Array ||
|
|
1163
|
+
value instanceof BigUint64Array ||
|
|
1164
|
+
value instanceof DataView) &&
|
|
1165
|
+
1e3 < value.byteLength)
|
|
1166
|
+
? emitDebugHaltChunk(request, id)
|
|
1167
|
+
: emitOutlinedDebugModelChunk(request, id, counter, value),
|
|
1160
1168
|
enqueueFlush(request));
|
|
1161
1169
|
},
|
|
1162
1170
|
function (reason) {
|
|
@@ -1193,8 +1201,8 @@
|
|
|
1193
1201
|
}
|
|
1194
1202
|
);
|
|
1195
1203
|
}
|
|
1196
|
-
function
|
|
1197
|
-
|
|
1204
|
+
function createThenableTask(request, task, thenable) {
|
|
1205
|
+
return createTask(
|
|
1198
1206
|
request,
|
|
1199
1207
|
thenable,
|
|
1200
1208
|
task.keyPath,
|
|
@@ -1206,42 +1214,35 @@
|
|
|
1206
1214
|
task.debugStack,
|
|
1207
1215
|
task.debugTask
|
|
1208
1216
|
);
|
|
1217
|
+
}
|
|
1218
|
+
function serializeThenable(request, task, thenable) {
|
|
1209
1219
|
switch (thenable.status) {
|
|
1210
1220
|
case "fulfilled":
|
|
1211
1221
|
return (
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
null
|
|
1218
|
-
),
|
|
1219
|
-
(newTask.model = thenable.value),
|
|
1220
|
-
pingTask(request, newTask),
|
|
1221
|
-
newTask.id
|
|
1222
|
+
(task = createThenableTask(request, task, thenable)),
|
|
1223
|
+
forwardDebugInfoFromThenable(request, task, thenable, null, null),
|
|
1224
|
+
(task.model = thenable.value),
|
|
1225
|
+
pingTask(request, task),
|
|
1226
|
+
task.id
|
|
1222
1227
|
);
|
|
1223
1228
|
case "rejected":
|
|
1224
1229
|
return (
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
null,
|
|
1230
|
-
null
|
|
1231
|
-
),
|
|
1232
|
-
erroredTask(request, newTask, thenable.reason),
|
|
1233
|
-
newTask.id
|
|
1230
|
+
(task = createThenableTask(request, task, thenable)),
|
|
1231
|
+
forwardDebugInfoFromThenable(request, task, thenable, null, null),
|
|
1232
|
+
erroredTask(request, task, thenable.reason),
|
|
1233
|
+
task.id
|
|
1234
1234
|
);
|
|
1235
1235
|
default:
|
|
1236
|
+
var _newTask2 = createThenableTask(request, task, thenable);
|
|
1236
1237
|
if (request.status === ABORTING)
|
|
1237
1238
|
return (
|
|
1238
|
-
request.abortableTasks.delete(
|
|
1239
|
-
|
|
1240
|
-
? (haltTask(
|
|
1239
|
+
request.abortableTasks.delete(_newTask2),
|
|
1240
|
+
request.type === PRERENDER
|
|
1241
|
+
? (haltTask(_newTask2), finishHaltedTask(_newTask2, request))
|
|
1241
1242
|
: ((task = request.fatalError),
|
|
1242
|
-
abortTask(
|
|
1243
|
-
finishAbortedTask(
|
|
1244
|
-
|
|
1243
|
+
abortTask(_newTask2),
|
|
1244
|
+
finishAbortedTask(_newTask2, request, task)),
|
|
1245
|
+
_newTask2.id
|
|
1245
1246
|
);
|
|
1246
1247
|
"string" !== typeof thenable.status &&
|
|
1247
1248
|
((thenable.status = "pending"),
|
|
@@ -1256,27 +1257,27 @@
|
|
|
1256
1257
|
((thenable.status = "rejected"), (thenable.reason = error));
|
|
1257
1258
|
}
|
|
1258
1259
|
));
|
|
1260
|
+
thenable.then(
|
|
1261
|
+
function (value) {
|
|
1262
|
+
forwardDebugInfoFromCurrentContext(request, _newTask2, thenable);
|
|
1263
|
+
_newTask2.model = value;
|
|
1264
|
+
pingTask(request, _newTask2);
|
|
1265
|
+
},
|
|
1266
|
+
function (reason) {
|
|
1267
|
+
_newTask2.status === PENDING$1 &&
|
|
1268
|
+
((_newTask2.timed = !0),
|
|
1269
|
+
erroredTask(request, _newTask2, reason),
|
|
1270
|
+
enqueueFlush(request));
|
|
1271
|
+
}
|
|
1272
|
+
);
|
|
1273
|
+
return _newTask2.id;
|
|
1259
1274
|
}
|
|
1260
|
-
thenable.then(
|
|
1261
|
-
function (value) {
|
|
1262
|
-
forwardDebugInfoFromCurrentContext(request, newTask, thenable);
|
|
1263
|
-
newTask.model = value;
|
|
1264
|
-
pingTask(request, newTask);
|
|
1265
|
-
},
|
|
1266
|
-
function (reason) {
|
|
1267
|
-
0 === newTask.status &&
|
|
1268
|
-
((newTask.timed = !0),
|
|
1269
|
-
erroredTask(request, newTask, reason),
|
|
1270
|
-
enqueueFlush(request));
|
|
1271
|
-
}
|
|
1272
|
-
);
|
|
1273
|
-
return newTask.id;
|
|
1274
1275
|
}
|
|
1275
1276
|
function serializeReadableStream(request, task, stream) {
|
|
1276
1277
|
function progress(entry) {
|
|
1277
|
-
if (
|
|
1278
|
+
if (streamTask.status === PENDING$1)
|
|
1278
1279
|
if (entry.done)
|
|
1279
|
-
(streamTask.status =
|
|
1280
|
+
(streamTask.status = COMPLETED),
|
|
1280
1281
|
(entry = streamTask.id.toString(16) + ":C\n"),
|
|
1281
1282
|
request.completedRegularChunks.push(stringToChunk(entry)),
|
|
1282
1283
|
request.abortableTasks.delete(streamTask),
|
|
@@ -1288,17 +1289,25 @@
|
|
|
1288
1289
|
callOnAllReadyIfReady(request);
|
|
1289
1290
|
else
|
|
1290
1291
|
try {
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1292
|
+
request.pendingChunks++,
|
|
1293
|
+
(streamTask.model = entry.value),
|
|
1294
|
+
isByteStream
|
|
1295
|
+
? emitTypedArrayChunk(
|
|
1296
|
+
request,
|
|
1297
|
+
streamTask.id,
|
|
1298
|
+
"b",
|
|
1299
|
+
streamTask.model,
|
|
1300
|
+
!1
|
|
1301
|
+
)
|
|
1302
|
+
: tryStreamTask(request, streamTask),
|
|
1294
1303
|
enqueueFlush(request),
|
|
1295
1304
|
reader.read().then(progress, error);
|
|
1296
|
-
} catch (x$
|
|
1297
|
-
error(x$
|
|
1305
|
+
} catch (x$6) {
|
|
1306
|
+
error(x$6);
|
|
1298
1307
|
}
|
|
1299
1308
|
}
|
|
1300
1309
|
function error(reason) {
|
|
1301
|
-
|
|
1310
|
+
streamTask.status === PENDING$1 &&
|
|
1302
1311
|
(request.cacheController.signal.removeEventListener(
|
|
1303
1312
|
"abort",
|
|
1304
1313
|
abortStream
|
|
@@ -1308,11 +1317,11 @@
|
|
|
1308
1317
|
reader.cancel(reason).then(error, error));
|
|
1309
1318
|
}
|
|
1310
1319
|
function abortStream() {
|
|
1311
|
-
if (
|
|
1320
|
+
if (streamTask.status === PENDING$1) {
|
|
1312
1321
|
var signal = request.cacheController.signal;
|
|
1313
1322
|
signal.removeEventListener("abort", abortStream);
|
|
1314
1323
|
signal = signal.reason;
|
|
1315
|
-
|
|
1324
|
+
request.type === PRERENDER
|
|
1316
1325
|
? (request.abortableTasks.delete(streamTask),
|
|
1317
1326
|
haltTask(streamTask),
|
|
1318
1327
|
finishHaltedTask(streamTask, request))
|
|
@@ -1327,7 +1336,8 @@
|
|
|
1327
1336
|
} catch (x) {
|
|
1328
1337
|
supportsBYOB = !1;
|
|
1329
1338
|
}
|
|
1330
|
-
var
|
|
1339
|
+
var isByteStream = supportsBYOB,
|
|
1340
|
+
reader = stream.getReader(),
|
|
1331
1341
|
streamTask = createTask(
|
|
1332
1342
|
request,
|
|
1333
1343
|
task.model,
|
|
@@ -1342,7 +1352,7 @@
|
|
|
1342
1352
|
);
|
|
1343
1353
|
request.pendingChunks++;
|
|
1344
1354
|
task =
|
|
1345
|
-
streamTask.id.toString(16) + ":" + (
|
|
1355
|
+
streamTask.id.toString(16) + ":" + (isByteStream ? "r" : "R") + "\n";
|
|
1346
1356
|
request.completedRegularChunks.push(stringToChunk(task));
|
|
1347
1357
|
request.cacheController.signal.addEventListener("abort", abortStream);
|
|
1348
1358
|
reader.read().then(progress, error);
|
|
@@ -1350,9 +1360,9 @@
|
|
|
1350
1360
|
}
|
|
1351
1361
|
function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
1352
1362
|
function progress(entry) {
|
|
1353
|
-
if (
|
|
1363
|
+
if (streamTask.status === PENDING$1)
|
|
1354
1364
|
if (entry.done) {
|
|
1355
|
-
streamTask.status =
|
|
1365
|
+
streamTask.status = COMPLETED;
|
|
1356
1366
|
if (void 0 === entry.value)
|
|
1357
1367
|
var endStreamRow = streamTask.id.toString(16) + ":C\n";
|
|
1358
1368
|
else
|
|
@@ -1382,12 +1392,12 @@
|
|
|
1382
1392
|
tryStreamTask(request, streamTask),
|
|
1383
1393
|
enqueueFlush(request),
|
|
1384
1394
|
callIteratorInDEV(iterator, progress, error);
|
|
1385
|
-
} catch (x$
|
|
1386
|
-
error(x$
|
|
1395
|
+
} catch (x$7) {
|
|
1396
|
+
error(x$7);
|
|
1387
1397
|
}
|
|
1388
1398
|
}
|
|
1389
1399
|
function error(reason) {
|
|
1390
|
-
|
|
1400
|
+
streamTask.status === PENDING$1 &&
|
|
1391
1401
|
(request.cacheController.signal.removeEventListener(
|
|
1392
1402
|
"abort",
|
|
1393
1403
|
abortIterable
|
|
@@ -1398,11 +1408,11 @@
|
|
|
1398
1408
|
iterator.throw(reason).then(noop, noop));
|
|
1399
1409
|
}
|
|
1400
1410
|
function abortIterable() {
|
|
1401
|
-
if (
|
|
1411
|
+
if (streamTask.status === PENDING$1) {
|
|
1402
1412
|
var signal = request.cacheController.signal;
|
|
1403
1413
|
signal.removeEventListener("abort", abortIterable);
|
|
1404
1414
|
var reason = signal.reason;
|
|
1405
|
-
|
|
1415
|
+
request.type === PRERENDER
|
|
1406
1416
|
? (request.abortableTasks.delete(streamTask),
|
|
1407
1417
|
haltTask(streamTask),
|
|
1408
1418
|
finishHaltedTask(streamTask, request))
|
|
@@ -1524,43 +1534,49 @@
|
|
|
1524
1534
|
result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1);
|
|
1525
1535
|
var iteratorFn = getIteratorFn(result);
|
|
1526
1536
|
if (iteratorFn) {
|
|
1527
|
-
var
|
|
1528
|
-
|
|
1529
|
-
iterator
|
|
1530
|
-
|
|
1531
|
-
Object.prototype.toString.call(Component) &&
|
|
1532
|
-
"[object Generator]" ===
|
|
1533
|
-
Object.prototype.toString.call(result)) ||
|
|
1534
|
-
callWithDebugContextInDEV(request, task, function () {
|
|
1535
|
-
console.error(
|
|
1536
|
-
"Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. "
|
|
1537
|
-
);
|
|
1538
|
-
});
|
|
1539
|
-
return iterator;
|
|
1540
|
-
});
|
|
1541
|
-
multiShot._debugInfo = result._debugInfo;
|
|
1542
|
-
return multiShot;
|
|
1543
|
-
}
|
|
1544
|
-
return "function" !== typeof result[ASYNC_ITERATOR] ||
|
|
1545
|
-
("function" === typeof ReadableStream &&
|
|
1546
|
-
result instanceof ReadableStream)
|
|
1547
|
-
? result
|
|
1548
|
-
: ((multiShot = _defineProperty({}, ASYNC_ITERATOR, function () {
|
|
1549
|
-
var iterator = result[ASYNC_ITERATOR]();
|
|
1537
|
+
var $jscomp$compprop0 = {};
|
|
1538
|
+
$jscomp$compprop0 =
|
|
1539
|
+
(($jscomp$compprop0[Symbol.iterator] = function () {
|
|
1540
|
+
var iterator = iteratorFn.call(result);
|
|
1550
1541
|
iterator !== result ||
|
|
1551
|
-
("[object
|
|
1542
|
+
("[object GeneratorFunction]" ===
|
|
1552
1543
|
Object.prototype.toString.call(Component) &&
|
|
1553
|
-
"[object
|
|
1544
|
+
"[object Generator]" ===
|
|
1554
1545
|
Object.prototype.toString.call(result)) ||
|
|
1555
1546
|
callWithDebugContextInDEV(request, task, function () {
|
|
1556
1547
|
console.error(
|
|
1557
|
-
"Returning an
|
|
1548
|
+
"Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. "
|
|
1558
1549
|
);
|
|
1559
1550
|
});
|
|
1560
1551
|
return iterator;
|
|
1561
|
-
})
|
|
1562
|
-
|
|
1563
|
-
|
|
1552
|
+
}),
|
|
1553
|
+
$jscomp$compprop0);
|
|
1554
|
+
$jscomp$compprop0._debugInfo = result._debugInfo;
|
|
1555
|
+
return $jscomp$compprop0;
|
|
1556
|
+
}
|
|
1557
|
+
return "function" !== typeof result[ASYNC_ITERATOR] ||
|
|
1558
|
+
("function" === typeof ReadableStream &&
|
|
1559
|
+
result instanceof ReadableStream)
|
|
1560
|
+
? result
|
|
1561
|
+
: (($jscomp$compprop0 = {}),
|
|
1562
|
+
($jscomp$compprop0 =
|
|
1563
|
+
(($jscomp$compprop0[ASYNC_ITERATOR] = function () {
|
|
1564
|
+
var iterator = result[ASYNC_ITERATOR]();
|
|
1565
|
+
iterator !== result ||
|
|
1566
|
+
("[object AsyncGeneratorFunction]" ===
|
|
1567
|
+
Object.prototype.toString.call(Component) &&
|
|
1568
|
+
"[object AsyncGenerator]" ===
|
|
1569
|
+
Object.prototype.toString.call(result)) ||
|
|
1570
|
+
callWithDebugContextInDEV(request, task, function () {
|
|
1571
|
+
console.error(
|
|
1572
|
+
"Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. "
|
|
1573
|
+
);
|
|
1574
|
+
});
|
|
1575
|
+
return iterator;
|
|
1576
|
+
}),
|
|
1577
|
+
$jscomp$compprop0)),
|
|
1578
|
+
($jscomp$compprop0._debugInfo = result._debugInfo),
|
|
1579
|
+
$jscomp$compprop0);
|
|
1564
1580
|
}
|
|
1565
1581
|
function renderFunctionComponent(
|
|
1566
1582
|
request,
|
|
@@ -1650,7 +1666,12 @@
|
|
|
1650
1666
|
Component = task.keyPath;
|
|
1651
1667
|
componentDebugInfo = task.implicitSlot;
|
|
1652
1668
|
null !== key
|
|
1653
|
-
? (task.keyPath =
|
|
1669
|
+
? (task.keyPath =
|
|
1670
|
+
key === REACT_OPTIMISTIC_KEY || Component === REACT_OPTIMISTIC_KEY
|
|
1671
|
+
? REACT_OPTIMISTIC_KEY
|
|
1672
|
+
: null === Component
|
|
1673
|
+
? key
|
|
1674
|
+
: Component + "," + key)
|
|
1654
1675
|
: null === Component && (task.implicitSlot = !0);
|
|
1655
1676
|
request = renderModelDestructive(request, task, emptyRoot, "", props);
|
|
1656
1677
|
task.keyPath = Component;
|
|
@@ -1755,7 +1776,7 @@
|
|
|
1755
1776
|
task.debugTask
|
|
1756
1777
|
);
|
|
1757
1778
|
retryTask(request, task);
|
|
1758
|
-
return
|
|
1779
|
+
return task.status === COMPLETED
|
|
1759
1780
|
? serializeByValueID(task.id)
|
|
1760
1781
|
: serializeLazyID(task.id);
|
|
1761
1782
|
}
|
|
@@ -1866,7 +1887,13 @@
|
|
|
1866
1887
|
validated
|
|
1867
1888
|
);
|
|
1868
1889
|
ref = task.keyPath;
|
|
1869
|
-
null === key
|
|
1890
|
+
null === key
|
|
1891
|
+
? (key = ref)
|
|
1892
|
+
: null !== ref &&
|
|
1893
|
+
(key =
|
|
1894
|
+
ref === REACT_OPTIMISTIC_KEY || key === REACT_OPTIMISTIC_KEY
|
|
1895
|
+
? REACT_OPTIMISTIC_KEY
|
|
1896
|
+
: ref + "," + key);
|
|
1870
1897
|
newFormatContext = null;
|
|
1871
1898
|
ref = task.debugOwner;
|
|
1872
1899
|
null !== ref && outlineComponentInfo(request, ref);
|
|
@@ -1900,7 +1927,7 @@
|
|
|
1900
1927
|
pingedTasks.push(task);
|
|
1901
1928
|
1 === pingedTasks.length &&
|
|
1902
1929
|
((request.flushScheduled = null !== request.destination),
|
|
1903
|
-
|
|
1930
|
+
request.type === PRERENDER || request.status === OPENING
|
|
1904
1931
|
? scheduleMicrotask(function () {
|
|
1905
1932
|
return performWork(request);
|
|
1906
1933
|
})
|
|
@@ -1919,9 +1946,35 @@
|
|
|
1919
1946
|
debugOwner,
|
|
1920
1947
|
debugStack,
|
|
1921
1948
|
debugTask
|
|
1949
|
+
) {
|
|
1950
|
+
return createTaskWithID(
|
|
1951
|
+
request,
|
|
1952
|
+
request.nextChunkId++,
|
|
1953
|
+
model,
|
|
1954
|
+
keyPath,
|
|
1955
|
+
implicitSlot,
|
|
1956
|
+
formatContext,
|
|
1957
|
+
abortSet,
|
|
1958
|
+
lastTimestamp,
|
|
1959
|
+
debugOwner,
|
|
1960
|
+
debugStack,
|
|
1961
|
+
debugTask
|
|
1962
|
+
);
|
|
1963
|
+
}
|
|
1964
|
+
function createTaskWithID(
|
|
1965
|
+
request,
|
|
1966
|
+
id,
|
|
1967
|
+
model,
|
|
1968
|
+
keyPath,
|
|
1969
|
+
implicitSlot,
|
|
1970
|
+
formatContext,
|
|
1971
|
+
abortSet,
|
|
1972
|
+
lastTimestamp,
|
|
1973
|
+
debugOwner,
|
|
1974
|
+
debugStack,
|
|
1975
|
+
debugTask
|
|
1922
1976
|
) {
|
|
1923
1977
|
request.pendingChunks++;
|
|
1924
|
-
var id = request.nextChunkId++;
|
|
1925
1978
|
"object" !== typeof model ||
|
|
1926
1979
|
null === model ||
|
|
1927
1980
|
null !== keyPath ||
|
|
@@ -1929,7 +1982,7 @@
|
|
|
1929
1982
|
request.writtenObjects.set(model, serializeByValueID(id));
|
|
1930
1983
|
var task = {
|
|
1931
1984
|
id: id,
|
|
1932
|
-
status:
|
|
1985
|
+
status: PENDING$1,
|
|
1933
1986
|
model: model,
|
|
1934
1987
|
keyPath: keyPath,
|
|
1935
1988
|
implicitSlot: implicitSlot,
|
|
@@ -1937,32 +1990,6 @@
|
|
|
1937
1990
|
ping: function () {
|
|
1938
1991
|
return pingTask(request, task);
|
|
1939
1992
|
},
|
|
1940
|
-
toJSON: function (parentPropertyName, value) {
|
|
1941
|
-
var parent = this,
|
|
1942
|
-
originalValue = parent[parentPropertyName];
|
|
1943
|
-
"object" !== typeof originalValue ||
|
|
1944
|
-
originalValue === value ||
|
|
1945
|
-
originalValue instanceof Date ||
|
|
1946
|
-
callWithDebugContextInDEV(request, task, function () {
|
|
1947
|
-
"Object" !== objectName(originalValue)
|
|
1948
|
-
? "string" === typeof jsxChildrenParents.get(parent)
|
|
1949
|
-
? console.error(
|
|
1950
|
-
"%s objects cannot be rendered as text children. Try formatting it using toString().%s",
|
|
1951
|
-
objectName(originalValue),
|
|
1952
|
-
describeObjectForErrorMessage(parent, parentPropertyName)
|
|
1953
|
-
)
|
|
1954
|
-
: console.error(
|
|
1955
|
-
"Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s",
|
|
1956
|
-
objectName(originalValue),
|
|
1957
|
-
describeObjectForErrorMessage(parent, parentPropertyName)
|
|
1958
|
-
)
|
|
1959
|
-
: console.error(
|
|
1960
|
-
"Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s",
|
|
1961
|
-
describeObjectForErrorMessage(parent, parentPropertyName)
|
|
1962
|
-
);
|
|
1963
|
-
});
|
|
1964
|
-
return renderModel(request, task, parent, parentPropertyName, value);
|
|
1965
|
-
},
|
|
1966
1993
|
thenableState: null,
|
|
1967
1994
|
timed: !1
|
|
1968
1995
|
};
|
|
@@ -1974,6 +2001,74 @@
|
|
|
1974
2001
|
abortSet.add(task);
|
|
1975
2002
|
return task;
|
|
1976
2003
|
}
|
|
2004
|
+
function resolveModel(request, task, parent, parentPropertyName, value) {
|
|
2005
|
+
var jsonValue = value;
|
|
2006
|
+
null !== value &&
|
|
2007
|
+
"object" === typeof value &&
|
|
2008
|
+
"function" === typeof value.toJSON &&
|
|
2009
|
+
(jsonValue = value.toJSON(parentPropertyName));
|
|
2010
|
+
var originalValue = parent[parentPropertyName];
|
|
2011
|
+
"object" !== typeof originalValue ||
|
|
2012
|
+
originalValue === jsonValue ||
|
|
2013
|
+
originalValue instanceof Date ||
|
|
2014
|
+
callWithDebugContextInDEV(request, task, function () {
|
|
2015
|
+
ArrayBuffer.isView(originalValue)
|
|
2016
|
+
? console.error(
|
|
2017
|
+
"Binary data with a toJSON method, such as a Node.js Buffer, is serialized through toJSON instead of as binary. Pass a Uint8Array or ArrayBuffer to send binary data.%s",
|
|
2018
|
+
describeObjectForErrorMessage(parent, parentPropertyName)
|
|
2019
|
+
)
|
|
2020
|
+
: "Object" !== objectName(originalValue)
|
|
2021
|
+
? "string" === typeof jsxChildrenParents.get(parent)
|
|
2022
|
+
? console.error(
|
|
2023
|
+
"%s objects cannot be rendered as text children. Try formatting it using toString().%s",
|
|
2024
|
+
objectName(originalValue),
|
|
2025
|
+
describeObjectForErrorMessage(parent, parentPropertyName)
|
|
2026
|
+
)
|
|
2027
|
+
: console.error(
|
|
2028
|
+
"Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s",
|
|
2029
|
+
objectName(originalValue),
|
|
2030
|
+
describeObjectForErrorMessage(parent, parentPropertyName)
|
|
2031
|
+
)
|
|
2032
|
+
: console.error(
|
|
2033
|
+
"Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s",
|
|
2034
|
+
describeObjectForErrorMessage(parent, parentPropertyName)
|
|
2035
|
+
);
|
|
2036
|
+
});
|
|
2037
|
+
value = renderModel(request, task, parent, parentPropertyName, jsonValue);
|
|
2038
|
+
if (null === value || "object" !== typeof value) return value;
|
|
2039
|
+
if (isArrayImpl(value)) {
|
|
2040
|
+
var _resolved = [];
|
|
2041
|
+
for (jsonValue = 0; jsonValue < value.length; jsonValue++)
|
|
2042
|
+
_resolved[jsonValue] = resolveModel(
|
|
2043
|
+
request,
|
|
2044
|
+
task,
|
|
2045
|
+
value,
|
|
2046
|
+
"" + jsonValue,
|
|
2047
|
+
value[jsonValue]
|
|
2048
|
+
);
|
|
2049
|
+
return _resolved;
|
|
2050
|
+
}
|
|
2051
|
+
jsonValue = {};
|
|
2052
|
+
for (_resolved in value)
|
|
2053
|
+
if (hasOwnProperty.call(value, _resolved)) {
|
|
2054
|
+
var resolvedValue = resolveModel(
|
|
2055
|
+
request,
|
|
2056
|
+
task,
|
|
2057
|
+
value,
|
|
2058
|
+
_resolved,
|
|
2059
|
+
value[_resolved]
|
|
2060
|
+
);
|
|
2061
|
+
_resolved === __PROTO__$1
|
|
2062
|
+
? Object.defineProperty(jsonValue, _resolved, {
|
|
2063
|
+
value: resolvedValue,
|
|
2064
|
+
enumerable: !0,
|
|
2065
|
+
writable: !0,
|
|
2066
|
+
configurable: !0
|
|
2067
|
+
})
|
|
2068
|
+
: (jsonValue[_resolved] = resolvedValue);
|
|
2069
|
+
}
|
|
2070
|
+
return jsonValue;
|
|
2071
|
+
}
|
|
1977
2072
|
function serializeByValueID(id) {
|
|
1978
2073
|
return "$" + id.toString(16);
|
|
1979
2074
|
}
|
|
@@ -2023,12 +2118,13 @@
|
|
|
2023
2118
|
: serializeByValueID(existingId);
|
|
2024
2119
|
try {
|
|
2025
2120
|
var clientReferenceMetadata = resolveClientReferenceMetadata(
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2121
|
+
request.bundlerConfig,
|
|
2122
|
+
clientReference
|
|
2123
|
+
),
|
|
2124
|
+
json = stringifyImportMetadata(request, clientReferenceMetadata, !1);
|
|
2029
2125
|
request.pendingChunks++;
|
|
2030
2126
|
var importId = request.nextChunkId++;
|
|
2031
|
-
emitImportChunk(request, importId,
|
|
2127
|
+
emitImportChunk(request, importId, json, !1);
|
|
2032
2128
|
writtenClientReferences.set(clientReferenceKey, importId);
|
|
2033
2129
|
return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName
|
|
2034
2130
|
? serializeLazyID(importId)
|
|
@@ -2060,12 +2156,13 @@
|
|
|
2060
2156
|
: serializeByValueID(existingId);
|
|
2061
2157
|
try {
|
|
2062
2158
|
var clientReferenceMetadata = resolveClientReferenceMetadata(
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2159
|
+
request.bundlerConfig,
|
|
2160
|
+
clientReference
|
|
2161
|
+
),
|
|
2162
|
+
json = stringifyImportMetadata(request, clientReferenceMetadata, !0);
|
|
2066
2163
|
request.pendingDebugChunks++;
|
|
2067
2164
|
var importId = request.nextChunkId++;
|
|
2068
|
-
emitImportChunk(request, importId,
|
|
2165
|
+
emitImportChunk(request, importId, json, !0);
|
|
2069
2166
|
return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName
|
|
2070
2167
|
? serializeLazyID(importId)
|
|
2071
2168
|
: serializeByValueID(importId);
|
|
@@ -2154,6 +2251,8 @@
|
|
|
2154
2251
|
return serializeByValueID(bufferId);
|
|
2155
2252
|
}
|
|
2156
2253
|
function serializeDebugTypedArray(request, tag, typedArray) {
|
|
2254
|
+
if (1e3 < typedArray.byteLength && !doNotLimit.has(typedArray))
|
|
2255
|
+
return serializeDeferredObject(request, typedArray);
|
|
2157
2256
|
request.pendingDebugChunks++;
|
|
2158
2257
|
var bufferId = request.nextChunkId++;
|
|
2159
2258
|
emitTypedArrayChunk(request, bufferId, tag, typedArray, !0);
|
|
@@ -2188,7 +2287,7 @@
|
|
|
2188
2287
|
}
|
|
2189
2288
|
function serializeBlob(request, blob) {
|
|
2190
2289
|
function progress(entry) {
|
|
2191
|
-
if (
|
|
2290
|
+
if (newTask.status === PENDING$1)
|
|
2192
2291
|
if (entry.done)
|
|
2193
2292
|
request.cacheController.signal.removeEventListener(
|
|
2194
2293
|
"abort",
|
|
@@ -2201,7 +2300,7 @@
|
|
|
2201
2300
|
);
|
|
2202
2301
|
}
|
|
2203
2302
|
function error(reason) {
|
|
2204
|
-
|
|
2303
|
+
newTask.status === PENDING$1 &&
|
|
2205
2304
|
(request.cacheController.signal.removeEventListener(
|
|
2206
2305
|
"abort",
|
|
2207
2306
|
abortBlob
|
|
@@ -2211,11 +2310,11 @@
|
|
|
2211
2310
|
reader.cancel(reason).then(error, error));
|
|
2212
2311
|
}
|
|
2213
2312
|
function abortBlob() {
|
|
2214
|
-
if (
|
|
2313
|
+
if (newTask.status === PENDING$1) {
|
|
2215
2314
|
var signal = request.cacheController.signal;
|
|
2216
2315
|
signal.removeEventListener("abort", abortBlob);
|
|
2217
2316
|
signal = signal.reason;
|
|
2218
|
-
|
|
2317
|
+
request.type === PRERENDER
|
|
2219
2318
|
? (request.abortableTasks.delete(newTask),
|
|
2220
2319
|
haltTask(newTask),
|
|
2221
2320
|
finishHaltedTask(newTask, request))
|
|
@@ -2241,6 +2340,29 @@
|
|
|
2241
2340
|
reader.read().then(progress).catch(error);
|
|
2242
2341
|
return "$B" + newTask.id.toString(16);
|
|
2243
2342
|
}
|
|
2343
|
+
function escapeStringValue(value) {
|
|
2344
|
+
return "$" === value[0] ? "$" + value : value;
|
|
2345
|
+
}
|
|
2346
|
+
function serializeImportString(request, value) {
|
|
2347
|
+
if (value.length < MIN_DEDUPLICATED_IMPORT_STRING_LENGTH)
|
|
2348
|
+
return escapeStringValue(value);
|
|
2349
|
+
var writtenStrings = request.writtenImportStrings,
|
|
2350
|
+
existing = writtenStrings.get(value);
|
|
2351
|
+
if (void 0 !== existing) return existing;
|
|
2352
|
+
existing = request.writtenImportStringsSize + value.length;
|
|
2353
|
+
if (existing > MAX_DEDUPLICATED_IMPORT_STRINGS_SIZE)
|
|
2354
|
+
return escapeStringValue(value);
|
|
2355
|
+
request.writtenImportStringsSize = existing;
|
|
2356
|
+
request.pendingChunks++;
|
|
2357
|
+
existing = request.nextChunkId++;
|
|
2358
|
+
var json = stringify(escapeStringValue(value));
|
|
2359
|
+
request.completedImportChunks.push(
|
|
2360
|
+
stringToChunk(existing.toString(16) + ":" + json + "\n")
|
|
2361
|
+
);
|
|
2362
|
+
request = serializeByValueID(existing);
|
|
2363
|
+
writtenStrings.set(value, request);
|
|
2364
|
+
return request;
|
|
2365
|
+
}
|
|
2244
2366
|
function renderModel(request, task, parent, key, value) {
|
|
2245
2367
|
serializedSize += key.length;
|
|
2246
2368
|
var prevKeyPath = task.keyPath,
|
|
@@ -2255,8 +2377,8 @@
|
|
|
2255
2377
|
(parent.$$typeof === REACT_ELEMENT_TYPE ||
|
|
2256
2378
|
parent.$$typeof === REACT_LAZY_TYPE);
|
|
2257
2379
|
if (request.status === ABORTING) {
|
|
2258
|
-
task.status =
|
|
2259
|
-
if (
|
|
2380
|
+
task.status = ABORTED;
|
|
2381
|
+
if (request.type === PRERENDER)
|
|
2260
2382
|
return (
|
|
2261
2383
|
(task = request.nextChunkId++),
|
|
2262
2384
|
(task = parent
|
|
@@ -2324,7 +2446,7 @@
|
|
|
2324
2446
|
value
|
|
2325
2447
|
) {
|
|
2326
2448
|
task.model = value;
|
|
2327
|
-
|
|
2449
|
+
parentPropertyName === __PROTO__$1 &&
|
|
2328
2450
|
callWithDebugContextInDEV(request, task, function () {
|
|
2329
2451
|
console.error(
|
|
2330
2452
|
"Expected not to serialize an object with own property `__proto__`. When parsed this property will be omitted.%s",
|
|
@@ -2368,7 +2490,9 @@
|
|
|
2368
2490
|
void 0 === value._debugTask
|
|
2369
2491
|
) {
|
|
2370
2492
|
var key = "";
|
|
2371
|
-
null !== value.key &&
|
|
2493
|
+
null !== value.key &&
|
|
2494
|
+
value.key !== REACT_OPTIMISTIC_KEY &&
|
|
2495
|
+
(key = ' key="' + value.key + '"');
|
|
2372
2496
|
console.error(
|
|
2373
2497
|
"Attempted to render <%s%s> without development properties. This is not supported. It can happen if:\n- The element is created with a production version of React but rendered in development.\n- The element was cloned with a custom function instead of `React.cloneElement`.\nThe props of this element may help locate this element: %o",
|
|
2374
2498
|
value.type,
|
|
@@ -2403,8 +2527,8 @@
|
|
|
2403
2527
|
return renderModelDestructive(
|
|
2404
2528
|
request,
|
|
2405
2529
|
task,
|
|
2406
|
-
|
|
2407
|
-
|
|
2530
|
+
parent,
|
|
2531
|
+
parentPropertyName,
|
|
2408
2532
|
elementReference
|
|
2409
2533
|
);
|
|
2410
2534
|
case REACT_LEGACY_ELEMENT_TYPE:
|
|
@@ -2568,9 +2692,7 @@
|
|
|
2568
2692
|
? "$D" + value
|
|
2569
2693
|
: 1024 <= value.length && null !== byteLengthOfChunk
|
|
2570
2694
|
? serializeLargeTextString(request, value)
|
|
2571
|
-
:
|
|
2572
|
-
? "$" + value
|
|
2573
|
-
: value
|
|
2695
|
+
: escapeStringValue(value)
|
|
2574
2696
|
);
|
|
2575
2697
|
if ("boolean" === typeof value) return value;
|
|
2576
2698
|
if ("number" === typeof value) return serializeNumber(value);
|
|
@@ -2673,7 +2795,7 @@
|
|
|
2673
2795
|
null !== request.destination
|
|
2674
2796
|
? ((request.status = CLOSED),
|
|
2675
2797
|
closeWithError(request.destination, error))
|
|
2676
|
-
: ((request.status =
|
|
2798
|
+
: ((request.status = CLOSING), (request.fatalError = error));
|
|
2677
2799
|
request.cacheController.abort(
|
|
2678
2800
|
Error("The render was aborted due to a fatal error.", { cause: error })
|
|
2679
2801
|
);
|
|
@@ -2692,19 +2814,21 @@
|
|
|
2692
2814
|
"An error occurred but serializing the error message failed."),
|
|
2693
2815
|
(stack = []);
|
|
2694
2816
|
}
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
outlineModel(request,
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
);
|
|
2817
|
+
name = { name: name, message: message, stack: stack, env: env };
|
|
2818
|
+
"cause" in error &&
|
|
2819
|
+
((message = outlineModel(request, error.cause)),
|
|
2820
|
+
(name.cause = serializeByValueID(message)));
|
|
2821
|
+
"undefined" !== typeof AggregateError &&
|
|
2822
|
+
error instanceof AggregateError &&
|
|
2823
|
+
((error = outlineModel(request, error.errors)),
|
|
2824
|
+
(name.errors = serializeByValueID(error)));
|
|
2825
|
+
return "$Z" + outlineModel(request, name).toString(16);
|
|
2704
2826
|
}
|
|
2705
2827
|
function emitErrorChunk(request, id, digest, error, debug, owner) {
|
|
2706
2828
|
var name = "Error",
|
|
2707
|
-
env = (0, request.environmentName)()
|
|
2829
|
+
env = (0, request.environmentName)(),
|
|
2830
|
+
causeReference = null,
|
|
2831
|
+
errorsReference = null;
|
|
2708
2832
|
try {
|
|
2709
2833
|
if (error instanceof Error) {
|
|
2710
2834
|
name = error.name;
|
|
@@ -2712,6 +2836,23 @@
|
|
|
2712
2836
|
var stack = filterStackTrace(request, parseStackTrace(error, 0));
|
|
2713
2837
|
var errorEnv = error.environmentName;
|
|
2714
2838
|
"string" === typeof errorEnv && (env = errorEnv);
|
|
2839
|
+
if ("cause" in error) {
|
|
2840
|
+
var cause = error.cause,
|
|
2841
|
+
causeId = debug
|
|
2842
|
+
? outlineDebugModel(request, { objectLimit: 5 }, cause)
|
|
2843
|
+
: outlineModel(request, cause);
|
|
2844
|
+
causeReference = serializeByValueID(causeId);
|
|
2845
|
+
}
|
|
2846
|
+
if (
|
|
2847
|
+
"undefined" !== typeof AggregateError &&
|
|
2848
|
+
error instanceof AggregateError
|
|
2849
|
+
) {
|
|
2850
|
+
var errors = error.errors,
|
|
2851
|
+
errorsId = debug
|
|
2852
|
+
? outlineDebugModel(request, { objectLimit: 5 }, errors)
|
|
2853
|
+
: outlineModel(request, errors);
|
|
2854
|
+
errorsReference = serializeByValueID(errorsId);
|
|
2855
|
+
}
|
|
2715
2856
|
} else
|
|
2716
2857
|
(message =
|
|
2717
2858
|
"object" === typeof error && null !== error
|
|
@@ -2732,15 +2873,101 @@
|
|
|
2732
2873
|
env: env,
|
|
2733
2874
|
owner: error
|
|
2734
2875
|
};
|
|
2876
|
+
null !== causeReference && (digest.cause = causeReference);
|
|
2877
|
+
null !== errorsReference && (digest.errors = errorsReference);
|
|
2735
2878
|
id = id.toString(16) + ":E" + stringify(digest) + "\n";
|
|
2736
2879
|
id = stringToChunk(id);
|
|
2737
2880
|
debug
|
|
2738
2881
|
? request.completedDebugChunks.push(id)
|
|
2739
2882
|
: request.completedErrorChunks.push(id);
|
|
2740
2883
|
}
|
|
2741
|
-
function
|
|
2742
|
-
|
|
2743
|
-
|
|
2884
|
+
function importMetadataReplacer(key, value) {
|
|
2885
|
+
return "string" === typeof value
|
|
2886
|
+
? ((key = importStringRequest),
|
|
2887
|
+
null === key
|
|
2888
|
+
? escapeStringValue(value)
|
|
2889
|
+
: serializeImportString(key, value))
|
|
2890
|
+
: value;
|
|
2891
|
+
}
|
|
2892
|
+
function transformImportMetadata(request, value, depth) {
|
|
2893
|
+
switch (typeof value) {
|
|
2894
|
+
case "string":
|
|
2895
|
+
return serializeImportString(request, value);
|
|
2896
|
+
case "number":
|
|
2897
|
+
case "boolean":
|
|
2898
|
+
case "undefined":
|
|
2899
|
+
return value;
|
|
2900
|
+
case "object":
|
|
2901
|
+
if (null === value) return null;
|
|
2902
|
+
if (
|
|
2903
|
+
depth > MAX_IMPORT_METADATA_DEPTH ||
|
|
2904
|
+
"function" === typeof value.toJSON
|
|
2905
|
+
)
|
|
2906
|
+
return NOT_PLAIN_IMPORT_METADATA;
|
|
2907
|
+
if (isArrayImpl(value)) {
|
|
2908
|
+
for (
|
|
2909
|
+
var length = value.length, _copy = Array(length), i = 0;
|
|
2910
|
+
i < length;
|
|
2911
|
+
i++
|
|
2912
|
+
) {
|
|
2913
|
+
var element = value[i];
|
|
2914
|
+
if ("string" === typeof element)
|
|
2915
|
+
_copy[i] = serializeImportString(request, element);
|
|
2916
|
+
else {
|
|
2917
|
+
element = transformImportMetadata(request, element, depth + 1);
|
|
2918
|
+
if (element === NOT_PLAIN_IMPORT_METADATA)
|
|
2919
|
+
return NOT_PLAIN_IMPORT_METADATA;
|
|
2920
|
+
_copy[i] = element;
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
return _copy;
|
|
2924
|
+
}
|
|
2925
|
+
length = getPrototypeOf(value);
|
|
2926
|
+
if (length !== ObjectPrototype$1 && null !== length)
|
|
2927
|
+
return NOT_PLAIN_IMPORT_METADATA;
|
|
2928
|
+
length = Object.keys(value);
|
|
2929
|
+
_copy = {};
|
|
2930
|
+
for (i = 0; i < length.length; i++) {
|
|
2931
|
+
element = length[i];
|
|
2932
|
+
if (element in ObjectPrototype$1) return NOT_PLAIN_IMPORT_METADATA;
|
|
2933
|
+
var _element = value[element];
|
|
2934
|
+
if ("string" === typeof _element)
|
|
2935
|
+
_copy[element] = serializeImportString(request, _element);
|
|
2936
|
+
else {
|
|
2937
|
+
_element = transformImportMetadata(request, _element, depth + 1);
|
|
2938
|
+
if (_element === NOT_PLAIN_IMPORT_METADATA)
|
|
2939
|
+
return NOT_PLAIN_IMPORT_METADATA;
|
|
2940
|
+
_copy[element] = _element;
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
return _copy;
|
|
2944
|
+
default:
|
|
2945
|
+
return NOT_PLAIN_IMPORT_METADATA;
|
|
2946
|
+
}
|
|
2947
|
+
}
|
|
2948
|
+
function stringifyImportMetadata(request, clientReferenceMetadata, debug) {
|
|
2949
|
+
if (!debug) {
|
|
2950
|
+
var copy = transformImportMetadata(request, clientReferenceMetadata, 0);
|
|
2951
|
+
if (copy !== NOT_PLAIN_IMPORT_METADATA) return stringify(copy);
|
|
2952
|
+
}
|
|
2953
|
+
a: {
|
|
2954
|
+
copy = importStringRequest;
|
|
2955
|
+
importStringRequest = debug ? null : request;
|
|
2956
|
+
try {
|
|
2957
|
+
var JSCompiler_inline_result = stringify(
|
|
2958
|
+
clientReferenceMetadata,
|
|
2959
|
+
importMetadataReplacer
|
|
2960
|
+
);
|
|
2961
|
+
break a;
|
|
2962
|
+
} finally {
|
|
2963
|
+
importStringRequest = copy;
|
|
2964
|
+
}
|
|
2965
|
+
JSCompiler_inline_result = void 0;
|
|
2966
|
+
}
|
|
2967
|
+
return JSCompiler_inline_result;
|
|
2968
|
+
}
|
|
2969
|
+
function emitImportChunk(request, id, json, debug) {
|
|
2970
|
+
id = id.toString(16) + ":I" + json + "\n";
|
|
2744
2971
|
id = stringToChunk(id);
|
|
2745
2972
|
debug
|
|
2746
2973
|
? request.completedDebugChunks.push(id)
|
|
@@ -2763,12 +2990,15 @@
|
|
|
2763
2990
|
function emitDebugChunk(request, id, debugInfo) {
|
|
2764
2991
|
var json = serializeDebugModel(request, 500, debugInfo);
|
|
2765
2992
|
null !== request.debugDestination
|
|
2766
|
-
?
|
|
2767
|
-
(
|
|
2768
|
-
|
|
2769
|
-
request.
|
|
2770
|
-
|
|
2771
|
-
|
|
2993
|
+
? '"' === json[0] && "$" === json[1]
|
|
2994
|
+
? ((id = id.toString(16) + ":D" + json + "\n"),
|
|
2995
|
+
request.completedRegularChunks.push(stringToChunk(id)))
|
|
2996
|
+
: ((debugInfo = request.nextChunkId++),
|
|
2997
|
+
(json = debugInfo.toString(16) + ":" + json + "\n"),
|
|
2998
|
+
request.pendingDebugChunks++,
|
|
2999
|
+
request.completedDebugChunks.push(stringToChunk(json)),
|
|
3000
|
+
(id = id.toString(16) + ':D"$' + debugInfo.toString(16) + '"\n'),
|
|
3001
|
+
request.completedRegularChunks.push(stringToChunk(id)))
|
|
2772
3002
|
: ((id = id.toString(16) + ":D" + json + "\n"),
|
|
2773
3003
|
request.completedRegularChunks.push(stringToChunk(id)));
|
|
2774
3004
|
}
|
|
@@ -2814,8 +3044,16 @@
|
|
|
2814
3044
|
id = id.toString(16) + ":" + tag + buffer.toString(16) + ",";
|
|
2815
3045
|
id = stringToChunk(id);
|
|
2816
3046
|
debug
|
|
2817
|
-
? request.completedDebugChunks.push(
|
|
2818
|
-
|
|
3047
|
+
? request.completedDebugChunks.push(
|
|
3048
|
+
NEXT_TWO_CHUNKS_ARE_ATOMIC,
|
|
3049
|
+
id,
|
|
3050
|
+
typedArray
|
|
3051
|
+
)
|
|
3052
|
+
: request.completedRegularChunks.push(
|
|
3053
|
+
NEXT_TWO_CHUNKS_ARE_ATOMIC,
|
|
3054
|
+
id,
|
|
3055
|
+
typedArray
|
|
3056
|
+
);
|
|
2819
3057
|
}
|
|
2820
3058
|
function emitTextChunk(request, id, text, debug) {
|
|
2821
3059
|
if (null === byteLengthOfChunk)
|
|
@@ -2828,8 +3066,16 @@
|
|
|
2828
3066
|
id = id.toString(16) + ":T" + binaryLength.toString(16) + ",";
|
|
2829
3067
|
id = stringToChunk(id);
|
|
2830
3068
|
debug
|
|
2831
|
-
? request.completedDebugChunks.push(
|
|
2832
|
-
|
|
3069
|
+
? request.completedDebugChunks.push(
|
|
3070
|
+
NEXT_TWO_CHUNKS_ARE_ATOMIC,
|
|
3071
|
+
id,
|
|
3072
|
+
text
|
|
3073
|
+
)
|
|
3074
|
+
: request.completedRegularChunks.push(
|
|
3075
|
+
NEXT_TWO_CHUNKS_ARE_ATOMIC,
|
|
3076
|
+
id,
|
|
3077
|
+
text
|
|
3078
|
+
);
|
|
2833
3079
|
}
|
|
2834
3080
|
function renderDebugModel(
|
|
2835
3081
|
request,
|
|
@@ -3008,7 +3254,11 @@
|
|
|
3008
3254
|
}
|
|
3009
3255
|
if ("function" === typeof value.then)
|
|
3010
3256
|
return serializeDebugThenable(request, counter, value);
|
|
3011
|
-
if (isArrayImpl(value))
|
|
3257
|
+
if (isArrayImpl(value))
|
|
3258
|
+
return 200 < value.length && !doNotLimit.has(value)
|
|
3259
|
+
? serializeDeferredObject(request, value)
|
|
3260
|
+
: value;
|
|
3261
|
+
if (value instanceof Date) return "$D" + value.toJSON();
|
|
3012
3262
|
if (value instanceof Map) {
|
|
3013
3263
|
value = Array.from(value);
|
|
3014
3264
|
counter.objectLimit++;
|
|
@@ -3043,25 +3293,35 @@
|
|
|
3043
3293
|
).toString(16)
|
|
3044
3294
|
);
|
|
3045
3295
|
if (value instanceof Error) {
|
|
3046
|
-
|
|
3047
|
-
|
|
3296
|
+
var name = "Error";
|
|
3297
|
+
parent = (0, request.environmentName)();
|
|
3048
3298
|
try {
|
|
3049
|
-
(
|
|
3050
|
-
(
|
|
3051
|
-
(
|
|
3299
|
+
(name = value.name),
|
|
3300
|
+
(key = String(value.message)),
|
|
3301
|
+
(ref = filterStackTrace(request, parseStackTrace(value, 0))),
|
|
3052
3302
|
(entry = value.environmentName),
|
|
3053
|
-
"string" === typeof entry && (
|
|
3303
|
+
"string" === typeof entry && (parent = entry);
|
|
3054
3304
|
} catch (x) {
|
|
3055
|
-
(
|
|
3305
|
+
(key =
|
|
3056
3306
|
"An error occurred but serializing the error message failed."),
|
|
3057
|
-
(
|
|
3307
|
+
(ref = []);
|
|
3058
3308
|
}
|
|
3309
|
+
key = { name: name, message: key, stack: ref, env: parent };
|
|
3310
|
+
"cause" in value &&
|
|
3311
|
+
(counter.objectLimit--,
|
|
3312
|
+
(entry = outlineDebugModel(request, counter, value.cause)),
|
|
3313
|
+
(key.cause = serializeByValueID(entry)));
|
|
3314
|
+
"undefined" !== typeof AggregateError &&
|
|
3315
|
+
value instanceof AggregateError &&
|
|
3316
|
+
(counter.objectLimit--,
|
|
3317
|
+
(value = outlineDebugModel(request, counter, value.errors)),
|
|
3318
|
+
(key.errors = serializeByValueID(value)));
|
|
3059
3319
|
request =
|
|
3060
3320
|
"$Z" +
|
|
3061
3321
|
outlineDebugModel(
|
|
3062
3322
|
request,
|
|
3063
|
-
{ objectLimit: 2 *
|
|
3064
|
-
|
|
3323
|
+
{ objectLimit: 2 * ref.length + 1 },
|
|
3324
|
+
key
|
|
3065
3325
|
).toString(16);
|
|
3066
3326
|
return request;
|
|
3067
3327
|
}
|
|
@@ -3097,9 +3357,9 @@
|
|
|
3097
3357
|
request = getPrototypeOf(value);
|
|
3098
3358
|
if (request !== ObjectPrototype$1 && null !== request) {
|
|
3099
3359
|
counter = Object.create(null);
|
|
3100
|
-
for (
|
|
3101
|
-
if (hasOwnProperty.call(value,
|
|
3102
|
-
counter[
|
|
3360
|
+
for (name in value)
|
|
3361
|
+
if (hasOwnProperty.call(value, name) || isGetter(request, name))
|
|
3362
|
+
counter[name] = value[name];
|
|
3103
3363
|
ref = request.constructor;
|
|
3104
3364
|
"function" !== typeof ref ||
|
|
3105
3365
|
ref.prototype !== request ||
|
|
@@ -3111,11 +3371,12 @@
|
|
|
3111
3371
|
return value;
|
|
3112
3372
|
}
|
|
3113
3373
|
if ("string" === typeof value) {
|
|
3114
|
-
if (
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3374
|
+
if (1e6 < value.length)
|
|
3375
|
+
return (
|
|
3376
|
+
"This string of length " +
|
|
3377
|
+
value.length +
|
|
3378
|
+
" has been omitted by React to avoid sending too much data from the server."
|
|
3379
|
+
);
|
|
3119
3380
|
if (1024 <= value.length) {
|
|
3120
3381
|
if (0 >= counter.objectLimit)
|
|
3121
3382
|
return serializeDeferredObject(request, value);
|
|
@@ -3125,7 +3386,7 @@
|
|
|
3125
3386
|
emitTextChunk(request, counter, value, !0);
|
|
3126
3387
|
return serializeByValueID(counter);
|
|
3127
3388
|
}
|
|
3128
|
-
return
|
|
3389
|
+
return escapeStringValue(value);
|
|
3129
3390
|
}
|
|
3130
3391
|
if ("boolean" === typeof value) return value;
|
|
3131
3392
|
if ("number" === typeof value) return serializeNumber(value);
|
|
@@ -3177,19 +3438,17 @@
|
|
|
3177
3438
|
}
|
|
3178
3439
|
return "bigint" === typeof value
|
|
3179
3440
|
? "$n" + value.toString(10)
|
|
3180
|
-
:
|
|
3181
|
-
? "$D" + value.toJSON()
|
|
3182
|
-
: "unknown type " + typeof value;
|
|
3441
|
+
: "unknown type " + typeof value;
|
|
3183
3442
|
}
|
|
3184
3443
|
function serializeDebugModel(request, objectLimit, model) {
|
|
3185
|
-
function replacer(parentPropertyName
|
|
3444
|
+
function replacer(parentPropertyName) {
|
|
3186
3445
|
try {
|
|
3187
3446
|
return renderDebugModel(
|
|
3188
3447
|
request,
|
|
3189
3448
|
counter,
|
|
3190
3449
|
this,
|
|
3191
3450
|
parentPropertyName,
|
|
3192
|
-
|
|
3451
|
+
this[parentPropertyName]
|
|
3193
3452
|
);
|
|
3194
3453
|
} catch (x) {
|
|
3195
3454
|
return (
|
|
@@ -3213,14 +3472,14 @@
|
|
|
3213
3472
|
}
|
|
3214
3473
|
}
|
|
3215
3474
|
function emitOutlinedDebugModelChunk(request, id, counter, model) {
|
|
3216
|
-
function replacer(parentPropertyName
|
|
3475
|
+
function replacer(parentPropertyName) {
|
|
3217
3476
|
try {
|
|
3218
3477
|
return renderDebugModel(
|
|
3219
3478
|
request,
|
|
3220
3479
|
counter,
|
|
3221
3480
|
this,
|
|
3222
3481
|
parentPropertyName,
|
|
3223
|
-
|
|
3482
|
+
this[parentPropertyName]
|
|
3224
3483
|
);
|
|
3225
3484
|
} catch (x) {
|
|
3226
3485
|
return (
|
|
@@ -3287,10 +3546,11 @@
|
|
|
3287
3546
|
parseStackTrace(ioInfo$jscomp$0.debugStack, 1)
|
|
3288
3547
|
)
|
|
3289
3548
|
: ioInfo$jscomp$0.stack;
|
|
3549
|
+
var env = ioInfo$jscomp$0.env;
|
|
3550
|
+
null == env && (env = (0, request.environmentName)());
|
|
3290
3551
|
var request$jscomp$0 = request,
|
|
3291
3552
|
id$jscomp$1 = id$jscomp$0,
|
|
3292
3553
|
value = ioInfo$jscomp$0.value,
|
|
3293
|
-
env = ioInfo$jscomp$0.env,
|
|
3294
3554
|
objectLimit = 10;
|
|
3295
3555
|
debugStack && (objectLimit += debugStack.length);
|
|
3296
3556
|
var debugIOInfo = {
|
|
@@ -3302,12 +3562,12 @@
|
|
|
3302
3562
|
null != debugStack && (debugIOInfo.stack = debugStack);
|
|
3303
3563
|
null != owner && (debugIOInfo.owner = owner);
|
|
3304
3564
|
void 0 !== value && (debugIOInfo.value = value);
|
|
3305
|
-
|
|
3565
|
+
env = serializeDebugModel(
|
|
3306
3566
|
request$jscomp$0,
|
|
3307
3567
|
objectLimit,
|
|
3308
3568
|
debugIOInfo
|
|
3309
3569
|
);
|
|
3310
|
-
id$jscomp$1 = id$jscomp$1.toString(16) + ":J" +
|
|
3570
|
+
id$jscomp$1 = id$jscomp$1.toString(16) + ":J" + env + "\n";
|
|
3311
3571
|
id$jscomp$1 = stringToChunk(id$jscomp$1);
|
|
3312
3572
|
request$jscomp$0.completedDebugChunks.push(id$jscomp$1);
|
|
3313
3573
|
request.writtenDebugObjects.set(
|
|
@@ -3325,7 +3585,10 @@
|
|
|
3325
3585
|
)
|
|
3326
3586
|
: info.stack;
|
|
3327
3587
|
ioInfo = { awaited: ioInfo };
|
|
3328
|
-
|
|
3588
|
+
ioInfo.env =
|
|
3589
|
+
null != info.env
|
|
3590
|
+
? info.env
|
|
3591
|
+
: (0, request$jscomp$1.environmentName)();
|
|
3329
3592
|
null != info.owner && (ioInfo.owner = info.owner);
|
|
3330
3593
|
null != request && (ioInfo.stack = request);
|
|
3331
3594
|
request$jscomp$1.pendingChunks++;
|
|
@@ -3413,21 +3676,28 @@
|
|
|
3413
3676
|
value,
|
|
3414
3677
|
!1
|
|
3415
3678
|
)
|
|
3416
|
-
: ((value =
|
|
3679
|
+
: ((value = resolveModel(
|
|
3680
|
+
request,
|
|
3681
|
+
task,
|
|
3682
|
+
{ "": value },
|
|
3683
|
+
"",
|
|
3684
|
+
value
|
|
3685
|
+
)),
|
|
3686
|
+
(value = stringify(value)),
|
|
3417
3687
|
emitModelChunk(request, task.id, value));
|
|
3418
3688
|
}
|
|
3419
3689
|
function erroredTask(request, task, error) {
|
|
3420
3690
|
task.timed && markOperationEndTime(request, task, performance.now());
|
|
3421
|
-
task.status =
|
|
3691
|
+
task.status = ERRORED$1;
|
|
3422
3692
|
var digest = logRecoverableError(request, error, task);
|
|
3423
3693
|
emitErrorChunk(request, task.id, digest, error, !1, task.debugOwner);
|
|
3424
3694
|
request.abortableTasks.delete(task);
|
|
3425
3695
|
callOnAllReadyIfReady(request);
|
|
3426
3696
|
}
|
|
3427
3697
|
function retryTask(request, task) {
|
|
3428
|
-
if (
|
|
3698
|
+
if (task.status === PENDING$1) {
|
|
3429
3699
|
var prevCanEmitDebugInfo = canEmitDebugInfo;
|
|
3430
|
-
task.status =
|
|
3700
|
+
task.status = RENDERING;
|
|
3431
3701
|
var parentSerializedSize = serializedSize;
|
|
3432
3702
|
try {
|
|
3433
3703
|
modelRoot = task.model;
|
|
@@ -3458,15 +3728,15 @@
|
|
|
3458
3728
|
var json = stringify(resolvedModel);
|
|
3459
3729
|
emitModelChunk(request, task.id, json);
|
|
3460
3730
|
}
|
|
3461
|
-
task.status =
|
|
3731
|
+
task.status = COMPLETED;
|
|
3462
3732
|
request.abortableTasks.delete(task);
|
|
3463
3733
|
callOnAllReadyIfReady(request);
|
|
3464
3734
|
} catch (thrownValue) {
|
|
3465
3735
|
if (request.status === ABORTING)
|
|
3466
3736
|
if (
|
|
3467
3737
|
(request.abortableTasks.delete(task),
|
|
3468
|
-
(task.status =
|
|
3469
|
-
|
|
3738
|
+
(task.status = PENDING$1),
|
|
3739
|
+
request.type === PRERENDER)
|
|
3470
3740
|
)
|
|
3471
3741
|
haltTask(task), finishHaltedTask(task, request);
|
|
3472
3742
|
else {
|
|
@@ -3484,7 +3754,7 @@
|
|
|
3484
3754
|
null !== x &&
|
|
3485
3755
|
"function" === typeof x.then
|
|
3486
3756
|
) {
|
|
3487
|
-
task.status =
|
|
3757
|
+
task.status = PENDING$1;
|
|
3488
3758
|
task.thenableState = getThenableStateAfterSuspending();
|
|
3489
3759
|
var ping = task.ping;
|
|
3490
3760
|
x.then(ping, ping);
|
|
@@ -3527,10 +3797,10 @@
|
|
|
3527
3797
|
}
|
|
3528
3798
|
}
|
|
3529
3799
|
function abortTask(task) {
|
|
3530
|
-
|
|
3800
|
+
task.status === PENDING$1 && (task.status = ABORTED);
|
|
3531
3801
|
}
|
|
3532
3802
|
function finishAbortedTask(task, request, errorId) {
|
|
3533
|
-
|
|
3803
|
+
task.status === ABORTED &&
|
|
3534
3804
|
(forwardDebugInfoFromAbortedTask(request, task),
|
|
3535
3805
|
task.timed && markOperationEndTime(request, task, request.abortTime),
|
|
3536
3806
|
(errorId = serializeByValueID(errorId)),
|
|
@@ -3538,10 +3808,10 @@
|
|
|
3538
3808
|
request.completedErrorChunks.push(task));
|
|
3539
3809
|
}
|
|
3540
3810
|
function haltTask(task) {
|
|
3541
|
-
|
|
3811
|
+
task.status === PENDING$1 && (task.status = ABORTED);
|
|
3542
3812
|
}
|
|
3543
3813
|
function finishHaltedTask(task, request) {
|
|
3544
|
-
|
|
3814
|
+
task.status === ABORTED &&
|
|
3545
3815
|
(forwardDebugInfoFromAbortedTask(request, task),
|
|
3546
3816
|
request.pendingChunks--);
|
|
3547
3817
|
}
|
|
@@ -3555,9 +3825,20 @@
|
|
|
3555
3825
|
var debugChunks = request.completedDebugChunks, i = 0;
|
|
3556
3826
|
i < debugChunks.length;
|
|
3557
3827
|
i++
|
|
3558
|
-
)
|
|
3559
|
-
|
|
3560
|
-
|
|
3828
|
+
) {
|
|
3829
|
+
var item = debugChunks[i];
|
|
3830
|
+
if (item === NEXT_TWO_CHUNKS_ARE_ATOMIC) {
|
|
3831
|
+
if (i + 2 >= debugChunks.length)
|
|
3832
|
+
throw Error(
|
|
3833
|
+
"A chunk pair is incomplete. This is a bug in React."
|
|
3834
|
+
);
|
|
3835
|
+
request.pendingDebugChunks -= 2;
|
|
3836
|
+
writeChunk(debugDestination, debugChunks[i + 1]);
|
|
3837
|
+
writeChunk(debugDestination, debugChunks[i + 2]);
|
|
3838
|
+
i += 2;
|
|
3839
|
+
} else
|
|
3840
|
+
request.pendingDebugChunks--, writeChunk(debugDestination, item);
|
|
3841
|
+
}
|
|
3561
3842
|
debugChunks.splice(0, i);
|
|
3562
3843
|
} finally {
|
|
3563
3844
|
completeWriting(debugDestination);
|
|
@@ -3602,18 +3883,33 @@
|
|
|
3602
3883
|
debugChunks = 0;
|
|
3603
3884
|
debugChunks < _debugChunks.length;
|
|
3604
3885
|
debugChunks++
|
|
3605
|
-
)
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3886
|
+
) {
|
|
3887
|
+
var _item = _debugChunks[debugChunks];
|
|
3888
|
+
importsChunks = void 0;
|
|
3889
|
+
if (_item === NEXT_TWO_CHUNKS_ARE_ATOMIC) {
|
|
3890
|
+
if (debugChunks + 2 >= _debugChunks.length)
|
|
3891
|
+
throw Error(
|
|
3892
|
+
"A chunk pair is incomplete. This is a bug in React."
|
|
3893
|
+
);
|
|
3894
|
+
request.pendingDebugChunks -= 2;
|
|
3895
|
+
writeChunk(debugDestination, _debugChunks[debugChunks + 1]);
|
|
3896
|
+
importsChunks = writeChunkAndReturn(
|
|
3609
3897
|
debugDestination,
|
|
3610
|
-
_debugChunks[debugChunks]
|
|
3611
|
-
)
|
|
3612
|
-
|
|
3898
|
+
_debugChunks[debugChunks + 2]
|
|
3899
|
+
);
|
|
3900
|
+
debugChunks += 2;
|
|
3901
|
+
} else
|
|
3902
|
+
request.pendingDebugChunks--,
|
|
3903
|
+
(importsChunks = writeChunkAndReturn(
|
|
3904
|
+
debugDestination,
|
|
3905
|
+
_item
|
|
3906
|
+
));
|
|
3907
|
+
if (!importsChunks) {
|
|
3613
3908
|
request.destination = null;
|
|
3614
3909
|
debugChunks++;
|
|
3615
3910
|
break;
|
|
3616
3911
|
}
|
|
3912
|
+
}
|
|
3617
3913
|
_debugChunks.splice(0, debugChunks);
|
|
3618
3914
|
}
|
|
3619
3915
|
var regularChunks = request.completedRegularChunks;
|
|
@@ -3621,18 +3917,30 @@
|
|
|
3621
3917
|
debugChunks = 0;
|
|
3622
3918
|
debugChunks < regularChunks.length;
|
|
3623
3919
|
debugChunks++
|
|
3624
|
-
)
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3920
|
+
) {
|
|
3921
|
+
var _item2 = regularChunks[debugChunks];
|
|
3922
|
+
_debugChunks = void 0;
|
|
3923
|
+
if (_item2 === NEXT_TWO_CHUNKS_ARE_ATOMIC) {
|
|
3924
|
+
if (debugChunks + 2 >= regularChunks.length)
|
|
3925
|
+
throw Error(
|
|
3926
|
+
"A chunk pair is incomplete. This is a bug in React."
|
|
3927
|
+
);
|
|
3928
|
+
request.pendingChunks -= 2;
|
|
3929
|
+
writeChunk(debugDestination, regularChunks[debugChunks + 1]);
|
|
3930
|
+
_debugChunks = writeChunkAndReturn(
|
|
3628
3931
|
debugDestination,
|
|
3629
|
-
regularChunks[debugChunks]
|
|
3630
|
-
)
|
|
3631
|
-
|
|
3932
|
+
regularChunks[debugChunks + 2]
|
|
3933
|
+
);
|
|
3934
|
+
debugChunks += 2;
|
|
3935
|
+
} else
|
|
3936
|
+
request.pendingChunks--,
|
|
3937
|
+
(_debugChunks = writeChunkAndReturn(debugDestination, _item2));
|
|
3938
|
+
if (!_debugChunks) {
|
|
3632
3939
|
request.destination = null;
|
|
3633
3940
|
debugChunks++;
|
|
3634
3941
|
break;
|
|
3635
3942
|
}
|
|
3943
|
+
}
|
|
3636
3944
|
regularChunks.splice(0, debugChunks);
|
|
3637
3945
|
var errorChunks = request.completedErrorChunks;
|
|
3638
3946
|
for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++)
|
|
@@ -3650,16 +3958,16 @@
|
|
|
3650
3958
|
}
|
|
3651
3959
|
}
|
|
3652
3960
|
0 === request.pendingChunks &&
|
|
3653
|
-
(
|
|
3961
|
+
(request.status < ABORTING &&
|
|
3962
|
+
request.cacheController.abort(
|
|
3963
|
+
Error(
|
|
3964
|
+
"This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources."
|
|
3965
|
+
)
|
|
3966
|
+
),
|
|
3967
|
+
(regularChunks = request.debugDestination),
|
|
3654
3968
|
0 === request.pendingDebugChunks
|
|
3655
|
-
? (null !==
|
|
3656
|
-
(
|
|
3657
|
-
request.status < ABORTING &&
|
|
3658
|
-
request.cacheController.abort(
|
|
3659
|
-
Error(
|
|
3660
|
-
"This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources."
|
|
3661
|
-
)
|
|
3662
|
-
),
|
|
3969
|
+
? (null !== regularChunks &&
|
|
3970
|
+
(regularChunks.close(), (request.debugDestination = null)),
|
|
3663
3971
|
null !== request.destination &&
|
|
3664
3972
|
((request.status = CLOSED),
|
|
3665
3973
|
request.destination.close(),
|
|
@@ -3667,7 +3975,7 @@
|
|
|
3667
3975
|
null !== request.debugDestination &&
|
|
3668
3976
|
(request.debugDestination.close(),
|
|
3669
3977
|
(request.debugDestination = null)))
|
|
3670
|
-
: null !==
|
|
3978
|
+
: null !== regularChunks &&
|
|
3671
3979
|
null !== request.destination &&
|
|
3672
3980
|
((request.status = CLOSED),
|
|
3673
3981
|
request.destination.close(),
|
|
@@ -3679,7 +3987,7 @@
|
|
|
3679
3987
|
return performWork(request);
|
|
3680
3988
|
});
|
|
3681
3989
|
scheduleWork(function () {
|
|
3682
|
-
|
|
3990
|
+
request.status === OPENING && (request.status = 11);
|
|
3683
3991
|
});
|
|
3684
3992
|
}
|
|
3685
3993
|
function enqueueFlush(request) {
|
|
@@ -3697,7 +4005,7 @@
|
|
|
3697
4005
|
((request = request.onAllReady), request());
|
|
3698
4006
|
}
|
|
3699
4007
|
function startFlowing(request, destination) {
|
|
3700
|
-
if (
|
|
4008
|
+
if (request.status === CLOSING)
|
|
3701
4009
|
(request.status = CLOSED),
|
|
3702
4010
|
closeWithError(destination, request.fatalError);
|
|
3703
4011
|
else if (request.status !== CLOSED && null === request.destination) {
|
|
@@ -3733,6 +4041,17 @@
|
|
|
3733
4041
|
logRecoverableError(request, error, null), fatalError(request, error);
|
|
3734
4042
|
}
|
|
3735
4043
|
}
|
|
4044
|
+
function attachAbortSignal(request, signal) {
|
|
4045
|
+
signal.aborted
|
|
4046
|
+
? abort(request, signal.reason)
|
|
4047
|
+
: signal.addEventListener(
|
|
4048
|
+
"abort",
|
|
4049
|
+
function () {
|
|
4050
|
+
abort(request, signal.reason);
|
|
4051
|
+
},
|
|
4052
|
+
{ signal: request.cacheController.signal }
|
|
4053
|
+
);
|
|
4054
|
+
}
|
|
3736
4055
|
function abort(request, reason) {
|
|
3737
4056
|
if (!(11 < request.status))
|
|
3738
4057
|
try {
|
|
@@ -3741,7 +4060,7 @@
|
|
|
3741
4060
|
request.cacheController.abort(reason);
|
|
3742
4061
|
var abortableTasks = request.abortableTasks;
|
|
3743
4062
|
if (0 < abortableTasks.size)
|
|
3744
|
-
if (
|
|
4063
|
+
if (request.type === PRERENDER)
|
|
3745
4064
|
abortableTasks.forEach(function (task) {
|
|
3746
4065
|
return haltTask(task, request);
|
|
3747
4066
|
}),
|
|
@@ -3762,15 +4081,15 @@
|
|
|
3762
4081
|
)
|
|
3763
4082
|
: reason,
|
|
3764
4083
|
digest = logRecoverableError(request, error, null),
|
|
3765
|
-
|
|
3766
|
-
request.fatalError =
|
|
4084
|
+
errorId = request.nextChunkId++;
|
|
4085
|
+
request.fatalError = errorId;
|
|
3767
4086
|
request.pendingChunks++;
|
|
3768
|
-
emitErrorChunk(request,
|
|
4087
|
+
emitErrorChunk(request, errorId, digest, error, !1, null);
|
|
3769
4088
|
abortableTasks.forEach(function (task) {
|
|
3770
|
-
return abortTask(task, request,
|
|
4089
|
+
return abortTask(task, request, errorId);
|
|
3771
4090
|
});
|
|
3772
4091
|
scheduleWork(function () {
|
|
3773
|
-
return finishAbort(request, abortableTasks,
|
|
4092
|
+
return finishAbort(request, abortableTasks, errorId);
|
|
3774
4093
|
});
|
|
3775
4094
|
}
|
|
3776
4095
|
else {
|
|
@@ -3778,9 +4097,9 @@
|
|
|
3778
4097
|
onAllReady();
|
|
3779
4098
|
flushCompletedChunks(request);
|
|
3780
4099
|
}
|
|
3781
|
-
} catch (error$
|
|
3782
|
-
logRecoverableError(request, error$
|
|
3783
|
-
fatalError(request, error$
|
|
4100
|
+
} catch (error$8) {
|
|
4101
|
+
logRecoverableError(request, error$8, null),
|
|
4102
|
+
fatalError(request, error$8);
|
|
3784
4103
|
}
|
|
3785
4104
|
}
|
|
3786
4105
|
function fromHex(str) {
|
|
@@ -3910,6 +4229,16 @@
|
|
|
3910
4229
|
null !== listeners && rejectChunk(response, listeners, error);
|
|
3911
4230
|
}
|
|
3912
4231
|
}
|
|
4232
|
+
function createResolvedModelChunk(response, value, id) {
|
|
4233
|
+
var $jscomp$compprop2 = {};
|
|
4234
|
+
return new ReactPromise(
|
|
4235
|
+
"resolved_model",
|
|
4236
|
+
value,
|
|
4237
|
+
(($jscomp$compprop2.id = id),
|
|
4238
|
+
($jscomp$compprop2[RESPONSE_SYMBOL] = response),
|
|
4239
|
+
$jscomp$compprop2)
|
|
4240
|
+
);
|
|
4241
|
+
}
|
|
3913
4242
|
function resolveModelChunk(response, chunk, value, id) {
|
|
3914
4243
|
if ("pending" !== chunk.status)
|
|
3915
4244
|
(chunk = chunk.reason),
|
|
@@ -3921,7 +4250,9 @@
|
|
|
3921
4250
|
rejectListeners = chunk.reason;
|
|
3922
4251
|
chunk.status = "resolved_model";
|
|
3923
4252
|
chunk.value = value;
|
|
3924
|
-
|
|
4253
|
+
value = {};
|
|
4254
|
+
chunk.reason =
|
|
4255
|
+
((value.id = id), (value[RESPONSE_SYMBOL] = response), value);
|
|
3925
4256
|
if (null !== resolveListeners)
|
|
3926
4257
|
switch ((initializeModelChunk(chunk), chunk.status)) {
|
|
3927
4258
|
case "fulfilled":
|
|
@@ -3930,13 +4261,21 @@
|
|
|
3930
4261
|
case "blocked":
|
|
3931
4262
|
case "pending":
|
|
3932
4263
|
if (chunk.value)
|
|
3933
|
-
for (
|
|
3934
|
-
|
|
4264
|
+
for (
|
|
4265
|
+
response = 0;
|
|
4266
|
+
response < resolveListeners.length;
|
|
4267
|
+
response++
|
|
4268
|
+
)
|
|
4269
|
+
chunk.value.push(resolveListeners[response]);
|
|
3935
4270
|
else chunk.value = resolveListeners;
|
|
3936
4271
|
if (chunk.reason) {
|
|
3937
4272
|
if (rejectListeners)
|
|
3938
|
-
for (
|
|
3939
|
-
|
|
4273
|
+
for (
|
|
4274
|
+
resolveListeners = 0;
|
|
4275
|
+
resolveListeners < rejectListeners.length;
|
|
4276
|
+
resolveListeners++
|
|
4277
|
+
)
|
|
4278
|
+
chunk.reason.push(rejectListeners[resolveListeners]);
|
|
3940
4279
|
} else chunk.reason = rejectListeners;
|
|
3941
4280
|
break;
|
|
3942
4281
|
case "rejected":
|
|
@@ -3946,12 +4285,15 @@
|
|
|
3946
4285
|
}
|
|
3947
4286
|
}
|
|
3948
4287
|
function createResolvedIteratorResultChunk(response, value, done) {
|
|
4288
|
+
var $jscomp$compprop4 = {};
|
|
3949
4289
|
return new ReactPromise(
|
|
3950
4290
|
"resolved_model",
|
|
3951
4291
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
|
3952
4292
|
value +
|
|
3953
4293
|
"}",
|
|
3954
|
-
|
|
4294
|
+
(($jscomp$compprop4.id = -1),
|
|
4295
|
+
($jscomp$compprop4[RESPONSE_SYMBOL] = response),
|
|
4296
|
+
$jscomp$compprop4)
|
|
3955
4297
|
);
|
|
3956
4298
|
}
|
|
3957
4299
|
function resolveIteratorResultChunk(response, chunk, value, done) {
|
|
@@ -4008,7 +4350,9 @@
|
|
|
4008
4350
|
(cachedPromise = requireModule(serverReference)),
|
|
4009
4351
|
(id = blockedPromise),
|
|
4010
4352
|
(id.status = "fulfilled"),
|
|
4011
|
-
(id.value = cachedPromise)
|
|
4353
|
+
(id.value = cachedPromise),
|
|
4354
|
+
(id.reason = null),
|
|
4355
|
+
cachedPromise
|
|
4012
4356
|
);
|
|
4013
4357
|
if (initializingHandler) {
|
|
4014
4358
|
var handler = initializingHandler;
|
|
@@ -4194,11 +4538,7 @@
|
|
|
4194
4538
|
((chunk = response._formData.data.get(response._prefix + id)),
|
|
4195
4539
|
(chunk =
|
|
4196
4540
|
"string" === typeof chunk
|
|
4197
|
-
?
|
|
4198
|
-
"resolved_model",
|
|
4199
|
-
chunk,
|
|
4200
|
-
_defineProperty({ id: id }, RESPONSE_SYMBOL, response)
|
|
4201
|
-
)
|
|
4541
|
+
? createResolvedModelChunk(response, chunk, id)
|
|
4202
4542
|
: response._closed
|
|
4203
4543
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
4204
4544
|
: new ReactPromise("pending", null, null)),
|
|
@@ -4524,11 +4864,7 @@
|
|
|
4524
4864
|
flightController = {
|
|
4525
4865
|
enqueueModel: function (json) {
|
|
4526
4866
|
if (null === previousBlockedChunk) {
|
|
4527
|
-
var chunk =
|
|
4528
|
-
"resolved_model",
|
|
4529
|
-
json,
|
|
4530
|
-
_defineProperty({ id: -1 }, RESPONSE_SYMBOL, response)
|
|
4531
|
-
);
|
|
4867
|
+
var chunk = createResolvedModelChunk(response, json, -1);
|
|
4532
4868
|
initializeModelChunk(chunk);
|
|
4533
4869
|
"fulfilled" === chunk.status
|
|
4534
4870
|
? enqueue(chunk.value)
|
|
@@ -4584,7 +4920,9 @@
|
|
|
4584
4920
|
var buffer = [],
|
|
4585
4921
|
closed = !1,
|
|
4586
4922
|
nextWriteIndex = 0,
|
|
4587
|
-
|
|
4923
|
+
$jscomp$compprop5 = {};
|
|
4924
|
+
$jscomp$compprop5 =
|
|
4925
|
+
(($jscomp$compprop5[ASYNC_ITERATOR] = function () {
|
|
4588
4926
|
var nextReadIndex = 0;
|
|
4589
4927
|
return new FlightIterator(function (arg) {
|
|
4590
4928
|
if (void 0 !== arg)
|
|
@@ -4602,8 +4940,11 @@
|
|
|
4602
4940
|
}
|
|
4603
4941
|
return buffer[nextReadIndex++];
|
|
4604
4942
|
});
|
|
4605
|
-
})
|
|
4606
|
-
|
|
4943
|
+
}),
|
|
4944
|
+
$jscomp$compprop5);
|
|
4945
|
+
iterator = iterator
|
|
4946
|
+
? $jscomp$compprop5[ASYNC_ITERATOR]()
|
|
4947
|
+
: $jscomp$compprop5;
|
|
4607
4948
|
resolveStream(response, reference, iterator, {
|
|
4608
4949
|
enqueueModel: function (value) {
|
|
4609
4950
|
nextWriteIndex === buffer.length
|
|
@@ -4906,10 +5247,11 @@
|
|
|
4906
5247
|
arrayRoot
|
|
4907
5248
|
);
|
|
4908
5249
|
case "B":
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
5250
|
+
obj = parseInt(value.slice(2), 16);
|
|
5251
|
+
response = response._formData.data.get(response._prefix + obj);
|
|
5252
|
+
if (!(response instanceof Blob))
|
|
5253
|
+
throw Error("Referenced Blob is not a Blob.");
|
|
5254
|
+
return response;
|
|
4913
5255
|
case "R":
|
|
4914
5256
|
return parseReadableStream(response, value, void 0);
|
|
4915
5257
|
case "r":
|
|
@@ -5125,7 +5467,7 @@
|
|
|
5125
5467
|
},
|
|
5126
5468
|
PROMISE_PROTOTYPE = Promise.prototype,
|
|
5127
5469
|
deepProxyHandlers = {
|
|
5128
|
-
get: function (target, name) {
|
|
5470
|
+
get: function (target, name, receiver) {
|
|
5129
5471
|
switch (name) {
|
|
5130
5472
|
case "$$typeof":
|
|
5131
5473
|
return target.$$typeof;
|
|
@@ -5148,9 +5490,7 @@
|
|
|
5148
5490
|
case Symbol.toStringTag:
|
|
5149
5491
|
return Object.prototype[Symbol.toStringTag];
|
|
5150
5492
|
case "Provider":
|
|
5151
|
-
|
|
5152
|
-
"Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider."
|
|
5153
|
-
);
|
|
5493
|
+
return receiver;
|
|
5154
5494
|
case "then":
|
|
5155
5495
|
throw Error(
|
|
5156
5496
|
"Cannot await or return from a thenable. You cannot await a client module from a server component."
|
|
@@ -5285,7 +5625,7 @@
|
|
|
5285
5625
|
stackTraceCache = new WeakMap(),
|
|
5286
5626
|
TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"),
|
|
5287
5627
|
proxyHandlers = {
|
|
5288
|
-
get: function (target, name) {
|
|
5628
|
+
get: function (target, name, receiver) {
|
|
5289
5629
|
switch (name) {
|
|
5290
5630
|
case "$$typeof":
|
|
5291
5631
|
return target.$$typeof;
|
|
@@ -5304,9 +5644,7 @@
|
|
|
5304
5644
|
case Symbol.toStringTag:
|
|
5305
5645
|
return Object.prototype[Symbol.toStringTag];
|
|
5306
5646
|
case "Provider":
|
|
5307
|
-
|
|
5308
|
-
"Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider."
|
|
5309
|
-
);
|
|
5647
|
+
return receiver;
|
|
5310
5648
|
case "then":
|
|
5311
5649
|
return;
|
|
5312
5650
|
}
|
|
@@ -5331,10 +5669,11 @@
|
|
|
5331
5669
|
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
5332
5670
|
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
5333
5671
|
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
5334
|
-
REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel")
|
|
5335
|
-
|
|
5336
|
-
|
|
5672
|
+
REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
|
|
5673
|
+
REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
|
|
5674
|
+
MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
5337
5675
|
ASYNC_ITERATOR = Symbol.asyncIterator,
|
|
5676
|
+
REACT_OPTIMISTIC_KEY = Symbol.for("react.optimistic_key"),
|
|
5338
5677
|
SuspenseException = Error(
|
|
5339
5678
|
"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
|
|
5340
5679
|
),
|
|
@@ -5413,10 +5752,10 @@
|
|
|
5413
5752
|
},
|
|
5414
5753
|
useCacheRefresh: function () {
|
|
5415
5754
|
return unsupportedRefresh;
|
|
5416
|
-
}
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5755
|
+
},
|
|
5756
|
+
useEffectEvent: unsupportedHook
|
|
5757
|
+
},
|
|
5758
|
+
currentOwner = null,
|
|
5420
5759
|
DefaultAsyncDispatcher = {
|
|
5421
5760
|
getCacheForType: function (resourceType) {
|
|
5422
5761
|
var cache = (cache = resolveRequest()) ? cache.cache : new Map();
|
|
@@ -5509,14 +5848,28 @@
|
|
|
5509
5848
|
patchConsole(console, "warn"));
|
|
5510
5849
|
var ObjectPrototype$1 = Object.prototype,
|
|
5511
5850
|
stringify = JSON.stringify,
|
|
5851
|
+
PENDING$1 = 0,
|
|
5852
|
+
COMPLETED = 1,
|
|
5853
|
+
ABORTED = 3,
|
|
5854
|
+
ERRORED$1 = 4,
|
|
5855
|
+
RENDERING = 5,
|
|
5856
|
+
__PROTO__$1 = "__proto__",
|
|
5857
|
+
OPENING = 10,
|
|
5512
5858
|
ABORTING = 12,
|
|
5859
|
+
CLOSING = 13,
|
|
5513
5860
|
CLOSED = 14,
|
|
5514
|
-
|
|
5861
|
+
PRERENDER = 21,
|
|
5862
|
+
NEXT_TWO_CHUNKS_ARE_ATOMIC = Symbol(),
|
|
5515
5863
|
currentRequest = null,
|
|
5516
5864
|
canEmitDebugInfo = !1,
|
|
5517
5865
|
serializedSize = 0,
|
|
5518
5866
|
MAX_ROW_SIZE = 3200,
|
|
5867
|
+
MIN_DEDUPLICATED_IMPORT_STRING_LENGTH = 16,
|
|
5868
|
+
MAX_DEDUPLICATED_IMPORT_STRINGS_SIZE = 32768,
|
|
5519
5869
|
modelRoot = !1,
|
|
5870
|
+
importStringRequest = null,
|
|
5871
|
+
MAX_IMPORT_METADATA_DEPTH = 16,
|
|
5872
|
+
NOT_PLAIN_IMPORT_METADATA = {},
|
|
5520
5873
|
CONSTRUCTOR_MARKER = Symbol(),
|
|
5521
5874
|
debugModelRoot = null,
|
|
5522
5875
|
debugNoOutline = null,
|
|
@@ -5533,52 +5886,57 @@
|
|
|
5533
5886
|
};
|
|
5534
5887
|
var RESPONSE_SYMBOL = Symbol();
|
|
5535
5888
|
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
5536
|
-
ReactPromise.prototype
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5889
|
+
Object.defineProperty(ReactPromise.prototype, "then", {
|
|
5890
|
+
writable: !0,
|
|
5891
|
+
enumerable: !0,
|
|
5892
|
+
configurable: !0,
|
|
5893
|
+
value: function (resolve, reject) {
|
|
5894
|
+
switch (this.status) {
|
|
5895
|
+
case "resolved_model":
|
|
5896
|
+
initializeModelChunk(this);
|
|
5897
|
+
}
|
|
5898
|
+
switch (this.status) {
|
|
5899
|
+
case "fulfilled":
|
|
5900
|
+
if ("function" === typeof resolve) {
|
|
5901
|
+
for (
|
|
5902
|
+
var inspectedValue = this.value,
|
|
5903
|
+
cycleProtection = 0,
|
|
5904
|
+
visited = new Set();
|
|
5905
|
+
inspectedValue instanceof ReactPromise;
|
|
5549
5906
|
|
|
5550
|
-
) {
|
|
5551
|
-
cycleProtection++;
|
|
5552
|
-
if (
|
|
5553
|
-
inspectedValue === this ||
|
|
5554
|
-
visited.has(inspectedValue) ||
|
|
5555
|
-
1e3 < cycleProtection
|
|
5556
5907
|
) {
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5908
|
+
cycleProtection++;
|
|
5909
|
+
if (
|
|
5910
|
+
inspectedValue === this ||
|
|
5911
|
+
visited.has(inspectedValue) ||
|
|
5912
|
+
1e3 < cycleProtection
|
|
5913
|
+
) {
|
|
5914
|
+
"function" === typeof reject &&
|
|
5915
|
+
reject(Error("Cannot have cyclic thenables."));
|
|
5916
|
+
return;
|
|
5917
|
+
}
|
|
5918
|
+
visited.add(inspectedValue);
|
|
5919
|
+
if ("fulfilled" === inspectedValue.status)
|
|
5920
|
+
inspectedValue = inspectedValue.value;
|
|
5921
|
+
else break;
|
|
5560
5922
|
}
|
|
5561
|
-
|
|
5562
|
-
if ("fulfilled" === inspectedValue.status)
|
|
5563
|
-
inspectedValue = inspectedValue.value;
|
|
5564
|
-
else break;
|
|
5923
|
+
resolve(this.value);
|
|
5565
5924
|
}
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
"function" === typeof reject && reject(this.reason);
|
|
5925
|
+
break;
|
|
5926
|
+
case "pending":
|
|
5927
|
+
case "blocked":
|
|
5928
|
+
"function" === typeof resolve &&
|
|
5929
|
+
(null === this.value && (this.value = []),
|
|
5930
|
+
this.value.push(resolve));
|
|
5931
|
+
"function" === typeof reject &&
|
|
5932
|
+
(null === this.reason && (this.reason = []),
|
|
5933
|
+
this.reason.push(reject));
|
|
5934
|
+
break;
|
|
5935
|
+
default:
|
|
5936
|
+
"function" === typeof reject && reject(this.reason);
|
|
5937
|
+
}
|
|
5580
5938
|
}
|
|
5581
|
-
};
|
|
5939
|
+
});
|
|
5582
5940
|
var ObjectPrototype = Object.prototype,
|
|
5583
5941
|
ArrayPrototype = Array.prototype,
|
|
5584
5942
|
initializingHandler = null;
|
|
@@ -5681,23 +6039,13 @@
|
|
|
5681
6039
|
reject,
|
|
5682
6040
|
options ? options.onError : void 0,
|
|
5683
6041
|
options ? options.identifierPrefix : void 0,
|
|
5684
|
-
options ? options.onPostpone : void 0,
|
|
5685
6042
|
options ? options.temporaryReferences : void 0,
|
|
6043
|
+
options ? options.startTime : void 0,
|
|
5686
6044
|
options ? options.environmentName : void 0,
|
|
5687
6045
|
options ? options.filterStackFrame : void 0,
|
|
5688
6046
|
!1
|
|
5689
6047
|
);
|
|
5690
|
-
|
|
5691
|
-
var signal = options.signal;
|
|
5692
|
-
if (signal.aborted) abort(request, signal.reason);
|
|
5693
|
-
else {
|
|
5694
|
-
var listener = function () {
|
|
5695
|
-
abort(request, signal.reason);
|
|
5696
|
-
signal.removeEventListener("abort", listener);
|
|
5697
|
-
};
|
|
5698
|
-
signal.addEventListener("abort", listener);
|
|
5699
|
-
}
|
|
5700
|
-
}
|
|
6048
|
+
options && options.signal && attachAbortSignal(request, options.signal);
|
|
5701
6049
|
startWork(request);
|
|
5702
6050
|
});
|
|
5703
6051
|
};
|
|
@@ -5739,29 +6087,19 @@
|
|
|
5739
6087
|
webpackMap,
|
|
5740
6088
|
options ? options.onError : void 0,
|
|
5741
6089
|
options ? options.identifierPrefix : void 0,
|
|
5742
|
-
options ? options.onPostpone : void 0,
|
|
5743
6090
|
options ? options.temporaryReferences : void 0,
|
|
6091
|
+
options ? options.startTime : void 0,
|
|
5744
6092
|
options ? options.environmentName : void 0,
|
|
5745
6093
|
options ? options.filterStackFrame : void 0,
|
|
5746
6094
|
void 0 !== debugChannelReadable
|
|
5747
6095
|
);
|
|
5748
|
-
|
|
5749
|
-
var signal = options.signal;
|
|
5750
|
-
if (signal.aborted) abort(request, signal.reason);
|
|
5751
|
-
else {
|
|
5752
|
-
var listener = function () {
|
|
5753
|
-
abort(request, signal.reason);
|
|
5754
|
-
signal.removeEventListener("abort", listener);
|
|
5755
|
-
};
|
|
5756
|
-
signal.addEventListener("abort", listener);
|
|
5757
|
-
}
|
|
5758
|
-
}
|
|
6096
|
+
options && options.signal && attachAbortSignal(request, options.signal);
|
|
5759
6097
|
void 0 !== debugChannelWritable &&
|
|
5760
6098
|
new ReadableStream(
|
|
5761
6099
|
{
|
|
5762
6100
|
type: "bytes",
|
|
5763
6101
|
pull: function (controller) {
|
|
5764
|
-
if (
|
|
6102
|
+
if (request.status === CLOSING)
|
|
5765
6103
|
(request.status = CLOSED),
|
|
5766
6104
|
closeWithError(controller, request.fatalError);
|
|
5767
6105
|
else if (
|