react-server-dom-webpack 19.2.0-canary-5d87cd22-20250704 → 19.2.0-canary-befc1246-20250708

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.
@@ -764,7 +764,7 @@
764
764
  "\n//# sourceURL=rsc://React/" +
765
765
  encodeURIComponent(environmentName) +
766
766
  "/" +
767
- filename +
767
+ encodeURI(filename) +
768
768
  "?s" +
769
769
  fakeServerFunctionIdx++),
770
770
  (col += "\n//# sourceMappingURL=" + sourceMap))
@@ -918,6 +918,17 @@
918
918
  this.reason = reason;
919
919
  this._debugInfo = null;
920
920
  }
921
+ function unwrapWeakResponse(weakResponse) {
922
+ weakResponse = weakResponse.weak.deref();
923
+ if (void 0 === weakResponse)
924
+ throw Error(
925
+ "We did not expect to receive new data after GC:ing the response."
926
+ );
927
+ return weakResponse;
928
+ }
929
+ function cleanupDebugChannel(debugChannel) {
930
+ debugChannel("");
931
+ }
921
932
  function readChunk(chunk) {
922
933
  switch (chunk.status) {
923
934
  case "resolved_model":
@@ -937,9 +948,27 @@
937
948
  throw chunk.reason;
938
949
  }
939
950
  }
