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;
|
|
@@ -47,31 +48,39 @@
|
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
function writeChunkAndReturn(destination, chunk) {
|
|
50
|
-
if (0
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
(
|
|
54
|
-
|
|
51
|
+
if (0 === chunk.byteLength)
|
|
52
|
+
if (supportsArrayBufferDetached) {
|
|
53
|
+
if (chunk.buffer.detached)
|
|
54
|
+
throw Error(
|
|
55
|
+
"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()`."
|
|
56
|
+
);
|
|
57
|
+
} else
|
|
58
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
59
|
+
(console.error(
|
|
60
|
+
"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 Edge runtime that supports ArrayBuffer.prototype.detached."
|
|
55
61
|
),
|
|
56
|
-
(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(currentView
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
63
|
+
else if (2048 < chunk.byteLength)
|
|
64
|
+
0 < writtenBytes &&
|
|
65
|
+
(destination.enqueue(
|
|
66
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
|
67
|
+
),
|
|
68
|
+
(currentView = new Uint8Array(2048)),
|
|
69
|
+
(writtenBytes = 0)),
|
|
70
|
+
destination.enqueue(chunk);
|
|
71
|
+
else {
|
|
72
|
+
var allowableBytes = currentView.length - writtenBytes;
|
|
73
|
+
allowableBytes < chunk.byteLength &&
|
|
74
|
+
(0 === allowableBytes
|
|
75
|
+
? destination.enqueue(currentView)
|
|
76
|
+
: (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
|
|
77
|
+
destination.enqueue(currentView),
|
|
78
|
+
(chunk = chunk.subarray(allowableBytes))),
|
|
79
|
+
(currentView = new Uint8Array(2048)),
|
|
80
|
+
(writtenBytes = 0));
|
|
81
|
+
currentView.set(chunk, writtenBytes);
|
|
82
|
+
writtenBytes += chunk.byteLength;
|
|
83
|
+
}
|
|
75
84
|
return !0;
|
|
76
85
|
}
|
|
77
86
|
function completeWriting(destination) {
|
|
@@ -514,7 +523,6 @@
|
|
|
514
523
|
temporaryReferences.set(reference, id);
|
|
515
524
|
return reference;
|
|
516
525
|
}
|
|
517
|
-
function noop() {}
|
|
518
526
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
519
527
|
index = thenableState[index];
|
|
520
528
|
void 0 === index
|
|
@@ -1407,7 +1415,7 @@
|
|
|
1407
1415
|
erroredTask(request, streamTask, reason),
|
|
1408
1416
|
enqueueFlush(request),
|
|
1409
1417
|
"function" === typeof iterator.throw &&
|
|
1410
|
-
iterator.throw(reason).then(
|
|
1418
|
+
iterator.throw(reason).then(noop, noop));
|
|
1411
1419
|
}
|
|
1412
1420
|
function abortIterable() {
|
|
1413
1421
|
if (0 === streamTask.status) {
|
|
@@ -1421,7 +1429,7 @@
|
|
|
1421
1429
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1422
1430
|
enqueueFlush(request));
|
|
1423
1431
|
"function" === typeof iterator.throw &&
|
|
1424
|
-
iterator.throw(reason).then(
|
|
1432
|
+
iterator.throw(reason).then(noop, noop);
|
|
1425
1433
|
}
|
|
1426
1434
|
}
|
|
1427
1435
|
var isIterator = iterable === iterator,
|
|
@@ -2875,14 +2883,35 @@
|
|
|
2875
2883
|
}
|
|
2876
2884
|
function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
|
|
2877
2885
|
debug ? request.pendingDebugChunks++ : request.pendingChunks++;
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
+
a: {
|
|
2887
|
+
var view = new Uint8Array(
|
|
2888
|
+
typedArray.buffer,
|
|
2889
|
+
typedArray.byteOffset,
|
|
2890
|
+
typedArray.byteLength
|
|
2891
|
+
);
|
|
2892
|
+
if (2048 < typedArray.byteLength) {
|
|
2893
|
+
if (
|
|
2894
|
+
0 !== typedArray.byteOffset ||
|
|
2895
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
2896
|
+
typedArray.buffer.resizable
|
|
2897
|
+
) {
|
|
2898
|
+
typedArray = view.slice();
|
|
2899
|
+
break a;
|
|
2900
|
+
}
|
|
2901
|
+
if (!supportsArrayBufferDetached) {
|
|
2902
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
2903
|
+
(console.error(
|
|
2904
|
+
"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 Edge runtime."
|
|
2905
|
+
),
|
|
2906
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
2907
|
+
typedArray = view.slice();
|
|
2908
|
+
break a;
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
typedArray = view;
|
|
2912
|
+
}
|
|
2913
|
+
view = typedArray.byteLength;
|
|
2914
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
2886
2915
|
id = stringToChunk(id);
|
|
2887
2916
|
debug
|
|
2888
2917
|
? request.completedDebugChunks.push(id, typedArray)
|
|
@@ -3947,13 +3976,38 @@
|
|
|
3947
3976
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
3948
3977
|
return moduleExports[metadata[2]];
|
|
3949
3978
|
}
|
|
3950
|
-
function appendBackingEntry(backingStore,
|
|
3951
|
-
backingStore.
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3979
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
3980
|
+
var prefix = backingStore.prefix;
|
|
3981
|
+
if (key.startsWith(prefix)) {
|
|
3982
|
+
switch (key[prefix.length]) {
|
|
3983
|
+
case "_":
|
|
3984
|
+
prefix = backingStore.referencedEntries;
|
|
3985
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
3986
|
+
prefix.push([key, value]);
|
|
3987
|
+
return;
|
|
3988
|
+
case "S":
|
|
3989
|
+
"string" === typeof value &&
|
|
3990
|
+
((prefix = backingStore.streamChunks),
|
|
3991
|
+
null === prefix &&
|
|
3992
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
3993
|
+
(backingStore = prefix.get(key)),
|
|
3994
|
+
void 0 === backingStore
|
|
3995
|
+
? prefix.set(key, [value])
|
|
3996
|
+
: backingStore.push(value));
|
|
3997
|
+
return;
|
|
3998
|
+
}
|
|
3999
|
+
"string" === typeof value
|
|
4000
|
+
? ((prefix = backingStore.stringChunks),
|
|
4001
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
4002
|
+
prefix.set(key, value))
|
|
4003
|
+
: ((prefix = backingStore.blobs),
|
|
4004
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
4005
|
+
prefix.set(key, value));
|
|
4006
|
+
}
|
|
4007
|
+
}
|
|
4008
|
+
function getBackingBlob(backingStore, key) {
|
|
4009
|
+
backingStore = backingStore.blobs;
|
|
4010
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
3957
4011
|
}
|
|
3958
4012
|
function ReactPromise(status, value, reason) {
|
|
3959
4013
|
this.status = status;
|
|
@@ -4266,9 +4320,11 @@
|
|
|
4266
4320
|
function getChunk(response, id) {
|
|
4267
4321
|
var chunks = response._chunks,
|
|
4268
4322
|
chunk = chunks.get(id);
|
|
4269
|
-
chunk
|
|
4270
|
-
|
|
4271
|
-
|
|
4323
|
+
if (!chunk) {
|
|
4324
|
+
chunk = response._prefix;
|
|
4325
|
+
var stringChunks = response._formData.stringChunks;
|
|
4326
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
4327
|
+
chunk =
|
|
4272
4328
|
"string" === typeof chunk
|
|
4273
4329
|
? new ReactPromise(
|
|
4274
4330
|
"resolved_model",
|
|
@@ -4277,8 +4333,9 @@
|
|
|
4277
4333
|
)
|
|
4278
4334
|
: response._closed
|
|
4279
4335
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
4280
|
-
: new ReactPromise("pending", null, null)
|
|
4281
|
-
chunks.set(id, chunk)
|
|
4336
|
+
: new ReactPromise("pending", null, null);
|
|
4337
|
+
chunks.set(id, chunk);
|
|
4338
|
+
}
|
|
4282
4339
|
return chunk;
|
|
4283
4340
|
}
|
|
4284
4341
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -4525,7 +4582,7 @@
|
|
|
4525
4582
|
Error("Already initialized typed array.")
|
|
4526
4583
|
)
|
|
4527
4584
|
);
|
|
4528
|
-
reference = response._formData
|
|
4585
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
4529
4586
|
if (initializingHandler) {
|
|
4530
4587
|
var handler = initializingHandler;
|
|
4531
4588
|
handler.deps++;
|
|
@@ -4569,15 +4626,17 @@
|
|
|
4569
4626
|
var chunks = response._chunks;
|
|
4570
4627
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
4571
4628
|
chunks.set(id, stream);
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4629
|
+
chunks = response._prefix;
|
|
4630
|
+
response = response._formData.streamChunks;
|
|
4631
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
4632
|
+
if (void 0 !== id)
|
|
4633
|
+
for (response = 0; response < id.length; response++)
|
|
4634
|
+
(chunks = id[response]),
|
|
4635
|
+
"C" === chunks[0]
|
|
4577
4636
|
? controller.close(
|
|
4578
4637
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
4579
4638
|
)
|
|
4580
|
-
: controller.enqueueModel(chunks)
|
|
4639
|
+
: controller.enqueueModel(chunks);
|
|
4581
4640
|
}
|
|
4582
4641
|
function parseReadableStream(response, reference, type) {
|
|
4583
4642
|
function enqueue(value) {
|
|
@@ -4741,7 +4800,14 @@
|
|
|
4741
4800
|
});
|
|
4742
4801
|
return iterator;
|
|
4743
4802
|
}
|
|
4744
|
-
function parseModelString(
|
|
4803
|
+
function parseModelString(
|
|
4804
|
+
response,
|
|
4805
|
+
obj,
|
|
4806
|
+
key$jscomp$0,
|
|
4807
|
+
value,
|
|
4808
|
+
reference,
|
|
4809
|
+
arrayRoot
|
|
4810
|
+
) {
|
|
4745
4811
|
if ("$" === value[0]) {
|
|
4746
4812
|
switch (value[1]) {
|
|
4747
4813
|
case "$":
|
|
@@ -4761,7 +4827,7 @@
|
|
|
4761
4827
|
response,
|
|
4762
4828
|
arrayRoot,
|
|
4763
4829
|
obj,
|
|
4764
|
-
key,
|
|
4830
|
+
key$jscomp$0,
|
|
4765
4831
|
null,
|
|
4766
4832
|
loadServerReference$1
|
|
4767
4833
|
)
|
|
@@ -4781,41 +4847,44 @@
|
|
|
4781
4847
|
case "Q":
|
|
4782
4848
|
return (
|
|
4783
4849
|
(arrayRoot = value.slice(2)),
|
|
4784
|
-
getOutlinedModel(
|
|
4850
|
+
getOutlinedModel(
|
|
4851
|
+
response,
|
|
4852
|
+
arrayRoot,
|
|
4853
|
+
obj,
|
|
4854
|
+
key$jscomp$0,
|
|
4855
|
+
null,
|
|
4856
|
+
createMap
|
|
4857
|
+
)
|
|
4785
4858
|
);
|
|
4786
4859
|
case "W":
|
|
4787
4860
|
return (
|
|
4788
4861
|
(arrayRoot = value.slice(2)),
|
|
4789
|
-
getOutlinedModel(
|
|
4862
|
+
getOutlinedModel(
|
|
4863
|
+
response,
|
|
4864
|
+
arrayRoot,
|
|
4865
|
+
obj,
|
|
4866
|
+
key$jscomp$0,
|
|
4867
|
+
null,
|
|
4868
|
+
createSet
|
|
4869
|
+
)
|
|
4790
4870
|
);
|
|
4791
4871
|
case "K":
|
|
4792
|
-
key = value.slice(2);
|
|
4793
|
-
obj = response.
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
(
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
for (
|
|
4807
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
4808
|
-
i < reference.length;
|
|
4809
|
-
i++
|
|
4810
|
-
)
|
|
4811
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
4812
|
-
reference = response;
|
|
4813
|
-
reference.data.delete(value);
|
|
4814
|
-
reference.keyPointer++;
|
|
4815
|
-
} else if (value.startsWith(obj)) break;
|
|
4816
|
-
else response.keyPointer++;
|
|
4872
|
+
key$jscomp$0 = value.slice(2);
|
|
4873
|
+
obj = response._formData;
|
|
4874
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
4875
|
+
key$jscomp$0 = new FormData();
|
|
4876
|
+
arrayRoot = obj.referencedEntries;
|
|
4877
|
+
if (null !== arrayRoot) {
|
|
4878
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
4879
|
+
reference = arrayRoot[value];
|
|
4880
|
+
var key = reference[0];
|
|
4881
|
+
if (!key.startsWith(response)) break;
|
|
4882
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
4883
|
+
value++;
|
|
4884
|
+
}
|
|
4885
|
+
obj.keyPointer = value;
|
|
4817
4886
|
}
|
|
4818
|
-
return
|
|
4887
|
+
return key$jscomp$0;
|
|
4819
4888
|
case "i":
|
|
4820
4889
|
return (
|
|
4821
4890
|
(arrayRoot = value.slice(2)),
|
|
@@ -4823,7 +4892,7 @@
|
|
|
4823
4892
|
response,
|
|
4824
4893
|
arrayRoot,
|
|
4825
4894
|
obj,
|
|
4826
|
-
key,
|
|
4895
|
+
key$jscomp$0,
|
|
4827
4896
|
null,
|
|
4828
4897
|
extractIterator
|
|
4829
4898
|
)
|
|
@@ -4858,7 +4927,7 @@
|
|
|
4858
4927
|
ArrayBuffer,
|
|
4859
4928
|
1,
|
|
4860
4929
|
obj,
|
|
4861
|
-
key,
|
|
4930
|
+
key$jscomp$0,
|
|
4862
4931
|
arrayRoot
|
|
4863
4932
|
);
|
|
4864
4933
|
case "O":
|
|
@@ -4868,7 +4937,7 @@
|
|
|
4868
4937
|
Int8Array,
|
|
4869
4938
|
1,
|
|
4870
4939
|
obj,
|
|
4871
|
-
key,
|
|
4940
|
+
key$jscomp$0,
|
|
4872
4941
|
arrayRoot
|
|
4873
4942
|
);
|
|
4874
4943
|
case "o":
|
|
@@ -4878,7 +4947,7 @@
|
|
|
4878
4947
|
Uint8Array,
|
|
4879
4948
|
1,
|
|
4880
4949
|
obj,
|
|
4881
|
-
key,
|
|
4950
|
+
key$jscomp$0,
|
|
4882
4951
|
arrayRoot
|
|
4883
4952
|
);
|
|
4884
4953
|
case "U":
|
|
@@ -4888,7 +4957,7 @@
|
|
|
4888
4957
|
Uint8ClampedArray,
|
|
4889
4958
|
1,
|
|
4890
4959
|
obj,
|
|
4891
|
-
key,
|
|
4960
|
+
key$jscomp$0,
|
|
4892
4961
|
arrayRoot
|
|
4893
4962
|
);
|
|
4894
4963
|
case "S":
|
|
@@ -4898,7 +4967,7 @@
|
|
|
4898
4967
|
Int16Array,
|
|
4899
4968
|
2,
|
|
4900
4969
|
obj,
|
|
4901
|
-
key,
|
|
4970
|
+
key$jscomp$0,
|
|
4902
4971
|
arrayRoot
|
|
4903
4972
|
);
|
|
4904
4973
|
case "s":
|
|
@@ -4908,7 +4977,7 @@
|
|
|
4908
4977
|
Uint16Array,
|
|
4909
4978
|
2,
|
|
4910
4979
|
obj,
|
|
4911
|
-
key,
|
|
4980
|
+
key$jscomp$0,
|
|
4912
4981
|
arrayRoot
|
|
4913
4982
|
);
|
|
4914
4983
|
case "L":
|
|
@@ -4918,7 +4987,7 @@
|
|
|
4918
4987
|
Int32Array,
|
|
4919
4988
|
4,
|
|
4920
4989
|
obj,
|
|
4921
|
-
key,
|
|
4990
|
+
key$jscomp$0,
|
|
4922
4991
|
arrayRoot
|
|
4923
4992
|
);
|
|
4924
4993
|
case "l":
|
|
@@ -4928,7 +4997,7 @@
|
|
|
4928
4997
|
Uint32Array,
|
|
4929
4998
|
4,
|
|
4930
4999
|
obj,
|
|
4931
|
-
key,
|
|
5000
|
+
key$jscomp$0,
|
|
4932
5001
|
arrayRoot
|
|
4933
5002
|
);
|
|
4934
5003
|
case "G":
|
|
@@ -4938,7 +5007,7 @@
|
|
|
4938
5007
|
Float32Array,
|
|
4939
5008
|
4,
|
|
4940
5009
|
obj,
|
|
4941
|
-
key,
|
|
5010
|
+
key$jscomp$0,
|
|
4942
5011
|
arrayRoot
|
|
4943
5012
|
);
|
|
4944
5013
|
case "g":
|
|
@@ -4948,7 +5017,7 @@
|
|
|
4948
5017
|
Float64Array,
|
|
4949
5018
|
8,
|
|
4950
5019
|
obj,
|
|
4951
|
-
key,
|
|
5020
|
+
key$jscomp$0,
|
|
4952
5021
|
arrayRoot
|
|
4953
5022
|
);
|
|
4954
5023
|
case "M":
|
|
@@ -4958,7 +5027,7 @@
|
|
|
4958
5027
|
BigInt64Array,
|
|
4959
5028
|
8,
|
|
4960
5029
|
obj,
|
|
4961
|
-
key,
|
|
5030
|
+
key$jscomp$0,
|
|
4962
5031
|
arrayRoot
|
|
4963
5032
|
);
|
|
4964
5033
|
case "m":
|
|
@@ -4968,7 +5037,7 @@
|
|
|
4968
5037
|
BigUint64Array,
|
|
4969
5038
|
8,
|
|
4970
5039
|
obj,
|
|
4971
|
-
key,
|
|
5040
|
+
key$jscomp$0,
|
|
4972
5041
|
arrayRoot
|
|
4973
5042
|
);
|
|
4974
5043
|
case "V":
|
|
@@ -4978,13 +5047,13 @@
|
|
|
4978
5047
|
DataView,
|
|
4979
5048
|
1,
|
|
4980
5049
|
obj,
|
|
4981
|
-
key,
|
|
5050
|
+
key$jscomp$0,
|
|
4982
5051
|
arrayRoot
|
|
4983
5052
|
);
|
|
4984
5053
|
case "B":
|
|
4985
5054
|
return (
|
|
4986
5055
|
(obj = parseInt(value.slice(2), 16)),
|
|
4987
|
-
response._formData
|
|
5056
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
4988
5057
|
);
|
|
4989
5058
|
case "R":
|
|
4990
5059
|
return parseReadableStream(response, value, void 0);
|
|
@@ -5000,7 +5069,7 @@
|
|
|
5000
5069
|
response,
|
|
5001
5070
|
value,
|
|
5002
5071
|
obj,
|
|
5003
|
-
key,
|
|
5072
|
+
key$jscomp$0,
|
|
5004
5073
|
arrayRoot,
|
|
5005
5074
|
createModel
|
|
5006
5075
|
);
|
|
@@ -5019,11 +5088,20 @@
|
|
|
5019
5088
|
: new FormData(),
|
|
5020
5089
|
arraySizeLimit =
|
|
5021
5090
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
5022
|
-
chunks = new Map()
|
|
5091
|
+
chunks = new Map(),
|
|
5092
|
+
backingStore = {
|
|
5093
|
+
prefix: formFieldPrefix,
|
|
5094
|
+
referencedEntries: null,
|
|
5095
|
+
keyPointer: 0,
|
|
5096
|
+
stringChunks: null,
|
|
5097
|
+
streamChunks: null,
|
|
5098
|
+
blobs: null
|
|
5099
|
+
};
|
|
5100
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
5023
5101
|
return {
|
|
5024
5102
|
_bundlerConfig: bundlerConfig,
|
|
5025
5103
|
_prefix: formFieldPrefix,
|
|
5026
|
-
_formData:
|
|
5104
|
+
_formData: backingStore,
|
|
5027
5105
|
_chunks: chunks,
|
|
5028
5106
|
_closed: !1,
|
|
5029
5107
|
_closedReason: null,
|
|
@@ -5183,6 +5261,12 @@
|
|
|
5183
5261
|
Symbol.for("react.postpone");
|
|
5184
5262
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
5185
5263
|
ASYNC_ITERATOR = Symbol.asyncIterator,
|
|
5264
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5265
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
5266
|
+
ArrayBuffer.prototype,
|
|
5267
|
+
"detached"
|
|
5268
|
+
),
|
|
5269
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
5186
5270
|
LocalPromise = Promise,
|
|
5187
5271
|
scheduleMicrotask =
|
|
5188
5272
|
"function" === typeof queueMicrotask
|
|
@@ -5566,7 +5650,6 @@
|
|
|
5566
5650
|
jsxPropsParents = new WeakMap(),
|
|
5567
5651
|
jsxChildrenParents = new WeakMap(),
|
|
5568
5652
|
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
|
5569
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5570
5653
|
doNotLimit = new WeakSet();
|
|
5571
5654
|
"object" === typeof console &&
|
|
5572
5655
|
null !== console &&
|
|
@@ -5666,44 +5749,44 @@
|
|
|
5666
5749
|
};
|
|
5667
5750
|
exports.decodeAction = function (body, serverManifest) {
|
|
5668
5751
|
var formData = new FormData(),
|
|
5669
|
-
|
|
5670
|
-
seenActions = new Set();
|
|
5752
|
+
maybeActionKey = null;
|
|
5671
5753
|
body.forEach(function (value, key) {
|
|
5672
5754
|
key.startsWith("$ACTION_")
|
|
5673
5755
|
? key.startsWith("$ACTION_REF_")
|
|
5674
|
-
?
|
|
5675
|
-
|
|
5676
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
5677
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
5678
|
-
(action = loadServerReference(serverManifest, value)))
|
|
5679
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
5680
|
-
!seenActions.has(key) &&
|
|
5681
|
-
(seenActions.add(key),
|
|
5682
|
-
(value = key.slice(11)),
|
|
5683
|
-
(action = loadServerReference(serverManifest, {
|
|
5684
|
-
id: value,
|
|
5685
|
-
bound: null
|
|
5686
|
-
})))
|
|
5756
|
+
? (maybeActionKey = key)
|
|
5757
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
5687
5758
|
: formData.append(key, value);
|
|
5688
5759
|
});
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5760
|
+
if (null === maybeActionKey) return null;
|
|
5761
|
+
var actionKey = maybeActionKey,
|
|
5762
|
+
action = null;
|
|
5763
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
5764
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
5765
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
5766
|
+
(action = loadServerReference(serverManifest, body));
|
|
5767
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
5768
|
+
(body = actionKey.slice(11)),
|
|
5769
|
+
(action = loadServerReference(serverManifest, {
|
|
5770
|
+
id: body,
|
|
5771
|
+
bound: null
|
|
5772
|
+
}));
|
|
5773
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
5774
|
+
return action.then(function (fn) {
|
|
5775
|
+
return fn.bind(null, formData);
|
|
5776
|
+
});
|
|
5694
5777
|
};
|
|
5695
5778
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
5696
5779
|
var keyPath = body.get("$ACTION_KEY");
|
|
5697
5780
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
5698
|
-
var
|
|
5781
|
+
var actionKey = null;
|
|
5699
5782
|
body.forEach(function (value, key) {
|
|
5700
|
-
key.startsWith("$ACTION_REF_") &&
|
|
5701
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
5702
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
5783
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
5703
5784
|
});
|
|
5704
|
-
if (null ===
|
|
5705
|
-
var
|
|
5706
|
-
|
|
5785
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
5786
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
5787
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
5788
|
+
var referenceId = body.id;
|
|
5789
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
5707
5790
|
return null === bound
|
|
5708
5791
|
? null
|
|
5709
5792
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -5734,27 +5817,47 @@
|
|
|
5734
5817
|
function progress(entry) {
|
|
5735
5818
|
if (entry.done) close(response$jscomp$0);
|
|
5736
5819
|
else {
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
if ("string" === typeof
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5820
|
+
var _entry$value = entry.value;
|
|
5821
|
+
entry = _entry$value[0];
|
|
5822
|
+
_entry$value = _entry$value[1];
|
|
5823
|
+
if ("string" === typeof _entry$value)
|
|
5824
|
+
a: {
|
|
5825
|
+
var response = response$jscomp$0,
|
|
5826
|
+
prefix = response._prefix;
|
|
5827
|
+
if (entry.startsWith(prefix)) {
|
|
5828
|
+
var chunks = response._chunks;
|
|
5829
|
+
if ("S" === entry[prefix.length]) {
|
|
5830
|
+
if (
|
|
5831
|
+
entry.length > prefix.length + 1 &&
|
|
5832
|
+
((prefix = +entry.slice(prefix.length + 1)),
|
|
5833
|
+
(chunks = chunks.get(prefix)))
|
|
5834
|
+
) {
|
|
5835
|
+
resolveModelChunk(response, chunks, _entry$value, prefix);
|
|
5836
|
+
break a;
|
|
5837
|
+
}
|
|
5838
|
+
} else if (
|
|
5839
|
+
((prefix = +entry.slice(prefix.length)),
|
|
5840
|
+
(chunks = chunks.get(prefix)))
|
|
5841
|
+
) {
|
|
5842
|
+
resolveModelChunk(response, chunks, _entry$value, prefix);
|
|
5843
|
+
break a;
|
|
5844
|
+
}
|
|
5845
|
+
}
|
|
5846
|
+
appendBackingEntry(response._formData, _entry$value, entry);
|
|
5749
5847
|
}
|
|
5750
|
-
|
|
5848
|
+
else
|
|
5849
|
+
appendBackingEntry(
|
|
5850
|
+
response$jscomp$0._formData,
|
|
5851
|
+
_entry$value,
|
|
5852
|
+
entry
|
|
5853
|
+
);
|
|
5751
5854
|
iterator.next().then(progress, error);
|
|
5752
5855
|
}
|
|
5753
5856
|
}
|
|
5754
5857
|
function error(reason) {
|
|
5755
5858
|
reportGlobalError(response$jscomp$0, reason);
|
|
5756
5859
|
"function" === typeof iterator.throw &&
|
|
5757
|
-
iterator.throw(reason).then(
|
|
5860
|
+
iterator.throw(reason).then(noop, noop);
|
|
5758
5861
|
}
|
|
5759
5862
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
5760
5863
|
response$jscomp$0 = createResponse(
|