react-server-dom-turbopack 19.2.7 → 19.2.9
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/cjs/react-server-dom-turbopack-client.browser.development.js +77 -46
- package/cjs/react-server-dom-turbopack-client.browser.production.js +81 -66
- package/cjs/react-server-dom-turbopack-client.edge.development.js +78 -43
- package/cjs/react-server-dom-turbopack-client.edge.production.js +84 -69
- package/cjs/react-server-dom-turbopack-client.node.development.js +78 -43
- package/cjs/react-server-dom-turbopack-client.node.production.js +84 -69
- package/cjs/react-server-dom-turbopack-server.browser.development.js +214 -123
- package/cjs/react-server-dom-turbopack-server.browser.production.js +208 -117
- package/cjs/react-server-dom-turbopack-server.edge.development.js +247 -144
- package/cjs/react-server-dom-turbopack-server.edge.production.js +239 -141
- package/cjs/react-server-dom-turbopack-server.node.development.js +268 -162
- package/cjs/react-server-dom-turbopack-server.node.production.js +258 -156
- package/package.json +5 -5
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
14
|
function voidHandler() {}
|
|
15
|
+
function noop() {}
|
|
15
16
|
function getIteratorFn(maybeIterable) {
|
|
16
17
|
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
17
18
|
return null;
|
|
@@ -81,33 +82,44 @@
|
|
|
81
82
|
(currentView = new Uint8Array(2048)),
|
|
82
83
|
(writtenBytes = 0));
|
|
83
84
|
}
|
|
84
|
-
} else
|
|
85
|
-
|
|
86
|
-
(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
(currentView
|
|
110
|
-
(
|
|
85
|
+
} else if (0 === chunk.byteLength)
|
|
86
|
+
if (supportsArrayBufferDetached) {
|
|
87
|
+
if (chunk.buffer.detached)
|
|
88
|
+
throw Error(
|
|
89
|
+
"Cannot transport a detached buffer. This usually happens when trying to transport multiple buffer-spanning views on the same underyling buffer. Either reuse the exact same view by identity or copy the underlying buffer manually via `view.slice()`."
|
|
90
|
+
);
|
|
91
|
+
} else
|
|
92
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
93
|
+
(console.error(
|
|
94
|
+
"React encountered an empty buffer when writing in an environment that does not support ArrayBuffer.prototype.detached. This could be a security issue if the buffer was not actually empty. Please upgrade to a Node.js version that supports ArrayBuffer.prototype.detached."
|
|
95
|
+
),
|
|
96
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
97
|
+
else
|
|
98
|
+
2048 < chunk.byteLength
|
|
99
|
+
? (0 < writtenBytes &&
|
|
100
|
+
(writeToDestination(
|
|
101
|
+
destination,
|
|
102
|
+
currentView.subarray(0, writtenBytes)
|
|
103
|
+
),
|
|
104
|
+
(currentView = new Uint8Array(2048)),
|
|
105
|
+
(writtenBytes = 0)),
|
|
106
|
+
writeToDestination(destination, chunk))
|
|
107
|
+
: ((target = currentView.length - writtenBytes),
|
|
108
|
+
target < chunk.byteLength &&
|
|
109
|
+
(0 === target
|
|
110
|
+
? writeToDestination(destination, currentView)
|
|
111
|
+
: (currentView.set(chunk.subarray(0, target), writtenBytes),
|
|
112
|
+
(writtenBytes += target),
|
|
113
|
+
writeToDestination(destination, currentView),
|
|
114
|
+
(chunk = chunk.subarray(target))),
|
|
115
|
+
(currentView = new Uint8Array(2048)),
|
|
116
|
+
(writtenBytes = 0)),
|
|
117
|
+
currentView.set(chunk, writtenBytes),
|
|
118
|
+
(writtenBytes += chunk.byteLength),
|
|
119
|
+
2048 === writtenBytes &&
|
|
120
|
+
(writeToDestination(destination, currentView),
|
|
121
|
+
(currentView = new Uint8Array(2048)),
|
|
122
|
+
(writtenBytes = 0)));
|
|
111
123
|
return destinationHasCapacity;
|
|
112
124
|
}
|
|
113
125
|
function completeWriting(destination) {
|
|
@@ -573,7 +585,6 @@
|
|
|
573
585
|
temporaryReferences.set(reference, id);
|
|
574
586
|
return reference;
|
|
575
587
|
}
|
|
576
|
-
function noop() {}
|
|
577
588
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
578
589
|
index = thenableState[index];
|
|
579
590
|
void 0 === index
|
|
@@ -1501,7 +1512,7 @@
|
|
|
1501
1512
|
erroredTask(request, streamTask, reason),
|
|
1502
1513
|
enqueueFlush(request),
|
|
1503
1514
|
"function" === typeof iterator.throw &&
|
|
1504
|
-
iterator.throw(reason).then(
|
|
1515
|
+
iterator.throw(reason).then(noop, noop));
|
|
1505
1516
|
}
|
|
1506
1517
|
function abortIterable() {
|
|
1507
1518
|
if (0 === streamTask.status) {
|
|
@@ -1515,7 +1526,7 @@
|
|
|
1515
1526
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1516
1527
|
enqueueFlush(request));
|
|
1517
1528
|
"function" === typeof iterator.throw &&
|
|
1518
|
-
iterator.throw(reason).then(
|
|
1529
|
+
iterator.throw(reason).then(noop, noop);
|
|
1519
1530
|
}
|
|
1520
1531
|
}
|
|
1521
1532
|
var isIterator = iterable === iterator,
|
|
@@ -3174,13 +3185,35 @@
|
|
|
3174
3185
|
}
|
|
3175
3186
|
function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
|
|
3176
3187
|
debug ? request.pendingDebugChunks++ : request.pendingChunks++;
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3188
|
+
a: {
|
|
3189
|
+
var view = new Uint8Array(
|
|
3190
|
+
typedArray.buffer,
|
|
3191
|
+
typedArray.byteOffset,
|
|
3192
|
+
typedArray.byteLength
|
|
3193
|
+
);
|
|
3194
|
+
if (2048 < typedArray.byteLength) {
|
|
3195
|
+
if (
|
|
3196
|
+
0 !== typedArray.byteOffset ||
|
|
3197
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
3198
|
+
typedArray.buffer.resizable
|
|
3199
|
+
) {
|
|
3200
|
+
typedArray = view.slice();
|
|
3201
|
+
break a;
|
|
3202
|
+
}
|
|
3203
|
+
if (!supportsArrayBufferDetached) {
|
|
3204
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
3205
|
+
(console.error(
|
|
3206
|
+
"React copied a partial view into a fresh buffer as a safety precaution because the environment does not implement ArrayBuffer.prototype.detached. This negatively impacts performance. Please upgrade to a modern Node.js version."
|
|
3207
|
+
),
|
|
3208
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
3209
|
+
typedArray = view.slice();
|
|
3210
|
+
break a;
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
typedArray = view;
|
|
3214
|
+
}
|
|
3215
|
+
view = typedArray.byteLength;
|
|
3216
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
3184
3217
|
debug
|
|
3185
3218
|
? request.completedDebugChunks.push(id, typedArray)
|
|
3186
3219
|
: request.completedRegularChunks.push(id, typedArray);
|
|
@@ -4350,13 +4383,38 @@
|
|
|
4350
4383
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
4351
4384
|
return moduleExports[metadata[2]];
|
|
4352
4385
|
}
|
|
4353
|
-
function appendBackingEntry(backingStore,
|
|
4354
|
-
backingStore.
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4386
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
4387
|
+
var prefix = backingStore.prefix;
|
|
4388
|
+
if (key.startsWith(prefix)) {
|
|
4389
|
+
switch (key[prefix.length]) {
|
|
4390
|
+
case "_":
|
|
4391
|
+
prefix = backingStore.referencedEntries;
|
|
4392
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
4393
|
+
prefix.push([key, value]);
|
|
4394
|
+
return;
|
|
4395
|
+
case "S":
|
|
4396
|
+
"string" === typeof value &&
|
|
4397
|
+
((prefix = backingStore.streamChunks),
|
|
4398
|
+
null === prefix &&
|
|
4399
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
4400
|
+
(backingStore = prefix.get(key)),
|
|
4401
|
+
void 0 === backingStore
|
|
4402
|
+
? prefix.set(key, [value])
|
|
4403
|
+
: backingStore.push(value));
|
|
4404
|
+
return;
|
|
4405
|
+
}
|
|
4406
|
+
"string" === typeof value
|
|
4407
|
+
? ((prefix = backingStore.stringChunks),
|
|
4408
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
4409
|
+
prefix.set(key, value))
|
|
4410
|
+
: ((prefix = backingStore.blobs),
|
|
4411
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
4412
|
+
prefix.set(key, value));
|
|
4413
|
+
}
|
|
4414
|
+
}
|
|
4415
|
+
function getBackingBlob(backingStore, key) {
|
|
4416
|
+
backingStore = backingStore.blobs;
|
|
4417
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
4360
4418
|
}
|
|
4361
4419
|
function ReactPromise(status, value, reason) {
|
|
4362
4420
|
this.status = status;
|
|
@@ -4669,9 +4727,11 @@
|
|
|
4669
4727
|
function getChunk(response, id) {
|
|
4670
4728
|
var chunks = response._chunks,
|
|
4671
4729
|
chunk = chunks.get(id);
|
|
4672
|
-
chunk
|
|
4673
|
-
|
|
4674
|
-
|
|
4730
|
+
if (!chunk) {
|
|
4731
|
+
chunk = response._prefix;
|
|
4732
|
+
var stringChunks = response._formData.stringChunks;
|
|
4733
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
4734
|
+
chunk =
|
|
4675
4735
|
"string" === typeof chunk
|
|
4676
4736
|
? new ReactPromise(
|
|
4677
4737
|
"resolved_model",
|
|
@@ -4680,8 +4740,9 @@
|
|
|
4680
4740
|
)
|
|
4681
4741
|
: response._closed
|
|
4682
4742
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
4683
|
-
: new ReactPromise("pending", null, null)
|
|
4684
|
-
chunks.set(id, chunk)
|
|
4743
|
+
: new ReactPromise("pending", null, null);
|
|
4744
|
+
chunks.set(id, chunk);
|
|
4745
|
+
}
|
|
4685
4746
|
return chunk;
|
|
4686
4747
|
}
|
|
4687
4748
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -4928,7 +4989,7 @@
|
|
|
4928
4989
|
Error("Already initialized typed array.")
|
|
4929
4990
|
)
|
|
4930
4991
|
);
|
|
4931
|
-
reference = response._formData
|
|
4992
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
4932
4993
|
if (initializingHandler) {
|
|
4933
4994
|
var handler = initializingHandler;
|
|
4934
4995
|
handler.deps++;
|
|
@@ -4972,15 +5033,17 @@
|
|
|
4972
5033
|
var chunks = response._chunks;
|
|
4973
5034
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
4974
5035
|
chunks.set(id, stream);
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
5036
|
+
chunks = response._prefix;
|
|
5037
|
+
response = response._formData.streamChunks;
|
|
5038
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
5039
|
+
if (void 0 !== id)
|
|
5040
|
+
for (response = 0; response < id.length; response++)
|
|
5041
|
+
(chunks = id[response]),
|
|
5042
|
+
"C" === chunks[0]
|
|
4980
5043
|
? controller.close(
|
|
4981
5044
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
4982
5045
|
)
|
|
4983
|
-
: controller.enqueueModel(chunks)
|
|
5046
|
+
: controller.enqueueModel(chunks);
|
|
4984
5047
|
}
|
|
4985
5048
|
function parseReadableStream(response, reference, type) {
|
|
4986
5049
|
function enqueue(value) {
|
|
@@ -5144,7 +5207,14 @@
|
|
|
5144
5207
|
});
|
|
5145
5208
|
return iterator;
|
|
5146
5209
|
}
|
|
5147
|
-
function parseModelString(
|
|
5210
|
+
function parseModelString(
|
|
5211
|
+
response,
|
|
5212
|
+
obj,
|
|
5213
|
+
key$jscomp$0,
|
|
5214
|
+
value,
|
|
5215
|
+
reference,
|
|
5216
|
+
arrayRoot
|
|
5217
|
+
) {
|
|
5148
5218
|
if ("$" === value[0]) {
|
|
5149
5219
|
switch (value[1]) {
|
|
5150
5220
|
case "$":
|
|
@@ -5164,7 +5234,7 @@
|
|
|
5164
5234
|
response,
|
|
5165
5235
|
arrayRoot,
|
|
5166
5236
|
obj,
|
|
5167
|
-
key,
|
|
5237
|
+
key$jscomp$0,
|
|
5168
5238
|
null,
|
|
5169
5239
|
loadServerReference$1
|
|
5170
5240
|
)
|
|
@@ -5184,41 +5254,44 @@
|
|
|
5184
5254
|
case "Q":
|
|
5185
5255
|
return (
|
|
5186
5256
|
(arrayRoot = value.slice(2)),
|
|
5187
|
-
getOutlinedModel(
|
|
5257
|
+
getOutlinedModel(
|
|
5258
|
+
response,
|
|
5259
|
+
arrayRoot,
|
|
5260
|
+
obj,
|
|
5261
|
+
key$jscomp$0,
|
|
5262
|
+
null,
|
|
5263
|
+
createMap
|
|
5264
|
+
)
|
|
5188
5265
|
);
|
|
5189
5266
|
case "W":
|
|
5190
5267
|
return (
|
|
5191
5268
|
(arrayRoot = value.slice(2)),
|
|
5192
|
-
getOutlinedModel(
|
|
5269
|
+
getOutlinedModel(
|
|
5270
|
+
response,
|
|
5271
|
+
arrayRoot,
|
|
5272
|
+
obj,
|
|
5273
|
+
key$jscomp$0,
|
|
5274
|
+
null,
|
|
5275
|
+
createSet
|
|
5276
|
+
)
|
|
5193
5277
|
);
|
|
5194
5278
|
case "K":
|
|
5195
|
-
key = value.slice(2);
|
|
5196
|
-
obj = response.
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
(
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
for (
|
|
5210
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
5211
|
-
i < reference.length;
|
|
5212
|
-
i++
|
|
5213
|
-
)
|
|
5214
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
5215
|
-
reference = response;
|
|
5216
|
-
reference.data.delete(value);
|
|
5217
|
-
reference.keyPointer++;
|
|
5218
|
-
} else if (value.startsWith(obj)) break;
|
|
5219
|
-
else response.keyPointer++;
|
|
5279
|
+
key$jscomp$0 = value.slice(2);
|
|
5280
|
+
obj = response._formData;
|
|
5281
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
5282
|
+
key$jscomp$0 = new FormData();
|
|
5283
|
+
arrayRoot = obj.referencedEntries;
|
|
5284
|
+
if (null !== arrayRoot) {
|
|
5285
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
5286
|
+
reference = arrayRoot[value];
|
|
5287
|
+
var key = reference[0];
|
|
5288
|
+
if (!key.startsWith(response)) break;
|
|
5289
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
5290
|
+
value++;
|
|
5291
|
+
}
|
|
5292
|
+
obj.keyPointer = value;
|
|
5220
5293
|
}
|
|
5221
|
-
return
|
|
5294
|
+
return key$jscomp$0;
|
|
5222
5295
|
case "i":
|
|
5223
5296
|
return (
|
|
5224
5297
|
(arrayRoot = value.slice(2)),
|
|
@@ -5226,7 +5299,7 @@
|
|
|
5226
5299
|
response,
|
|
5227
5300
|
arrayRoot,
|
|
5228
5301
|
obj,
|
|
5229
|
-
key,
|
|
5302
|
+
key$jscomp$0,
|
|
5230
5303
|
null,
|
|
5231
5304
|
extractIterator
|
|
5232
5305
|
)
|
|
@@ -5261,7 +5334,7 @@
|
|
|
5261
5334
|
ArrayBuffer,
|
|
5262
5335
|
1,
|
|
5263
5336
|
obj,
|
|
5264
|
-
key,
|
|
5337
|
+
key$jscomp$0,
|
|
5265
5338
|
arrayRoot
|
|
5266
5339
|
);
|
|
5267
5340
|
case "O":
|
|
@@ -5271,7 +5344,7 @@
|
|
|
5271
5344
|
Int8Array,
|
|
5272
5345
|
1,
|
|
5273
5346
|
obj,
|
|
5274
|
-
key,
|
|
5347
|
+
key$jscomp$0,
|
|
5275
5348
|
arrayRoot
|
|
5276
5349
|
);
|
|
5277
5350
|
case "o":
|
|
@@ -5281,7 +5354,7 @@
|
|
|
5281
5354
|
Uint8Array,
|
|
5282
5355
|
1,
|
|
5283
5356
|
obj,
|
|
5284
|
-
key,
|
|
5357
|
+
key$jscomp$0,
|
|
5285
5358
|
arrayRoot
|
|
5286
5359
|
);
|
|
5287
5360
|
case "U":
|
|
@@ -5291,7 +5364,7 @@
|
|
|
5291
5364
|
Uint8ClampedArray,
|
|
5292
5365
|
1,
|
|
5293
5366
|
obj,
|
|
5294
|
-
key,
|
|
5367
|
+
key$jscomp$0,
|
|
5295
5368
|
arrayRoot
|
|
5296
5369
|
);
|
|
5297
5370
|
case "S":
|
|
@@ -5301,7 +5374,7 @@
|
|
|
5301
5374
|
Int16Array,
|
|
5302
5375
|
2,
|
|
5303
5376
|
obj,
|
|
5304
|
-
key,
|
|
5377
|
+
key$jscomp$0,
|
|
5305
5378
|
arrayRoot
|
|
5306
5379
|
);
|
|
5307
5380
|
case "s":
|
|
@@ -5311,7 +5384,7 @@
|
|
|
5311
5384
|
Uint16Array,
|
|
5312
5385
|
2,
|
|
5313
5386
|
obj,
|
|
5314
|
-
key,
|
|
5387
|
+
key$jscomp$0,
|
|
5315
5388
|
arrayRoot
|
|
5316
5389
|
);
|
|
5317
5390
|
case "L":
|
|
@@ -5321,7 +5394,7 @@
|
|
|
5321
5394
|
Int32Array,
|
|
5322
5395
|
4,
|
|
5323
5396
|
obj,
|
|
5324
|
-
key,
|
|
5397
|
+
key$jscomp$0,
|
|
5325
5398
|
arrayRoot
|
|
5326
5399
|
);
|
|
5327
5400
|
case "l":
|
|
@@ -5331,7 +5404,7 @@
|
|
|
5331
5404
|
Uint32Array,
|
|
5332
5405
|
4,
|
|
5333
5406
|
obj,
|
|
5334
|
-
key,
|
|
5407
|
+
key$jscomp$0,
|
|
5335
5408
|
arrayRoot
|
|
5336
5409
|
);
|
|
5337
5410
|
case "G":
|
|
@@ -5341,7 +5414,7 @@
|
|
|
5341
5414
|
Float32Array,
|
|
5342
5415
|
4,
|
|
5343
5416
|
obj,
|
|
5344
|
-
key,
|
|
5417
|
+
key$jscomp$0,
|
|
5345
5418
|
arrayRoot
|
|
5346
5419
|
);
|
|
5347
5420
|
case "g":
|
|
@@ -5351,7 +5424,7 @@
|
|
|
5351
5424
|
Float64Array,
|
|
5352
5425
|
8,
|
|
5353
5426
|
obj,
|
|
5354
|
-
key,
|
|
5427
|
+
key$jscomp$0,
|
|
5355
5428
|
arrayRoot
|
|
5356
5429
|
);
|
|
5357
5430
|
case "M":
|
|
@@ -5361,7 +5434,7 @@
|
|
|
5361
5434
|
BigInt64Array,
|
|
5362
5435
|
8,
|
|
5363
5436
|
obj,
|
|
5364
|
-
key,
|
|
5437
|
+
key$jscomp$0,
|
|
5365
5438
|
arrayRoot
|
|
5366
5439
|
);
|
|
5367
5440
|
case "m":
|
|
@@ -5371,7 +5444,7 @@
|
|
|
5371
5444
|
BigUint64Array,
|
|
5372
5445
|
8,
|
|
5373
5446
|
obj,
|
|
5374
|
-
key,
|
|
5447
|
+
key$jscomp$0,
|
|
5375
5448
|
arrayRoot
|
|
5376
5449
|
);
|
|
5377
5450
|
case "V":
|
|
@@ -5381,13 +5454,13 @@
|
|
|
5381
5454
|
DataView,
|
|
5382
5455
|
1,
|
|
5383
5456
|
obj,
|
|
5384
|
-
key,
|
|
5457
|
+
key$jscomp$0,
|
|
5385
5458
|
arrayRoot
|
|
5386
5459
|
);
|
|
5387
5460
|
case "B":
|
|
5388
5461
|
return (
|
|
5389
5462
|
(obj = parseInt(value.slice(2), 16)),
|
|
5390
|
-
response._formData
|
|
5463
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
5391
5464
|
);
|
|
5392
5465
|
case "R":
|
|
5393
5466
|
return parseReadableStream(response, value, void 0);
|
|
@@ -5403,7 +5476,7 @@
|
|
|
5403
5476
|
response,
|
|
5404
5477
|
value,
|
|
5405
5478
|
obj,
|
|
5406
|
-
key,
|
|
5479
|
+
key$jscomp$0,
|
|
5407
5480
|
arrayRoot,
|
|
5408
5481
|
createModel
|
|
5409
5482
|
);
|
|
@@ -5422,11 +5495,20 @@
|
|
|
5422
5495
|
: new FormData(),
|
|
5423
5496
|
arraySizeLimit =
|
|
5424
5497
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
5425
|
-
chunks = new Map()
|
|
5498
|
+
chunks = new Map(),
|
|
5499
|
+
backingStore = {
|
|
5500
|
+
prefix: formFieldPrefix,
|
|
5501
|
+
referencedEntries: null,
|
|
5502
|
+
keyPointer: 0,
|
|
5503
|
+
stringChunks: null,
|
|
5504
|
+
streamChunks: null,
|
|
5505
|
+
blobs: null
|
|
5506
|
+
};
|
|
5507
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
5426
5508
|
return {
|
|
5427
5509
|
_bundlerConfig: bundlerConfig,
|
|
5428
5510
|
_prefix: formFieldPrefix,
|
|
5429
|
-
_formData:
|
|
5511
|
+
_formData: backingStore,
|
|
5430
5512
|
_chunks: chunks,
|
|
5431
5513
|
_closed: !1,
|
|
5432
5514
|
_closedReason: null,
|
|
@@ -5436,14 +5518,26 @@
|
|
|
5436
5518
|
};
|
|
5437
5519
|
}
|
|
5438
5520
|
function resolveField(response, key, value) {
|
|
5439
|
-
appendBackingEntry(response._formData, key, value);
|
|
5440
5521
|
var prefix = response._prefix;
|
|
5441
5522
|
if (key.startsWith(prefix)) {
|
|
5442
5523
|
var chunks = response._chunks;
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5524
|
+
if ("S" === key[prefix.length]) {
|
|
5525
|
+
if (
|
|
5526
|
+
key.length > prefix.length + 1 &&
|
|
5527
|
+
((prefix = +key.slice(prefix.length + 1)),
|
|
5528
|
+
(chunks = chunks.get(prefix)))
|
|
5529
|
+
) {
|
|
5530
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
5531
|
+
return;
|
|
5532
|
+
}
|
|
5533
|
+
} else if (
|
|
5534
|
+
((prefix = +key.slice(prefix.length)), (chunks = chunks.get(prefix)))
|
|
5535
|
+
) {
|
|
5536
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
5537
|
+
return;
|
|
5538
|
+
}
|
|
5446
5539
|
}
|
|
5540
|
+
appendBackingEntry(response._formData, value, key);
|
|
5447
5541
|
}
|
|
5448
5542
|
function close(response) {
|
|
5449
5543
|
reportGlobalError(response, Error("Connection closed."));
|
|
@@ -5651,6 +5745,12 @@
|
|
|
5651
5745
|
Symbol.for("react.postpone");
|
|
5652
5746
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
5653
5747
|
ASYNC_ITERATOR = Symbol.asyncIterator,
|
|
5748
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5749
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
5750
|
+
ArrayBuffer.prototype,
|
|
5751
|
+
"detached"
|
|
5752
|
+
),
|
|
5753
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
5654
5754
|
scheduleMicrotask = queueMicrotask,
|
|
5655
5755
|
currentView = null,
|
|
5656
5756
|
writtenBytes = 0,
|
|
@@ -6027,7 +6127,6 @@
|
|
|
6027
6127
|
jsxPropsParents = new WeakMap(),
|
|
6028
6128
|
jsxChildrenParents = new WeakMap(),
|
|
6029
6129
|
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
|
6030
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
6031
6130
|
doNotLimit = new WeakSet();
|
|
6032
6131
|
(function () {
|
|
6033
6132
|
async_hooks
|
|
@@ -6292,44 +6391,44 @@
|
|
|
6292
6391
|
};
|
|
6293
6392
|
exports.decodeAction = function (body, serverManifest) {
|
|
6294
6393
|
var formData = new FormData(),
|
|
6295
|
-
|
|
6296
|
-
seenActions = new Set();
|
|
6394
|
+
maybeActionKey = null;
|
|
6297
6395
|
body.forEach(function (value, key) {
|
|
6298
6396
|
key.startsWith("$ACTION_")
|
|
6299
6397
|
? key.startsWith("$ACTION_REF_")
|
|
6300
|
-
?
|
|
6301
|
-
|
|
6302
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
6303
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
6304
|
-
(action = loadServerReference(serverManifest, value)))
|
|
6305
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
6306
|
-
!seenActions.has(key) &&
|
|
6307
|
-
(seenActions.add(key),
|
|
6308
|
-
(value = key.slice(11)),
|
|
6309
|
-
(action = loadServerReference(serverManifest, {
|
|
6310
|
-
id: value,
|
|
6311
|
-
bound: null
|
|
6312
|
-
})))
|
|
6398
|
+
? (maybeActionKey = key)
|
|
6399
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
6313
6400
|
: formData.append(key, value);
|
|
6314
6401
|
});
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6402
|
+
if (null === maybeActionKey) return null;
|
|
6403
|
+
var actionKey = maybeActionKey,
|
|
6404
|
+
action = null;
|
|
6405
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
6406
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
6407
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
6408
|
+
(action = loadServerReference(serverManifest, body));
|
|
6409
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
6410
|
+
(body = actionKey.slice(11)),
|
|
6411
|
+
(action = loadServerReference(serverManifest, {
|
|
6412
|
+
id: body,
|
|
6413
|
+
bound: null
|
|
6414
|
+
}));
|
|
6415
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
6416
|
+
return action.then(function (fn) {
|
|
6417
|
+
return fn.bind(null, formData);
|
|
6418
|
+
});
|
|
6320
6419
|
};
|
|
6321
6420
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
6322
6421
|
var keyPath = body.get("$ACTION_KEY");
|
|
6323
6422
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
6324
|
-
var
|
|
6423
|
+
var actionKey = null;
|
|
6325
6424
|
body.forEach(function (value, key) {
|
|
6326
|
-
key.startsWith("$ACTION_REF_") &&
|
|
6327
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
6328
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
6425
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
6329
6426
|
});
|
|
6330
|
-
if (null ===
|
|
6331
|
-
var
|
|
6332
|
-
|
|
6427
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
6428
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
6429
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
6430
|
+
var referenceId = body.id;
|
|
6431
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
6333
6432
|
return null === bound
|
|
6334
6433
|
? null
|
|
6335
6434
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -6365,14 +6464,14 @@
|
|
|
6365
6464
|
_entry$value = _entry$value[1];
|
|
6366
6465
|
"string" === typeof _entry$value
|
|
6367
6466
|
? resolveField(response, entry, _entry$value)
|
|
6368
|
-
: appendBackingEntry(response._formData,
|
|
6467
|
+
: appendBackingEntry(response._formData, _entry$value, entry);
|
|
6369
6468
|
iterator.next().then(progress, error);
|
|
6370
6469
|
}
|
|
6371
6470
|
}
|
|
6372
6471
|
function error(reason) {
|
|
6373
6472
|
reportGlobalError(response, reason);
|
|
6374
6473
|
"function" === typeof iterator.throw &&
|
|
6375
|
-
iterator.throw(reason).then(
|
|
6474
|
+
iterator.throw(reason).then(noop, noop);
|
|
6376
6475
|
}
|
|
6377
6476
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
6378
6477
|
response = createResponse(
|
|
@@ -6395,26 +6494,33 @@
|
|
|
6395
6494
|
var current = head;
|
|
6396
6495
|
if (!current.complete) return;
|
|
6397
6496
|
try {
|
|
6398
|
-
var
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6497
|
+
var key = current.name,
|
|
6498
|
+
JSCompiler_temp_const = response._formData;
|
|
6499
|
+
var handle = current.file;
|
|
6500
|
+
if ("function" === typeof File)
|
|
6501
|
+
var JSCompiler_inline_result = new File(
|
|
6502
|
+
handle.chunks,
|
|
6503
|
+
handle.filename,
|
|
6504
|
+
{ type: handle.mime }
|
|
6505
|
+
);
|
|
6506
|
+
else {
|
|
6507
|
+
var scratch = new FormData();
|
|
6508
|
+
scratch.append(
|
|
6509
|
+
"file",
|
|
6510
|
+
new Blob(handle.chunks, { type: handle.mime }),
|
|
6511
|
+
handle.filename
|
|
6512
|
+
);
|
|
6513
|
+
JSCompiler_inline_result = scratch.get("file");
|
|
6514
|
+
}
|
|
6515
|
+
appendBackingEntry(
|
|
6516
|
+
JSCompiler_temp_const,
|
|
6517
|
+
JSCompiler_inline_result,
|
|
6518
|
+
key
|
|
6519
|
+
);
|
|
6410
6520
|
var queuedFields = current.queuedFields;
|
|
6411
6521
|
if (null !== queuedFields)
|
|
6412
|
-
for (
|
|
6413
|
-
resolveField(
|
|
6414
|
-
response$jscomp$0,
|
|
6415
|
-
queuedFields[response],
|
|
6416
|
-
queuedFields[response + 1]
|
|
6417
|
-
);
|
|
6522
|
+
for (var i = 0; i < queuedFields.length; i += 2)
|
|
6523
|
+
resolveField(response, queuedFields[i], queuedFields[i + 1]);
|
|
6418
6524
|
} catch (error) {
|
|
6419
6525
|
busboyStream.destroy(error);
|
|
6420
6526
|
return;
|
|
@@ -6422,9 +6528,9 @@
|
|
|
6422
6528
|
head = current.next;
|
|
6423
6529
|
}
|
|
6424
6530
|
tail = null;
|
|
6425
|
-
bodyFinished && !closed && ((closed = !0), close(response
|
|
6531
|
+
bodyFinished && !closed && ((closed = !0), close(response));
|
|
6426
6532
|
}
|
|
6427
|
-
var response
|
|
6533
|
+
var response = createResponse(
|
|
6428
6534
|
turbopackMap,
|
|
6429
6535
|
"",
|
|
6430
6536
|
options ? options.temporaryReferences : void 0,
|
|
@@ -6441,7 +6547,7 @@
|
|
|
6441
6547
|
tail.queuedFields.push(name, value);
|
|
6442
6548
|
else
|
|
6443
6549
|
try {
|
|
6444
|
-
resolveField(response
|
|
6550
|
+
resolveField(response, name, value);
|
|
6445
6551
|
} catch (error) {
|
|
6446
6552
|
busboyStream.destroy(error);
|
|
6447
6553
|
}
|
|
@@ -6487,14 +6593,14 @@
|
|
|
6487
6593
|
flush();
|
|
6488
6594
|
closed ||
|
|
6489
6595
|
reportGlobalError(
|
|
6490
|
-
response
|
|
6596
|
+
response,
|
|
6491
6597
|
Error("Reply finished with incomplete file part.")
|
|
6492
6598
|
);
|
|
6493
6599
|
});
|
|
6494
6600
|
busboyStream.on("error", function (err) {
|
|
6495
|
-
reportGlobalError(response
|
|
6601
|
+
reportGlobalError(response, err);
|
|
6496
6602
|
});
|
|
6497
|
-
return getChunk(response
|
|
6603
|
+
return getChunk(response, 0);
|
|
6498
6604
|
};
|
|
6499
6605
|
exports.prerender = function (model, turbopackMap, options) {
|
|
6500
6606
|
return new Promise(function (resolve, reject) {
|