940
- function createPendingChunk() {
951
+ function getRoot(weakResponse) {
952
+ weakResponse = unwrapWeakResponse(weakResponse);
953
+ return getChunk(weakResponse, 0);
954
+ }
955
+ function createPendingChunk(response) {
956
+ 0 === response._pendingChunks++ &&
957
+ ((response._weakResponse.response = response),
958
+ null !== response._pendingInitialRender &&
959
+ (clearTimeout(response._pendingInitialRender),
960
+ (response._pendingInitialRender = null)));
941
961
  return new ReactPromise("pending", null, null);
942
962
  }
963
+ function releasePendingChunk(response, chunk) {
964
+ "pending" === chunk.status &&
965
+ 0 === --response._pendingChunks &&
966
+ ((response._weakResponse.response = null),
967
+ (response._pendingInitialRender = setTimeout(
968
+ flushInitialRenderPerformance.bind(null, response),
969
+ 100
970
+ )));
971
+ }
943
972
  function wakeChunk(listeners, value) {
944
973
  for (var i = 0; i < listeners.length; i++) {
945
974
  var listener = listeners[i];
@@ -1015,15 +1044,14 @@
1015
1044
  rejectListeners && rejectChunk(rejectListeners, chunk.reason);
1016
1045
  }
1017
1046
  }
1018
- function triggerErrorOnChunk(chunk, error) {
1019
- if ("pending" !== chunk.status && "blocked" !== chunk.status)
1020
- chunk.reason.error(error);
1021
- else {
1022
- var listeners = chunk.reason;
1023
- chunk.status = "rejected";
1024
- chunk.reason = error;
1025
- null !== listeners && rejectChunk(listeners, error);
1026
- }
1047
+ function triggerErrorOnChunk(response, chunk, error) {
1048
+ "pending" !== chunk.status && "blocked" !== chunk.status
1049
+ ? chunk.reason.error(error)
1050
+ : (releasePendingChunk(response, chunk),
1051
+ (response = chunk.reason),
1052
+ (chunk.status = "rejected"),
1053
+ (chunk.reason = error),
1054
+ null !== response && rejectChunk(response, error));
1027
1055
  }
1028
1056
  function createResolvedIteratorResultChunk(response, value, done) {
1029
1057
  return new ReactPromise(
@@ -1046,6 +1074,7 @@
1046
1074
  function resolveModelChunk(response, chunk, value) {
1047
1075
  if ("pending" !== chunk.status) chunk.reason.enqueueModel(value);
1048
1076
  else {
1077
+ releasePendingChunk(response, chunk);
1049
1078
  var resolveListeners = chunk.value,
1050
1079
  rejectListeners = chunk.reason;
1051
1080
  chunk.status = "resolved_model";
@@ -1056,15 +1085,16 @@
1056
1085
  wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
1057
1086
  }
1058
1087
  }
1059
- function resolveModuleChunk(chunk, value) {
1088
+ function resolveModuleChunk(response, chunk, value) {
1060
1089
  if ("pending" === chunk.status || "blocked" === chunk.status) {
1061
- var resolveListeners = chunk.value,
1062
- rejectListeners = chunk.reason;
1090
+ releasePendingChunk(response, chunk);
1091
+ response = chunk.value;
1092
+ var rejectListeners = chunk.reason;
1063
1093
  chunk.status = "resolved_module";
1064
1094
  chunk.value = value;
1065
- null !== resolveListeners &&
1095
+ null !== response &&
1066
1096
  (initializeModuleChunk(chunk),
1067
- wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
1097
+ wakeChunkIfInitialized(chunk, response, rejectListeners));
1068
1098
  }
1069
1099
  }
1070
1100
  function initializeModelChunk(chunk) {
@@ -1107,15 +1137,19 @@
1107
1137
  (chunk.status = "rejected"), (chunk.reason = error);
1108
1138
  }
1109
1139
  }
1110
- function reportGlobalError(response, error) {
1111
- response._closed = !0;
1112
- response._closedReason = error;
1113
- response._chunks.forEach(function (chunk) {
1114
- "pending" === chunk.status && triggerErrorOnChunk(chunk, error);
1115
- });
1116
- var debugChannel = response._debugChannel;
1117
- void 0 !== debugChannel &&
1118
- (debugChannel(""), (response._debugChannel = void 0));
1140
+ function reportGlobalError(weakResponse, error) {
1141
+ if (void 0 !== weakResponse.weak.deref()) {
1142
+ var response = unwrapWeakResponse(weakResponse);
1143
+ response._closed = !0;
1144
+ response._closedReason = error;
1145
+ response._chunks.forEach(function (chunk) {
1146
+ "pending" === chunk.status &&
1147
+ triggerErrorOnChunk(response, chunk, error);
1148
+ });
1149
+ weakResponse = response._debugChannel;
1150
+ void 0 !== weakResponse &&
1151
+ (weakResponse(""), (response._debugChannel = void 0));
1152
+ }
1119
1153
  }
1120
1154
  function nullRefGetter() {
1121
1155
  return null;
@@ -1191,7 +1225,7 @@
1191
1225
  chunk ||
1192
1226
  ((chunk = response._closed
1193
1227
  ? new ReactPromise("rejected", null, response._closedReason)
1194
- : createPendingChunk()),
1228
+ : createPendingChunk(response)),
1195
1229
  chunks.set(id, chunk));
1196
1230
  return chunk;
1197
1231
  }
@@ -1277,31 +1311,31 @@
1277
1311
  }
1278
1312
  function rejectReference(reference, error) {
1279
1313
  var handler = reference.handler;
1280
- if (
1281
- !handler.errored &&
1282
- ((reference = handler.value),
1283
- (handler.errored = !0),
1284
- (handler.value = error),
1285
- (handler = handler.chunk),
1286
- null !== handler && "blocked" === handler.status)
1287
- ) {
1288
- if (
1289
- "object" === typeof reference &&
1290
- null !== reference &&
1291
- reference.$$typeof === REACT_ELEMENT_TYPE
1292
- ) {
1293
- var erroredComponent = {
1294
- name: getComponentNameFromType(reference.type) || "",
1295
- owner: reference._owner
1296
- };
1297
- erroredComponent.debugStack = reference._debugStack;
1298
- supportsCreateTask &&
1299
- (erroredComponent.debugTask = reference._debugTask);
1300
- (handler._debugInfo || (handler._debugInfo = [])).push(
1301
- erroredComponent
1302
- );
1314
+ reference = reference.response;
1315
+ if (!handler.errored) {
1316
+ var blockedValue = handler.value;
1317
+ handler.errored = !0;
1318
+ handler.value = error;
1319
+ handler = handler.chunk;
1320
+ if (null !== handler && "blocked" === handler.status) {
1321
+ if (
1322
+ "object" === typeof blockedValue &&
1323
+ null !== blockedValue &&
1324
+ blockedValue.$$typeof === REACT_ELEMENT_TYPE
1325
+ ) {
1326
+ var erroredComponent = {
1327
+ name: getComponentNameFromType(blockedValue.type) || "",
1328
+ owner: blockedValue._owner
1329
+ };
1330
+ erroredComponent.debugStack = blockedValue._debugStack;
1331
+ supportsCreateTask &&
1332
+ (erroredComponent.debugTask = blockedValue._debugTask);
1333
+ (handler._debugInfo || (handler._debugInfo = [])).push(
1334
+ erroredComponent
1335
+ );
1336
+ }
1337
+ triggerErrorOnChunk(reference, handler, error);
1303
1338
  }
1304
- triggerErrorOnChunk(handler, error);
1305
1339
  }
1306
1340
  }
1307
1341
  function waitForReference(
@@ -1348,17 +1382,18 @@
1348
1382
  response._debugFindSourceMapURL
1349
1383
  );
1350
1384
  var serverReference = resolveServerReference(
1351
- response._serverReferenceConfig,
1352
- metaData.id
1353
- );
1354
- if ((response = preloadModule(serverReference)))
1355
- metaData.bound && (response = Promise.all([response, metaData.bound]));
1356
- else if (metaData.bound) response = Promise.resolve(metaData.bound);
1385
+ response._serverReferenceConfig,
1386
+ metaData.id
1387
+ ),
1388
+ promise = preloadModule(serverReference);
1389
+ if (promise)
1390
+ metaData.bound && (promise = Promise.all([promise, metaData.bound]));
1391
+ else if (metaData.bound) promise = Promise.resolve(metaData.bound);
1357
1392
  else
1358
1393
  return (
1359
- (response = requireModule(serverReference)),
1360
- registerBoundServerReference(response, metaData.id, metaData.bound),
1361
- response
1394
+ (promise = requireModule(serverReference)),
1395
+ registerBoundServerReference(promise, metaData.id, metaData.bound),
1396
+ promise
1362
1397
  );
1363
1398
  if (initializingHandler) {
1364
1399
  var handler = initializingHandler;
@@ -1371,7 +1406,7 @@
1371
1406
  deps: 1,
1372
1407
  errored: !1
1373
1408
  };
1374
- response.then(
1409
+ promise.then(
1375
1410
  function () {
1376
1411
  var resolvedValue = requireModule(serverReference);
1377
1412
  if (metaData.bound) {
@@ -1434,7 +1469,7 @@
1434
1469
  erroredComponent
1435
1470
  );
1436
1471
  }
1437
- triggerErrorOnChunk(chunk, error);
1472
+ triggerErrorOnChunk(response, chunk, error);
1438
1473
  }
1439
1474
  }
1440
1475
  }
@@ -1581,6 +1616,23 @@
1581
1616
  function applyConstructor(response, model, parentObject) {
1582
1617
  Object.setPrototypeOf(parentObject, model.prototype);
1583
1618
  }
1619
+ function defineLazyGetter(response, chunk, parentObject, key) {
1620
+ Object.defineProperty(parentObject, key, {
1621
+ get: function () {
1622
+ "resolved_model" === chunk.status && initializeModelChunk(chunk);
1623
+ switch (chunk.status) {
1624
+ case "fulfilled":
1625
+ return chunk.value;
1626
+ case "rejected":
1627
+ throw chunk.reason;
1628
+ }
1629
+ return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.";
1630
+ },
1631
+ enumerable: !0,
1632
+ configurable: !1
1633
+ });
1634
+ return null;
1635
+ }
1584
1636
  function extractIterator(response, model) {
1585
1637
  return model[Symbol.iterator]();
1586
1638
  }
@@ -1619,15 +1671,13 @@
1619
1671
  case "S":
1620
1672
  return Symbol.for(value.slice(2));
1621
1673
  case "F":
1622
- return (
1623
- (value = value.slice(2)),
1624
- getOutlinedModel(
1625
- response,
1626
- value,
1627
- parentObject,
1628
- key,
1629
- loadServerReference
1630
- )
1674
+ var ref = value.slice(2);
1675
+ return getOutlinedModel(
1676
+ response,
1677
+ ref,
1678
+ parentObject,
1679
+ key,
1680
+ loadServerReference
1631
1681
  );
1632
1682
  case "T":
1633
1683
  parentObject = "$" + value.slice(2);
@@ -1639,36 +1689,30 @@
1639
1689
  return response.get(parentObject);
1640
1690
  case "Q":
1641
1691
  return (
1642
- (value = value.slice(2)),
1643
- getOutlinedModel(response, value, parentObject, key, createMap)
1692
+ (ref = value.slice(2)),
1693
+ getOutlinedModel(response, ref, parentObject, key, createMap)
1644
1694
  );
1645
1695
  case "W":
1646
1696
  return (
1647
- (value = value.slice(2)),
1648
- getOutlinedModel(response, value, parentObject, key, createSet)
1697
+ (ref = value.slice(2)),
1698
+ getOutlinedModel(response, ref, parentObject, key, createSet)
1649
1699
  );
1650
1700
  case "B":
1651
1701
  return (
1652
- (value = value.slice(2)),
1653
- getOutlinedModel(response, value, parentObject, key, createBlob)
1702
+ (ref = value.slice(2)),
1703
+ getOutlinedModel(response, ref, parentObject, key, createBlob)
1654
1704
  );
1655
1705
  case "K":
1656
1706
  return (
1657
- (value = value.slice(2)),
1658
- getOutlinedModel(
1659
- response,
1660
- value,
1661
- parentObject,
1662
- key,
1663
- createFormData
1664
- )
1707
+ (ref = value.slice(2)),
1708
+ getOutlinedModel(response, ref, parentObject, key, createFormData)
1665
1709
  );
1666
1710
  case "Z":
1667
1711
  return (
1668
- (value = value.slice(2)),
1712
+ (ref = value.slice(2)),
1669
1713
  getOutlinedModel(
1670
1714
  response,
1671
- value,
1715
+ ref,
1672
1716
  parentObject,
1673
1717
  key,
1674
1718
  resolveErrorDev
@@ -1676,10 +1720,10 @@
1676
1720
  );
1677
1721
  case "i":
1678
1722
  return (
1679
- (value = value.slice(2)),
1723
+ (ref = value.slice(2)),
1680
1724
  getOutlinedModel(
1681
1725
  response,
1682
- value,
1726
+ ref,
1683
1727
  parentObject,
1684
1728
  key,
1685
1729
  extractIterator
@@ -1699,10 +1743,10 @@
1699
1743
  return BigInt(value.slice(2));
1700
1744
  case "P":
1701
1745
  return (
1702
- (value = value.slice(2)),
1746
+ (ref = value.slice(2)),
1703
1747
  getOutlinedModel(
1704
1748
  response,
1705
- value,
1749
+ ref,
1706
1750
  parentObject,
1707
1751
  key,
1708
1752
  applyConstructor
@@ -1748,23 +1792,27 @@
1748
1792
  return function () {};
1749
1793
  }
1750
1794
  case "Y":
1751
- return (
1752
- 2 < value.length &&
1753
- (response = response._debugChannel) &&
1754
- ((value = value.slice(2)), response("R:" + value)),
1755
- Object.defineProperty(parentObject, key, {
1756
- get: function () {
1757
- return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.";
1758
- },
1759
- enumerable: !0,
1760
- configurable: !1
1761
- }),
1762
- null
1763
- );
1795
+ if (2 < value.length && (ref = response._debugChannel)) {
1796
+ value = value.slice(2);
1797
+ var _id2 = parseInt(value, 16);
1798
+ response._chunks.has(_id2) || ref("Q:" + value);
1799
+ ref = getChunk(response, _id2);
1800
+ return "fulfilled" === ref.status
1801
+ ? ref.value
1802
+ : defineLazyGetter(response, ref, parentObject, key);
1803
+ }
1804
+ Object.defineProperty(parentObject, key, {
1805
+ get: function () {
1806
+ return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.";
1807
+ },
1808
+ enumerable: !0,
1809
+ configurable: !1
1810
+ });
1811
+ return null;
1764
1812
  default:
1765
1813
  return (
1766
- (value = value.slice(1)),
1767
- getOutlinedModel(response, value, parentObject, key, createModel)
1814
+ (ref = value.slice(1)),
1815
+ getOutlinedModel(response, ref, parentObject, key, createModel)
1768
1816
  );
1769
1817
  }
1770
1818
  }
@@ -1803,6 +1851,8 @@
1803
1851
  this._closed = !1;
1804
1852
  this._closedReason = null;
1805
1853
  this._tempRefs = temporaryReferences;
1854
+ this._pendingChunks = 0;
1855
+ this._weakResponse = { weak: new WeakRef(this), response: this };
1806
1856
  this._debugRootOwner = bundlerConfig =
1807
1857
  void 0 === ReactSharedInteralsServer ||
1808
1858
  null === ReactSharedInteralsServer.A
@@ -1819,17 +1869,22 @@
1819
1869
  this._debugChannel = debugChannel;
1820
1870
  this._replayConsole = replayConsole;
1821
1871
  this._rootEnvironmentName = environmentName;
1872
+ debugChannel &&
1873
+ (null === debugChannelRegistry
1874
+ ? (debugChannel(""), (this._debugChannel = void 0))
1875
+ : debugChannelRegistry.register(this, debugChannel));
1822
1876
  this._fromJSON = createFromJSONCallback(this);
1823
1877
  }
1824
1878
  function resolveDebugHalt(response, id) {
1825
- response = response._chunks;
1826
- var chunk = response.get(id);
1827
- chunk || response.set(id, (chunk = createPendingChunk()));
1879
+ var chunks = response._chunks,
1880
+ chunk = chunks.get(id);
1881
+ chunk || chunks.set(id, (chunk = createPendingChunk(response)));
1828
1882
  if ("pending" === chunk.status || "blocked" === chunk.status)
1829
- (id = chunk),
1830
- (id.status = "halted"),
1831
- (id.value = null),
1832
- (id.reason = null);
1883
+ releasePendingChunk(response, chunk),
1884
+ (response = chunk),
1885
+ (response.status = "halted"),
1886
+ (response.value = null),
1887
+ (response.reason = null);
1833
1888
  }
1834
1889
  function resolveModel(response, id, model) {
1835
1890
  var chunks = response._chunks,
@@ -1839,18 +1894,20 @@
1839
1894
  : chunks.set(id, new ReactPromise("resolved_model", model, response));
1840
1895
  }
1841
1896
  function resolveText(response, id, text) {
1842
- response = response._chunks;
1843
- var chunk = response.get(id);
1897
+ var chunks = response._chunks,
1898
+ chunk = chunks.get(id);
1844
1899
  chunk && "pending" !== chunk.status
1845
1900
  ? chunk.reason.enqueueValue(text)
1846
- : response.set(id, new ReactPromise("fulfilled", text, null));
1901
+ : (chunk && releasePendingChunk(response, chunk),
1902
+ chunks.set(id, new ReactPromise("fulfilled", text, null)));
1847
1903
  }
1848
1904
  function resolveBuffer(response, id, buffer) {
1849
- response = response._chunks;
1850
- var chunk = response.get(id);
1905
+ var chunks = response._chunks,
1906
+ chunk = chunks.get(id);
1851
1907
  chunk && "pending" !== chunk.status
1852
1908
  ? chunk.reason.enqueueValue(buffer)
1853
- : response.set(id, new ReactPromise("fulfilled", buffer, null));
1909
+ : (chunk && releasePendingChunk(response, chunk),
1910
+ chunks.set(id, new ReactPromise("fulfilled", buffer, null)));
1854
1911
  }
1855
1912
  function resolveModule(response, id, model) {
1856
1913
  var chunks = response._chunks,
@@ -1860,39 +1917,41 @@
1860
1917
  response._bundlerConfig,
1861
1918
  model
1862
1919
  );
1863
- if ((response = preloadModule(clientReference))) {
1920
+ if ((model = preloadModule(clientReference))) {
1864
1921
  if (chunk) {
1922
+ releasePendingChunk(response, chunk);
1865
1923
  var blockedChunk = chunk;
1866
1924
  blockedChunk.status = "blocked";
1867
1925
  } else
1868
1926
  (blockedChunk = new ReactPromise("blocked", null, null)),
1869
1927
  chunks.set(id, blockedChunk);
1870
- response.then(
1928
+ model.then(
1871
1929
  function () {
1872
- return resolveModuleChunk(blockedChunk, clientReference);
1930
+ return resolveModuleChunk(response, blockedChunk, clientReference);
1873
1931
  },
1874
1932
  function (error) {
1875
- return triggerErrorOnChunk(blockedChunk, error);
1933
+ return triggerErrorOnChunk(response, blockedChunk, error);
1876
1934
  }
1877
1935
  );
1878
1936
  } else
1879
1937
  chunk
1880
- ? resolveModuleChunk(chunk, clientReference)
1938
+ ? resolveModuleChunk(response, chunk, clientReference)
1881
1939
  : chunks.set(
1882
1940
  id,
1883
1941
  new ReactPromise("resolved_module", clientReference, null)
1884
1942
  );
1885
1943
  }
1886
1944
  function resolveStream(response, id, stream, controller) {
1887
- var chunks = response._chunks;
1888
- response = chunks.get(id);
1889
- response
1890
- ? "pending" === response.status &&
1891
- ((id = response.value),
1892
- (response.status = "fulfilled"),
1893
- (response.value = stream),
1894
- (response.reason = controller),
1895
- null !== id && wakeChunk(id, response.value))
1945
+ var chunks = response._chunks,
1946
+ chunk = chunks.get(id);
1947
+ chunk
1948
+ ? "pending" === chunk.status &&
1949
+ (releasePendingChunk(response, chunk),
1950
+ (response = chunk.value),
1951
+ (chunk.status = "fulfilled"),
1952
+ (chunk.value = stream),
1953
+ (chunk.reason = controller),
1954
+ null !== response && wakeChunk(response, chunk.value))
1896
1955
  : chunks.set(id, new ReactPromise("fulfilled", stream, controller));
1897
1956
  }
1898
1957
  function startReadableStream(response, id, type) {
@@ -1929,8 +1988,8 @@
1929
1988
  (previousBlockedChunk = chunk));
1930
1989
  } else {
1931
1990
  chunk = previousBlockedChunk;
1932
- var _chunk2 = createPendingChunk();
1933
- _chunk2.then(
1991
+ var _chunk3 = createPendingChunk(response);
1992
+ _chunk3.then(
1934
1993
  function (v) {
1935
1994
  return controller.enqueue(v);
1936
1995
  },
@@ -1938,10 +1997,10 @@
1938
1997
  return controller.error(e);
1939
1998
  }
1940
1999
  );
1941
- previousBlockedChunk = _chunk2;
2000
+ previousBlockedChunk = _chunk3;
1942
2001
  chunk.then(function () {
1943
- previousBlockedChunk === _chunk2 && (previousBlockedChunk = null);
1944
- resolveModelChunk(response, _chunk2, json);
2002
+ previousBlockedChunk === _chunk3 && (previousBlockedChunk = null);
2003
+ resolveModelChunk(response, _chunk3, json);
1945
2004
  });
1946
2005
  }
1947
2006
  },
@@ -1994,7 +2053,7 @@
1994
2053
  { done: !0, value: void 0 },
1995
2054
  null
1996
2055
  );
1997
- buffer[nextReadIndex] = createPendingChunk();
2056
+ buffer[nextReadIndex] = createPendingChunk(response);
1998
2057
  }
1999
2058
  return buffer[nextReadIndex++];
2000
2059
  });
