react-dom 19.1.0-canary-cbbe8666-20250213 → 19.1.0-canary-e670e72f-20250214
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-dom-client.development.js +433 -342
- package/cjs/react-dom-client.production.js +37 -35
- package/cjs/react-dom-profiling.development.js +433 -342
- package/cjs/react-dom-profiling.profiling.js +39 -37
- package/cjs/react-dom-server-legacy.browser.development.js +589 -432
- package/cjs/react-dom-server-legacy.browser.production.js +1 -1
- package/cjs/react-dom-server-legacy.node.development.js +589 -432
- package/cjs/react-dom-server-legacy.node.production.js +1 -1
- package/cjs/react-dom-server.browser.development.js +588 -431
- package/cjs/react-dom-server.browser.production.js +3 -3
- package/cjs/react-dom-server.bun.development.js +569 -428
- package/cjs/react-dom-server.bun.production.js +3 -3
- package/cjs/react-dom-server.edge.development.js +588 -431
- package/cjs/react-dom-server.edge.production.js +3 -3
- package/cjs/react-dom-server.node.development.js +588 -431
- package/cjs/react-dom-server.node.production.js +3 -3
- package/cjs/react-dom.development.js +1 -1
- package/cjs/react-dom.production.js +1 -1
- package/cjs/react-dom.react-server.development.js +1 -1
- package/cjs/react-dom.react-server.production.js +1 -1
- package/package.json +3 -3
@@ -4324,6 +4324,27 @@
|
|
4324
4324
|
"function" === typeof fn && componentFrameCache.set(fn, sampleLines);
|
4325
4325
|
return sampleLines;
|
4326
4326
|
}
|
4327
|
+
function formatOwnerStack(error) {
|
4328
|
+
var prevPrepareStackTrace = Error.prepareStackTrace;
|
4329
|
+
Error.prepareStackTrace = prepareStackTrace;
|
4330
|
+
error = error.stack;
|
4331
|
+
Error.prepareStackTrace = prevPrepareStackTrace;
|
4332
|
+
error.startsWith("Error: react-stack-top-frame\n") &&
|
4333
|
+
(error = error.slice(29));
|
4334
|
+
prevPrepareStackTrace = error.indexOf("\n");
|
4335
|
+
-1 !== prevPrepareStackTrace &&
|
4336
|
+
(error = error.slice(prevPrepareStackTrace + 1));
|
4337
|
+
prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
|
4338
|
+
-1 !== prevPrepareStackTrace &&
|
4339
|
+
(prevPrepareStackTrace = error.lastIndexOf(
|
4340
|
+
"\n",
|
4341
|
+
prevPrepareStackTrace
|
4342
|
+
));
|
4343
|
+
if (-1 !== prevPrepareStackTrace)
|
4344
|
+
error = error.slice(0, prevPrepareStackTrace);
|
4345
|
+
else return "";
|
4346
|
+
return error;
|
4347
|
+
}
|
4327
4348
|
function describeComponentStackByType(type) {
|
4328
4349
|
if ("string" === typeof type) return describeBuiltInComponentFrame(type);
|
4329
4350
|
if ("function" === typeof type)
|
@@ -4363,18 +4384,6 @@
|
|
4363
4384
|
}
|
4364
4385
|
return "";
|
4365
4386
|
}
|
4366
|
-
function getStackByComponentStackNode(componentStack) {
|
4367
|
-
try {
|
4368
|
-
var info = "";
|
4369
|
-
do
|
4370
|
-
(info += describeComponentStackByType(componentStack.type)),
|
4371
|
-
(componentStack = componentStack.parent);
|
4372
|
-
while (componentStack);
|
4373
|
-
return info;
|
4374
|
-
} catch (x) {
|
4375
|
-
return "\nError generating stack: " + x.message + "\n" + x.stack;
|
4376
|
-
}
|
4377
|
-
}
|
4378
4387
|
function defaultErrorHandler(error) {
|
4379
4388
|
if (
|
4380
4389
|
"object" === typeof error &&
|
@@ -4498,7 +4507,9 @@
|
|
4498
4507
|
null,
|
4499
4508
|
emptyTreeContext,
|
4500
4509
|
null,
|
4501
|
-
!1
|
4510
|
+
!1,
|
4511
|
+
emptyContextObject,
|
4512
|
+
null
|
4502
4513
|
);
|
4503
4514
|
pushComponentStack(children);
|
4504
4515
|
resumableState.pingedTasks.push(children);
|
@@ -4599,7 +4610,9 @@
|
|
4599
4610
|
context,
|
4600
4611
|
treeContext,
|
4601
4612
|
componentStack,
|
4602
|
-
isFallback
|
4613
|
+
isFallback,
|
4614
|
+
legacyContext,
|
4615
|
+
debugTask
|
4603
4616
|
) {
|
4604
4617
|
request.allPendingTasks++;
|
4605
4618
|
null === blockedBoundary
|
@@ -4625,6 +4638,7 @@
|
|
4625
4638
|
thenableState: thenableState,
|
4626
4639
|
isFallback: isFallback
|
4627
4640
|
};
|
4641
|
+
task.debugTask = debugTask;
|
4628
4642
|
abortSet.add(task);
|
4629
4643
|
return task;
|
4630
4644
|
}
|
@@ -4642,7 +4656,9 @@
|
|
4642
4656
|
context,
|
4643
4657
|
treeContext,
|
4644
4658
|
componentStack,
|
4645
|
-
isFallback
|
4659
|
+
isFallback,
|
4660
|
+
legacyContext,
|
4661
|
+
debugTask
|
4646
4662
|
) {
|
4647
4663
|
request.allPendingTasks++;
|
4648
4664
|
null === blockedBoundary
|
@@ -4669,6 +4685,7 @@
|
|
4669
4685
|
thenableState: thenableState,
|
4670
4686
|
isFallback: isFallback
|
4671
4687
|
};
|
4688
|
+
task.debugTask = debugTask;
|
4672
4689
|
abortSet.add(task);
|
4673
4690
|
return task;
|
4674
4691
|
}
|
@@ -4695,22 +4712,63 @@
|
|
4695
4712
|
};
|
4696
4713
|
}
|
4697
4714
|
function getCurrentStackInDEV() {
|
4698
|
-
|
4699
|
-
|
4700
|
-
|
4701
|
-
|
4715
|
+
if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)
|
4716
|
+
return "";
|
4717
|
+
var componentStack = currentTaskInDEV.componentStack;
|
4718
|
+
try {
|
4719
|
+
var info = "";
|
4720
|
+
if ("string" === typeof componentStack.type)
|
4721
|
+
info += describeBuiltInComponentFrame(componentStack.type);
|
4722
|
+
else if ("function" === typeof componentStack.type) {
|
4723
|
+
if (!componentStack.owner) {
|
4724
|
+
var JSCompiler_temp_const = info,
|
4725
|
+
fn = componentStack.type,
|
4726
|
+
name = fn ? fn.displayName || fn.name : "";
|
4727
|
+
var JSCompiler_inline_result = name
|
4728
|
+
? describeBuiltInComponentFrame(name)
|
4729
|
+
: "";
|
4730
|
+
info = JSCompiler_temp_const + JSCompiler_inline_result;
|
4731
|
+
}
|
4732
|
+
} else
|
4733
|
+
componentStack.owner ||
|
4734
|
+
(info += describeComponentStackByType(componentStack.type));
|
4735
|
+
for (; componentStack; )
|
4736
|
+
(JSCompiler_temp_const = null),
|
4737
|
+
null != componentStack.debugStack
|
4738
|
+
? (JSCompiler_temp_const = formatOwnerStack(
|
4739
|
+
componentStack.debugStack
|
4740
|
+
))
|
4741
|
+
: ((JSCompiler_inline_result = componentStack),
|
4742
|
+
null != JSCompiler_inline_result.stack &&
|
4743
|
+
(JSCompiler_temp_const =
|
4744
|
+
"string" !== typeof JSCompiler_inline_result.stack
|
4745
|
+
? (JSCompiler_inline_result.stack = formatOwnerStack(
|
4746
|
+
JSCompiler_inline_result.stack
|
4747
|
+
))
|
4748
|
+
: JSCompiler_inline_result.stack)),
|
4749
|
+
(componentStack = componentStack.owner) &&
|
4750
|
+
JSCompiler_temp_const &&
|
4751
|
+
(info += "\n" + JSCompiler_temp_const);
|
4752
|
+
var JSCompiler_inline_result$jscomp$0 = info;
|
4753
|
+
} catch (x) {
|
4754
|
+
JSCompiler_inline_result$jscomp$0 =
|
4755
|
+
"\nError generating stack: " + x.message + "\n" + x.stack;
|
4756
|
+
}
|
4757
|
+
return JSCompiler_inline_result$jscomp$0;
|
4702
4758
|
}
|
4703
4759
|
function pushServerComponentStack(task, debugInfo) {
|
4704
4760
|
if (null != debugInfo)
|
4705
4761
|
for (var i = 0; i < debugInfo.length; i++) {
|
4706
4762
|
var componentInfo = debugInfo[i];
|
4707
4763
|
"string" === typeof componentInfo.name &&
|
4708
|
-
|
4764
|
+
void 0 !== componentInfo.debugStack &&
|
4765
|
+
((task.componentStack = {
|
4709
4766
|
parent: task.componentStack,
|
4710
4767
|
type: componentInfo,
|
4711
4768
|
owner: componentInfo.owner,
|
4712
|
-
stack:
|
4713
|
-
})
|
4769
|
+
stack: componentInfo.debugStack
|
4770
|
+
}),
|
4771
|
+
(task.debugTask = componentInfo.debugTask));
|
4714
4772
|
}
|
4715
4773
|
}
|
4716
4774
|
function pushComponentStack(task) {
|
@@ -4719,13 +4777,15 @@
|
|
4719
4777
|
switch (node.$$typeof) {
|
4720
4778
|
case REACT_ELEMENT_TYPE:
|
4721
4779
|
var type = node.type,
|
4722
|
-
owner = node._owner
|
4780
|
+
owner = node._owner,
|
4781
|
+
stack = node._debugStack;
|
4723
4782
|
pushServerComponentStack(task, node._debugInfo);
|
4783
|
+
task.debugTask = node._debugTask;
|
4724
4784
|
task.componentStack = {
|
4725
4785
|
parent: task.componentStack,
|
4726
4786
|
type: type,
|
4727
4787
|
owner: owner,
|
4728
|
-
stack:
|
4788
|
+
stack: stack
|
4729
4789
|
};
|
4730
4790
|
break;
|
4731
4791
|
case REACT_LAZY_TYPE:
|
@@ -4736,14 +4796,24 @@
|
|
4736
4796
|
pushServerComponentStack(task, node._debugInfo);
|
4737
4797
|
}
|
4738
4798
|
}
|
4739
|
-
function getThrownInfo(node) {
|
4799
|
+
function getThrownInfo(node$jscomp$0) {
|
4740
4800
|
var errorInfo = {};
|
4741
|
-
node &&
|
4801
|
+
node$jscomp$0 &&
|
4742
4802
|
Object.defineProperty(errorInfo, "componentStack", {
|
4743
4803
|
configurable: !0,
|
4744
4804
|
enumerable: !0,
|
4745
4805
|
get: function () {
|
4746
|
-
|
4806
|
+
try {
|
4807
|
+
var info = "",
|
4808
|
+
node = node$jscomp$0;
|
4809
|
+
do
|
4810
|
+
(info += describeComponentStackByType(node.type)),
|
4811
|
+
(node = node.parent);
|
4812
|
+
while (node);
|
4813
|
+
var stack = info;
|
4814
|
+
} catch (x) {
|
4815
|
+
stack = "\nError generating stack: " + x.message + "\n" + x.stack;
|
4816
|
+
}
|
4747
4817
|
Object.defineProperty(errorInfo, "componentStack", {
|
4748
4818
|
value: stack
|
4749
4819
|
});
|
@@ -4774,9 +4844,11 @@
|
|
4774
4844
|
boundary.errorStack = null !== error ? wasAborted + error : null;
|
4775
4845
|
boundary.errorComponentStack = thrownInfo.componentStack;
|
4776
4846
|
}
|
4777
|
-
function logRecoverableError(request, error, errorInfo) {
|
4847
|
+
function logRecoverableError(request, error, errorInfo, debugTask) {
|
4778
4848
|
request = request.onError;
|
4779
|
-
error =
|
4849
|
+
error = debugTask
|
4850
|
+
? debugTask.run(request.bind(null, error, errorInfo))
|
4851
|
+
: request(error, errorInfo);
|
4780
4852
|
if (null != error && "string" !== typeof error)
|
4781
4853
|
console.error(
|
4782
4854
|
'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',
|
@@ -4784,11 +4856,13 @@
|
|
4784
4856
|
);
|
4785
4857
|
else return error;
|
4786
4858
|
}
|
4787
|
-
function fatalError(request, error) {
|
4788
|
-
|
4789
|
-
|
4790
|
-
|
4791
|
-
|
4859
|
+
function fatalError(request, error, errorInfo, debugTask) {
|
4860
|
+
errorInfo = request.onShellError;
|
4861
|
+
var onFatalError = request.onFatalError;
|
4862
|
+
debugTask
|
4863
|
+
? (debugTask.run(errorInfo.bind(null, error)),
|
4864
|
+
debugTask.run(onFatalError.bind(null, error)))
|
4865
|
+
: (errorInfo(error), onFatalError(error));
|
4792
4866
|
null !== request.destination
|
4793
4867
|
? ((request.status = CLOSED),
|
4794
4868
|
closeWithError(request.destination, error))
|
@@ -5369,7 +5443,9 @@
|
|
5369
5443
|
task.context,
|
5370
5444
|
task.treeContext,
|
5371
5445
|
task.componentStack,
|
5372
|
-
task.isFallback
|
5446
|
+
task.isFallback,
|
5447
|
+
emptyContextObject,
|
5448
|
+
task.debugTask
|
5373
5449
|
);
|
5374
5450
|
pushComponentStack(preambleTask);
|
5375
5451
|
request.pingedTasks.push(preambleTask);
|
@@ -5554,7 +5630,9 @@
|
|
5554
5630
|
task.context,
|
5555
5631
|
task.treeContext,
|
5556
5632
|
task.componentStack,
|
5557
|
-
task.isFallback
|
5633
|
+
task.isFallback,
|
5634
|
+
emptyContextObject,
|
5635
|
+
task.debugTask
|
5558
5636
|
);
|
5559
5637
|
pushComponentStack(suspendedPrimaryTask);
|
5560
5638
|
request.pingedTasks.push(suspendedPrimaryTask);
|
@@ -5593,7 +5671,8 @@
|
|
5593
5671
|
var errorDigest = logRecoverableError(
|
5594
5672
|
request,
|
5595
5673
|
error,
|
5596
|
-
thrownInfo
|
5674
|
+
thrownInfo,
|
5675
|
+
task.debugTask
|
5597
5676
|
);
|
5598
5677
|
encodeErrorForBoundary(
|
5599
5678
|
newBoundary,
|
@@ -5625,7 +5704,9 @@
|
|
5625
5704
|
task.context,
|
5626
5705
|
task.treeContext,
|
5627
5706
|
task.componentStack,
|
5628
|
-
!0
|
5707
|
+
!0,
|
5708
|
+
emptyContextObject,
|
5709
|
+
task.debugTask
|
5629
5710
|
);
|
5630
5711
|
pushComponentStack(suspendedFallbackTask);
|
5631
5712
|
request.pingedTasks.push(suspendedFallbackTask);
|
@@ -5777,15 +5858,183 @@
|
|
5777
5858
|
(task.replay = prevReplay), (task.blockedSegment = null);
|
5778
5859
|
}
|
5779
5860
|
}
|
5861
|
+
function replayElement(
|
5862
|
+
request,
|
5863
|
+
task,
|
5864
|
+
keyPath,
|
5865
|
+
name,
|
5866
|
+
keyOrIndex,
|
5867
|
+
childIndex,
|
5868
|
+
type,
|
5869
|
+
props,
|
5870
|
+
ref,
|
5871
|
+
replay
|
5872
|
+
) {
|
5873
|
+
childIndex = replay.nodes;
|
5874
|
+
for (var i = 0; i < childIndex.length; i++) {
|
5875
|
+
var node = childIndex[i];
|
5876
|
+
if (keyOrIndex === node[1]) {
|
5877
|
+
if (4 === node.length) {
|
5878
|
+
if (null !== name && name !== node[0])
|
5879
|
+
throw Error(
|
5880
|
+
"Expected the resume to render <" +
|
5881
|
+
node[0] +
|
5882
|
+
"> in this slot but instead it rendered <" +
|
5883
|
+
name +
|
5884
|
+
">. The tree doesn't match so React will fallback to client rendering."
|
5885
|
+
);
|
5886
|
+
var childNodes = node[2];
|
5887
|
+
node = node[3];
|
5888
|
+
name = task.node;
|
5889
|
+
task.replay = { nodes: childNodes, slots: node, pendingTasks: 1 };
|
5890
|
+
try {
|
5891
|
+
renderElement(request, task, keyPath, type, props, ref);
|
5892
|
+
if (
|
5893
|
+
1 === task.replay.pendingTasks &&
|
5894
|
+
0 < task.replay.nodes.length
|
5895
|
+
)
|
5896
|
+
throw Error(
|
5897
|
+
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
5898
|
+
);
|
5899
|
+
task.replay.pendingTasks--;
|
5900
|
+
} catch (x) {
|
5901
|
+
if (
|
5902
|
+
"object" === typeof x &&
|
5903
|
+
null !== x &&
|
5904
|
+
(x === SuspenseException || "function" === typeof x.then)
|
5905
|
+
)
|
5906
|
+
throw (task.node === name && (task.replay = replay), x);
|
5907
|
+
task.replay.pendingTasks--;
|
5908
|
+
type = getThrownInfo(task.componentStack);
|
5909
|
+
props = request;
|
5910
|
+
request = task.blockedBoundary;
|
5911
|
+
keyPath = x;
|
5912
|
+
ref = node;
|
5913
|
+
node = logRecoverableError(props, keyPath, type, task.debugTask);
|
5914
|
+
abortRemainingReplayNodes(
|
5915
|
+
props,
|
5916
|
+
request,
|
5917
|
+
childNodes,
|
5918
|
+
ref,
|
5919
|
+
keyPath,
|
5920
|
+
node,
|
5921
|
+
type,
|
5922
|
+
!1
|
5923
|
+
);
|
5924
|
+
}
|
5925
|
+
task.replay = replay;
|
5926
|
+
} else {
|
5927
|
+
if (type !== REACT_SUSPENSE_TYPE)
|
5928
|
+
throw Error(
|
5929
|
+
"Expected the resume to render <Suspense> in this slot but instead it rendered <" +
|
5930
|
+
(getComponentNameFromType(type) || "Unknown") +
|
5931
|
+
">. The tree doesn't match so React will fallback to client rendering."
|
5932
|
+
);
|
5933
|
+
a: {
|
5934
|
+
replay = void 0;
|
5935
|
+
type = node[5];
|
5936
|
+
ref = node[2];
|
5937
|
+
name = node[3];
|
5938
|
+
keyOrIndex = null === node[4] ? [] : node[4][2];
|
5939
|
+
node = null === node[4] ? null : node[4][3];
|
5940
|
+
var prevKeyPath = task.keyPath,
|
5941
|
+
previousReplaySet = task.replay,
|
5942
|
+
parentBoundary = task.blockedBoundary,
|
5943
|
+
parentHoistableState = task.hoistableState,
|
5944
|
+
content = props.children,
|
5945
|
+
fallback = props.fallback,
|
5946
|
+
fallbackAbortSet = new Set();
|
5947
|
+
props =
|
5948
|
+
task.formatContext.insertionMode < HTML_MODE
|
5949
|
+
? createSuspenseBoundary(
|
5950
|
+
request,
|
5951
|
+
fallbackAbortSet,
|
5952
|
+
createPreambleState(),
|
5953
|
+
createPreambleState()
|
5954
|
+
)
|
5955
|
+
: createSuspenseBoundary(
|
5956
|
+
request,
|
5957
|
+
fallbackAbortSet,
|
5958
|
+
null,
|
5959
|
+
null
|
5960
|
+
);
|
5961
|
+
props.parentFlushed = !0;
|
5962
|
+
props.rootSegmentID = type;
|
5963
|
+
task.blockedBoundary = props;
|
5964
|
+
task.hoistableState = props.contentState;
|
5965
|
+
task.keyPath = keyPath;
|
5966
|
+
task.replay = { nodes: ref, slots: name, pendingTasks: 1 };
|
5967
|
+
try {
|
5968
|
+
renderNode(request, task, content, -1);
|
5969
|
+
if (
|
5970
|
+
1 === task.replay.pendingTasks &&
|
5971
|
+
0 < task.replay.nodes.length
|
5972
|
+
)
|
5973
|
+
throw Error(
|
5974
|
+
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
5975
|
+
);
|
5976
|
+
task.replay.pendingTasks--;
|
5977
|
+
if (0 === props.pendingTasks && props.status === PENDING) {
|
5978
|
+
props.status = COMPLETED;
|
5979
|
+
request.completedBoundaries.push(props);
|
5980
|
+
break a;
|
5981
|
+
}
|
5982
|
+
} catch (error) {
|
5983
|
+
(props.status = CLIENT_RENDERED),
|
5984
|
+
(childNodes = getThrownInfo(task.componentStack)),
|
5985
|
+
(replay = logRecoverableError(
|
5986
|
+
request,
|
5987
|
+
error,
|
5988
|
+
childNodes,
|
5989
|
+
task.debugTask
|
5990
|
+
)),
|
5991
|
+
encodeErrorForBoundary(props, replay, error, childNodes, !1),
|
5992
|
+
task.replay.pendingTasks--,
|
5993
|
+
request.clientRenderedBoundaries.push(props);
|
5994
|
+
} finally {
|
5995
|
+
(task.blockedBoundary = parentBoundary),
|
5996
|
+
(task.hoistableState = parentHoistableState),
|
5997
|
+
(task.replay = previousReplaySet),
|
5998
|
+
(task.keyPath = prevKeyPath);
|
5999
|
+
}
|
6000
|
+
props = createReplayTask(
|
6001
|
+
request,
|
6002
|
+
null,
|
6003
|
+
{ nodes: keyOrIndex, slots: node, pendingTasks: 0 },
|
6004
|
+
fallback,
|
6005
|
+
-1,
|
6006
|
+
parentBoundary,
|
6007
|
+
props.fallbackState,
|
6008
|
+
fallbackAbortSet,
|
6009
|
+
[keyPath[0], "Suspense Fallback", keyPath[2]],
|
6010
|
+
task.formatContext,
|
6011
|
+
task.context,
|
6012
|
+
task.treeContext,
|
6013
|
+
task.componentStack,
|
6014
|
+
!0,
|
6015
|
+
emptyContextObject,
|
6016
|
+
task.debugTask
|
6017
|
+
);
|
6018
|
+
pushComponentStack(props);
|
6019
|
+
request.pingedTasks.push(props);
|
6020
|
+
}
|
6021
|
+
}
|
6022
|
+
childIndex.splice(i, 1);
|
6023
|
+
break;
|
6024
|
+
}
|
6025
|
+
}
|
6026
|
+
}
|
5780
6027
|
function renderNodeDestructive(request, task, node, childIndex) {
|
5781
6028
|
null !== task.replay && "number" === typeof task.replay.slots
|
5782
6029
|
? resumeNode(request, task, task.replay.slots, node, childIndex)
|
5783
6030
|
: ((task.node = node),
|
5784
6031
|
(task.childIndex = childIndex),
|
5785
6032
|
(node = task.componentStack),
|
6033
|
+
(childIndex = task.debugTask),
|
5786
6034
|
pushComponentStack(task),
|
5787
6035
|
retryNode(request, task),
|
5788
|
-
(task.componentStack = node)
|
6036
|
+
(task.componentStack = node),
|
6037
|
+
(task.debugTask = childIndex));
|
5789
6038
|
}
|
5790
6039
|
function retryNode(request, task) {
|
5791
6040
|
var node = task.node,
|
@@ -5795,178 +6044,56 @@
|
|
5795
6044
|
switch (node.$$typeof) {
|
5796
6045
|
case REACT_ELEMENT_TYPE:
|
5797
6046
|
var type = node.type,
|
5798
|
-
key = node.key
|
5799
|
-
|
5800
|
-
|
5801
|
-
|
5802
|
-
|
5803
|
-
|
5804
|
-
|
5805
|
-
|
5806
|
-
|
5807
|
-
|
5808
|
-
|
5809
|
-
|
5810
|
-
|
5811
|
-
|
5812
|
-
|
5813
|
-
|
5814
|
-
|
5815
|
-
|
5816
|
-
|
5817
|
-
|
5818
|
-
|
5819
|
-
|
5820
|
-
|
5821
|
-
|
5822
|
-
|
5823
|
-
|
5824
|
-
|
5825
|
-
|
5826
|
-
|
5827
|
-
|
5828
|
-
|
5829
|
-
|
5830
|
-
|
5831
|
-
|
5832
|
-
|
5833
|
-
|
5834
|
-
|
5835
|
-
|
5836
|
-
|
5837
|
-
|
5838
|
-
|
5839
|
-
|
5840
|
-
|
5841
|
-
|
5842
|
-
|
5843
|
-
|
5844
|
-
|
5845
|
-
|
5846
|
-
|
5847
|
-
|
5848
|
-
task.replay.pendingTasks--;
|
5849
|
-
props = getThrownInfo(task.componentStack);
|
5850
|
-
erroredReplay(
|
5851
|
-
request,
|
5852
|
-
task.blockedBoundary,
|
5853
|
-
x,
|
5854
|
-
props,
|
5855
|
-
childNodes,
|
5856
|
-
key
|
5857
|
-
);
|
5858
|
-
}
|
5859
|
-
task.replay = replay;
|
5860
|
-
} else {
|
5861
|
-
if (type !== REACT_SUSPENSE_TYPE)
|
5862
|
-
throw Error(
|
5863
|
-
"Expected the resume to render <Suspense> in this slot but instead it rendered <" +
|
5864
|
-
(getComponentNameFromType(type) || "Unknown") +
|
5865
|
-
">. The tree doesn't match so React will fallback to client rendering."
|
5866
|
-
);
|
5867
|
-
a: {
|
5868
|
-
type = void 0;
|
5869
|
-
ref = key[5];
|
5870
|
-
replay = key[2];
|
5871
|
-
name = key[3];
|
5872
|
-
keyOrIndex = null === key[4] ? [] : key[4][2];
|
5873
|
-
key = null === key[4] ? null : key[4][3];
|
5874
|
-
var prevKeyPath = task.keyPath,
|
5875
|
-
previousReplaySet = task.replay,
|
5876
|
-
parentBoundary = task.blockedBoundary,
|
5877
|
-
parentHoistableState = task.hoistableState,
|
5878
|
-
content = props.children,
|
5879
|
-
fallback = props.fallback,
|
5880
|
-
fallbackAbortSet = new Set();
|
5881
|
-
props =
|
5882
|
-
task.formatContext.insertionMode < HTML_MODE
|
5883
|
-
? createSuspenseBoundary(
|
5884
|
-
request,
|
5885
|
-
fallbackAbortSet,
|
5886
|
-
createPreambleState(),
|
5887
|
-
createPreambleState()
|
5888
|
-
)
|
5889
|
-
: createSuspenseBoundary(
|
5890
|
-
request,
|
5891
|
-
fallbackAbortSet,
|
5892
|
-
null,
|
5893
|
-
null
|
5894
|
-
);
|
5895
|
-
props.parentFlushed = !0;
|
5896
|
-
props.rootSegmentID = ref;
|
5897
|
-
task.blockedBoundary = props;
|
5898
|
-
task.hoistableState = props.contentState;
|
5899
|
-
task.keyPath = keyPath;
|
5900
|
-
task.replay = {
|
5901
|
-
nodes: replay,
|
5902
|
-
slots: name,
|
5903
|
-
pendingTasks: 1
|
5904
|
-
};
|
5905
|
-
try {
|
5906
|
-
renderNode(request, task, content, -1);
|
5907
|
-
if (
|
5908
|
-
1 === task.replay.pendingTasks &&
|
5909
|
-
0 < task.replay.nodes.length
|
5910
|
-
)
|
5911
|
-
throw Error(
|
5912
|
-
"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
|
5913
|
-
);
|
5914
|
-
task.replay.pendingTasks--;
|
5915
|
-
if (
|
5916
|
-
0 === props.pendingTasks &&
|
5917
|
-
props.status === PENDING
|
5918
|
-
) {
|
5919
|
-
props.status = COMPLETED;
|
5920
|
-
request.completedBoundaries.push(props);
|
5921
|
-
break a;
|
5922
|
-
}
|
5923
|
-
} catch (error) {
|
5924
|
-
(props.status = CLIENT_RENDERED),
|
5925
|
-
(childNodes = getThrownInfo(task.componentStack)),
|
5926
|
-
(type = logRecoverableError(
|
5927
|
-
request,
|
5928
|
-
error,
|
5929
|
-
childNodes
|
5930
|
-
)),
|
5931
|
-
encodeErrorForBoundary(
|
5932
|
-
props,
|
5933
|
-
type,
|
5934
|
-
error,
|
5935
|
-
childNodes,
|
5936
|
-
!1
|
5937
|
-
),
|
5938
|
-
task.replay.pendingTasks--,
|
5939
|
-
request.clientRenderedBoundaries.push(props);
|
5940
|
-
} finally {
|
5941
|
-
(task.blockedBoundary = parentBoundary),
|
5942
|
-
(task.hoistableState = parentHoistableState),
|
5943
|
-
(task.replay = previousReplaySet),
|
5944
|
-
(task.keyPath = prevKeyPath);
|
5945
|
-
}
|
5946
|
-
childNodes = createReplayTask(
|
5947
|
-
request,
|
5948
|
-
null,
|
5949
|
-
{ nodes: keyOrIndex, slots: key, pendingTasks: 0 },
|
5950
|
-
fallback,
|
5951
|
-
-1,
|
5952
|
-
parentBoundary,
|
5953
|
-
props.fallbackState,
|
5954
|
-
fallbackAbortSet,
|
5955
|
-
[keyPath[0], "Suspense Fallback", keyPath[2]],
|
5956
|
-
task.formatContext,
|
5957
|
-
task.context,
|
5958
|
-
task.treeContext,
|
5959
|
-
task.componentStack,
|
5960
|
-
!0
|
5961
|
-
);
|
5962
|
-
pushComponentStack(childNodes);
|
5963
|
-
request.pingedTasks.push(childNodes);
|
5964
|
-
}
|
5965
|
-
}
|
5966
|
-
childIndex.splice(node, 1);
|
5967
|
-
break;
|
5968
|
-
}
|
5969
|
-
} else renderElement(request, task, keyPath, type, props, ref);
|
6047
|
+
key = node.key;
|
6048
|
+
node = node.props;
|
6049
|
+
var refProp = node.ref;
|
6050
|
+
refProp = void 0 !== refProp ? refProp : null;
|
6051
|
+
var debugTask = task.debugTask,
|
6052
|
+
name = getComponentNameFromType(type);
|
6053
|
+
key = null == key ? (-1 === childIndex ? 0 : childIndex) : key;
|
6054
|
+
var keyPath = [task.keyPath, name, key];
|
6055
|
+
null !== task.replay
|
6056
|
+
? debugTask
|
6057
|
+
? debugTask.run(
|
6058
|
+
replayElement.bind(
|
6059
|
+
null,
|
6060
|
+
request,
|
6061
|
+
task,
|
6062
|
+
keyPath,
|
6063
|
+
name,
|
6064
|
+
key,
|
6065
|
+
childIndex,
|
6066
|
+
type,
|
6067
|
+
node,
|
6068
|
+
refProp,
|
6069
|
+
task.replay
|
6070
|
+
)
|
6071
|
+
)
|
6072
|
+
: replayElement(
|
6073
|
+
request,
|
6074
|
+
task,
|
6075
|
+
keyPath,
|
6076
|
+
name,
|
6077
|
+
key,
|
6078
|
+
childIndex,
|
6079
|
+
type,
|
6080
|
+
node,
|
6081
|
+
refProp,
|
6082
|
+
task.replay
|
6083
|
+
)
|
6084
|
+
: debugTask
|
6085
|
+
? debugTask.run(
|
6086
|
+
renderElement.bind(
|
6087
|
+
null,
|
6088
|
+
request,
|
6089
|
+
task,
|
6090
|
+
keyPath,
|
6091
|
+
type,
|
6092
|
+
node,
|
6093
|
+
refProp
|
6094
|
+
)
|
6095
|
+
)
|
6096
|
+
: renderElement(request, task, keyPath, type, node, refProp);
|
5970
6097
|
return;
|
5971
6098
|
case REACT_PORTAL_TYPE:
|
5972
6099
|
throw Error(
|
@@ -5983,21 +6110,20 @@
|
|
5983
6110
|
return;
|
5984
6111
|
}
|
5985
6112
|
null === node || "object" !== typeof node
|
5986
|
-
? (
|
5987
|
-
: ((
|
6113
|
+
? (key = null)
|
6114
|
+
: ((type =
|
5988
6115
|
(MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
|
5989
6116
|
node["@@iterator"]),
|
5990
|
-
(
|
5991
|
-
if (
|
5992
|
-
if (
|
6117
|
+
(key = "function" === typeof type ? type : null));
|
6118
|
+
if (key && (type = key.call(node))) {
|
6119
|
+
if (type === node) {
|
5993
6120
|
if (
|
5994
6121
|
-1 !== childIndex ||
|
5995
6122
|
null === task.componentStack ||
|
5996
6123
|
"function" !== typeof task.componentStack.type ||
|
5997
6124
|
"[object GeneratorFunction]" !==
|
5998
6125
|
Object.prototype.toString.call(task.componentStack.type) ||
|
5999
|
-
"[object Generator]" !==
|
6000
|
-
Object.prototype.toString.call(childNodes)
|
6126
|
+
"[object Generator]" !== Object.prototype.toString.call(type)
|
6001
6127
|
)
|
6002
6128
|
didWarnAboutGenerators ||
|
6003
6129
|
console.error(
|
@@ -6005,18 +6131,18 @@
|
|
6005
6131
|
),
|
6006
6132
|
(didWarnAboutGenerators = !0);
|
6007
6133
|
} else
|
6008
|
-
node.entries !==
|
6134
|
+
node.entries !== key ||
|
6009
6135
|
didWarnAboutMaps ||
|
6010
6136
|
(console.error(
|
6011
6137
|
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
6012
6138
|
),
|
6013
6139
|
(didWarnAboutMaps = !0));
|
6014
|
-
node =
|
6140
|
+
node = type.next();
|
6015
6141
|
if (!node.done) {
|
6016
|
-
|
6017
|
-
do
|
6142
|
+
key = [];
|
6143
|
+
do key.push(node.value), (node = type.next());
|
6018
6144
|
while (!node.done);
|
6019
|
-
renderChildrenArray(request, task,
|
6145
|
+
renderChildrenArray(request, task, key, childIndex);
|
6020
6146
|
}
|
6021
6147
|
return;
|
6022
6148
|
}
|
@@ -6037,39 +6163,39 @@
|
|
6037
6163
|
node._currentValue,
|
6038
6164
|
childIndex
|
6039
6165
|
);
|
6040
|
-
|
6166
|
+
request = Object.prototype.toString.call(node);
|
6041
6167
|
throw Error(
|
6042
6168
|
"Objects are not valid as a React child (found: " +
|
6043
|
-
("[object Object]" ===
|
6169
|
+
("[object Object]" === request
|
6044
6170
|
? "object with keys {" + Object.keys(node).join(", ") + "}"
|
6045
|
-
:
|
6171
|
+
: request) +
|
6046
6172
|
"). If you meant to render a collection of children, use an array instead."
|
6047
6173
|
);
|
6048
6174
|
}
|
6049
6175
|
"string" === typeof node
|
6050
|
-
? ((
|
6051
|
-
null !==
|
6052
|
-
(
|
6053
|
-
|
6176
|
+
? ((task = task.blockedSegment),
|
6177
|
+
null !== task &&
|
6178
|
+
(task.lastPushedText = pushTextInstance(
|
6179
|
+
task.chunks,
|
6054
6180
|
node,
|
6055
6181
|
request.renderState,
|
6056
|
-
|
6182
|
+
task.lastPushedText
|
6057
6183
|
)))
|
6058
6184
|
: "number" === typeof node || "bigint" === typeof node
|
6059
|
-
? ((
|
6060
|
-
null !==
|
6061
|
-
(
|
6062
|
-
|
6185
|
+
? ((task = task.blockedSegment),
|
6186
|
+
null !== task &&
|
6187
|
+
(task.lastPushedText = pushTextInstance(
|
6188
|
+
task.chunks,
|
6063
6189
|
"" + node,
|
6064
6190
|
request.renderState,
|
6065
|
-
|
6191
|
+
task.lastPushedText
|
6066
6192
|
)))
|
6067
6193
|
: ("function" === typeof node &&
|
6068
|
-
((
|
6194
|
+
((request = node.displayName || node.name || "Component"),
|
6069
6195
|
console.error(
|
6070
6196
|
"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",
|
6071
|
-
|
6072
|
-
|
6197
|
+
request,
|
6198
|
+
request
|
6073
6199
|
)),
|
6074
6200
|
"symbol" === typeof node &&
|
6075
6201
|
console.error(
|
@@ -6078,9 +6204,10 @@
|
|
6078
6204
|
));
|
6079
6205
|
}
|
6080
6206
|
}
|
6081
|
-
function renderChildrenArray(request
|
6207
|
+
function renderChildrenArray(request, task, children, childIndex) {
|
6082
6208
|
var prevKeyPath = task.keyPath,
|
6083
6209
|
previousComponentStack = task.componentStack;
|
6210
|
+
var previousDebugTask = task.debugTask;
|
6084
6211
|
pushServerComponentStack(task, task.node._debugInfo);
|
6085
6212
|
if (
|
6086
6213
|
-1 !== childIndex &&
|
@@ -6098,7 +6225,7 @@
|
|
6098
6225
|
node = node[3];
|
6099
6226
|
task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
|
6100
6227
|
try {
|
6101
|
-
renderChildrenArray(request
|
6228
|
+
renderChildrenArray(request, task, children, -1);
|
6102
6229
|
if (
|
6103
6230
|
1 === task.replay.pendingTasks &&
|
6104
6231
|
0 < task.replay.nodes.length
|
@@ -6115,14 +6242,25 @@
|
|
6115
6242
|
)
|
6116
6243
|
throw x;
|
6117
6244
|
task.replay.pendingTasks--;
|
6118
|
-
|
6119
|
-
|
6120
|
-
|
6121
|
-
|
6122
|
-
|
6245
|
+
var thrownInfo = getThrownInfo(task.componentStack);
|
6246
|
+
children = task.blockedBoundary;
|
6247
|
+
var error = x,
|
6248
|
+
resumeSlots = node;
|
6249
|
+
node = logRecoverableError(
|
6250
|
+
request,
|
6251
|
+
error,
|
6252
|
+
thrownInfo,
|
6253
|
+
task.debugTask
|
6254
|
+
);
|
6255
|
+
abortRemainingReplayNodes(
|
6256
|
+
request,
|
6123
6257
|
children,
|
6124
6258
|
childIndex,
|
6125
|
-
|
6259
|
+
resumeSlots,
|
6260
|
+
error,
|
6261
|
+
node,
|
6262
|
+
thrownInfo,
|
6263
|
+
!1
|
6126
6264
|
);
|
6127
6265
|
}
|
6128
6266
|
task.replay = replay;
|
@@ -6132,6 +6270,7 @@
|
|
6132
6270
|
}
|
6133
6271
|
task.keyPath = prevKeyPath;
|
6134
6272
|
task.componentStack = previousComponentStack;
|
6273
|
+
task.debugTask = previousDebugTask;
|
6135
6274
|
return;
|
6136
6275
|
}
|
6137
6276
|
replay = task.treeContext;
|
@@ -6140,98 +6279,98 @@
|
|
6140
6279
|
null !== task.replay &&
|
6141
6280
|
((j = task.replay.slots), null !== j && "object" === typeof j)
|
6142
6281
|
) {
|
6143
|
-
for (childIndex = 0; childIndex < replayNodes; childIndex++)
|
6144
|
-
node = children[childIndex]
|
6145
|
-
|
6146
|
-
|
6147
|
-
|
6148
|
-
|
6149
|
-
|
6150
|
-
|
6151
|
-
|
6152
|
-
|
6153
|
-
childIndex
|
6154
|
-
)
|
6155
|
-
delete j[childIndex])
|
6156
|
-
: renderNode(request$jscomp$0, task, node, childIndex);
|
6157
|
-
}
|
6282
|
+
for (childIndex = 0; childIndex < replayNodes; childIndex++)
|
6283
|
+
(node = children[childIndex]),
|
6284
|
+
(task.treeContext = pushTreeContext(
|
6285
|
+
replay,
|
6286
|
+
replayNodes,
|
6287
|
+
childIndex
|
6288
|
+
)),
|
6289
|
+
(error = j[childIndex]),
|
6290
|
+
"number" === typeof error
|
6291
|
+
? (resumeNode(request, task, error, node, childIndex),
|
6292
|
+
delete j[childIndex])
|
6293
|
+
: renderNode(request, task, node, childIndex);
|
6158
6294
|
task.treeContext = replay;
|
6159
6295
|
task.keyPath = prevKeyPath;
|
6160
6296
|
task.componentStack = previousComponentStack;
|
6297
|
+
task.debugTask = previousDebugTask;
|
6161
6298
|
return;
|
6162
6299
|
}
|
6163
6300
|
for (j = 0; j < replayNodes; j++) {
|
6164
6301
|
childIndex = children[j];
|
6165
|
-
|
6302
|
+
resumeSlots = request;
|
6166
6303
|
node = task;
|
6167
|
-
|
6304
|
+
error = childIndex;
|
6168
6305
|
if (
|
6169
|
-
null !==
|
6170
|
-
"object" === typeof
|
6171
|
-
(
|
6172
|
-
|
6173
|
-
|
6174
|
-
((!
|
6175
|
-
2 ===
|
6306
|
+
null !== error &&
|
6307
|
+
"object" === typeof error &&
|
6308
|
+
(error.$$typeof === REACT_ELEMENT_TYPE ||
|
6309
|
+
error.$$typeof === REACT_PORTAL_TYPE) &&
|
6310
|
+
error._store &&
|
6311
|
+
((!error._store.validated && null == error.key) ||
|
6312
|
+
2 === error._store.validated)
|
6176
6313
|
) {
|
6177
|
-
if ("object" !== typeof
|
6314
|
+
if ("object" !== typeof error._store)
|
6178
6315
|
throw Error(
|
6179
6316
|
"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
|
6180
6317
|
);
|
6181
|
-
|
6182
|
-
|
6183
|
-
null ==
|
6184
|
-
(
|
6185
|
-
|
6186
|
-
if (null !==
|
6187
|
-
|
6188
|
-
var componentName = getComponentNameFromType(
|
6189
|
-
|
6190
|
-
var parentOwner =
|
6191
|
-
|
6318
|
+
error._store.validated = 1;
|
6319
|
+
thrownInfo = resumeSlots.didWarnForKey;
|
6320
|
+
null == thrownInfo &&
|
6321
|
+
(thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
|
6322
|
+
resumeSlots = node.componentStack;
|
6323
|
+
if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
|
6324
|
+
thrownInfo.add(resumeSlots);
|
6325
|
+
var componentName = getComponentNameFromType(error.type);
|
6326
|
+
thrownInfo = error._owner;
|
6327
|
+
var parentOwner = resumeSlots.owner;
|
6328
|
+
resumeSlots = "";
|
6192
6329
|
if (parentOwner && "undefined" !== typeof parentOwner.type) {
|
6193
6330
|
var name = getComponentNameFromType(parentOwner.type);
|
6194
6331
|
name &&
|
6195
|
-
(
|
6332
|
+
(resumeSlots =
|
6333
|
+
"\n\nCheck the render method of `" + name + "`.");
|
6196
6334
|
}
|
6197
|
-
|
6335
|
+
resumeSlots ||
|
6198
6336
|
(componentName &&
|
6199
|
-
(
|
6337
|
+
(resumeSlots =
|
6200
6338
|
"\n\nCheck the top-level render call using <" +
|
6201
6339
|
componentName +
|
6202
6340
|
">."));
|
6203
6341
|
componentName = "";
|
6204
|
-
null !=
|
6205
|
-
parentOwner !==
|
6342
|
+
null != thrownInfo &&
|
6343
|
+
parentOwner !== thrownInfo &&
|
6206
6344
|
((parentOwner = null),
|
6207
|
-
"undefined" !== typeof
|
6208
|
-
? (parentOwner = getComponentNameFromType(
|
6209
|
-
: "string" === typeof
|
6210
|
-
(parentOwner =
|
6345
|
+
"undefined" !== typeof thrownInfo.type
|
6346
|
+
? (parentOwner = getComponentNameFromType(thrownInfo.type))
|
6347
|
+
: "string" === typeof thrownInfo.name &&
|
6348
|
+
(parentOwner = thrownInfo.name),
|
6211
6349
|
parentOwner &&
|
6212
6350
|
(componentName =
|
6213
6351
|
" It was passed a child from " + parentOwner + "."));
|
6214
|
-
|
6352
|
+
thrownInfo = node.componentStack;
|
6215
6353
|
node.componentStack = {
|
6216
6354
|
parent: node.componentStack,
|
6217
|
-
type:
|
6218
|
-
owner:
|
6219
|
-
stack:
|
6355
|
+
type: error.type,
|
6356
|
+
owner: error._owner,
|
6357
|
+
stack: error._debugStack
|
6220
6358
|
};
|
6221
6359
|
console.error(
|
6222
6360
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
6223
|
-
|
6361
|
+
resumeSlots,
|
6224
6362
|
componentName
|
6225
6363
|
);
|
6226
|
-
node.componentStack =
|
6364
|
+
node.componentStack = thrownInfo;
|
6227
6365
|
}
|
6228
6366
|
}
|
6229
6367
|
task.treeContext = pushTreeContext(replay, replayNodes, j);
|
6230
|
-
renderNode(request
|
6368
|
+
renderNode(request, task, childIndex, j);
|
6231
6369
|
}
|
6232
6370
|
task.treeContext = replay;
|
6233
6371
|
task.keyPath = prevKeyPath;
|
6234
6372
|
task.componentStack = previousComponentStack;
|
6373
|
+
task.debugTask = previousDebugTask;
|
6235
6374
|
}
|
6236
6375
|
function untrackBoundary(request, boundary) {
|
6237
6376
|
request = request.trackedPostpones;
|
@@ -6257,7 +6396,9 @@
|
|
6257
6396
|
task.context,
|
6258
6397
|
task.treeContext,
|
6259
6398
|
task.componentStack,
|
6260
|
-
task.isFallback
|
6399
|
+
task.isFallback,
|
6400
|
+
emptyContextObject,
|
6401
|
+
task.debugTask
|
6261
6402
|
);
|
6262
6403
|
}
|
6263
6404
|
function spawnNewSuspendedRenderTask(request, task, thenableState) {
|
@@ -6287,7 +6428,9 @@
|
|
6287
6428
|
task.context,
|
6288
6429
|
task.treeContext,
|
6289
6430
|
task.componentStack,
|
6290
|
-
task.isFallback
|
6431
|
+
task.isFallback,
|
6432
|
+
emptyContextObject,
|
6433
|
+
task.debugTask
|
6291
6434
|
);
|
6292
6435
|
}
|
6293
6436
|
function renderNode(request, task, node, childIndex) {
|
@@ -6296,6 +6439,7 @@
|
|
6296
6439
|
previousKeyPath = task.keyPath,
|
6297
6440
|
previousTreeContext = task.treeContext,
|
6298
6441
|
previousComponentStack = task.componentStack,
|
6442
|
+
previousDebugTask = task.debugTask,
|
6299
6443
|
segment = task.blockedSegment;
|
6300
6444
|
if (null === segment)
|
6301
6445
|
try {
|
@@ -6322,6 +6466,7 @@
|
|
6322
6466
|
task.keyPath = previousKeyPath;
|
6323
6467
|
task.treeContext = previousTreeContext;
|
6324
6468
|
task.componentStack = previousComponentStack;
|
6469
|
+
task.debugTask = previousDebugTask;
|
6325
6470
|
switchContext(previousContext);
|
6326
6471
|
return;
|
6327
6472
|
}
|
@@ -6334,6 +6479,7 @@
|
|
6334
6479
|
task.keyPath = previousKeyPath;
|
6335
6480
|
task.treeContext = previousTreeContext;
|
6336
6481
|
task.componentStack = previousComponentStack;
|
6482
|
+
task.debugTask = previousDebugTask;
|
6337
6483
|
switchContext(previousContext);
|
6338
6484
|
return;
|
6339
6485
|
}
|
@@ -6368,6 +6514,7 @@
|
|
6368
6514
|
task.keyPath = previousKeyPath;
|
6369
6515
|
task.treeContext = previousTreeContext;
|
6370
6516
|
task.componentStack = previousComponentStack;
|
6517
|
+
task.debugTask = previousDebugTask;
|
6371
6518
|
switchContext(previousContext);
|
6372
6519
|
return;
|
6373
6520
|
}
|
@@ -6380,6 +6527,7 @@
|
|
6380
6527
|
task.keyPath = previousKeyPath;
|
6381
6528
|
task.treeContext = previousTreeContext;
|
6382
6529
|
task.componentStack = previousComponentStack;
|
6530
|
+
task.debugTask = previousDebugTask;
|
6383
6531
|
switchContext(previousContext);
|
6384
6532
|
return;
|
6385
6533
|
}
|
@@ -6393,26 +6541,6 @@
|
|
6393
6541
|
switchContext(previousContext);
|
6394
6542
|
throw node;
|
6395
6543
|
}
|
6396
|
-
function erroredReplay(
|
6397
|
-
request,
|
6398
|
-
boundary,
|
6399
|
-
error,
|
6400
|
-
errorInfo,
|
6401
|
-
replayNodes,
|
6402
|
-
resumeSlots
|
6403
|
-
) {
|
6404
|
-
var errorDigest = logRecoverableError(request, error, errorInfo);
|
6405
|
-
abortRemainingReplayNodes(
|
6406
|
-
request,
|
6407
|
-
boundary,
|
6408
|
-
replayNodes,
|
6409
|
-
resumeSlots,
|
6410
|
-
error,
|
6411
|
-
errorDigest,
|
6412
|
-
errorInfo,
|
6413
|
-
!1
|
6414
|
-
);
|
6415
|
-
}
|
6416
6544
|
function abortTaskSoft(task) {
|
6417
6545
|
var boundary = task.blockedBoundary;
|
6418
6546
|
task = task.blockedSegment;
|
@@ -6501,14 +6629,14 @@
|
|
6501
6629
|
if (13 !== request.status && request.status !== CLOSED) {
|
6502
6630
|
boundary = task.replay;
|
6503
6631
|
if (null === boundary) {
|
6504
|
-
logRecoverableError(request, error, segment);
|
6505
|
-
fatalError(request, error);
|
6632
|
+
logRecoverableError(request, error, segment, null);
|
6633
|
+
fatalError(request, error, segment, null);
|
6506
6634
|
return;
|
6507
6635
|
}
|
6508
6636
|
boundary.pendingTasks--;
|
6509
6637
|
0 === boundary.pendingTasks &&
|
6510
6638
|
0 < boundary.nodes.length &&
|
6511
|
-
((task = logRecoverableError(request, error, segment)),
|
6639
|
+
((task = logRecoverableError(request, error, segment, null)),
|
6512
6640
|
abortRemainingReplayNodes(
|
6513
6641
|
request,
|
6514
6642
|
null,
|
@@ -6526,7 +6654,7 @@
|
|
6526
6654
|
boundary.pendingTasks--,
|
6527
6655
|
boundary.status !== CLIENT_RENDERED &&
|
6528
6656
|
((boundary.status = CLIENT_RENDERED),
|
6529
|
-
(task = logRecoverableError(request, error, segment)),
|
6657
|
+
(task = logRecoverableError(request, error, segment, null)),
|
6530
6658
|
(boundary.status = CLIENT_RENDERED),
|
6531
6659
|
encodeErrorForBoundary(boundary, task, error, segment, !0),
|
6532
6660
|
untrackBoundary(request, boundary),
|
@@ -6601,7 +6729,7 @@
|
|
6601
6729
|
}
|
6602
6730
|
}
|
6603
6731
|
} catch (error) {
|
6604
|
-
logRecoverableError(request, error, {});
|
6732
|
+
logRecoverableError(request, error, {}, null);
|
6605
6733
|
}
|
6606
6734
|
}
|
6607
6735
|
function completeShell(request) {
|
@@ -6679,10 +6807,10 @@
|
|
6679
6807
|
request.allPendingTasks--;
|
6680
6808
|
0 === request.allPendingTasks && completeAll(request);
|
6681
6809
|
}
|
6682
|
-
function performWork(request$jscomp$
|
6810
|
+
function performWork(request$jscomp$2) {
|
6683
6811
|
if (
|
6684
|
-
request$jscomp$
|
6685
|
-
13 !== request$jscomp$
|
6812
|
+
request$jscomp$2.status !== CLOSED &&
|
6813
|
+
13 !== request$jscomp$2.status
|
6686
6814
|
) {
|
6687
6815
|
var prevContext = currentActiveSnapshot,
|
6688
6816
|
prevDispatcher = ReactSharedInternals.H;
|
@@ -6690,16 +6818,16 @@
|
|
6690
6818
|
var prevAsyncDispatcher = ReactSharedInternals.A;
|
6691
6819
|
ReactSharedInternals.A = DefaultAsyncDispatcher;
|
6692
6820
|
var prevRequest = currentRequest;
|
6693
|
-
currentRequest = request$jscomp$
|
6821
|
+
currentRequest = request$jscomp$2;
|
6694
6822
|
var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;
|
6695
6823
|
ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;
|
6696
6824
|
var prevResumableState = currentResumableState;
|
6697
|
-
currentResumableState = request$jscomp$
|
6825
|
+
currentResumableState = request$jscomp$2.resumableState;
|
6698
6826
|
try {
|
6699
|
-
var pingedTasks = request$jscomp$
|
6827
|
+
var pingedTasks = request$jscomp$2.pingedTasks,
|
6700
6828
|
i;
|
6701
6829
|
for (i = 0; i < pingedTasks.length; i++) {
|
6702
|
-
var request = request$jscomp$
|
6830
|
+
var request = request$jscomp$2,
|
6703
6831
|
task = pingedTasks[i],
|
6704
6832
|
segment = task.blockedSegment;
|
6705
6833
|
if (null === segment) {
|
@@ -6747,16 +6875,32 @@
|
|
6747
6875
|
} else {
|
6748
6876
|
request.replay.pendingTasks--;
|
6749
6877
|
request.abortSet.delete(request);
|
6750
|
-
var errorInfo = getThrownInfo(request.componentStack)
|
6751
|
-
|
6752
|
-
request$jscomp$0,
|
6753
|
-
request.blockedBoundary,
|
6754
|
-
|
6755
|
-
|
6756
|
-
|
6757
|
-
|
6758
|
-
|
6759
|
-
request.replay.
|
6878
|
+
var errorInfo = getThrownInfo(request.componentStack),
|
6879
|
+
errorDigest = void 0,
|
6880
|
+
request$jscomp$1 = request$jscomp$0,
|
6881
|
+
boundary = request.blockedBoundary,
|
6882
|
+
error$jscomp$0 =
|
6883
|
+
12 === request$jscomp$0.status
|
6884
|
+
? request$jscomp$0.fatalError
|
6885
|
+
: x,
|
6886
|
+
errorInfo$jscomp$0 = errorInfo,
|
6887
|
+
replayNodes = request.replay.nodes,
|
6888
|
+
resumeSlots = request.replay.slots;
|
6889
|
+
errorDigest = logRecoverableError(
|
6890
|
+
request$jscomp$1,
|
6891
|
+
error$jscomp$0,
|
6892
|
+
errorInfo$jscomp$0,
|
6893
|
+
request.debugTask
|
6894
|
+
);
|
6895
|
+
abortRemainingReplayNodes(
|
6896
|
+
request$jscomp$1,
|
6897
|
+
boundary,
|
6898
|
+
replayNodes,
|
6899
|
+
resumeSlots,
|
6900
|
+
error$jscomp$0,
|
6901
|
+
errorDigest,
|
6902
|
+
errorInfo$jscomp$0,
|
6903
|
+
!1
|
6760
6904
|
);
|
6761
6905
|
request$jscomp$0.pendingRootTasks--;
|
6762
6906
|
0 === request$jscomp$0.pendingRootTasks &&
|
@@ -6769,98 +6913,107 @@
|
|
6769
6913
|
currentTaskInDEV = prevTaskInDEV;
|
6770
6914
|
}
|
6771
6915
|
}
|
6772
|
-
} else
|
6773
|
-
request$jscomp$0 = prevTaskInDEV = void 0
|
6774
|
-
|
6775
|
-
|
6776
|
-
|
6777
|
-
|
6778
|
-
|
6779
|
-
|
6780
|
-
|
6781
|
-
|
6782
|
-
|
6783
|
-
|
6784
|
-
|
6785
|
-
|
6786
|
-
|
6787
|
-
|
6788
|
-
|
6789
|
-
|
6790
|
-
|
6791
|
-
|
6792
|
-
|
6793
|
-
|
6794
|
-
|
6795
|
-
|
6796
|
-
|
6797
|
-
|
6798
|
-
|
6799
|
-
|
6800
|
-
|
6801
|
-
|
6802
|
-
|
6803
|
-
|
6804
|
-
|
6805
|
-
|
6806
|
-
|
6807
|
-
|
6808
|
-
|
6809
|
-
|
6810
|
-
|
6811
|
-
|
6812
|
-
|
6813
|
-
|
6814
|
-
|
6815
|
-
|
6816
|
-
|
6817
|
-
|
6818
|
-
|
6819
|
-
|
6820
|
-
|
6821
|
-
|
6822
|
-
|
6823
|
-
|
6824
|
-
|
6825
|
-
|
6826
|
-
|
6827
|
-
|
6828
|
-
|
6829
|
-
|
6830
|
-
|
6831
|
-
|
6832
|
-
|
6833
|
-
|
6834
|
-
|
6835
|
-
|
6836
|
-
|
6837
|
-
|
6916
|
+
} else if (
|
6917
|
+
((request$jscomp$0 = prevTaskInDEV = void 0),
|
6918
|
+
(errorDigest = task),
|
6919
|
+
(request$jscomp$1 = segment),
|
6920
|
+
request$jscomp$1.status === PENDING)
|
6921
|
+
) {
|
6922
|
+
request$jscomp$1.status = 6;
|
6923
|
+
switchContext(errorDigest.context);
|
6924
|
+
request$jscomp$0 = currentTaskInDEV;
|
6925
|
+
currentTaskInDEV = errorDigest;
|
6926
|
+
var childrenLength = request$jscomp$1.children.length,
|
6927
|
+
chunkLength = request$jscomp$1.chunks.length;
|
6928
|
+
try {
|
6929
|
+
retryNode(request, errorDigest),
|
6930
|
+
request$jscomp$1.lastPushedText &&
|
6931
|
+
request$jscomp$1.textEmbedded &&
|
6932
|
+
request$jscomp$1.chunks.push(textSeparator),
|
6933
|
+
errorDigest.abortSet.delete(errorDigest),
|
6934
|
+
(request$jscomp$1.status = COMPLETED),
|
6935
|
+
finishedTask(
|
6936
|
+
request,
|
6937
|
+
errorDigest.blockedBoundary,
|
6938
|
+
request$jscomp$1
|
6939
|
+
);
|
6940
|
+
} catch (thrownValue) {
|
6941
|
+
resetHooksState();
|
6942
|
+
request$jscomp$1.children.length = childrenLength;
|
6943
|
+
request$jscomp$1.chunks.length = chunkLength;
|
6944
|
+
var x$jscomp$0 =
|
6945
|
+
thrownValue === SuspenseException
|
6946
|
+
? getSuspendedThenable()
|
6947
|
+
: 12 === request.status
|
6948
|
+
? request.fatalError
|
6949
|
+
: thrownValue;
|
6950
|
+
if (
|
6951
|
+
"object" === typeof x$jscomp$0 &&
|
6952
|
+
null !== x$jscomp$0 &&
|
6953
|
+
"function" === typeof x$jscomp$0.then
|
6954
|
+
) {
|
6955
|
+
request$jscomp$1.status = PENDING;
|
6956
|
+
errorDigest.thenableState = getThenableStateAfterSuspending();
|
6957
|
+
var ping$jscomp$0 = errorDigest.ping;
|
6958
|
+
x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
|
6959
|
+
} else {
|
6960
|
+
var errorInfo$jscomp$1 = getThrownInfo(
|
6961
|
+
errorDigest.componentStack
|
6962
|
+
);
|
6963
|
+
errorDigest.abortSet.delete(errorDigest);
|
6964
|
+
request$jscomp$1.status = 4;
|
6965
|
+
var boundary$jscomp$0 = errorDigest.blockedBoundary,
|
6966
|
+
debugTask = errorDigest.debugTask;
|
6967
|
+
prevTaskInDEV = logRecoverableError(
|
6968
|
+
request,
|
6969
|
+
x$jscomp$0,
|
6970
|
+
errorInfo$jscomp$1,
|
6971
|
+
debugTask
|
6972
|
+
);
|
6973
|
+
null === boundary$jscomp$0
|
6974
|
+
? fatalError(
|
6975
|
+
request,
|
6976
|
+
x$jscomp$0,
|
6977
|
+
errorInfo$jscomp$1,
|
6978
|
+
debugTask
|
6979
|
+
)
|
6980
|
+
: (boundary$jscomp$0.pendingTasks--,
|
6981
|
+
boundary$jscomp$0.status !== CLIENT_RENDERED &&
|
6982
|
+
((boundary$jscomp$0.status = CLIENT_RENDERED),
|
6983
|
+
encodeErrorForBoundary(
|
6984
|
+
boundary$jscomp$0,
|
6985
|
+
prevTaskInDEV,
|
6986
|
+
x$jscomp$0,
|
6987
|
+
errorInfo$jscomp$1,
|
6988
|
+
!1
|
6989
|
+
),
|
6990
|
+
untrackBoundary(request, boundary$jscomp$0),
|
6991
|
+
boundary$jscomp$0.parentFlushed &&
|
6992
|
+
request.clientRenderedBoundaries.push(
|
6993
|
+
boundary$jscomp$0
|
6838
6994
|
),
|
6839
|
-
|
6840
|
-
|
6841
|
-
|
6842
|
-
|
6843
|
-
|
6844
|
-
|
6845
|
-
preparePreamble(request)));
|
6846
|
-
request.allPendingTasks--;
|
6847
|
-
0 === request.allPendingTasks && completeAll(request);
|
6848
|
-
}
|
6849
|
-
} finally {
|
6850
|
-
currentTaskInDEV = request$jscomp$0;
|
6995
|
+
0 === request.pendingRootTasks &&
|
6996
|
+
null === request.trackedPostpones &&
|
6997
|
+
null !== boundary$jscomp$0.contentPreamble &&
|
6998
|
+
preparePreamble(request)));
|
6999
|
+
request.allPendingTasks--;
|
7000
|
+
0 === request.allPendingTasks && completeAll(request);
|
6851
7001
|
}
|
7002
|
+
} finally {
|
7003
|
+
currentTaskInDEV = request$jscomp$0;
|
6852
7004
|
}
|
6853
7005
|
}
|
6854
7006
|
}
|
6855
7007
|
pingedTasks.splice(0, i);
|
6856
|
-
null !== request$jscomp$
|
7008
|
+
null !== request$jscomp$2.destination &&
|
6857
7009
|
flushCompletedQueues(
|
6858
|
-
request$jscomp$
|
6859
|
-
request$jscomp$
|
7010
|
+
request$jscomp$2,
|
7011
|
+
request$jscomp$2.destination
|
6860
7012
|
);
|
6861
7013
|
} catch (error) {
|
6862
|
-
|
6863
|
-
|
7014
|
+
(pingedTasks = {}),
|
7015
|
+
logRecoverableError(request$jscomp$2, error, pingedTasks, null),
|
7016
|
+
fatalError(request$jscomp$2, error, pingedTasks, null);
|
6864
7017
|
} finally {
|
6865
7018
|
(currentResumableState = prevResumableState),
|
6866
7019
|
(ReactSharedInternals.H = prevDispatcher),
|
@@ -7574,7 +7727,9 @@
|
|
7574
7727
|
try {
|
7575
7728
|
flushCompletedQueues(request, destination);
|
7576
7729
|
} catch (error) {
|
7577
|
-
|
7730
|
+
(destination = {}),
|
7731
|
+
logRecoverableError(request, error, destination, null),
|
7732
|
+
fatalError(request, error, destination, null);
|
7578
7733
|
}
|
7579
7734
|
}
|
7580
7735
|
}
|
@@ -7600,16 +7755,18 @@
|
|
7600
7755
|
null !== request.destination &&
|
7601
7756
|
flushCompletedQueues(request, request.destination);
|
7602
7757
|
} catch (error$4) {
|
7603
|
-
|
7758
|
+
(reason = {}),
|
7759
|
+
logRecoverableError(request, error$4, reason, null),
|
7760
|
+
fatalError(request, error$4, reason, null);
|
7604
7761
|
}
|
7605
7762
|
}
|
7606
7763
|
function ensureCorrectIsomorphicReactVersion() {
|
7607
7764
|
var isomorphicReactPackageVersion = React.version;
|
7608
|
-
if ("19.1.0-canary-
|
7765
|
+
if ("19.1.0-canary-e670e72f-20250214" !== isomorphicReactPackageVersion)
|
7609
7766
|
throw Error(
|
7610
7767
|
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
|
7611
7768
|
(isomorphicReactPackageVersion +
|
7612
|
-
"\n - react-dom: 19.1.0-canary-
|
7769
|
+
"\n - react-dom: 19.1.0-canary-e670e72f-20250214\nLearn more: https://react.dev/warnings/version-mismatch")
|
7613
7770
|
);
|
7614
7771
|
}
|
7615
7772
|
var React = require("react"),
|
@@ -9259,5 +9416,5 @@
|
|
9259
9416
|
startWork(request);
|
9260
9417
|
});
|
9261
9418
|
};
|
9262
|
-
exports.version = "19.1.0-canary-
|
9419
|
+
exports.version = "19.1.0-canary-e670e72f-20250214";
|
9263
9420
|
})();
|