react-server-dom-webpack 19.0.7 → 19.0.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-webpack-client.browser.development.js +66 -47
- package/cjs/react-server-dom-webpack-client.browser.production.js +84 -62
- package/cjs/react-server-dom-webpack-client.edge.development.js +74 -47
- package/cjs/react-server-dom-webpack-client.edge.production.js +94 -64
- package/cjs/react-server-dom-webpack-client.node.development.js +74 -47
- package/cjs/react-server-dom-webpack-client.node.production.js +94 -64
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +74 -47
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +94 -64
- package/cjs/react-server-dom-webpack-server.browser.development.js +214 -123
- package/cjs/react-server-dom-webpack-server.browser.production.js +209 -118
- package/cjs/react-server-dom-webpack-server.edge.development.js +213 -122
- package/cjs/react-server-dom-webpack-server.edge.production.js +210 -119
- package/cjs/react-server-dom-webpack-server.node.development.js +270 -161
- package/cjs/react-server-dom-webpack-server.node.production.js +259 -154
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +270 -161
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +259 -154
- package/package.json +5 -5
|
@@ -33,31 +33,39 @@
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
function writeChunkAndReturn(destination, chunk) {
|
|
36
|
-
if (0
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
(
|
|
40
|
-
|
|
36
|
+
if (0 === chunk.byteLength)
|
|
37
|
+
if (supportsArrayBufferDetached) {
|
|
38
|
+
if (chunk.buffer.detached)
|
|
39
|
+
throw Error(
|
|
40
|
+
"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()`."
|
|
41
|
+
);
|
|
42
|
+
} else
|
|
43
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
44
|
+
(console.error(
|
|
45
|
+
"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 use a modern browser that supports ArrayBuffer.prototype.detached."
|
|
41
46
|
),
|
|
42
|
-
(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
(currentView
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
48
|
+
else if (2048 < chunk.byteLength)
|
|
49
|
+
0 < writtenBytes &&
|
|
50
|
+
(destination.enqueue(
|
|
51
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
|
52
|
+
),
|
|
53
|
+
(currentView = new Uint8Array(2048)),
|
|
54
|
+
(writtenBytes = 0)),
|
|
55
|
+
destination.enqueue(chunk);
|
|
56
|
+
else {
|
|
57
|
+
var allowableBytes = currentView.length - writtenBytes;
|
|
58
|
+
allowableBytes < chunk.byteLength &&
|
|
59
|
+
(0 === allowableBytes
|
|
60
|
+
? destination.enqueue(currentView)
|
|
61
|
+
: (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
|
|
62
|
+
destination.enqueue(currentView),
|
|
63
|
+
(chunk = chunk.subarray(allowableBytes))),
|
|
64
|
+
(currentView = new Uint8Array(2048)),
|
|
65
|
+
(writtenBytes = 0));
|
|
66
|
+
currentView.set(chunk, writtenBytes);
|
|
67
|
+
writtenBytes += chunk.byteLength;
|
|
68
|
+
}
|
|
61
69
|
return !0;
|
|
62
70
|
}
|
|
63
71
|
function stringToChunk(content) {
|
|
@@ -818,7 +826,7 @@
|
|
|
818
826
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
819
827
|
enqueueFlush(request);
|
|
820
828
|
"function" === typeof iterator.throw &&
|
|
821
|
-
iterator.throw(reason).then(
|
|
829
|
+
iterator.throw(reason).then(noop, noop);
|
|
822
830
|
}
|
|
823
831
|
}
|
|
824
832
|
function abortIterable(reason) {
|
|
@@ -829,7 +837,7 @@
|
|
|
829
837
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
830
838
|
enqueueFlush(request);
|
|
831
839
|
"function" === typeof iterator.throw &&
|
|
832
|
-
iterator.throw(reason).then(
|
|
840
|
+
iterator.throw(reason).then(noop, noop);
|
|
833
841
|
}
|
|
834
842
|
}
|
|
835
843
|
var isIterator = iterable === iterator,
|
|
@@ -1880,14 +1888,35 @@
|
|
|
1880
1888
|
}
|
|
1881
1889
|
function emitTypedArrayChunk(request, id, tag, typedArray) {
|
|
1882
1890
|
request.pendingChunks++;
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
+
a: {
|
|
1892
|
+
var view = new Uint8Array(
|
|
1893
|
+
typedArray.buffer,
|
|
1894
|
+
typedArray.byteOffset,
|
|
1895
|
+
typedArray.byteLength
|
|
1896
|
+
);
|
|
1897
|
+
if (2048 < typedArray.byteLength) {
|
|
1898
|
+
if (
|
|
1899
|
+
0 !== typedArray.byteOffset ||
|
|
1900
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
1901
|
+
typedArray.buffer.resizable
|
|
1902
|
+
) {
|
|
1903
|
+
typedArray = view.slice();
|
|
1904
|
+
break a;
|
|
1905
|
+
}
|
|
1906
|
+
if (!supportsArrayBufferDetached) {
|
|
1907
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
1908
|
+
(console.error(
|
|
1909
|
+
"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 use a modern browser that supports ArrayBuffer.prototype.detached."
|
|
1910
|
+
),
|
|
1911
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
1912
|
+
typedArray = view.slice();
|
|
1913
|
+
break a;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
typedArray = view;
|
|
1917
|
+
}
|
|
1918
|
+
view = typedArray.byteLength;
|
|
1919
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
1891
1920
|
id = stringToChunk(id);
|
|
1892
1921
|
request.completedRegularChunks.push(id, typedArray);
|
|
1893
1922
|
}
|
|
@@ -2517,6 +2546,39 @@
|
|
|
2517
2546
|
chunkMap.set(chunkId, filename);
|
|
2518
2547
|
return __webpack_chunk_load__(chunkId);
|
|
2519
2548
|
}
|
|
2549
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
2550
|
+
var prefix = backingStore.prefix;
|
|
2551
|
+
if (key.startsWith(prefix)) {
|
|
2552
|
+
switch (key[prefix.length]) {
|
|
2553
|
+
case "_":
|
|
2554
|
+
prefix = backingStore.referencedEntries;
|
|
2555
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
2556
|
+
prefix.push([key, value]);
|
|
2557
|
+
return;
|
|
2558
|
+
case "S":
|
|
2559
|
+
"string" === typeof value &&
|
|
2560
|
+
((prefix = backingStore.streamChunks),
|
|
2561
|
+
null === prefix &&
|
|
2562
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
2563
|
+
(backingStore = prefix.get(key)),
|
|
2564
|
+
void 0 === backingStore
|
|
2565
|
+
? prefix.set(key, [value])
|
|
2566
|
+
: backingStore.push(value));
|
|
2567
|
+
return;
|
|
2568
|
+
}
|
|
2569
|
+
"string" === typeof value
|
|
2570
|
+
? ((prefix = backingStore.stringChunks),
|
|
2571
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
2572
|
+
prefix.set(key, value))
|
|
2573
|
+
: ((prefix = backingStore.blobs),
|
|
2574
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
2575
|
+
prefix.set(key, value));
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
function getBackingBlob(backingStore, key) {
|
|
2579
|
+
backingStore = backingStore.blobs;
|
|
2580
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
2581
|
+
}
|
|
2520
2582
|
function ReactPromise(status, value, reason) {
|
|
2521
2583
|
this.status = status;
|
|
2522
2584
|
this.value = value;
|
|
@@ -2826,17 +2888,20 @@
|
|
|
2826
2888
|
function getChunk(response, id) {
|
|
2827
2889
|
var chunks = response._chunks,
|
|
2828
2890
|
chunk = chunks.get(id);
|
|
2829
|
-
chunk
|
|
2830
|
-
|
|
2831
|
-
|
|
2891
|
+
if (!chunk) {
|
|
2892
|
+
chunk = response._prefix;
|
|
2893
|
+
var stringChunks = response._formData.stringChunks;
|
|
2894
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
2895
|
+
chunk =
|
|
2832
2896
|
"string" === typeof chunk
|
|
2833
2897
|
? new ReactPromise(
|
|
2834
2898
|
"resolved_model",
|
|
2835
2899
|
chunk,
|
|
2836
2900
|
_defineProperty({ id: id }, RESPONSE_SYMBOL, response)
|
|
2837
2901
|
)
|
|
2838
|
-
: new ReactPromise("pending", null, null)
|
|
2839
|
-
chunks.set(id, chunk)
|
|
2902
|
+
: new ReactPromise("pending", null, null);
|
|
2903
|
+
chunks.set(id, chunk);
|
|
2904
|
+
}
|
|
2840
2905
|
return chunk;
|
|
2841
2906
|
}
|
|
2842
2907
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -3083,7 +3148,7 @@
|
|
|
3083
3148
|
Error("Already initialized typed array.")
|
|
3084
3149
|
)
|
|
3085
3150
|
);
|
|
3086
|
-
reference = response._formData
|
|
3151
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
3087
3152
|
if (initializingHandler) {
|
|
3088
3153
|
var handler = initializingHandler;
|
|
3089
3154
|
handler.deps++;
|
|
@@ -3127,15 +3192,17 @@
|
|
|
3127
3192
|
var chunks = response._chunks;
|
|
3128
3193
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
3129
3194
|
chunks.set(id, stream);
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3195
|
+
chunks = response._prefix;
|
|
3196
|
+
response = response._formData.streamChunks;
|
|
3197
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
3198
|
+
if (void 0 !== id)
|
|
3199
|
+
for (response = 0; response < id.length; response++)
|
|
3200
|
+
(chunks = id[response]),
|
|
3201
|
+
"C" === chunks[0]
|
|
3135
3202
|
? controller.close(
|
|
3136
3203
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
3137
3204
|
)
|
|
3138
|
-
: controller.enqueueModel(chunks)
|
|
3205
|
+
: controller.enqueueModel(chunks);
|
|
3139
3206
|
}
|
|
3140
3207
|
function parseReadableStream(response, reference, type) {
|
|
3141
3208
|
function enqueue(value) {
|
|
@@ -3299,7 +3366,14 @@
|
|
|
3299
3366
|
});
|
|
3300
3367
|
return iterator;
|
|
3301
3368
|
}
|
|
3302
|
-
function parseModelString(
|
|
3369
|
+
function parseModelString(
|
|
3370
|
+
response,
|
|
3371
|
+
obj,
|
|
3372
|
+
key$jscomp$0,
|
|
3373
|
+
value,
|
|
3374
|
+
reference,
|
|
3375
|
+
arrayRoot
|
|
3376
|
+
) {
|
|
3303
3377
|
if ("$" === value[0]) {
|
|
3304
3378
|
switch (value[1]) {
|
|
3305
3379
|
case "$":
|
|
@@ -3319,7 +3393,7 @@
|
|
|
3319
3393
|
response,
|
|
3320
3394
|
arrayRoot,
|
|
3321
3395
|
obj,
|
|
3322
|
-
key,
|
|
3396
|
+
key$jscomp$0,
|
|
3323
3397
|
null,
|
|
3324
3398
|
loadServerReference$1
|
|
3325
3399
|
)
|
|
@@ -3339,41 +3413,44 @@
|
|
|
3339
3413
|
case "Q":
|
|
3340
3414
|
return (
|
|
3341
3415
|
(arrayRoot = value.slice(2)),
|
|
3342
|
-
getOutlinedModel(
|
|
3416
|
+
getOutlinedModel(
|
|
3417
|
+
response,
|
|
3418
|
+
arrayRoot,
|
|
3419
|
+
obj,
|
|
3420
|
+
key$jscomp$0,
|
|
3421
|
+
null,
|
|
3422
|
+
createMap
|
|
3423
|
+
)
|
|
3343
3424
|
);
|
|
3344
3425
|
case "W":
|
|
3345
3426
|
return (
|
|
3346
3427
|
(arrayRoot = value.slice(2)),
|
|
3347
|
-
getOutlinedModel(
|
|
3428
|
+
getOutlinedModel(
|
|
3429
|
+
response,
|
|
3430
|
+
arrayRoot,
|
|
3431
|
+
obj,
|
|
3432
|
+
key$jscomp$0,
|
|
3433
|
+
null,
|
|
3434
|
+
createSet
|
|
3435
|
+
)
|
|
3348
3436
|
);
|
|
3349
3437
|
case "K":
|
|
3350
|
-
key = value.slice(2);
|
|
3351
|
-
obj = response.
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
(
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
for (
|
|
3365
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
3366
|
-
i < reference.length;
|
|
3367
|
-
i++
|
|
3368
|
-
)
|
|
3369
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
3370
|
-
reference = response;
|
|
3371
|
-
reference.data.delete(value);
|
|
3372
|
-
reference.keyPointer++;
|
|
3373
|
-
} else if (value.startsWith(obj)) break;
|
|
3374
|
-
else response.keyPointer++;
|
|
3438
|
+
key$jscomp$0 = value.slice(2);
|
|
3439
|
+
obj = response._formData;
|
|
3440
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
3441
|
+
key$jscomp$0 = new FormData();
|
|
3442
|
+
arrayRoot = obj.referencedEntries;
|
|
3443
|
+
if (null !== arrayRoot) {
|
|
3444
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
3445
|
+
reference = arrayRoot[value];
|
|
3446
|
+
var key = reference[0];
|
|
3447
|
+
if (!key.startsWith(response)) break;
|
|
3448
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
3449
|
+
value++;
|
|
3450
|
+
}
|
|
3451
|
+
obj.keyPointer = value;
|
|
3375
3452
|
}
|
|
3376
|
-
return
|
|
3453
|
+
return key$jscomp$0;
|
|
3377
3454
|
case "i":
|
|
3378
3455
|
return (
|
|
3379
3456
|
(arrayRoot = value.slice(2)),
|
|
@@ -3381,7 +3458,7 @@
|
|
|
3381
3458
|
response,
|
|
3382
3459
|
arrayRoot,
|
|
3383
3460
|
obj,
|
|
3384
|
-
key,
|
|
3461
|
+
key$jscomp$0,
|
|
3385
3462
|
null,
|
|
3386
3463
|
extractIterator
|
|
3387
3464
|
)
|
|
@@ -3418,7 +3495,7 @@
|
|
|
3418
3495
|
ArrayBuffer,
|
|
3419
3496
|
1,
|
|
3420
3497
|
obj,
|
|
3421
|
-
key,
|
|
3498
|
+
key$jscomp$0,
|
|
3422
3499
|
arrayRoot
|
|
3423
3500
|
);
|
|
3424
3501
|
case "O":
|
|
@@ -3428,7 +3505,7 @@
|
|
|
3428
3505
|
Int8Array,
|
|
3429
3506
|
1,
|
|
3430
3507
|
obj,
|
|
3431
|
-
key,
|
|
3508
|
+
key$jscomp$0,
|
|
3432
3509
|
arrayRoot
|
|
3433
3510
|
);
|
|
3434
3511
|
case "o":
|
|
@@ -3438,7 +3515,7 @@
|
|
|
3438
3515
|
Uint8Array,
|
|
3439
3516
|
1,
|
|
3440
3517
|
obj,
|
|
3441
|
-
key,
|
|
3518
|
+
key$jscomp$0,
|
|
3442
3519
|
arrayRoot
|
|
3443
3520
|
);
|
|
3444
3521
|
case "U":
|
|
@@ -3448,7 +3525,7 @@
|
|
|
3448
3525
|
Uint8ClampedArray,
|
|
3449
3526
|
1,
|
|
3450
3527
|
obj,
|
|
3451
|
-
key,
|
|
3528
|
+
key$jscomp$0,
|
|
3452
3529
|
arrayRoot
|
|
3453
3530
|
);
|
|
3454
3531
|
case "S":
|
|
@@ -3458,7 +3535,7 @@
|
|
|
3458
3535
|
Int16Array,
|
|
3459
3536
|
2,
|
|
3460
3537
|
obj,
|
|
3461
|
-
key,
|
|
3538
|
+
key$jscomp$0,
|
|
3462
3539
|
arrayRoot
|
|
3463
3540
|
);
|
|
3464
3541
|
case "s":
|
|
@@ -3468,7 +3545,7 @@
|
|
|
3468
3545
|
Uint16Array,
|
|
3469
3546
|
2,
|
|
3470
3547
|
obj,
|
|
3471
|
-
key,
|
|
3548
|
+
key$jscomp$0,
|
|
3472
3549
|
arrayRoot
|
|
3473
3550
|
);
|
|
3474
3551
|
case "L":
|
|
@@ -3478,7 +3555,7 @@
|
|
|
3478
3555
|
Int32Array,
|
|
3479
3556
|
4,
|
|
3480
3557
|
obj,
|
|
3481
|
-
key,
|
|
3558
|
+
key$jscomp$0,
|
|
3482
3559
|
arrayRoot
|
|
3483
3560
|
);
|
|
3484
3561
|
case "l":
|
|
@@ -3488,7 +3565,7 @@
|
|
|
3488
3565
|
Uint32Array,
|
|
3489
3566
|
4,
|
|
3490
3567
|
obj,
|
|
3491
|
-
key,
|
|
3568
|
+
key$jscomp$0,
|
|
3492
3569
|
arrayRoot
|
|
3493
3570
|
);
|
|
3494
3571
|
case "G":
|
|
@@ -3498,7 +3575,7 @@
|
|
|
3498
3575
|
Float32Array,
|
|
3499
3576
|
4,
|
|
3500
3577
|
obj,
|
|
3501
|
-
key,
|
|
3578
|
+
key$jscomp$0,
|
|
3502
3579
|
arrayRoot
|
|
3503
3580
|
);
|
|
3504
3581
|
case "g":
|
|
@@ -3508,7 +3585,7 @@
|
|
|
3508
3585
|
Float64Array,
|
|
3509
3586
|
8,
|
|
3510
3587
|
obj,
|
|
3511
|
-
key,
|
|
3588
|
+
key$jscomp$0,
|
|
3512
3589
|
arrayRoot
|
|
3513
3590
|
);
|
|
3514
3591
|
case "M":
|
|
@@ -3518,7 +3595,7 @@
|
|
|
3518
3595
|
BigInt64Array,
|
|
3519
3596
|
8,
|
|
3520
3597
|
obj,
|
|
3521
|
-
key,
|
|
3598
|
+
key$jscomp$0,
|
|
3522
3599
|
arrayRoot
|
|
3523
3600
|
);
|
|
3524
3601
|
case "m":
|
|
@@ -3528,7 +3605,7 @@
|
|
|
3528
3605
|
BigUint64Array,
|
|
3529
3606
|
8,
|
|
3530
3607
|
obj,
|
|
3531
|
-
key,
|
|
3608
|
+
key$jscomp$0,
|
|
3532
3609
|
arrayRoot
|
|
3533
3610
|
);
|
|
3534
3611
|
case "V":
|
|
@@ -3538,13 +3615,13 @@
|
|
|
3538
3615
|
DataView,
|
|
3539
3616
|
1,
|
|
3540
3617
|
obj,
|
|
3541
|
-
key,
|
|
3618
|
+
key$jscomp$0,
|
|
3542
3619
|
arrayRoot
|
|
3543
3620
|
);
|
|
3544
3621
|
case "B":
|
|
3545
3622
|
return (
|
|
3546
3623
|
(obj = parseInt(value.slice(2), 16)),
|
|
3547
|
-
response._formData
|
|
3624
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
3548
3625
|
);
|
|
3549
3626
|
}
|
|
3550
3627
|
switch (value[1]) {
|
|
@@ -3562,7 +3639,7 @@
|
|
|
3562
3639
|
response,
|
|
3563
3640
|
value,
|
|
3564
3641
|
obj,
|
|
3565
|
-
key,
|
|
3642
|
+
key$jscomp$0,
|
|
3566
3643
|
arrayRoot,
|
|
3567
3644
|
createModel
|
|
3568
3645
|
);
|
|
@@ -3581,11 +3658,20 @@
|
|
|
3581
3658
|
: new FormData(),
|
|
3582
3659
|
arraySizeLimit =
|
|
3583
3660
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
3584
|
-
chunks = new Map()
|
|
3661
|
+
chunks = new Map(),
|
|
3662
|
+
backingStore = {
|
|
3663
|
+
prefix: formFieldPrefix,
|
|
3664
|
+
referencedEntries: null,
|
|
3665
|
+
keyPointer: 0,
|
|
3666
|
+
stringChunks: null,
|
|
3667
|
+
streamChunks: null,
|
|
3668
|
+
blobs: null
|
|
3669
|
+
};
|
|
3670
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
3585
3671
|
return {
|
|
3586
3672
|
_bundlerConfig: bundlerConfig,
|
|
3587
3673
|
_prefix: formFieldPrefix,
|
|
3588
|
-
_formData:
|
|
3674
|
+
_formData: backingStore,
|
|
3589
3675
|
_chunks: chunks,
|
|
3590
3676
|
_temporaryReferences: temporaryReferences,
|
|
3591
3677
|
_rootArrayContexts: new WeakMap(),
|
|
@@ -3642,13 +3728,19 @@
|
|
|
3642
3728
|
}
|
|
3643
3729
|
var ReactDOM = require("react-dom"),
|
|
3644
3730
|
React = require("react"),
|
|
3731
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
3645
3732
|
channel = new MessageChannel(),
|
|
3646
3733
|
taskQueue = [];
|
|
3647
3734
|
channel.port1.onmessage = function () {
|
|
3648
3735
|
var task = taskQueue.shift();
|
|
3649
3736
|
task && task();
|
|
3650
3737
|
};
|
|
3651
|
-
var
|
|
3738
|
+
var supportsArrayBufferDetached = hasOwnProperty.call(
|
|
3739
|
+
ArrayBuffer.prototype,
|
|
3740
|
+
"detached"
|
|
3741
|
+
),
|
|
3742
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
3743
|
+
LocalPromise = Promise,
|
|
3652
3744
|
scheduleMicrotask =
|
|
3653
3745
|
"function" === typeof queueMicrotask
|
|
3654
3746
|
? queueMicrotask
|
|
@@ -4076,7 +4168,6 @@
|
|
|
4076
4168
|
debugID = null,
|
|
4077
4169
|
modelRoot = !1,
|
|
4078
4170
|
emptyRoot = {},
|
|
4079
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4080
4171
|
chunkCache = new Map(),
|
|
4081
4172
|
chunkMap = new Map(),
|
|
4082
4173
|
webpackGetChunkFilename = __webpack_require__.u;
|
|
@@ -4152,44 +4243,44 @@
|
|
|
4152
4243
|
};
|
|
4153
4244
|
exports.decodeAction = function (body, serverManifest) {
|
|
4154
4245
|
var formData = new FormData(),
|
|
4155
|
-
|
|
4156
|
-
seenActions = new Set();
|
|
4246
|
+
maybeActionKey = null;
|
|
4157
4247
|
body.forEach(function (value, key) {
|
|
4158
4248
|
key.startsWith("$ACTION_")
|
|
4159
4249
|
? key.startsWith("$ACTION_REF_")
|
|
4160
|
-
?
|
|
4161
|
-
|
|
4162
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4163
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4164
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4165
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4166
|
-
!seenActions.has(key) &&
|
|
4167
|
-
(seenActions.add(key),
|
|
4168
|
-
(value = key.slice(11)),
|
|
4169
|
-
(action = loadServerReference(serverManifest, {
|
|
4170
|
-
id: value,
|
|
4171
|
-
bound: null
|
|
4172
|
-
})))
|
|
4250
|
+
? (maybeActionKey = key)
|
|
4251
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4173
4252
|
: formData.append(key, value);
|
|
4174
4253
|
});
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4254
|
+
if (null === maybeActionKey) return null;
|
|
4255
|
+
var actionKey = maybeActionKey,
|
|
4256
|
+
action = null;
|
|
4257
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4258
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4259
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4260
|
+
(action = loadServerReference(serverManifest, body));
|
|
4261
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4262
|
+
(body = actionKey.slice(11)),
|
|
4263
|
+
(action = loadServerReference(serverManifest, {
|
|
4264
|
+
id: body,
|
|
4265
|
+
bound: null
|
|
4266
|
+
}));
|
|
4267
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4268
|
+
return action.then(function (fn) {
|
|
4269
|
+
return fn.bind(null, formData);
|
|
4270
|
+
});
|
|
4180
4271
|
};
|
|
4181
4272
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4182
4273
|
var keyPath = body.get("$ACTION_KEY");
|
|
4183
4274
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4184
|
-
var
|
|
4275
|
+
var actionKey = null;
|
|
4185
4276
|
body.forEach(function (value, key) {
|
|
4186
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4187
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4188
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4277
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4189
4278
|
});
|
|
4190
|
-
if (null ===
|
|
4191
|
-
var
|
|
4192
|
-
|
|
4279
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4280
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4281
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4282
|
+
var referenceId = body.id;
|
|
4283
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4193
4284
|
return null === bound
|
|
4194
4285
|
? null
|
|
4195
4286
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|