@@ -2067,11 +2126,11 @@
2067
2126
  closed = !0;
2068
2127
  for (
2069
2128
  nextWriteIndex === buffer.length &&
2070
- (buffer[nextWriteIndex] = createPendingChunk());
2129
+ (buffer[nextWriteIndex] = createPendingChunk(response));
2071
2130
  nextWriteIndex < buffer.length;
2072
2131
 
2073
2132
  )
2074
- triggerErrorOnChunk(buffer[nextWriteIndex++], error);
2133
+ triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);
2075
2134
  }
2076
2135
  }
2077
2136
  );
@@ -2476,6 +2535,7 @@
2476
2535
  );
2477
2536
  resolveBuffer(response, id, constructor);
2478
2537
  }
2538
+ function flushInitialRenderPerformance() {}
2479
2539
  function processFullBinaryRow(response, id, tag, buffer, chunk) {
2480
2540
  switch (tag) {
2481
2541
  case 65:
@@ -2546,7 +2606,7 @@
2546
2606
  row = response._chunks;
2547
2607
  var chunk = row.get(id);
2548
2608
  chunk
2549
- ? triggerErrorOnChunk(chunk, tag)
2609
+ ? triggerErrorOnChunk(response, chunk, tag)
2550
2610
  : row.set(id, new ReactPromise("rejected", null, tag));
2551
2611
  break;
2552
2612
  case 84:
@@ -2702,96 +2762,99 @@
2702
2762
  options ? !1 !== options.replayConsoleLogs : !0,
2703
2763
  options && options.environmentName ? options.environmentName : void 0,
2704
2764
  debugChannel
2705
- );
2765
+ )._weakResponse;
2706
2766
  }
