react-server-dom-webpack 19.0.0-canary-95e6f032c-20240401 → 19.0.0-canary-7a2609eed-20240403

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.
Files changed (37) hide show
  1. package/cjs/react-server-dom-webpack-client.browser.development.js +20 -6
  2. package/cjs/react-server-dom-webpack-client.browser.production.js +7 -1
  3. package/cjs/react-server-dom-webpack-client.browser.production.min.js +14 -14
  4. package/cjs/react-server-dom-webpack-client.browser.production.min.js.map +1 -1
  5. package/cjs/react-server-dom-webpack-client.edge.development.js +20 -6
  6. package/cjs/react-server-dom-webpack-client.edge.production.js +7 -1
  7. package/cjs/react-server-dom-webpack-client.edge.production.min.js +1 -1
  8. package/cjs/react-server-dom-webpack-client.edge.production.min.js.map +1 -1
  9. package/cjs/react-server-dom-webpack-client.node.development.js +20 -6
  10. package/cjs/react-server-dom-webpack-client.node.production.js +7 -1
  11. package/cjs/react-server-dom-webpack-client.node.production.min.js +1 -1
  12. package/cjs/react-server-dom-webpack-client.node.production.min.js.map +1 -1
  13. package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +20 -6
  14. package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +7 -1
  15. package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +1 -1
  16. package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js.map +1 -1
  17. package/cjs/react-server-dom-webpack-server.browser.development.js +90 -37
  18. package/cjs/react-server-dom-webpack-server.browser.production.js +88 -38
  19. package/cjs/react-server-dom-webpack-server.browser.production.min.js +46 -45
  20. package/cjs/react-server-dom-webpack-server.browser.production.min.js.map +1 -1
  21. package/cjs/react-server-dom-webpack-server.edge.development.js +90 -37
  22. package/cjs/react-server-dom-webpack-server.edge.production.js +88 -38
  23. package/cjs/react-server-dom-webpack-server.edge.production.min.js +32 -31
  24. package/cjs/react-server-dom-webpack-server.edge.production.min.js.map +1 -1
  25. package/cjs/react-server-dom-webpack-server.node.development.js +90 -37
  26. package/cjs/react-server-dom-webpack-server.node.production.js +88 -38
  27. package/cjs/react-server-dom-webpack-server.node.production.min.js +33 -31
  28. package/cjs/react-server-dom-webpack-server.node.production.min.js.map +1 -1
  29. package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +90 -37
  30. package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +88 -38
  31. package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +33 -31
  32. package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js.map +1 -1
  33. package/package.json +3 -3
  34. package/umd/react-server-dom-webpack-client.browser.development.js +20 -6
  35. package/umd/react-server-dom-webpack-client.browser.production.min.js +15 -15
  36. package/umd/react-server-dom-webpack-server.browser.development.js +90 -37
  37. package/umd/react-server-dom-webpack-server.browser.production.min.js +52 -51
@@ -1042,10 +1042,6 @@ function use(usable) {
1042
1042
  }
1043
1043
  }
1044
1044
 
