react-server-dom-webpack 19.0.0-canary-4c12339ce-20240408 → 19.0.0-canary-96c584661-20240412
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/react-server-dom-webpack-client.browser.development.js +115 -100
- package/cjs/react-server-dom-webpack-client.browser.production.js +92 -72
- package/cjs/react-server-dom-webpack-client.browser.production.min.js +24 -24
- package/cjs/react-server-dom-webpack-client.browser.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-client.edge.development.js +123 -108
- package/cjs/react-server-dom-webpack-client.edge.production.js +100 -80
- package/cjs/react-server-dom-webpack-client.edge.production.min.js +24 -23
- package/cjs/react-server-dom-webpack-client.edge.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-client.node.development.js +123 -108
- package/cjs/react-server-dom-webpack-client.node.production.js +100 -80
- package/cjs/react-server-dom-webpack-client.node.production.min.js +23 -22
- package/cjs/react-server-dom-webpack-client.node.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +123 -108
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +100 -80
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +22 -21
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-node-register.js.map +1 -1
- package/cjs/react-server-dom-webpack-server.browser.development.js +75 -39
- package/cjs/react-server-dom-webpack-server.browser.production.js +70 -32
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +68 -68
- package/cjs/react-server-dom-webpack-server.browser.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-server.edge.development.js +75 -39
- package/cjs/react-server-dom-webpack-server.edge.production.js +70 -32
- package/cjs/react-server-dom-webpack-server.edge.production.min.js +53 -53
- package/cjs/react-server-dom-webpack-server.edge.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-server.node.development.js +75 -39
- package/cjs/react-server-dom-webpack-server.node.production.js +70 -32
- package/cjs/react-server-dom-webpack-server.node.production.min.js +56 -56
- package/cjs/react-server-dom-webpack-server.node.production.min.js.map +1 -1
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +75 -39
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +70 -32
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +53 -53
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js.map +1 -1
- package/package.json +3 -3
- package/umd/react-server-dom-webpack-client.browser.development.js +115 -100
- package/umd/react-server-dom-webpack-client.browser.production.min.js +24 -24
- package/umd/react-server-dom-webpack-server.browser.development.js +75 -39
- package/umd/react-server-dom-webpack-server.browser.production.min.js +53 -53
@@ -198,7 +198,7 @@ chunks, nonce) {
|
|
198
198
|
}
|
199
199
|
}
|
200
200
|
|
201
|
-
const ReactDOMSharedInternals = ReactDOM.
|
201
|
+
const ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
202
202
|
|
203
203
|
function getCrossOriginString(input) {
|
204
204
|
if (typeof input === 'string') {
|
@@ -209,16 +209,18 @@ function getCrossOriginString(input) {
|
|
209
209
|
}
|
210
210
|
|
211
211
|
// This client file is in the shared folder because it applies to both SSR and browser contexts.
|
212
|
-
const ReactDOMCurrentDispatcher = ReactDOMSharedInternals.ReactDOMCurrentDispatcher;
|
213
212
|
function dispatchHint(code, model) {
|
214
|
-
const dispatcher =
|
213
|
+
const dispatcher = ReactDOMSharedInternals.d;
|
214
|
+
/* ReactDOMCurrentDispatcher */
|
215
215
|
|
216
216
|
switch (code) {
|
217
217
|
case 'D':
|
218
218
|
{
|
219
219
|
const refined = refineModel(code, model);
|
220
220
|
const href = refined;
|
221
|
-
dispatcher.
|
221
|
+
dispatcher.D(
|
222
|
+
/* prefetchDNS */
|
223
|
+
href);
|
222
224
|
return;
|
223
225
|
}
|
224
226
|
|
@@ -228,11 +230,15 @@ function dispatchHint(code, model) {
|
|
228
230
|
|
229
231
|
if (typeof refined === 'string') {
|
230
232
|
const href = refined;
|
231
|
-
dispatcher.
|
233
|
+
dispatcher.C(
|
234
|
+
/* preconnect */
|
235
|
+
href);
|
232
236
|
} else {
|
233
237
|
const href = refined[0];
|
234
238
|
const crossOrigin = refined[1];
|
235
|
-
dispatcher.
|
239
|
+
dispatcher.C(
|
240
|
+
/* preconnect */
|
241
|
+
href, crossOrigin);
|
236
242
|
}
|
237
243
|
|
238
244
|
return;
|
@@ -246,9 +252,13 @@ function dispatchHint(code, model) {
|
|
246
252
|
|
247
253
|
if (refined.length === 3) {
|
248
254
|
const options = refined[2];
|
249
|
-
dispatcher.
|
255
|
+
dispatcher.L(
|
256
|
+
/* preload */
|
257
|
+
href, as, options);
|
250
258
|
} else {
|
251
|
-
dispatcher.
|
259
|
+
dispatcher.L(
|
260
|
+
/* preload */
|
261
|
+
href, as);
|
252
262
|
}
|
253
263
|
|
254
264
|
return;
|
@@ -260,44 +270,56 @@ function dispatchHint(code, model) {
|
|
260
270
|
|
261
271
|
if (typeof refined === 'string') {
|
262
272
|
const href = refined;
|
263
|
-
dispatcher.
|
273
|
+
dispatcher.m(
|
274
|
+
/* preloadModule */
|
275
|
+
href);
|
264
276
|
} else {
|
265
277
|
const href = refined[0];
|
266
278
|
const options = refined[1];
|
267
|
-
dispatcher.
|
279
|
+
dispatcher.m(
|
280
|
+
/* preloadModule */
|
281
|
+
href, options);
|
268
282
|
}
|
269
283
|
|
270
284
|
return;
|
271
285
|
}
|
272
286
|
|
273
|
-
case '
|
287
|
+
case 'X':
|
274
288
|
{
|
275
289
|
const refined = refineModel(code, model);
|
276
290
|
|
277
291
|
if (typeof refined === 'string') {
|
278
292
|
const href = refined;
|
279
|
-
dispatcher.
|
293
|
+
dispatcher.X(
|
294
|
+
/* preinitScript */
|
295
|
+
href);
|
280
296
|
} else {
|
281
297
|
const href = refined[0];
|
282
|
-
const
|
283
|
-
|
284
|
-
|
298
|
+
const options = refined[1];
|
299
|
+
dispatcher.X(
|
300
|
+
/* preinitScript */
|
301
|
+
href, options);
|
285
302
|
}
|
286
303
|
|
287
304
|
return;
|
288
305
|
}
|
289
306
|
|
290
|
-
case '
|
307
|
+
case 'S':
|
291
308
|
{
|
292
309
|
const refined = refineModel(code, model);
|
293
310
|
|
294
311
|
if (typeof refined === 'string') {
|
295
312
|
const href = refined;
|
296
|
-
dispatcher.
|
313
|
+
dispatcher.S(
|
314
|
+
/* preinitStyle */
|
315
|
+
href);
|
297
316
|
} else {
|
298
317
|
const href = refined[0];
|
299
|
-
const
|
300
|
-
|
318
|
+
const precedence = refined[1] === 0 ? undefined : refined[1];
|
319
|
+
const options = refined.length === 3 ? refined[2] : undefined;
|
320
|
+
dispatcher.S(
|
321
|
+
/* preinitStyle */
|
322
|
+
href, precedence, options);
|
301
323
|
}
|
302
324
|
|
303
325
|
return;
|
@@ -309,11 +331,15 @@ function dispatchHint(code, model) {
|
|
309
331
|
|
310
332
|
if (typeof refined === 'string') {
|
311
333
|
const href = refined;
|
312
|
-
dispatcher.
|
334
|
+
dispatcher.M(
|
335
|
+
/* preinitModuleScript */
|
336
|
+
href);
|
313
337
|
} else {
|
314
338
|
const href = refined[0];
|
315
339
|
const options = refined[1];
|
316
|
-
dispatcher.
|
340
|
+
dispatcher.M(
|
341
|
+
/* preinitModuleScript */
|
342
|
+
href, options);
|
317
343
|
}
|
318
344
|
|
319
345
|
return;
|
@@ -326,14 +352,14 @@ function refineModel(code, model) {
|
|
326
352
|
return model;
|
327
353
|
}
|
328
354
|
function preinitScriptForSSR(href, nonce, crossOrigin) {
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
}
|
355
|
+
ReactDOMSharedInternals.d
|
356
|
+
/* ReactDOMCurrentDispatcher */
|
357
|
+
.X(
|
358
|
+
/* preinitScript */
|
359
|
+
href, {
|
360
|
+
crossOrigin: getCrossOriginString(crossOrigin),
|
361
|
+
nonce
|
362
|
+
});
|
337
363
|
}
|
338
364
|
|
339
365
|
// ATTENTION
|
@@ -1309,7 +1335,7 @@ function getChunk(response, id) {
|
|
1309
1335
|
return chunk;
|
1310
1336
|
}
|
1311
1337
|
|
1312
|
-
function createModelResolver(chunk, parentObject, key, cyclic) {
|
1338
|
+
function createModelResolver(chunk, parentObject, key, cyclic, response, map) {
|
1313
1339
|
let blocked;
|
1314
1340
|
|
1315
1341
|
if (initializingChunkBlockedModel) {
|
@@ -1326,11 +1352,11 @@ function createModelResolver(chunk, parentObject, key, cyclic) {
|
|
1326
1352
|
}
|
1327
1353
|
|
1328
1354
|
return value => {
|
1329
|
-
parentObject[key] = value; // If this is the root object for a model reference, where `blocked.value`
|
1355
|
+
parentObject[key] = map(response, value); // If this is the root object for a model reference, where `blocked.value`
|
1330
1356
|
// is a stale `null`, the resolved value can be used directly.
|
1331
1357
|
|
1332
1358
|
if (key === '' && blocked.value === null) {
|
1333
|
-
blocked.value =
|
1359
|
+
blocked.value = parentObject[key];
|
1334
1360
|
}
|
1335
1361
|
|
1336
1362
|
blocked.deps--;
|
@@ -1384,28 +1410,60 @@ function createServerReferenceProxy(response, metaData) {
|
|
1384
1410
|
return proxy;
|
1385
1411
|
}
|
1386
1412
|
|
1387
|
-
function getOutlinedModel(response, id) {
|
1413
|
+
function getOutlinedModel(response, id, parentObject, key, map) {
|
1388
1414
|
const chunk = getChunk(response, id);
|
1389
1415
|
|
1390
1416
|
switch (chunk.status) {
|
1391
1417
|
case RESOLVED_MODEL:
|
1392
1418
|
initializeModelChunk(chunk);
|
1393
1419
|
break;
|
1420
|
+
|
1421
|
+
case RESOLVED_MODULE:
|
1422
|
+
initializeModuleChunk(chunk);
|
1423
|
+
break;
|
1394
1424
|
} // The status might have changed after initialization.
|
1395
1425
|
|
1396
1426
|
|
1397
1427
|
switch (chunk.status) {
|
1398
1428
|
case INITIALIZED:
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1429
|
+
const chunkValue = map(response, chunk.value);
|
1430
|
+
|
1431
|
+
return chunkValue;
|
1432
|
+
|
1433
|
+
case PENDING:
|
1434
|
+
case BLOCKED:
|
1435
|
+
case CYCLIC:
|
1436
|
+
const parentChunk = initializingChunk;
|
1437
|
+
chunk.then(createModelResolver(parentChunk, parentObject, key, chunk.status === CYCLIC, response, map), createModelReject(parentChunk));
|
1438
|
+
return null;
|
1403
1439
|
|
1404
1440
|
default:
|
1405
1441
|
throw chunk.reason;
|
1406
1442
|
}
|
1407
1443
|
}
|
1408
1444
|
|
1445
|
+
function createMap(response, model) {
|
1446
|
+
return new Map(model);
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
function createSet(response, model) {
|
1450
|
+
return new Set(model);
|
1451
|
+
}
|
1452
|
+
|
1453
|
+
function createFormData(response, model) {
|
1454
|
+
const formData = new FormData();
|
1455
|
+
|
1456
|
+
for (let i = 0; i < model.length; i++) {
|
1457
|
+
formData.append(model[i][0], model[i][1]);
|
1458
|
+
}
|
1459
|
+
|
1460
|
+
return formData;
|
1461
|
+
}
|
1462
|
+
|
1463
|
+
function createModel(response, model) {
|
1464
|
+
return model;
|
1465
|
+
}
|
1466
|
+
|
1409
1467
|
function parseModelString(response, parentObject, key, value) {
|
1410
1468
|
if (value[0] === '$') {
|
1411
1469
|
if (value === '$') {
|
@@ -1453,8 +1511,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
1453
1511
|
{
|
1454
1512
|
// Server Reference
|
1455
1513
|
const id = parseInt(value.slice(2), 16);
|
1456
|
-
|
1457
|
-
return createServerReferenceProxy(response, metadata);
|
1514
|
+
return getOutlinedModel(response, id, parentObject, key, createServerReferenceProxy);
|
1458
1515
|
}
|
1459
1516
|
|
1460
1517
|
case 'T':
|
@@ -1474,16 +1531,14 @@ function parseModelString(response, parentObject, key, value) {
|
|
1474
1531
|
{
|
1475
1532
|
// Map
|
1476
1533
|
const id = parseInt(value.slice(2), 16);
|
1477
|
-
|
1478
|
-
return new Map(data);
|
1534
|
+
return getOutlinedModel(response, id, parentObject, key, createMap);
|
1479
1535
|
}
|
1480
1536
|
|
1481
1537
|
case 'W':
|
1482
1538
|
{
|
1483
1539
|
// Set
|
1484
1540
|
const id = parseInt(value.slice(2), 16);
|
1485
|
-
|
1486
|
-
return new Set(data);
|
1541
|
+
return getOutlinedModel(response, id, parentObject, key, createSet);
|
1487
1542
|
}
|
1488
1543
|
|
1489
1544
|
case 'B':
|
@@ -1496,14 +1551,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
1496
1551
|
{
|
1497
1552
|
// FormData
|
1498
1553
|
const id = parseInt(value.slice(2), 16);
|
1499
|
-
|
1500
|
-
const formData = new FormData();
|
1501
|
-
|
1502
|
-
for (let i = 0; i < data.length; i++) {
|
1503
|
-
formData.append(data[i][0], data[i][1]);
|
1504
|
-
}
|
1505
|
-
|
1506
|
-
return formData;
|
1554
|
+
return getOutlinedModel(response, id, parentObject, key, createFormData);
|
1507
1555
|
}
|
1508
1556
|
|
1509
1557
|
case 'I':
|
@@ -1553,35 +1601,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
1553
1601
|
{
|
1554
1602
|
// We assume that anything else is a reference ID.
|
1555
1603
|
const id = parseInt(value.slice(1), 16);
|
1556
|
-
|
1557
|
-
|
1558
|
-
switch (chunk.status) {
|
1559
|
-
case RESOLVED_MODEL:
|
1560
|
-
initializeModelChunk(chunk);
|
1561
|
-
break;
|
1562
|
-
|
1563
|
-
case RESOLVED_MODULE:
|
1564
|
-
initializeModuleChunk(chunk);
|
1565
|
-
break;
|
1566
|
-
} // The status might have changed after initialization.
|
1567
|
-
|
1568
|
-
|
1569
|
-
switch (chunk.status) {
|
1570
|
-
case INITIALIZED:
|
1571
|
-
const chunkValue = chunk.value;
|
1572
|
-
|
1573
|
-
return chunkValue;
|
1574
|
-
|
1575
|
-
case PENDING:
|
1576
|
-
case BLOCKED:
|
1577
|
-
case CYCLIC:
|
1578
|
-
const parentChunk = initializingChunk;
|
1579
|
-
chunk.then(createModelResolver(parentChunk, parentObject, key, chunk.status === CYCLIC), createModelReject(parentChunk));
|
1580
|
-
return null;
|
1581
|
-
|
1582
|
-
default:
|
1583
|
-
throw chunk.reason;
|
1584
|
-
}
|
1604
|
+
return getOutlinedModel(response, id, parentObject, key, createModel);
|
1585
1605
|
}
|
1586
1606
|
}
|
1587
1607
|
}
|
@@ -9,14 +9,14 @@
|
|
9
9
|
*/
|
10
10
|
'use strict';var r=require("util"),t=require("react-dom"),aa={stream:!0};function ba(a,b){if(a){var c=a[b[0]];if(a=c[b[2]])c=a.name;else{a=c["*"];if(!a)throw Error('Could not find the module "'+b[0]+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');c=b[2]}return 4===b.length?[a.id,a.chunks,c,1]:[a.id,a.chunks,c]}return b}var u=new Map;
|
11
11
|
function x(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 ca(){}
|
12
|
-
function da(a){for(var b=a[1],c=[],d=0;d<b.length;){var f=b[d++];b[d++];var g=u.get(f);if(void 0===g){g=__webpack_chunk_load__(f);c.push(g);var
|
13
|
-
function ea(a,b,c){if(null!==a)for(var d=1;d<b.length;d+=2){var f=c,g=y.
|
14
|
-
function
|
15
|
-
function ka(a,b,c,d,f){function g(n,
|
16
|
-
null!==q&&"function"===typeof q.then){
|
17
|
-
var ma=e;
|
18
|
-
return"$T"+E(c,
|
19
|
-
return"$T"+E(c,
|
12
|
+
function da(a){for(var b=a[1],c=[],d=0;d<b.length;){var f=b[d++];b[d++];var g=u.get(f);if(void 0===g){g=__webpack_chunk_load__(f);c.push(g);var h=u.set.bind(u,f,null);g.then(h,ca);u.set(f,g)}else null!==g&&c.push(g)}return 4===a.length?0===c.length?x(a[0]):Promise.all(c).then(function(){return x(a[0])}):0<c.length?Promise.all(c):null}
|
13
|
+
function ea(a,b,c){if(null!==a)for(var d=1;d<b.length;d+=2){var f=c,g=y.d,h=g.X,l=a.prefix+b[d];var e=a.crossOrigin;e="string"===typeof e?"use-credentials"===e?e:"":void 0;h.call(g,l,{crossOrigin:e,nonce:f})}}var y=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Symbol.for("react.element"),A=Symbol.for("react.lazy"),B=Symbol.iterator;function fa(a){if(null===a||"object"!==typeof a)return null;a=B&&a[B]||a["@@iterator"];return"function"===typeof a?a:null}var ha=Array.isArray,D=Object.getPrototypeOf;
|
14
|
+
function E(a,b){var c=a.length;a.push(b);return c}var ia=Object.prototype,F=new WeakMap;function ja(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
|
15
|
+
function ka(a,b,c,d,f){function g(n,k){if(null===k)return null;if("object"===typeof k){switch(k.$$typeof){case z:if(void 0===c)throw Error("React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options.");return"$T"+E(c,k).toString(16);case A:n=k._payload;var I=k._init;null===e&&(e=new FormData);l++;try{var m=I(n),p=h++,v=JSON.stringify(m,g);e.append(b+p,v);return"$"+p.toString(16)}catch(q){if("object"===typeof q&&
|
16
|
+
null!==q&&"function"===typeof q.then){l++;var O=h++;m=function(){try{var w=JSON.stringify(k,g),C=e;C.append(b+O,w);l--;0===l&&d(C)}catch(la){f(la)}};q.then(m,m);return"$"+O.toString(16)}f(q);return null}finally{l--}}if("function"===typeof k.then){null===e&&(e=new FormData);l++;var P=h++;k.then(function(q){try{var w=JSON.stringify(q,g);q=e;q.append(b+P,w);l--;0===l&&d(q)}catch(C){f(C)}},function(q){f(q)});return"$@"+P.toString(16)}if(ha(k))return k;if(k instanceof FormData){null===e&&(e=new FormData);
|
17
|
+
var ma=e;m=h++;var na=b+m+"_";k.forEach(function(q,w){ma.append(na+w,q)});return"$K"+m.toString(16)}if(k instanceof Map)return m=JSON.stringify(Array.from(k),g),null===e&&(e=new FormData),p=h++,e.append(b+p,m),"$Q"+p.toString(16);if(k instanceof Set)return m=JSON.stringify(Array.from(k),g),null===e&&(e=new FormData),p=h++,e.append(b+p,m),"$W"+p.toString(16);if(fa(k))return Array.from(k);m=D(k);if(m!==ia&&(null===m||null!==D(m))){if(void 0===c)throw Error("Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported.");
|
18
|
+
return"$T"+E(c,k).toString(16)}return k}if("string"===typeof k){if("Z"===k[k.length-1]&&this[n]instanceof Date)return"$D"+k;m="$"===k[0]?"$"+k:k;return m}if("boolean"===typeof k)return k;if("number"===typeof k)return ja(k);if("undefined"===typeof k)return"$undefined";if("function"===typeof k){m=F.get(k);if(void 0!==m)return m=JSON.stringify(m,g),null===e&&(e=new FormData),p=h++,e.set(b+p,m),"$F"+p.toString(16);if(void 0===c)throw Error("Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.");
|
19
|
+
return"$T"+E(c,k).toString(16)}if("symbol"===typeof k){if(void 0===c)throw Error("Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options.");return"$T"+E(c,k).toString(16)}if("bigint"===typeof k)return"$n"+k.toString(10);throw Error("Type "+typeof k+" is not supported as an argument to a Server Function.");}var h=1,l=0,e=null;a=JSON.stringify(a,g);null===e?d(a):(e.set(b+"0",a),0===l&&d(e))}var G=new WeakMap;
|
20
20
|
function oa(a){var b,c,d=new Promise(function(f,g){b=f;c=g});ka(a,"",void 0,function(f){if("string"===typeof f){var g=new FormData;g.append("0",f);f=g}d.status="fulfilled";d.value=f;b(f)},function(f){d.status="rejected";d.reason=f;c(f)});return d}
|
21
21
|
function pa(a){var b=F.get(this);if(!b)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");var c=null;if(null!==b.bound){c=G.get(b);c||(c=oa(b),G.set(b,c));if("rejected"===c.status)throw c.reason;if("fulfilled"!==c.status)throw c;b=c.value;var d=new FormData;b.forEach(function(f,g){d.append("$ACTION_"+a+":"+g,f)});c=d;b="$ACTION_REF_"+a}else b="$ACTION_ID_"+b.id;return{name:b,method:"POST",encType:"multipart/form-data",data:c}}
|
22
22
|
function H(a,b){var c=F.get(this);if(!c)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");if(c.id!==a)return!1;var d=c.bound;if(null===d)return 0===b;switch(d.status){case "fulfilled":return d.value.length===b;case "pending":throw d;case "rejected":throw d.reason;default:throw"string"!==typeof d.status&&(d.status="pending",d.then(function(f){d.status="fulfilled";d.value=f},function(f){d.status="rejected";d.reason=f})),d;}}
|
@@ -25,20 +25,21 @@ function K(){var a=qa.apply(this,arguments),b=F.get(this);if(b){var c=ra.call(ar
|
|
25
25
|
function L(a,b,c,d){this.status=a;this.value=b;this.reason=c;this._response=d}L.prototype=Object.create(Promise.prototype);L.prototype.then=function(a,b){switch(this.status){case "resolved_model":M(this);break;case "resolved_module":N(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":case "cyclic":a&&(null===this.value&&(this.value=[]),this.value.push(a));b&&(null===this.reason&&(this.reason=[]),this.reason.push(b));break;default:b(this.reason)}};
|
26
26
|
function ta(a){switch(a.status){case "resolved_model":M(a);break;case "resolved_module":N(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":case "cyclic":throw a;default:throw a.reason;}}function Q(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function R(a,b,c){switch(a.status){case "fulfilled":Q(b,a.value);break;case "pending":case "blocked":case "cyclic":a.value=b;a.reason=c;break;case "rejected":c&&Q(c,a.reason)}}
|
27
27
|
function S(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&Q(c,b)}}function T(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,d=a.reason;a.status="resolved_module";a.value=b;null!==c&&(N(a),R(a,c,d))}}var U=null,V=null;
|
28
|
-
function M(a){var b=U,c=V;U=a;V=null;var d=a.value;a.status="cyclic";a.value=null;a.reason=null;try{var f=JSON.parse(d,a._response._fromJSON);if(null!==V&&0<V.deps)V.value=f,a.status="blocked",a.value=null,a.reason=null;else{var g=a.value;a.status="fulfilled";a.value=f;null!==g&&Q(g,f)}}catch(
|
28
|
+
function M(a){var b=U,c=V;U=a;V=null;var d=a.value;a.status="cyclic";a.value=null;a.reason=null;try{var f=JSON.parse(d,a._response._fromJSON);if(null!==V&&0<V.deps)V.value=f,a.status="blocked",a.value=null,a.reason=null;else{var g=a.value;a.status="fulfilled";a.value=f;null!==g&&Q(g,f)}}catch(h){a.status="rejected",a.reason=h}finally{U=b,V=c}}
|
29
29
|
function N(a){try{var b=a.value,c=__webpack_require__(b[0]);if(4===b.length&&"function"===typeof c.then)if("fulfilled"===c.status)c=c.value;else throw c.reason;var d="*"===b[2]?c:""===b[2]?c.__esModule?c.default:c:c[b[2]];a.status="fulfilled";a.value=d}catch(f){a.status="rejected",a.reason=f}}function W(a,b){a._chunks.forEach(function(c){"pending"===c.status&&S(c,b)})}function X(a,b){var c=a._chunks,d=c.get(b);d||(d=new L("pending",null,null,a),c.set(b,d));return d}
|
30
|
-
function ua(a,b,c,d){if(V){var
|
31
|
-
function wa(a,b){function c(){var f=Array.prototype.slice.call(arguments),g=b.bound;return g?"fulfilled"===g.status?d(b.id,g.value.concat(f)):Promise.resolve(g).then(function(
|
32
|
-
function
|
33
|
-
if(0
|
34
|
-
|
35
|
-
function
|
36
|
-
function
|
37
|
-
function
|
38
|
-
|
39
|
-
|
40
|
-
case
|
41
|
-
e
|
42
|
-
|
30
|
+
function ua(a,b,c,d,f,g){if(V){var h=V;d||h.deps++}else h=V={deps:d?0:1,value:null};return function(l){b[c]=g(f,l);""===c&&null===h.value&&(h.value=b[c]);h.deps--;0===h.deps&&"blocked"===a.status&&(l=a.value,a.status="fulfilled",a.value=h.value,null!==l&&Q(l,h.value))}}function va(a){return function(b){return S(a,b)}}
|
31
|
+
function wa(a,b){function c(){var f=Array.prototype.slice.call(arguments),g=b.bound;return g?"fulfilled"===g.status?d(b.id,g.value.concat(f)):Promise.resolve(g).then(function(h){return d(b.id,h.concat(f))}):d(b.id,f)}var d=a._callServer;J(c,b,a._encodeFormAction);return c}
|
32
|
+
function Y(a,b,c,d,f){b=X(a,b);switch(b.status){case "resolved_model":M(b);break;case "resolved_module":N(b)}switch(b.status){case "fulfilled":return f(a,b.value);case "pending":case "blocked":case "cyclic":var g=U;b.then(ua(g,c,d,"cyclic"===b.status,a,f),va(g));return null;default:throw b.reason;}}function xa(a,b){return new Map(b)}function ya(a,b){return new Set(b)}function za(a,b){a=new FormData;for(var c=0;c<b.length;c++)a.append(b[c][0],b[c][1]);return a}function Aa(a,b){return b}
|
33
|
+
function Ba(a,b,c,d){if("$"===d[0]){if("$"===d)return z;switch(d[1]){case "$":return d.slice(1);case "L":return b=parseInt(d.slice(2),16),a=X(a,b),{$$typeof:A,_payload:a,_init:ta};case "@":if(2===d.length)return new Promise(function(){});b=parseInt(d.slice(2),16);return X(a,b);case "S":return Symbol.for(d.slice(2));case "F":return d=parseInt(d.slice(2),16),Y(a,d,b,c,wa);case "T":b=parseInt(d.slice(2),16);a=a._tempRefs;if(null==a)throw Error("Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply.");
|
34
|
+
if(0>b||b>=a.length)throw Error("The RSC response contained a reference that doesn't exist in the temporary reference set. Always pass the matching set that was used to create the reply when parsing its response.");return a[b];case "Q":return d=parseInt(d.slice(2),16),Y(a,d,b,c,xa);case "W":return d=parseInt(d.slice(2),16),Y(a,d,b,c,ya);case "B":return;case "K":return d=parseInt(d.slice(2),16),Y(a,d,b,c,za);case "I":return Infinity;case "-":return"$-0"===d?-0:-Infinity;case "N":return NaN;case "u":return;
|
35
|
+
case "D":return new Date(Date.parse(d.slice(2)));case "n":return BigInt(d.slice(2));default:return d=parseInt(d.slice(1),16),Y(a,d,b,c,Aa)}}return d}function Ca(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}
|
36
|
+
function Da(a,b,c,d,f,g){var h=new Map;a={_bundlerConfig:a,_moduleLoading:b,_callServer:void 0!==c?c:Ca,_encodeFormAction:d,_nonce:f,_chunks:h,_stringDecoder:new r.TextDecoder,_fromJSON:null,_rowState:0,_rowID:0,_rowTag:0,_rowLength:0,_buffer:[],_tempRefs:g};a._fromJSON=Ea(a);return a}
|
37
|
+
function Fa(a,b,c){var d=a._chunks,f=d.get(b);c=JSON.parse(c,a._fromJSON);var g=ba(a._bundlerConfig,c);ea(a._moduleLoading,c[1],a._nonce);if(c=da(g)){if(f){var h=f;h.status="blocked"}else h=new L("blocked",null,null,a),d.set(b,h);c.then(function(){return T(h,g)},function(l){return S(h,l)})}else f?T(f,g):d.set(b,new L("resolved_module",g,null,a))}
|
38
|
+
function Ea(a){return function(b,c){return"string"===typeof c?Ba(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===z?{$$typeof:z,type:c[1],key:c[2],ref:null,props:c[3]}:c,b):c}}function Z(){throw Error("Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead.");}
|
39
|
+
exports.createFromNodeStream=function(a,b,c){var d=Da(b.moduleMap,b.moduleLoading,Z,c?c.encodeFormAction:void 0,c&&"string"===typeof c.nonce?c.nonce:void 0,void 0);a.on("data",function(f){for(var g=0,h=d._rowState,l=d._rowID,e=d._rowTag,n=d._rowLength,k=d._buffer,I=f.length;g<I;){var m=-1;switch(h){case 0:m=f[g++];58===m?h=1:l=l<<4|(96<m?m-87:m-48);continue;case 1:h=f[g];84===h?(e=h,h=2,g++):64<h&&91>h?(e=h,h=3,g++):(e=0,h=3);continue;case 2:m=f[g++];44===m?h=4:n=n<<4|(96<m?m-87:m-48);continue;case 3:m=
|
40
|
+
f.indexOf(10,g);break;case 4:m=g+n,m>f.length&&(m=-1)}var p=f.byteOffset+g;if(-1<m){n=new Uint8Array(f.buffer,p,m-g);g=e;p=d._stringDecoder;e="";for(var v=0;v<k.length;v++)e+=p.decode(k[v],aa);e+=p.decode(n);switch(g){case 73:Fa(d,l,e);break;case 72:l=e[0];e=e.slice(1);e=JSON.parse(e,d._fromJSON);n=y.d;switch(l){case "D":n.D(e);break;case "C":"string"===typeof e?n.C(e):n.C(e[0],e[1]);break;case "L":l=e[0];g=e[1];3===e.length?n.L(l,g,e[2]):n.L(l,g);break;case "m":"string"===typeof e?n.m(e):n.m(e[0],
|
41
|
+
e[1]);break;case "X":"string"===typeof e?n.X(e):n.X(e[0],e[1]);break;case "S":"string"===typeof e?n.S(e):n.S(e[0],0===e[1]?void 0:e[1],3===e.length?e[2]:void 0);break;case "M":"string"===typeof e?n.M(e):n.M(e[0],e[1])}break;case 69:e=JSON.parse(e);n=e.digest;e=Error("An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.");
|
42
|
+
e.stack="Error: "+e.message;e.digest=n;n=d._chunks;(g=n.get(l))?S(g,e):n.set(l,new L("rejected",null,e,d));break;case 84:d._chunks.set(l,new L("fulfilled",e,null,d));break;case 68:case 87:throw Error("Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client.");default:n=d._chunks,(g=n.get(l))?(l=g,"pending"===l.status&&(n=l.value,g=l.reason,l.status="resolved_model",
|
43
|
+
l.value=e,null!==n&&(M(l),R(l,n,g)))):n.set(l,new L("resolved_model",e,null,d))}g=m;3===h&&g++;n=l=e=h=0;k.length=0}else{f=new Uint8Array(f.buffer,p,f.byteLength-g);k.push(f);n-=f.byteLength;break}}d._rowState=h;d._rowID=l;d._rowTag=e;d._rowLength=n});a.on("error",function(f){W(d,f)});a.on("end",function(){W(d,Error("Connection closed."))});return X(d,0)};exports.createServerReference=function(a){return sa(a,Z)};
|
43
44
|
|
44
45
|
//# sourceMappingURL=react-server-dom-webpack-client.node.production.min.js.map
|