2707
2767
  function startReadingFromStream(response, stream) {
2708
2768
  function progress(_ref) {
2709
2769
  var value = _ref.value;
2710
2770
  if (_ref.done) reportGlobalError(response, Error("Connection closed."));
2711
2771
  else {
2712
- var i = 0,
2713
- rowState = response._rowState;
2714
- _ref = response._rowID;
2715
- for (
2716
- var rowTag = response._rowTag,
2717
- rowLength = response._rowLength,
2718
- buffer = response._buffer,
2719
- chunkLength = value.length;
2720
- i < chunkLength;
2772
+ if (void 0 !== response.weak.deref()) {
2773
+ _ref = unwrapWeakResponse(response);
2774
+ for (
2775
+ var i = 0,
2776
+ rowState = _ref._rowState,
2777
+ rowID = _ref._rowID,
2778
+ rowTag = _ref._rowTag,
2779
+ rowLength = _ref._rowLength,
2780
+ buffer = _ref._buffer,
2781
+ chunkLength = value.length;
2782
+ i < chunkLength;
2721
2783
 
2722
- ) {
2723
- var lastIdx = -1;
2724
- switch (rowState) {
2725
- case 0:
2726
- lastIdx = value[i++];
2727
- 58 === lastIdx
2728
- ? (rowState = 1)
2729
- : (_ref =
2730
- (_ref << 4) |
2731
- (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2732
- continue;
2733
- case 1:
2734
- rowState = value[i];
2735
- 84 === rowState ||
2736
- 65 === rowState ||
2737
- 79 === rowState ||
2738
- 111 === rowState ||
2739
- 85 === rowState ||
2740
- 83 === rowState ||
2741
- 115 === rowState ||
2742
- 76 === rowState ||
2743
- 108 === rowState ||
2744
- 71 === rowState ||
2745
- 103 === rowState ||
2746
- 77 === rowState ||
2747
- 109 === rowState ||
2748
- 86 === rowState
2749
- ? ((rowTag = rowState), (rowState = 2), i++)
2750
- : (64 < rowState && 91 > rowState) ||
2751
- 35 === rowState ||
2752
- 114 === rowState ||
2753
- 120 === rowState
2754
- ? ((rowTag = rowState), (rowState = 3), i++)
2755
- : ((rowTag = 0), (rowState = 3));
2756
- continue;
2757
- case 2:
2758
- lastIdx = value[i++];
2759
- 44 === lastIdx
2760
- ? (rowState = 4)
2761
- : (rowLength =
2762
- (rowLength << 4) |
2763
- (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2764
- continue;
2765
- case 3:
2766
- lastIdx = value.indexOf(10, i);
2784
+ ) {
2785
+ var lastIdx = -1;
2786
+ switch (rowState) {
2787
+ case 0:
2788
+ lastIdx = value[i++];
2789
+ 58 === lastIdx
2790
+ ? (rowState = 1)
2791
+ : (rowID =
2792
+ (rowID << 4) |
2793
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2794
+ continue;
2795
+ case 1:
2796
+ rowState = value[i];
2797
+ 84 === rowState ||
2798
+ 65 === rowState ||
2799
+ 79 === rowState ||
2800
+ 111 === rowState ||
2801
+ 85 === rowState ||
2802
+ 83 === rowState ||
2803
+ 115 === rowState ||
2804
+ 76 === rowState ||
2805
+ 108 === rowState ||
2806
+ 71 === rowState ||
2807
+ 103 === rowState ||
2808
+ 77 === rowState ||
2809
+ 109 === rowState ||
2810
+ 86 === rowState
2811
+ ? ((rowTag = rowState), (rowState = 2), i++)
2812
+ : (64 < rowState && 91 > rowState) ||
2813
+ 35 === rowState ||
2814
+ 114 === rowState ||
2815
+ 120 === rowState
2816
+ ? ((rowTag = rowState), (rowState = 3), i++)
2817
+ : ((rowTag = 0), (rowState = 3));
2818
+ continue;
2819
+ case 2:
2820
+ lastIdx = value[i++];
2821
+ 44 === lastIdx
2822
+ ? (rowState = 4)
2823
+ : (rowLength =
2824
+ (rowLength << 4) |
2825
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2826
+ continue;
2827
+ case 3:
2828
+ lastIdx = value.indexOf(10, i);
2829
+ break;
2830
+ case 4:
2831
+ (lastIdx = i + rowLength),
2832
+ lastIdx > value.length && (lastIdx = -1);
2833
+ }
2834
+ var offset = value.byteOffset + i;
2835
+ if (-1 < lastIdx)
2836
+ (rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)),
2837
+ processFullBinaryRow(_ref, rowID, rowTag, buffer, rowLength),
2838
+ (i = lastIdx),
2839
+ 3 === rowState && i++,
2840
+ (rowLength = rowID = rowTag = rowState = 0),
2841
+ (buffer.length = 0);
2842
+ else {
2843
+ value = new Uint8Array(
2844
+ value.buffer,
2845
+ offset,
2846
+ value.byteLength - i
2847
+ );
2848
+ buffer.push(value);
2849
+ rowLength -= value.byteLength;
2767
2850
  break;
2768
- case 4:
2769
- (lastIdx = i + rowLength),
2770
- lastIdx > value.length && (lastIdx = -1);
2771
- }
2772
- var offset = value.byteOffset + i;
2773
- if (-1 < lastIdx)
2774
- (rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)),
2775
- processFullBinaryRow(response, _ref, rowTag, buffer, rowLength),
2776
- (i = lastIdx),
2777
- 3 === rowState && i++,
2778
- (rowLength = _ref = rowTag = rowState = 0),
2779
- (buffer.length = 0);
2780
- else {
2781
- value = new Uint8Array(
2782
- value.buffer,
2783
- offset,
2784
- value.byteLength - i
2785
- );
2786
- buffer.push(value);
2787
- rowLength -= value.byteLength;
2788
- break;
2851
+ }
2789
2852
  }
2853
+ _ref._rowState = rowState;
2854
+ _ref._rowID = rowID;
2855
+ _ref._rowTag = rowTag;
2856
+ _ref._rowLength = rowLength;
2790
2857
  }
2791
- response._rowState = rowState;
2792
- response._rowID = _ref;
2793
- response._rowTag = rowTag;
2794
- response._rowLength = rowLength;
2795
2858
  return reader.read().then(progress).catch(error);
2796
2859
  }
2797
2860
  }
@@ -2879,7 +2942,11 @@
2879
2942
  "function" === typeof reject && reject(this.reason);
2880
2943
  }
2881
2944
  };
2882
- var initializingHandler = null,
2945
+ var debugChannelRegistry =
2946
+ "function" === typeof FinalizationRegistry
2947
+ ? new FinalizationRegistry(cleanupDebugChannel)
2948
+ : null,
2949
+ initializingHandler = null,
2883
2950
  supportsCreateTask = !!console.createTask,
2884
2951
  fakeFunctionCache = new Map(),
2885
2952
  fakeFunctionIdx = 0,
@@ -2990,10 +3057,10 @@
2990
3057
  return hook.checkDCE ? !0 : !1;
2991
3058
  })({
2992
3059
  bundleType: 1,
2993
- version: "19.2.0-canary-5d87cd22-20250704",
3060
+ version: "19.2.0-canary-befc1246-20250708",
2994
3061
  rendererPackageName: "react-server-dom-webpack",
2995
3062
  currentDispatcherRef: ReactSharedInternals,
2996
- reconcilerVersion: "19.2.0-canary-5d87cd22-20250704",
3063
+ reconcilerVersion: "19.2.0-canary-befc1246-20250708",
2997
3064
  getCurrentComponentInfo: function () {
2998
3065
  return currentOwnerInDEV;
2999
3066
  }
@@ -3008,12 +3075,12 @@
3008
3075
  reportGlobalError(response, e);
3009
3076
  }
3010
3077
  );
3011
- return getChunk(response, 0);
3078
+ return getRoot(response);
3012
3079
  };
3013
3080
  exports.createFromReadableStream = function (stream, options) {
3014
3081
  options = createResponseFromOptions(options);
3015
3082
  startReadingFromStream(options, stream);
3016
- return getChunk(options, 0);
3083
+ return getRoot(options);
3017
3084
  };
3018
3085
  exports.createServerReference = function (
3019
3086
  id,