1045
- function createSignal() {
1046
- return new AbortController().signal;
1047
- }
1048
-
1049
1045
  function resolveCache() {
1050
1046
  var request = resolveRequest();
1051
1047
 
@@ -1057,17 +1053,6 @@ function resolveCache() {
1057
1053
  }
1058
1054
 
1059
1055
  var DefaultCacheDispatcher = {
1060
- getCacheSignal: function () {
1061
- var cache = resolveCache();
1062
- var entry = cache.get(createSignal);
1063
-
1064
- if (entry === undefined) {
1065
- entry = createSignal();
1066
- cache.set(createSignal, entry);
1067
- }
1068
-
1069
- return entry;
1070
- },
1071
1056
  getCacheForType: function (resourceType) {
1072
1057
  var cache = resolveCache();
1073
1058
  var entry = cache.get(resourceType);
@@ -1430,11 +1415,15 @@ if (!ReactSharedServerInternals) {
1430
1415
  var ObjectPrototype = Object.prototype;
1431
1416
  var stringify = JSON.stringify; // Serializable values
1432
1417
  // Thenable<ReactClientValue>
1418
+ // task status
1433
1419
 
1434
1420
  var PENDING$1 = 0;
1435
1421
  var COMPLETED = 1;
1436
1422
  var ABORTED = 3;
1437
- var ERRORED$1 = 4;
1423
+ var ERRORED$1 = 4; // object reference status
1424
+
1425
+ var SEEN_BUT_NOT_YET_OUTLINED = -1;
1426
+ var NEVER_OUTLINED = -2;
1438
1427
  var ReactCurrentCache = ReactSharedServerInternals.ReactCurrentCache;
1439
1428
  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
1440
1429
 
@@ -1745,15 +1734,68 @@ function renderFragment(request, task, children) {
1745
1734
  }
1746
1735
  }
1747
1736
 
1748
- {
1749
- return children;
1750
- }
1737
+ if (task.keyPath !== null) {
1738
+ // We have a Server Component that specifies a key but we're now splitting
1739
+ // the tree using a fragment.
1740
+ var fragment = [REACT_ELEMENT_TYPE, REACT_FRAGMENT_TYPE, task.keyPath, {
1741
+ children: children
1742
+ }];
1743
+
1744
+ if (!task.implicitSlot) {
1745
+ // If this was keyed inside a set. I.e. the outer Server Component was keyed
1746
+ // then we need to handle reorders of the whole set. To do this we need to wrap
1747
+ // this array in a keyed Fragment.
1748
+ return fragment;
1749
+ } // If the outer Server Component was implicit but then an inner one had a key
1750
+ // we don't actually need to be able to move the whole set around. It'll always be
1751
+ // in an implicit slot. The key only exists to be able to reset the state of the
1752
+ // children. We could achieve the same effect by passing on the keyPath to the next
1753
+ // set of components inside the fragment. This would also allow a keyless fragment
1754
+ // reconcile against a single child.
1755
+ // Unfortunately because of JSON.stringify, we can't call the recursive loop for
1756
+ // each child within this context because we can't return a set with already resolved
1757
+ // values. E.g. a string would get double encoded. Returning would pop the context.
1758
+ // So instead, we wrap it with an unkeyed fragment and inner keyed fragment.
1759
+
1760
+
1761
+ return [fragment];
1762
+ } // Since we're yielding here, that implicitly resets the keyPath context on the
1763
+ // way up. Which is what we want since we've consumed it. If this changes to
1764
+ // be recursive serialization, we need to reset the keyPath and implicitSlot,
1765
+ // before recursing here.
1766
+
1767
+
1768
+ return children;
1751
1769
  }
1752
1770
 
1753
1771
  function renderClientElement(task, type, key, props) {
1754
- {
1755
- return [REACT_ELEMENT_TYPE, type, key, props];
1756
- } // We prepend the terminal client element that actually gets serialized with
1772
+ // the keys of any Server Components which are not serialized.
1773
+
1774
+
1775
+ var keyPath = task.keyPath;
1776
+
1777
+ if (key === null) {
1778
+ key = keyPath;
1779
+ } else if (keyPath !== null) {
1780
+ key = keyPath + ',' + key;
1781
+ }
1782
+
1783
+ var element = [REACT_ELEMENT_TYPE, type, key, props];
1784
+
1785
+ if (task.implicitSlot && key !== null) {
1786
+ // The root Server Component had no key so it was in an implicit slot.
1787
+ // If we had a key lower, it would end up in that slot with an explicit key.
1788
+ // We wrap the element in a fragment to give it an implicit key slot with
1789
+ // an inner explicit key.
1790
+ return [element];
1791
+ } // Since we're yielding here, that implicitly resets the keyPath context on the
1792
+ // way up. Which is what we want since we've consumed it. If this changes to
1793
+ // be recursive serialization, we need to reset the keyPath and implicitSlot,
1794
+ // before recursing here. We also need to reset it once we render into an array
1795
+ // or anything else too which we also get implicitly.
1796
+
1797
+
1798
+ return element;
1757
1799
  } // The chunk ID we're currently rendering that we can assign debug data to.
1758
1800
 
1759
1801
 
@@ -1872,7 +1914,7 @@ function createTask(request, model, keyPath, implicitSlot, abortSet) {
1872
1914
  if (typeof model === 'object' && model !== null) {
1873
1915
  // If we're about to write this into a new task we can assign it an ID early so that
1874
1916
  // any other references can refer to the value we're about to write.
1875
- {
1917
+ if ((keyPath !== null || implicitSlot)) ; else {
1876
1918
  request.writtenObjects.set(model, id);
1877
1919
  }
1878
1920
  }
@@ -2079,8 +2121,7 @@ function serializeMap(request, map) {
2079
2121
  var existingId = writtenObjects.get(key);
2080
2122
 
2081
2123
  if (existingId === undefined) {
2082
- // Mark all object keys as seen so that they're always outlined.
2083
- writtenObjects.set(key, -1);
2124
+ writtenObjects.set(key, SEEN_BUT_NOT_YET_OUTLINED);
2084
2125
  }
2085
2126
  }
2086
2127
  }
@@ -2100,8 +2141,7 @@ function serializeSet(request, set) {
2100
2141
  var existingId = writtenObjects.get(key);
2101
2142
 
2102
2143
  if (existingId === undefined) {
2103
- // Mark all object keys as seen so that they're always outlined.
2104
- writtenObjects.set(key, -1);
2144
+ writtenObjects.set(key, SEEN_BUT_NOT_YET_OUTLINED);
2105
2145
  }
2106
2146
  }
2107
2147
  }
@@ -2205,12 +2245,11 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
2205
2245
  var _existingId = _writtenObjects.get(value);
2206
2246
 
2207
2247
  if (_existingId !== undefined) {
2208
- if (modelRoot === value) {
2248
+ if ((task.keyPath !== null || task.implicitSlot)) ; else if (modelRoot === value) {
2209
2249
  // This is the ID we're currently emitting so we need to write it
2210
2250
  // once but if we discover it again, we refer to it by id.
2211
2251
  modelRoot = null;
2212
- } else if (_existingId === -1) {
2213
- // Seen but not yet outlined.
2252
+ } else if (_existingId === SEEN_BUT_NOT_YET_OUTLINED) {
2214
2253
  // TODO: If we throw here we can treat this as suspending which causes an outline
2215
2254
  // but that is able to reuse the same task if we're already in one but then that
2216
2255
  // will be a lazy future value rather than guaranteed to exist but maybe that's good.
@@ -2229,7 +2268,11 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
2229
2268
  } else {
2230
2269
  // This is the first time we've seen this object. We may never see it again
2231
2270
  // so we'll inline it. Mark it as seen. If we see it again, we'll outline.
2232
- _writtenObjects.set(value, -1);
2271
+ _writtenObjects.set(value, SEEN_BUT_NOT_YET_OUTLINED); // The element's props are marked as "never outlined" so that they are inlined into
2272
+ // the same row as the element itself.
2273
+
2274
+
2275
+ _writtenObjects.set(value.props, NEVER_OUTLINED);
2233
2276
  }
2234
2277
 
2235
2278
  var element = value;
@@ -2254,7 +2297,11 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
2254
2297
  var ref;
2255
2298
 
2256
2299
  {
2257
- ref = element.ref;
2300
+ // TODO: This is a temporary, intermediate step. Once the feature
2301
+ // flag is removed, we should get the ref off the props object right
2302
+ // before using it.
2303
+ var refProp = props.ref;
2304
+ ref = refProp !== undefined ? refProp : null;
2258
2305
  } // Attempt to render the Server Component.
2259
2306
 
2260
2307
 
@@ -2303,7 +2350,14 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
2303
2350
 
2304
2351
  if (typeof value.then === 'function') {
2305
2352
  if (existingId !== undefined) {
2306
- if (modelRoot === value) {
2353
+ if ((task.keyPath !== null || task.implicitSlot)) {
2354
+ // If we're in some kind of context we can't reuse the result of this render or
2355
+ // previous renders of this element. We only reuse Promises if they're not wrapped
2356
+ // by another Server Component.
2357
+ var _promiseId = serializeThenable(request, task, value);
2358
+
2359
+ return serializePromiseID(_promiseId);
2360
+ } else if (modelRoot === value) {
2307
2361
  // This is the ID we're currently emitting so we need to write it
2308
2362
  // once but if we discover it again, we refer to it by id.
2309
2363
  modelRoot = null;
@@ -2325,12 +2379,11 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
2325
2379
  // This is the ID we're currently emitting so we need to write it
2326
2380
  // once but if we discover it again, we refer to it by id.
2327
2381
  modelRoot = null;
2328
- } else if (existingId === -1) {
2329
- // Seen but not yet outlined.
2382
+ } else if (existingId === SEEN_BUT_NOT_YET_OUTLINED) {
2330
2383
  var _newId = outlineModel(request, value);
2331
2384
 
2332
2385
  return serializeByValueID(_newId);
2333
- } else {
2386
+ } else if (existingId !== NEVER_OUTLINED) {
2334
2387
  // We've already emitted this as an outlined object, so we can
2335
2388
  // just refer to that by its existing ID.
2336
2389
  return serializeByValueID(existingId);
@@ -2338,7 +2391,7 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
2338
2391
  } else {
2339
2392
  // This is the first time we've seen this object. We may never see it again
2340
2393
  // so we'll inline it. Mark it as seen. If we see it again, we'll outline.
2341
- writtenObjects.set(value, -1);
2394
+ writtenObjects.set(value, SEEN_BUT_NOT_YET_OUTLINED);
2342
2395
  }
2343
2396
 
2344
2397
  if (isArray(value)) {
@@ -1002,10 +1002,6 @@ function use(usable) {
1002
1002
  }
1003
1003
  }
1004
1004
 
1005
- function createSignal() {
1006
- return new AbortController().signal;
1007
- }
1008
-
1009
1005
  function resolveCache() {
1010
1006
  const request = resolveRequest();
1011
1007
 
@@ -1017,18 +1013,6 @@ function resolveCache() {
1017
1013
  }
1018
1014
 
1019
1015
  const DefaultCacheDispatcher = {
1020
- getCacheSignal() {
1021
- const cache = resolveCache();
1022
- let entry = cache.get(createSignal);
1023
-
1024
- if (entry === undefined) {
1025
- entry = createSignal();
1026
- cache.set(createSignal, entry);
1027
- }
1028
-
1029
- return entry;
1030
- },
1031
-
1032
1016
  getCacheForType(resourceType) {
1033
1017
  const cache = resolveCache();
1034
1018
  let entry = cache.get(resourceType);
@@ -1261,11 +1245,15 @@ if (!ReactSharedServerInternals) {
1261
1245
  const ObjectPrototype = Object.prototype;
1262
1246
  const stringify = JSON.stringify; // Serializable values
1263
1247
  // Thenable<ReactClientValue>
1248
+ // task status
1264
1249
 
1265
1250
  const PENDING$1 = 0;
1266
1251
  const COMPLETED = 1;
1267
1252
  const ABORTED = 3;
1268
- const ERRORED$1 = 4;
1253
+ const ERRORED$1 = 4; // object reference status
1254
+
1255
+ const SEEN_BUT_NOT_YET_OUTLINED = -1;
1256
+ const NEVER_OUTLINED = -2;
1269
1257
  const ReactCurrentCache = ReactSharedServerInternals.ReactCurrentCache;
1270
1258
  const ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
1271
1259
 
@@ -1523,15 +1511,68 @@ function renderFunctionComponent(request, task, key, Component, props) {
1523
1511
 
1524
1512
  function renderFragment(request, task, children) {
1525
1513
 
1526
- {
1527
- return children;
1528
- }
1514
+ if (task.keyPath !== null) {
1515
+ // We have a Server Component that specifies a key but we're now splitting
1516
+ // the tree using a fragment.
1517
+ const fragment = [REACT_ELEMENT_TYPE, REACT_FRAGMENT_TYPE, task.keyPath, {
1518
+ children
1519
+ }];
1520
+
1521
+ if (!task.implicitSlot) {
1522
+ // If this was keyed inside a set. I.e. the outer Server Component was keyed
1523
+ // then we need to handle reorders of the whole set. To do this we need to wrap
1524
+ // this array in a keyed Fragment.
1525
+ return fragment;
1526
+ } // If the outer Server Component was implicit but then an inner one had a key
1527
+ // we don't actually need to be able to move the whole set around. It'll always be
1528
+ // in an implicit slot. The key only exists to be able to reset the state of the
1529
+ // children. We could achieve the same effect by passing on the keyPath to the next
1530
+ // set of components inside the fragment. This would also allow a keyless fragment
1531
+ // reconcile against a single child.
1532
+ // Unfortunately because of JSON.stringify, we can't call the recursive loop for
1533
+ // each child within this context because we can't return a set with already resolved
1534
+ // values. E.g. a string would get double encoded. Returning would pop the context.
1535
+ // So instead, we wrap it with an unkeyed fragment and inner keyed fragment.
1536
+
1537
+
1538
+ return [fragment];
1539
+ } // Since we're yielding here, that implicitly resets the keyPath context on the
1540
+ // way up. Which is what we want since we've consumed it. If this changes to
1541
+ // be recursive serialization, we need to reset the keyPath and implicitSlot,
1542
+ // before recursing here.
1543
+
1544
+
1545
+ return children;
1529
1546
  }
1530
1547
 
1531
1548
  function renderClientElement(task, type, key, props) {
1532
- {
1533
- return [REACT_ELEMENT_TYPE, type, key, props];
1534
- } // We prepend the terminal client element that actually gets serialized with
1549
+ // the keys of any Server Components which are not serialized.
1550
+
1551
+
1552
+ const keyPath = task.keyPath;
1553
+
1554
+ if (key === null) {
1555
+ key = keyPath;
1556
+ } else if (keyPath !== null) {
1557
+ key = keyPath + ',' + key;
1558
+ }
1559
+
1560
+ const element = [REACT_ELEMENT_TYPE, type, key, props];
1561
+
1562
+ if (task.implicitSlot && key !== null) {
1563
+ // The root Server Component had no key so it was in an implicit slot.
1564
+ // If we had a key lower, it would end up in that slot with an explicit key.
1565
+ // We wrap the element in a fragment to give it an implicit key slot with
1566
+ // an inner explicit key.
1567
+ return [element];
1568
+ } // Since we're yielding here, that implicitly resets the keyPath context on the
1569
+ // way up. Which is what we want since we've consumed it. If this changes to
1570
+ // be recursive serialization, we need to reset the keyPath and implicitSlot,
1571
+ // before recursing here. We also need to reset it once we render into an array
1572
+ // or anything else too which we also get implicitly.
1573
+
1574
+
1575
+ return element;
1535
1576
  } // The chunk ID we're currently rendering that we can assign debug data to.
1536
1577
 
1537
1578
 
@@ -1623,7 +1664,7 @@ function createTask(request, model, keyPath, implicitSlot, abortSet) {
1623
1664
  if (typeof model === 'object' && model !== null) {
1624
1665
  // If we're about to write this into a new task we can assign it an ID early so that
1625
1666
  // any other references can refer to the value we're about to write.
1626
- {
1667
+ if ((keyPath !== null || implicitSlot)) ; else {
1627
1668
  request.writtenObjects.set(model, id);
1628
1669
  }
1629
1670
  }
@@ -1809,8 +1850,7 @@ function serializeMap(request, map) {
1809
1850
  const existingId = writtenObjects.get(key);
1810
1851
 
1811
1852
  if (existingId === undefined) {
1812
- // Mark all object keys as seen so that they're always outlined.
1813
- writtenObjects.set(key, -1);
1853
+ writtenObjects.set(key, SEEN_BUT_NOT_YET_OUTLINED);
1814
1854
  }
1815
1855
  }
1816
1856
  }
@@ -1830,8 +1870,7 @@ function serializeSet(request, set) {
1830
1870
  const existingId = writtenObjects.get(key);
1831
1871
 
1832
1872
  if (existingId === undefined) {
1833
- // Mark all object keys as seen so that they're always outlined.
1834
- writtenObjects.set(key, -1);
1873
+ writtenObjects.set(key, SEEN_BUT_NOT_YET_OUTLINED);
1835
1874
  }
1836
1875
  }
1837
1876
  }
@@ -1934,12 +1973,11 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
1934
1973
  const existingId = writtenObjects.get(value);
1935
1974
 
1936
1975
  if (existingId !== undefined) {
1937
- if (modelRoot === value) {
1976
+ if ((task.keyPath !== null || task.implicitSlot)) ; else if (modelRoot === value) {
1938
1977
  // This is the ID we're currently emitting so we need to write it
1939
1978
  // once but if we discover it again, we refer to it by id.
1940
1979
  modelRoot = null;
1941
- } else if (existingId === -1) {
1942
- // Seen but not yet outlined.
1980
+ } else if (existingId === SEEN_BUT_NOT_YET_OUTLINED) {
1943
1981
  // TODO: If we throw here we can treat this as suspending which causes an outline
1944
1982
  // but that is able to reuse the same task if we're already in one but then that
1945
1983
  // will be a lazy future value rather than guaranteed to exist but maybe that's good.
@@ -1958,7 +1996,10 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
1958
1996
  } else {
1959
1997
  // This is the first time we've seen this object. We may never see it again
1960
1998
  // so we'll inline it. Mark it as seen. If we see it again, we'll outline.
1961
- writtenObjects.set(value, -1);
1999
+ writtenObjects.set(value, SEEN_BUT_NOT_YET_OUTLINED); // The element's props are marked as "never outlined" so that they are inlined into
2000
+ // the same row as the element itself.
2001
+
2002
+ writtenObjects.set(value.props, NEVER_OUTLINED);
1962
2003
  }
1963
2004
 
1964
2005
  const element = value;
@@ -1967,7 +2008,11 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
1967
2008
  let ref;
1968
2009
 
1969
2010
  {
1970
- ref = element.ref;
2011
+ // TODO: This is a temporary, intermediate step. Once the feature
2012
+ // flag is removed, we should get the ref off the props object right
2013
+ // before using it.
2014
+ const refProp = props.ref;
2015
+ ref = refProp !== undefined ? refProp : null;
1971
2016
  } // Attempt to render the Server Component.
1972
2017
 
1973
2018
 
@@ -1998,7 +2043,13 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
1998
2043
 
1999
2044
  if (typeof value.then === 'function') {
2000
2045
  if (existingId !== undefined) {
2001
- if (modelRoot === value) {
2046
+ if ((task.keyPath !== null || task.implicitSlot)) {
2047
+ // If we're in some kind of context we can't reuse the result of this render or
2048
+ // previous renders of this element. We only reuse Promises if they're not wrapped
2049
+ // by another Server Component.
2050
+ const promiseId = serializeThenable(request, task, value);
2051
+ return serializePromiseID(promiseId);
2052
+ } else if (modelRoot === value) {
2002
2053
  // This is the ID we're currently emitting so we need to write it
2003
2054
  // once but if we discover it again, we refer to it by id.
2004
2055
  modelRoot = null;
@@ -2020,11 +2071,10 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
2020
2071
  // This is the ID we're currently emitting so we need to write it
2021
2072
  // once but if we discover it again, we refer to it by id.
2022
2073
  modelRoot = null;
2023
- } else if (existingId === -1) {
2024
- // Seen but not yet outlined.
2074
+ } else if (existingId === SEEN_BUT_NOT_YET_OUTLINED) {
2025
2075
  const newId = outlineModel(request, value);
2026
2076
  return serializeByValueID(newId);
2027
- } else {
2077
+ } else if (existingId !== NEVER_OUTLINED) {
2028
2078
  // We've already emitted this as an outlined object, so we can
2029
2079
  // just refer to that by its existing ID.
2030
2080
  return serializeByValueID(existingId);
@@ -2032,7 +2082,7 @@ function renderModelDestructive(request, task, parent, parentPropertyName, value
2032
2082
  } else {
2033
2083
  // This is the first time we've seen this object. We may never see it again
2034
2084
  // so we'll inline it. Mark it as seen. If we see it again, we'll outline.
2035
- writtenObjects.set(value, -1);
2085
+ writtenObjects.set(value, SEEN_BUT_NOT_YET_OUTLINED);
2036
2086
  }
2037
2087
 
2038
2088
  if (isArray(value)) {
@@ -7,14 +7,14 @@
7
7
  This source code is licensed under the MIT license found in the
8
8
  LICENSE file in the root directory of this source tree.
9
9
  */
10
- 'use strict';var ba=require("react-dom"),ca=require("react"),m=null,n=0;function p(a,b){if(0!==b.byteLength)if(2048<b.byteLength)0<n&&(a.enqueue(new Uint8Array(m.buffer,0,n)),m=new Uint8Array(2048),n=0),a.enqueue(b);else{var c=m.length-n;c<b.byteLength&&(0===c?a.enqueue(m):(m.set(b.subarray(0,c),n),a.enqueue(m),b=b.subarray(c)),m=new Uint8Array(2048),n=0);m.set(b,n);n+=b.byteLength}return!0}var q=new TextEncoder;function da(a,b){"function"===typeof a.error?a.error(b):a.close()}
11
- var r=Symbol.for("react.client.reference"),t=Symbol.for("react.server.reference");function v(a,b,c){return Object.defineProperties(a,{$$typeof:{value:r},$$id:{value:b},$$async:{value:c}})}var ea=Function.prototype.bind,fa=Array.prototype.slice;function ha(){var a=ea.apply(this,arguments);if(this.$$typeof===t){var b=fa.call(arguments,1);return Object.defineProperties(a,{$$typeof:{value:t},$$id:{value:this.$$id},$$bound:{value:this.$$bound?this.$$bound.concat(b):b},bind:{value:ha}})}return a}
10
+ 'use strict';var aa=require("react-dom"),ca=require("react"),m=null,n=0;function p(a,b){if(0!==b.byteLength)if(2048<b.byteLength)0<n&&(a.enqueue(new Uint8Array(m.buffer,0,n)),m=new Uint8Array(2048),n=0),a.enqueue(b);else{var c=m.length-n;c<b.byteLength&&(0===c?a.enqueue(m):(m.set(b.subarray(0,c),n),a.enqueue(m),b=b.subarray(c)),m=new Uint8Array(2048),n=0);m.set(b,n);n+=b.byteLength}return!0}var q=new TextEncoder;function da(a,b){"function"===typeof a.error?a.error(b):a.close()}
11
+ var r=Symbol.for("react.client.reference"),u=Symbol.for("react.server.reference");function v(a,b,c){return Object.defineProperties(a,{$$typeof:{value:r},$$id:{value:b},$$async:{value:c}})}var ea=Function.prototype.bind,fa=Array.prototype.slice;function ha(){var a=ea.apply(this,arguments);if(this.$$typeof===u){var b=fa.call(arguments,1);return Object.defineProperties(a,{$$typeof:{value:u},$$id:{value:this.$$id},$$bound:{value:this.$$bound?this.$$bound.concat(b):b},bind:{value:ha}})}return a}
12
12
  var ia=Promise.prototype,ja={get:function(a,b){switch(b){case "$$typeof":return a.$$typeof;case "$$id":return a.$$id;case "$$async":return a.$$async;case "name":return a.name;case "displayName":return;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case Symbol.toStringTag:return Object.prototype[Symbol.toStringTag];case "Provider":throw Error("Cannot render a Client Context Provider on the Server. Instead, you can export a Client Component wrapper that itself renders a Client Context Provider.");
13
13
  }throw Error("Cannot access "+(String(a.name)+"."+String(b))+" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.");},set:function(){throw Error("Cannot assign to a client module from a server module.");}};
14
14
  function ka(a,b){switch(b){case "$$typeof":return a.$$typeof;case "$$id":return a.$$id;case "$$async":return a.$$async;case "name":return a.name;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];case Symbol.toStringTag:return Object.prototype[Symbol.toStringTag];case "__esModule":var c=a.$$id;a.default=v(function(){throw Error("Attempted to call the default export of "+c+" from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
15
15
  },a.$$id+"#",a.$$async);return!0;case "then":if(a.then)return a.then;if(a.$$async)return;var d=v({},a.$$id,!0),e=new Proxy(d,la);a.status="fulfilled";a.value=e;return a.then=v(function(g){return Promise.resolve(g(e))},a.$$id+"#then",!1)}if("symbol"===typeof b)throw Error("Cannot read Symbol exports. Only named exports are supported on a client module imported on the server.");d=a[b];d||(d=v(function(){throw Error("Attempted to call "+String(b)+"() from the server but "+String(b)+" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.");
16
16
  },a.$$id+"#"+b,a.$$async),Object.defineProperty(d,"name",{value:b}),d=a[b]=new Proxy(d,ja));return d}
17
- var la={get:function(a,b){return ka(a,b)},getOwnPropertyDescriptor:function(a,b){var c=Object.getOwnPropertyDescriptor(a,b);c||(c={value:ka(a,b),writable:!1,configurable:!1,enumerable:!1},Object.defineProperty(a,b,c));return c},getPrototypeOf:function(){return ia},set:function(){throw Error("Cannot assign to a client module from a server module.");}},ma=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDOMCurrentDispatcher,w=ma.current;
17
+ var la={get:function(a,b){return ka(a,b)},getOwnPropertyDescriptor:function(a,b){var c=Object.getOwnPropertyDescriptor(a,b);c||(c={value:ka(a,b),writable:!1,configurable:!1,enumerable:!1},Object.defineProperty(a,b,c));return c},getPrototypeOf:function(){return ia},set:function(){throw Error("Cannot assign to a client module from a server module.");}},ma=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDOMCurrentDispatcher,w=ma.current;
18
18
  ma.current={prefetchDNS:na,preconnect:oa,preload:pa,preloadModule:qa,preinitStyle:ra,preinitScript:sa,preinitModuleScript:ta};function na(a){if("string"===typeof a&&a){var b=x();if(b){var c=b.hints,d="D|"+a;c.has(d)||(c.add(d),y(b,"D",a))}else w.prefetchDNS(a)}}function oa(a,b){if("string"===typeof a){var c=x();if(c){var d=c.hints,e="C|"+(null==b?"null":b)+"|"+a;d.has(e)||(d.add(e),"string"===typeof b?y(c,"C",[a,b]):y(c,"C",a))}else w.preconnect(a,b)}}
19
19
  function pa(a,b,c){if("string"===typeof a){var d=x();if(d){var e=d.hints,g="L";if("image"===b&&c){var f=c.imageSrcSet,h=c.imageSizes,k="";"string"===typeof f&&""!==f?(k+="["+f+"]","string"===typeof h&&(k+="["+h+"]")):k+="[][]"+a;g+="[image]"+k}else g+="["+b+"]"+a;e.has(g)||(e.add(g),(c=A(c))?y(d,"L",[a,b,c]):y(d,"L",[a,b]))}else w.preload(a,b,c)}}
20
20
  function qa(a,b){if("string"===typeof a){var c=x();if(c){var d=c.hints,e="m|"+a;if(d.has(e))return;d.add(e);return(b=A(b))?y(c,"m",[a,b]):y(c,"m",a)}w.preloadModule(a,b)}}function ra(a,b,c){if("string"===typeof a){var d=x();if(d){var e=d.hints,g="S|"+a;if(e.has(g))return;e.add(g);return(c=A(c))?y(d,"S",[a,"string"===typeof b?b:0,c]):"string"===typeof b?y(d,"S",[a,b]):y(d,"S",a)}w.preinitStyle(a,b,c)}}
@@ -28,37 +28,38 @@ function Ha(){}function Ia(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(Ha,
28
28
  function Ja(){if(null===F)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=F;F=null;return a}var G=null,Ka=0,H=null;function La(){var a=H||[];H=null;return a}
29
29
  var Qa={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:I,useTransition:I,readContext:Ma,useContext:Ma,useReducer:I,useRef:I,useState:I,useInsertionEffect:I,useLayoutEffect:I,useImperativeHandle:I,useEffect:I,useId:Na,useSyncExternalStore:I,useCacheRefresh:function(){return Oa},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=Ea;return b},use:Pa};
30
30
  function I(){throw Error("This Hook is not supported in Server Components.");}function Oa(){throw Error("Refreshing the cache is not supported in Server Components.");}function Ma(){throw Error("Cannot read a Client Context from a Server Component.");}function Na(){if(null===G)throw Error("useId can only be used while React is rendering");var a=G.identifierCount++;return":"+G.identifierPrefix+"S"+a.toString(32)+":"}
31
- function Pa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=Ka;Ka+=1;null===H&&(H=[]);return Ia(H,a,b)}a.$$typeof===za&&Ma()}if(a.$$typeof===r){if(null!=a.value&&a.value.$$typeof===za)throw Error("Cannot read a Client Context from a Server Component.");throw Error("Cannot use() an already resolved Client Reference.");}throw Error("An unsupported type was passed to use(): "+String(a));}function Ra(){return(new AbortController).signal}
32
- function Sa(){var a=x();return a?a.cache:new Map}var Ta={getCacheSignal:function(){var a=Sa(),b=a.get(Ra);void 0===b&&(b=Ra(),a.set(Ra,b));return b},getCacheForType:function(a){var b=Sa(),c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},Ua=Array.isArray,Va=Object.getPrototypeOf;function Wa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(b,c){return c})}
33
- function Xa(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.slice(0,10)+"...");case "object":if(Ua(a))return"[...]";if(null!==a&&a.$$typeof===Ya)return"client";a=Wa(a);return"Object"===a?"{...}":a;case "function":return a.$$typeof===Ya?"client":(a=a.displayName||a.name)?"function "+a:"function";default:return String(a)}}
34
- function J(a){if("string"===typeof a)return a;switch(a){case Ba:return"Suspense";case Ca:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Aa:return J(a.render);case Da:return J(a.type);case E:var b=a._payload;a=a._init;try{return J(a(b))}catch(c){}}return""}var Ya=Symbol.for("react.client.reference");
35
- function K(a,b){var c=Wa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(Ua(a)){var e="[";for(var g=0;g<a.length;g++){0<g&&(e+=", ");var f=a[g];f="object"===typeof f&&null!==f?K(f):Xa(f);""+g===b?(c=e.length,d=f.length,e+=f):e=10>f.length&&40>e.length+f.length?e+f:e+"..."}e+="]"}else if(a.$$typeof===C)e="<"+J(a.type)+"/>";else{if(a.$$typeof===Ya)return"client";e="{";g=Object.keys(a);for(f=0;f<g.length;f++){0<f&&(e+=", ");var h=g[f],k=JSON.stringify(h);e+=('"'+h+'"'===k?h:k)+": ";k=a[h];k=
36
- "object"===typeof k&&null!==k?K(k):Xa(k);h===b?(c=e.length,d=k.length,e+=k):e=10>k.length&&40>e.length+k.length?e+k:e+"..."}e+="}"}return void 0===b?e:-1<c&&0<d?(a=" ".repeat(c)+"^".repeat(d),"\n "+e+"\n "+a):"\n "+e}var Za=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$a=ca.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
37
- if(!$a)throw Error('The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.');var ab=Object.prototype,L=JSON.stringify,bb=$a.ReactCurrentCache,cb=Za.ReactCurrentDispatcher;function db(a){console.error(a)}function eb(){}
38
- function fb(a,b,c,d,e){if(null!==bb.current&&bb.current!==Ta)throw Error("Currently React only supports one RSC renderer at a time.");bb.current=Ta;var g=new Set,f=[],h=new Set;b={status:0,flushScheduled:!1,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,hints:h,abortableTasks:g,pingedTasks:f,completedImportChunks:[],completedHintChunks:[],completedRegularChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenClientReferences:new Map,writtenServerReferences:new Map,
39
- writtenObjects:new WeakMap,identifierPrefix:d||"",identifierCount:1,taintCleanupQueue:[],onError:void 0===c?db:c,onPostpone:void 0===e?eb:e};a=M(b,a,null,!1,g);f.push(a);return b}var N=null;function x(){if(N)return N;if(B){var a=ua.getStore();if(a)return a}return null}
40
- function gb(a,b,c){var d=M(a,null,b.keyPath,b.implicitSlot,a.abortableTasks);switch(c.status){case "fulfilled":return d.model=c.value,hb(a,d),d.id;case "rejected":return b=O(a,c.reason),P(a,d.id,b),d.id;default:"string"!==typeof c.status&&(c.status="pending",c.then(function(e){"pending"===c.status&&(c.status="fulfilled",c.value=e)},function(e){"pending"===c.status&&(c.status="rejected",c.reason=e)}))}c.then(function(e){d.model=e;hb(a,d)},function(e){d.status=4;e=O(a,e);P(a,d.id,e);a.abortableTasks.delete(d);
41
- null!==a.destination&&Q(a,a.destination)});return d.id}function y(a,b,c){c=L(c);var d=a.nextChunkId++;b="H"+b;b=d.toString(16)+":"+b;c=q.encode(b+c+"\n");a.completedHintChunks.push(c);ib(a)}function jb(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}
42
- function kb(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:E,_payload:a,_init:jb}}
43
- function lb(a,b,c,d,e){var g=b.thenableState;b.thenableState=null;Ka=0;H=g;d=d(e,void 0);if("object"===typeof d&&null!==d&&"function"===typeof d.then){e=d;if("fulfilled"===e.status)return e.value;d=kb(d)}e=b.keyPath;g=b.implicitSlot;null!==c?b.keyPath=null===e?c:e+","+c:null===e&&(b.implicitSlot=!0);a=R(a,b,S,"",d);b.keyPath=e;b.implicitSlot=g;return a}
44
- function mb(a,b,c,d,e,g){if(null!==e&&void 0!==e)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof c)return c.$$typeof===r||c.$$typeof===va?[C,c,d,g]:lb(a,b,d,c,g);if("string"===typeof c)return[C,c,d,g];if("symbol"===typeof c)return c===ya&&null===d?(d=b.implicitSlot,null===b.keyPath&&(b.implicitSlot=!0),a=R(a,b,S,"",g.children),b.implicitSlot=d,a):[C,c,d,g];if(null!=c&&"object"===typeof c){if(c.$$typeof===r)return[C,c,d,g];switch(c.$$typeof){case E:var f=
45
- c._init;c=f(c._payload);return mb(a,b,c,d,e,g);case Aa:return lb(a,b,d,c.render,g);case Da:return mb(a,b,c.type,d,e,g)}}throw Error("Unsupported Server Component type: "+Xa(c));}function hb(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&(a.flushScheduled=null!==a.destination,setTimeout(function(){return nb(a)},0))}
46
- function M(a,b,c,d,e){a.pendingChunks++;var g=a.nextChunkId++;"object"===typeof b&&null!==b&&a.writtenObjects.set(b,g);var f={id:g,status:0,model:b,keyPath:c,implicitSlot:d,ping:function(){return hb(a,f)},toJSON:function(h,k){var l=f.keyPath,z=f.implicitSlot;try{var u=R(a,f,this,h,k)}catch(aa){if(h=aa===Ga?Ja():aa,k=f.model,k="object"===typeof k&&null!==k&&(k.$$typeof===C||k.$$typeof===E),"object"===typeof h&&null!==h&&"function"===typeof h.then){u=M(a,f.model,f.keyPath,f.implicitSlot,a.abortableTasks);
47
- var D=u.ping;h.then(D,D);u.thenableState=La();f.keyPath=l;f.implicitSlot=z;u=k?"$L"+u.id.toString(16):T(u.id)}else if(f.keyPath=l,f.implicitSlot=z,k)a.pendingChunks++,l=a.nextChunkId++,z=O(a,h),P(a,l,z),u="$L"+l.toString(16);else throw h;}return u},thenableState:null};e.add(f);return f}function T(a){return"$"+a.toString(16)}function ob(a,b,c){a=L(c);b=b.toString(16)+":"+a+"\n";return q.encode(b)}
48
- function pb(a,b,c,d){var e=d.$$async?d.$$id+"#async":d.$$id,g=a.writtenClientReferences,f=g.get(e);if(void 0!==f)return b[0]===C&&"1"===c?"$L"+f.toString(16):T(f);try{var h=a.bundlerConfig,k=d.$$id;f="";var l=h[k];if(l)f=l.name;else{var z=k.lastIndexOf("#");-1!==z&&(f=k.slice(z+1),l=h[k.slice(0,z)]);if(!l)throw Error('Could not find the module "'+k+'" in the React Client Manifest. This is probably a bug in the React Server Components bundler.');}var u=!0===d.$$async?[l.id,l.chunks,f,1]:[l.id,l.chunks,
49
- f];a.pendingChunks++;var D=a.nextChunkId++,aa=L(u),Ib=D.toString(16)+":I"+aa+"\n",Jb=q.encode(Ib);a.completedImportChunks.push(Jb);g.set(e,D);return b[0]===C&&"1"===c?"$L"+D.toString(16):T(D)}catch(Kb){return a.pendingChunks++,b=a.nextChunkId++,c=O(a,Kb),P(a,b,c),T(b)}}function U(a,b){b=M(a,b,null,!1,a.abortableTasks);qb(a,b);return b.id}var V=!1;
50
- function R(a,b,c,d,e){b.model=e;if(e===C)return"$";if(null===e)return null;if("object"===typeof e){switch(e.$$typeof){case C:c=a.writtenObjects;d=c.get(e);if(void 0!==d)if(V===e)V=null;else return-1===d?(a=U(a,e),T(a)):T(d);else c.set(e,-1);return mb(a,b,e.type,e.key,e.ref,e.props);case E:return b.thenableState=null,c=e._init,e=c(e._payload),R(a,b,S,"",e)}if(e.$$typeof===r)return pb(a,c,d,e);c=a.writtenObjects;d=c.get(e);if("function"===typeof e.then){if(void 0!==d)if(V===e)V=null;else return"$@"+
51
- d.toString(16);a=gb(a,b,e);c.set(e,a);return"$@"+a.toString(16)}if(void 0!==d)if(V===e)V=null;else return-1===d?(a=U(a,e),T(a)):T(d);else c.set(e,-1);if(Ua(e))return e;if(e instanceof Map){e=Array.from(e);for(b=0;b<e.length;b++)c=e[b][0],"object"===typeof c&&null!==c&&(d=a.writtenObjects,void 0===d.get(c)&&d.set(c,-1));return"$Q"+U(a,e).toString(16)}if(e instanceof Set){e=Array.from(e);for(b=0;b<e.length;b++)c=e[b],"object"===typeof c&&null!==c&&(d=a.writtenObjects,void 0===d.get(c)&&d.set(c,-1));
52
- return"$W"+U(a,e).toString(16)}null===e||"object"!==typeof e?a=null:(a=Fa&&e[Fa]||e["@@iterator"],a="function"===typeof a?a:null);if(a)return a=Array.from(e),a;a=Va(e);if(a!==ab&&(null===a||null!==Va(a)))throw Error("Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.");return e}if("string"===typeof e){if("Z"===e[e.length-1]&&c[d]instanceof Date)return"$D"+e;if(1024<=e.length)return a.pendingChunks+=2,b=
53
- a.nextChunkId++,e=q.encode(e),c=e.byteLength,c=b.toString(16)+":T"+c.toString(16)+",",c=q.encode(c),a.completedRegularChunks.push(c,e),T(b);a="$"===e[0]?"$"+e:e;return a}if("boolean"===typeof e)return e;if("number"===typeof e)return Number.isFinite(e)?0===e&&-Infinity===1/e?"$-0":e:Infinity===e?"$Infinity":-Infinity===e?"$-Infinity":"$NaN";if("undefined"===typeof e)return"$undefined";if("function"===typeof e){if(e.$$typeof===r)return pb(a,c,d,e);if(e.$$typeof===t)return b=a.writtenServerReferences,
54
- c=b.get(e),void 0!==c?a="$F"+c.toString(16):(c=e.$$bound,c={id:e.$$id,bound:c?Promise.resolve(c):null},a=U(a,c),b.set(e,a),a="$F"+a.toString(16)),a;if(e.$$typeof===va)return"$T"+e.$$id;if(/^on[A-Z]/.test(d))throw Error("Event handlers cannot be passed to Client Component props."+K(c,d)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error('Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.'+
31
+ function Pa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=Ka;Ka+=1;null===H&&(H=[]);return Ia(H,a,b)}a.$$typeof===za&&Ma()}if(a.$$typeof===r){if(null!=a.value&&a.value.$$typeof===za)throw Error("Cannot read a Client Context from a Server Component.");throw Error("Cannot use() an already resolved Client Reference.");}throw Error("An unsupported type was passed to use(): "+String(a));}
32
+ var Ra={getCacheForType:function(a){var b=(b=x())?b.cache:new Map;var c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},Sa=Array.isArray,Ta=Object.getPrototypeOf;function Ua(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(b,c){return c})}
33
+ function Va(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.slice(0,10)+"...");case "object":if(Sa(a))return"[...]";if(null!==a&&a.$$typeof===Wa)return"client";a=Ua(a);return"Object"===a?"{...}":a;case "function":return a.$$typeof===Wa?"client":(a=a.displayName||a.name)?"function "+a:"function";default:return String(a)}}
34
+ function J(a){if("string"===typeof a)return a;switch(a){case Ba:return"Suspense";case Ca:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Aa:return J(a.render);case Da:return J(a.type);case E:var b=a._payload;a=a._init;try{return J(a(b))}catch(c){}}return""}var Wa=Symbol.for("react.client.reference");
35
+ function K(a,b){var c=Ua(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(Sa(a)){var e="[";for(var g=0;g<a.length;g++){0<g&&(e+=", ");var f=a[g];f="object"===typeof f&&null!==f?K(f):Va(f);""+g===b?(c=e.length,d=f.length,e+=f):e=10>f.length&&40>e.length+f.length?e+f:e+"..."}e+="]"}else if(a.$$typeof===C)e="<"+J(a.type)+"/>";else{if(a.$$typeof===Wa)return"client";e="{";g=Object.keys(a);for(f=0;f<g.length;f++){0<f&&(e+=", ");var h=g[f],k=JSON.stringify(h);e+=('"'+h+'"'===k?h:k)+": ";k=a[h];k=
36
+ "object"===typeof k&&null!==k?K(k):Va(k);h===b?(c=e.length,d=k.length,e+=k):e=10>k.length&&40>e.length+k.length?e+k:e+"..."}e+="}"}return void 0===b?e:-1<c&&0<d?(a=" ".repeat(c)+"^".repeat(d),"\n "+e+"\n "+a):"\n "+e}var Xa=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ya=ca.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
37
+ if(!Ya)throw Error('The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.');var Za=Object.prototype,L=JSON.stringify,$a=Ya.ReactCurrentCache,ab=Xa.ReactCurrentDispatcher;function bb(a){console.error(a)}function cb(){}
38
+ function db(a,b,c,d,e){if(null!==$a.current&&$a.current!==Ra)throw Error("Currently React only supports one RSC renderer at a time.");$a.current=Ra;var g=new Set,f=[],h=new Set;b={status:0,flushScheduled:!1,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,hints:h,abortableTasks:g,pingedTasks:f,completedImportChunks:[],completedHintChunks:[],completedRegularChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenClientReferences:new Map,writtenServerReferences:new Map,
39
+ writtenObjects:new WeakMap,identifierPrefix:d||"",identifierCount:1,taintCleanupQueue:[],onError:void 0===c?bb:c,onPostpone:void 0===e?cb:e};a=M(b,a,null,!1,g);f.push(a);return b}var N=null;function x(){if(N)return N;if(B){var a=ua.getStore();if(a)return a}return null}
40
+ function eb(a,b,c){var d=M(a,null,b.keyPath,b.implicitSlot,a.abortableTasks);switch(c.status){case "fulfilled":return d.model=c.value,fb(a,d),d.id;case "rejected":return b=O(a,c.reason),P(a,d.id,b),d.id;default:"string"!==typeof c.status&&(c.status="pending",c.then(function(e){"pending"===c.status&&(c.status="fulfilled",c.value=e)},function(e){"pending"===c.status&&(c.status="rejected",c.reason=e)}))}c.then(function(e){d.model=e;fb(a,d)},function(e){d.status=4;e=O(a,e);P(a,d.id,e);a.abortableTasks.delete(d);
41
+ null!==a.destination&&Q(a,a.destination)});return d.id}function y(a,b,c){c=L(c);var d=a.nextChunkId++;b="H"+b;b=d.toString(16)+":"+b;c=q.encode(b+c+"\n");a.completedHintChunks.push(c);gb(a)}function hb(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}
42
+ function ib(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:E,_payload:a,_init:hb}}
43
+ function jb(a,b,c,d,e){var g=b.thenableState;b.thenableState=null;Ka=0;H=g;d=d(e,void 0);if("object"===typeof d&&null!==d&&"function"===typeof d.then){e=d;if("fulfilled"===e.status)return e.value;d=ib(d)}e=b.keyPath;g=b.implicitSlot;null!==c?b.keyPath=null===e?c:e+","+c:null===e&&(b.implicitSlot=!0);a=R(a,b,S,"",d);b.keyPath=e;b.implicitSlot=g;return a}function kb(a,b,c){return null!==b.keyPath?(a=[C,ya,b.keyPath,{children:c}],b.implicitSlot?[a]:a):c}
44
+ function lb(a,b,c,d){var e=a.keyPath;null===c?c=e:null!==e&&(c=e+","+c);b=[C,b,c,d];return a.implicitSlot&&null!==c?[b]:b}
45
+ function mb(a,b,c,d,e,g){if(null!==e&&void 0!==e)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof c)return c.$$typeof===r||c.$$typeof===va?lb(b,c,d,g):jb(a,b,d,c,g);if("string"===typeof c)return lb(b,c,d,g);if("symbol"===typeof c)return c===ya&&null===d?(d=b.implicitSlot,null===b.keyPath&&(b.implicitSlot=!0),a=R(a,b,S,"",g.children),b.implicitSlot=d,a):lb(b,c,d,g);if(null!=c&&"object"===typeof c){if(c.$$typeof===r)return lb(b,c,d,g);
46
+ switch(c.$$typeof){case E:var f=c._init;c=f(c._payload);return mb(a,b,c,d,e,g);case Aa:return jb(a,b,d,c.render,g);case Da:return mb(a,b,c.type,d,e,g)}}throw Error("Unsupported Server Component type: "+Va(c));}function fb(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&(a.flushScheduled=null!==a.destination,setTimeout(function(){return nb(a)},0))}
47
+ function M(a,b,c,d,e){a.pendingChunks++;var g=a.nextChunkId++;"object"!==typeof b||null===b||null!==c||d||a.writtenObjects.set(b,g);var f={id:g,status:0,model:b,keyPath:c,implicitSlot:d,ping:function(){return fb(a,f)},toJSON:function(h,k){var l=f.keyPath,z=f.implicitSlot;try{var t=R(a,f,this,h,k)}catch(ba){if(h=ba===Ga?Ja():ba,k=f.model,k="object"===typeof k&&null!==k&&(k.$$typeof===C||k.$$typeof===E),"object"===typeof h&&null!==h&&"function"===typeof h.then){t=M(a,f.model,f.keyPath,f.implicitSlot,
48
+ a.abortableTasks);var D=t.ping;h.then(D,D);t.thenableState=La();f.keyPath=l;f.implicitSlot=z;t=k?"$L"+t.id.toString(16):T(t.id)}else if(f.keyPath=l,f.implicitSlot=z,k)a.pendingChunks++,l=a.nextChunkId++,z=O(a,h),P(a,l,z),t="$L"+l.toString(16);else throw h;}return t},thenableState:null};e.add(f);return f}function T(a){return"$"+a.toString(16)}function ob(a,b,c){a=L(c);b=b.toString(16)+":"+a+"\n";return q.encode(b)}
49
+ function pb(a,b,c,d){var e=d.$$async?d.$$id+"#async":d.$$id,g=a.writtenClientReferences,f=g.get(e);if(void 0!==f)return b[0]===C&&"1"===c?"$L"+f.toString(16):T(f);try{var h=a.bundlerConfig,k=d.$$id;f="";var l=h[k];if(l)f=l.name;else{var z=k.lastIndexOf("#");-1!==z&&(f=k.slice(z+1),l=h[k.slice(0,z)]);if(!l)throw Error('Could not find the module "'+k+'" in the React Client Manifest. This is probably a bug in the React Server Components bundler.');}var t=!0===d.$$async?[l.id,l.chunks,f,1]:[l.id,l.chunks,
50
+ f];a.pendingChunks++;var D=a.nextChunkId++,ba=L(t),Ib=D.toString(16)+":I"+ba+"\n",Jb=q.encode(Ib);a.completedImportChunks.push(Jb);g.set(e,D);return b[0]===C&&"1"===c?"$L"+D.toString(16):T(D)}catch(Kb){return a.pendingChunks++,b=a.nextChunkId++,c=O(a,Kb),P(a,b,c),T(b)}}function U(a,b){b=M(a,b,null,!1,a.abortableTasks);qb(a,b);return b.id}var V=!1;
51
+ function R(a,b,c,d,e){b.model=e;if(e===C)return"$";if(null===e)return null;if("object"===typeof e){switch(e.$$typeof){case C:c=a.writtenObjects;d=c.get(e);if(void 0!==d){if(null===b.keyPath&&!b.implicitSlot)if(V===e)V=null;else return-1===d?(a=U(a,e),T(a)):T(d)}else c.set(e,-1),c.set(e.props,-2);c=e.props;d=c.ref;return mb(a,b,e.type,e.key,void 0!==d?d:null,c);case E:return b.thenableState=null,c=e._init,e=c(e._payload),R(a,b,S,"",e)}if(e.$$typeof===r)return pb(a,c,d,e);c=a.writtenObjects;d=c.get(e);
52
+ if("function"===typeof e.then){if(void 0!==d){if(null!==b.keyPath||b.implicitSlot)return"$@"+eb(a,b,e).toString(16);if(V===e)V=null;else return"$@"+d.toString(16)}a=eb(a,b,e);c.set(e,a);return"$@"+a.toString(16)}if(void 0!==d)if(V===e)V=null;else{if(-1===d)return a=U(a,e),T(a);if(-2!==d)return T(d)}else c.set(e,-1);if(Sa(e))return kb(a,b,e);if(e instanceof Map){e=Array.from(e);for(b=0;b<e.length;b++)c=e[b][0],"object"===typeof c&&null!==c&&(d=a.writtenObjects,void 0===d.get(c)&&d.set(c,-1));return"$Q"+
53
+ U(a,e).toString(16)}if(e instanceof Set){e=Array.from(e);for(b=0;b<e.length;b++)c=e[b],"object"===typeof c&&null!==c&&(d=a.writtenObjects,void 0===d.get(c)&&d.set(c,-1));return"$W"+U(a,e).toString(16)}null===e||"object"!==typeof e?c=null:(c=Fa&&e[Fa]||e["@@iterator"],c="function"===typeof c?c:null);if(c)return kb(a,b,Array.from(e));a=Ta(e);if(a!==Za&&(null===a||null!==Ta(a)))throw Error("Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.");
54
+ return e}if("string"===typeof e){if("Z"===e[e.length-1]&&c[d]instanceof Date)return"$D"+e;if(1024<=e.length)return a.pendingChunks+=2,b=a.nextChunkId++,e=q.encode(e),c=e.byteLength,c=b.toString(16)+":T"+c.toString(16)+",",c=q.encode(c),a.completedRegularChunks.push(c,e),T(b);a="$"===e[0]?"$"+e:e;return a}if("boolean"===typeof e)return e;if("number"===typeof e)return Number.isFinite(e)?0===e&&-Infinity===1/e?"$-0":e:Infinity===e?"$Infinity":-Infinity===e?"$-Infinity":"$NaN";if("undefined"===typeof e)return"$undefined";
55
+ if("function"===typeof e){if(e.$$typeof===r)return pb(a,c,d,e);if(e.$$typeof===u)return b=a.writtenServerReferences,c=b.get(e),void 0!==c?a="$F"+c.toString(16):(c=e.$$bound,c={id:e.$$id,bound:c?Promise.resolve(c):null},a=U(a,c),b.set(e,a),a="$F"+a.toString(16)),a;if(e.$$typeof===va)return"$T"+e.$$id;if(/^on[A-Z]/.test(d))throw Error("Event handlers cannot be passed to Client Component props."+K(c,d)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error('Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.'+
55
56
  K(c,d));}if("symbol"===typeof e){b=a.writtenSymbols;var g=b.get(e);if(void 0!==g)return T(g);g=e.description;if(Symbol.for(g)!==e)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(e.description+") cannot be found among global symbols.")+K(c,d));a.pendingChunks++;c=a.nextChunkId++;d=ob(a,c,"$S"+g);a.completedImportChunks.push(d);b.set(e,c);return T(c)}if("bigint"===typeof e)return"$n"+e.toString(10);throw Error("Type "+typeof e+
56
57
  " is not supported in Client Component props."+K(c,d));}function O(a,b){var c=N;N=null;try{var d=a.onError;var e=B?ua.run(void 0,d,b):d(b)}finally{N=c}if(null!=e&&"string"!==typeof e)throw Error('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 "'+typeof e+'" instead');return e||""}
57
58
  function rb(a,b){null!==a.destination?(a.status=2,da(a.destination,b)):(a.status=1,a.fatalError=b)}function P(a,b,c){c={digest:c};b=b.toString(16)+":E"+L(c)+"\n";b=q.encode(b);a.completedErrorChunks.push(b)}var S={};
58
59
  function qb(a,b){if(0===b.status)try{V=b.model;var c=R(a,b,S,"",b.model);V=c;b.keyPath=null;b.implicitSlot=!1;var d="object"===typeof c&&null!==c?L(c,b.toJSON):L(c),e=b.id.toString(16)+":"+d+"\n",g=q.encode(e);a.completedRegularChunks.push(g);a.abortableTasks.delete(b);b.status=1}catch(l){var f=l===Ga?Ja():l;if("object"===typeof f&&null!==f&&"function"===typeof f.then){var h=b.ping;f.then(h,h);b.thenableState=La()}else{a.abortableTasks.delete(b);b.status=4;var k=O(a,f);P(a,b.id,k)}}finally{}}
59
- function nb(a){var b=cb.current;cb.current=Qa;var c=N;G=N=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var e=0;e<d.length;e++)qb(a,d[e]);null!==a.destination&&Q(a,a.destination)}catch(g){O(a,g),rb(a,g)}finally{cb.current=b,G=null,N=c}}
60
+ function nb(a){var b=ab.current;ab.current=Qa;var c=N;G=N=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var e=0;e<d.length;e++)qb(a,d[e]);null!==a.destination&&Q(a,a.destination)}catch(g){O(a,g),rb(a,g)}finally{ab.current=b,G=null,N=c}}
60
61
  function Q(a,b){m=new Uint8Array(2048);n=0;try{for(var c=a.completedImportChunks,d=0;d<c.length;d++)a.pendingChunks--,p(b,c[d]);c.splice(0,d);var e=a.completedHintChunks;for(d=0;d<e.length;d++)p(b,e[d]);e.splice(0,d);var g=a.completedRegularChunks;for(d=0;d<g.length;d++)a.pendingChunks--,p(b,g[d]);g.splice(0,d);var f=a.completedErrorChunks;for(d=0;d<f.length;d++)a.pendingChunks--,p(b,f[d]);f.splice(0,d)}finally{a.flushScheduled=!1,m&&0<n&&(b.enqueue(new Uint8Array(m.buffer,0,n)),m=null,n=0)}0===a.pendingChunks&&
61
- b.close()}function sb(a){a.flushScheduled=null!==a.destination;B?setTimeout(function(){return ua.run(a,nb,a)},0):setTimeout(function(){return nb(a)},0)}function ib(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){var b=a.destination;a.flushScheduled=!0;setTimeout(function(){return Q(a,b)},0)}}
62
+ b.close()}function sb(a){a.flushScheduled=null!==a.destination;B?setTimeout(function(){return ua.run(a,nb,a)},0):setTimeout(function(){return nb(a)},0)}function gb(a){if(!1===a.flushScheduled&&0===a.pingedTasks.length&&null!==a.destination){var b=a.destination;a.flushScheduled=!0;setTimeout(function(){return Q(a,b)},0)}}
62
63
  function tb(a,b){try{var c=a.abortableTasks;if(0<c.size){a.pendingChunks++;var d=a.nextChunkId++,e=void 0===b?Error("The render was aborted by the server without a reason."):b,g=O(a,e);P(a,d,g,e);c.forEach(function(f){f.status=3;var h=T(d);f=ob(a,f.id,h);a.completedErrorChunks.push(f)});c.clear()}null!==a.destination&&Q(a,a.destination)}catch(f){O(a,f),rb(a,f)}}
63
64
  function ub(a,b){var c="",d=a[b];if(d)c=d.name;else{var e=b.lastIndexOf("#");-1!==e&&(c=b.slice(e+1),d=a[b.slice(0,e)]);if(!d)throw Error('Could not find the module "'+b+'" in the React Server Manifest. This is probably a bug in the React Server Components bundler.');}return[d.id,d.chunks,c]}var vb=new Map;
64
65
  function wb(a){var b=__webpack_require__(a);if("function"!==typeof b.then||"fulfilled"===b.status)return null;b.then(function(c){b.status="fulfilled";b.value=c},function(c){b.status="rejected";b.reason=c});return b}function xb(){}
@@ -75,8 +76,8 @@ function Mb(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:ne
75
76
  function Pb(a,b,c){a=Mb(b,c,a);Nb(a);a=Z(a,0);a.then(function(){});if("fulfilled"!==a.status)throw a.reason;return a.value}exports.createClientModuleProxy=function(a){a=v({},a,!1);return new Proxy(a,la)};
76
77
  exports.decodeAction=function(a,b){var c=new FormData,d=null;a.forEach(function(e,g){g.startsWith("$ACTION_")?g.startsWith("$ACTION_REF_")?(e="$ACTION_"+g.slice(12)+":",e=Pb(a,b,e),d=Ob(b,e.id,e.bound)):g.startsWith("$ACTION_ID_")&&(e=g.slice(11),d=Ob(b,e,null)):c.append(g,e)});return null===d?null:d.then(function(e){return e.bind(null,c)})};
77
78
  exports.decodeFormState=function(a,b,c){var d=b.get("$ACTION_KEY");if("string"!==typeof d)return Promise.resolve(null);var e=null;b.forEach(function(f,h){h.startsWith("$ACTION_REF_")&&(f="$ACTION_"+h.slice(12)+":",e=Pb(b,c,f))});if(null===e)return Promise.resolve(null);var g=e.id;return Promise.resolve(e.bound).then(function(f){return null===f?null:[a,d,g,f.length-1]})};exports.decodeReply=function(a,b){if("string"===typeof a){var c=new FormData;c.append("0",a);a=c}a=Mb(b,"",a);b=Z(a,0);Nb(a);return b};
78
- exports.registerClientReference=function(a,b,c){return v(a,b+"#"+c,!1)};exports.registerServerReference=function(a,b,c){return Object.defineProperties(a,{$$typeof:{value:t},$$id:{value:null===c?b:b+"#"+c,configurable:!0},$$bound:{value:null,configurable:!0},bind:{value:ha,configurable:!0}})};
79
- exports.renderToReadableStream=function(a,b,c){var d=fb(a,b,c?c.onError:void 0,c?c.identifierPrefix:void 0,c?c.onPostpone:void 0);if(c&&c.signal){var e=c.signal;if(e.aborted)tb(d,e.reason);else{var g=function(){tb(d,e.reason);e.removeEventListener("abort",g)};e.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){sb(d)},pull:function(f){if(1===d.status)d.status=2,da(f,d.fatalError);else if(2!==d.status&&null===d.destination){d.destination=f;try{Q(d,f)}catch(h){O(d,
79
+ exports.registerClientReference=function(a,b,c){return v(a,b+"#"+c,!1)};exports.registerServerReference=function(a,b,c){return Object.defineProperties(a,{$$typeof:{value:u},$$id:{value:null===c?b:b+"#"+c,configurable:!0},$$bound:{value:null,configurable:!0},bind:{value:ha,configurable:!0}})};
80
+ exports.renderToReadableStream=function(a,b,c){var d=db(a,b,c?c.onError:void 0,c?c.identifierPrefix:void 0,c?c.onPostpone:void 0);if(c&&c.signal){var e=c.signal;if(e.aborted)tb(d,e.reason);else{var g=function(){tb(d,e.reason);e.removeEventListener("abort",g)};e.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){sb(d)},pull:function(f){if(1===d.status)d.status=2,da(f,d.fatalError);else if(2!==d.status&&null===d.destination){d.destination=f;try{Q(d,f)}catch(h){O(d,
80
81
  h),rb(d,h)}}},cancel:function(f){d.destination=null;tb(d,f)}},{highWaterMark:0})};
81
82
 
82
83
  //# sourceMappingURL=react-server-dom-webpack-server.edge.production.min.js.map