react-server-dom-webpack 18.3.0-next-85de6fde5-20230328 → 18.3.0-next-1308e49a6-20230330
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 +11 -1
- package/cjs/react-server-dom-webpack-client.browser.production.min.js +3 -3
- package/cjs/react-server-dom-webpack-client.edge.development.js +6 -0
- package/cjs/react-server-dom-webpack-client.edge.production.min.js +4 -3
- package/cjs/react-server-dom-webpack-client.node.development.js +6 -0
- package/cjs/react-server-dom-webpack-client.node.production.min.js +2 -2
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +6 -0
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +2 -2
- package/cjs/react-server-dom-webpack-node-register.js +1 -1
- package/cjs/react-server-dom-webpack-plugin.js +9 -8
- package/cjs/react-server-dom-webpack-server.browser.development.js +19 -91
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +48 -50
- package/cjs/react-server-dom-webpack-server.edge.development.js +19 -91
- package/cjs/react-server-dom-webpack-server.edge.production.min.js +48 -50
- package/cjs/react-server-dom-webpack-server.node.development.js +19 -91
- package/cjs/react-server-dom-webpack-server.node.production.min.js +50 -52
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +19 -91
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +49 -51
- package/esm/react-server-dom-webpack-node-loader.production.min.js +1 -1
- package/package.json +4 -4
- package/umd/react-server-dom-webpack-client.browser.development.js +11 -1
- package/umd/react-server-dom-webpack-client.browser.production.min.js +10 -10
- package/umd/react-server-dom-webpack-server.browser.development.js +19 -91
- package/umd/react-server-dom-webpack-server.browser.production.min.js +42 -43
@@ -669,6 +669,12 @@ function parseModelString(response, parentObject, key, value) {
|
|
669
669
|
return undefined;
|
670
670
|
}
|
671
671
|
|
672
|
+
case 'n':
|
673
|
+
{
|
674
|
+
// BigInt
|
675
|
+
return BigInt(value.substring(2));
|
676
|
+
}
|
677
|
+
|
672
678
|
default:
|
673
679
|
{
|
674
680
|
// We assume that anything else is a reference ID.
|
@@ -1285,6 +1291,10 @@ function serializeUndefined() {
|
|
1285
1291
|
return '$undefined';
|
1286
1292
|
}
|
1287
1293
|
|
1294
|
+
function serializeBigInt(n) {
|
1295
|
+
return '$n' + n.toString(10);
|
1296
|
+
}
|
1297
|
+
|
1288
1298
|
function escapeStringValue(value) {
|
1289
1299
|
if (value[0] === '$') {
|
1290
1300
|
// We need to escape $ prefixed strings since we use those to encode
|
@@ -1433,7 +1443,7 @@ function processReply(root, resolve, reject) {
|
|
1433
1443
|
}
|
1434
1444
|
|
1435
1445
|
if (typeof value === 'bigint') {
|
1436
|
-
|
1446
|
+
return serializeBigInt(value);
|
1437
1447
|
}
|
1438
1448
|
|
1439
1449
|
throw new Error("Type " + typeof value + " is not supported as an argument to a Server Function.");
|
@@ -18,13 +18,13 @@ function F(a){try{var b=a.value;if(b.async){var c=t.get(b.id);if("fulfilled"===c
|
|
18
18
|
function Q(a,b,c){if(N){var d=N;d.deps++}else d=N={deps:1,value:null};return function(e){b[c]=e;d.deps--;0===d.deps&&"blocked"===a.status&&(e=a.value,a.status="fulfilled",a.value=d.value,null!==e&&H(e,d.value))}}function R(a){return function(b){return J(a,b)}}
|
19
19
|
function S(a,b){function c(){var e=Array.prototype.slice.call(arguments),g=b.bound;return g?"fulfilled"===g.status?d(b.id,g.value.concat(e)):Promise.resolve(g).then(function(h){return d(b.id,h.concat(e))}):d(b.id,e)}var d=a._callServer;w.set(c,b);return c}
|
20
20
|
function T(a,b,c,d){if("$"===d[0]){if("$"===d)return x;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=P(a,b),{$$typeof:y,_payload:a,_init:G};case "@":return b=parseInt(d.substring(2),16),P(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),C[a]||(C[a]=l.createServerContext(a,z)),C[a].Provider;case "F":b=parseInt(d.substring(2),16);b=P(a,b);switch(b.status){case "resolved_model":E(b)}switch(b.status){case "fulfilled":return S(a,
|
21
|
-
b.value);default:throw b.reason;}case "u":return;default:d=parseInt(d.substring(1),16);a=P(a,d);switch(a.status){case "resolved_model":E(a);break;case "resolved_module":F(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=M,a.then(Q(d,b,c),R(d)),null;default:throw a.reason;}}}return d}
|
22
|
-
function V(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var g=n(a._bundlerConfig,c);if(c=v(g)){if(e){var h=e;h.status="blocked"}else h=new D("blocked",null,null,a),d.set(b,h);c.then(function(){return L(h,g)},function(k){return J(h,k)})}else e?L(e,g):d.set(b,new D("resolved_module",g,null,a))}function W(a){O(a,Error("Connection closed."))}
|
21
|
+
b.value);default:throw b.reason;}case "u":return;case "n":return BigInt(d.substring(2));default:d=parseInt(d.substring(1),16);a=P(a,d);switch(a.status){case "resolved_model":E(a);break;case "resolved_module":F(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=M,a.then(Q(d,b,c),R(d)),null;default:throw a.reason;}}}return d}
|
22
|
+
function U(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function V(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var g=n(a._bundlerConfig,c);if(c=v(g)){if(e){var h=e;h.status="blocked"}else h=new D("blocked",null,null,a),d.set(b,h);c.then(function(){return L(h,g)},function(k){return J(h,k)})}else e?L(e,g):d.set(b,new D("resolved_module",g,null,a))}function W(a){O(a,Error("Connection closed."))}
|
23
23
|
function X(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.substring(0,c),16);switch(b[c+1]){case "I":V(a,d,b.substring(c+2));break;case "E":c=JSON.parse(b.substring(c+2)).digest;b=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.");b.stack="Error: "+b.message;b.digest=c;c=a._chunks;
|
24
24
|
var e=c.get(d);e?J(e,b):c.set(d,new D("rejected",null,b,a));break;default:b=b.substring(c+1),e=a._chunks,(c=e.get(d))?"pending"===c.status&&(a=c.value,d=c.reason,c.status="resolved_model",c.value=b,null!==a&&(E(c),I(c,a,d))):e.set(d,new D("resolved_model",b,null,a))}}}function aa(a){return function(b,c){return"string"===typeof c?T(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===x?{$$typeof:x,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}var ba=Array.isArray;
|
25
25
|
function ca(a,b,c){function d(k,f){if(null===f)return null;if("object"===typeof f){if("function"===typeof f.then){null===h&&(h=new FormData);g++;var p=e++;f.then(function(r){r=JSON.stringify(r,d);var K=h;K.append(""+p,r);g--;0===g&&b(K)},function(r){c(r)});return"$@"+p.toString(16)}return!ba(f)&&B(f)?Array.from(f):f}if("string"===typeof f)return f="$"===f[0]?"$"+f:f,f;if("boolean"===typeof f||"number"===typeof f)return f;if("undefined"===typeof f)return"$undefined";if("function"===typeof f){f=w.get(f);
|
26
26
|
if(void 0!==f)return f=JSON.stringify(f,d),null===h&&(h=new FormData),k=e++,h.set(""+k,f),"$F"+k.toString(16);throw Error("Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.");}if("symbol"===typeof f){k=f.description;if(Symbol.for(k)!==f)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+(f.description+") cannot be found among global symbols."));return"$S"+
|
27
|
-
k}if("bigint"===typeof f)
|
27
|
+
k}if("bigint"===typeof f)return"$n"+f.toString(10);throw Error("Type "+typeof f+" is not supported as an argument to a Server Function.");}var e=1,g=0,h=null;a=JSON.stringify(a,d);null===h?b(a):(h.set("0",a),0===g&&b(h))}function Y(a){a=a&&a.callServer?a.callServer:void 0;var b=new TextDecoder,c=new Map;a={_bundlerConfig:null,_callServer:void 0!==a?a:U,_chunks:c,_partialRow:"",_stringDecoder:b};a._fromJSON=aa(a);return a}
|
28
28
|
function Z(a,b){function c(g){var h=g.value;if(g.done)W(a);else{g=h;h=a._stringDecoder;for(var k=g.indexOf(10);-1<k;){var f=a._partialRow;var p=g.subarray(0,k);p=h.decode(p);X(a,f+p);a._partialRow="";g=g.subarray(k+1);k=g.indexOf(10)}a._partialRow+=h.decode(g,m);return e.read().then(c).catch(d)}}function d(g){O(a,g)}var e=b.getReader();e.read().then(c).catch(d)}exports.createFromFetch=function(a,b){var c=Y(b);a.then(function(d){Z(c,d.body)},function(d){O(c,d)});return P(c,0)};
|
29
29
|
exports.createFromReadableStream=function(a,b){b=Y(b);Z(b,a);return P(b,0)};
|
30
30
|
exports.createFromXHR=function(a,b){function c(){for(var h=a.responseText,k=g,f=h.indexOf("\n",k);-1<f;)k=e._partialRow+h.substring(k,f),X(e,k),e._partialRow="",k=f+1,f=h.indexOf("\n",k);e._partialRow+=h.substring(k);g=h.length}function d(){O(e,new TypeError("Network error"))}var e=Y(b),g=0;a.addEventListener("progress",c);a.addEventListener("load",function(){c();W(e)});a.addEventListener("error",d);a.addEventListener("abort",d);a.addEventListener("timeout",d);return P(e,0)};
|
@@ -649,6 +649,12 @@ function parseModelString(response, parentObject, key, value) {
|
|
649
649
|
return undefined;
|
650
650
|
}
|
651
651
|
|
652
|
+
case 'n':
|
653
|
+
{
|
654
|
+
// BigInt
|
655
|
+
return BigInt(value.substring(2));
|
656
|
+
}
|
657
|
+
|
652
658
|
default:
|
653
659
|
{
|
654
660
|
// We assume that anything else is a reference ID.
|
@@ -18,9 +18,10 @@ function F(a){try{var b=a.value;if(b.async){var c=u.get(b.id);if("fulfilled"===c
|
|
18
18
|
function P(a,b,c){if(M){var d=M;d.deps++}else d=M={deps:1,value:null};return function(f){b[c]=f;d.deps--;0===d.deps&&"blocked"===a.status&&(f=a.value,a.status="fulfilled",a.value=d.value,null!==f&&H(f,d.value))}}function Q(a){return function(b){return J(a,b)}}
|
19
19
|
function R(a,b){function c(){var f=Array.prototype.slice.call(arguments),e=b.bound;return e?"fulfilled"===e.status?d(b.id,e.value.concat(f)):Promise.resolve(e).then(function(l){return d(b.id,l.concat(f))}):d(b.id,f)}var d=a._callServer;x.set(c,b);return c}
|
20
20
|
function S(a,b,c,d){if("$"===d[0]){if("$"===d)return y;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=O(a,b),{$$typeof:A,_payload:a,_init:G};case "@":return b=parseInt(d.substring(2),16),O(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),C[a]||(C[a]=p.createServerContext(a,B)),C[a].Provider;case "F":b=parseInt(d.substring(2),16);b=O(a,b);switch(b.status){case "resolved_model":E(b)}switch(b.status){case "fulfilled":return R(a,
|
21
|
-
b.value);default:throw b.reason;}case "u":return;default:d=parseInt(d.substring(1),16);a=O(a,d);switch(a.status){case "resolved_model":E(a);break;case "resolved_module":F(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=L,a.then(P(d,b,c),Q(d)),null;default:throw a.reason;}}}return d}
|
22
|
-
function U(a,b,c){var d=a._chunks,f=d.get(b);c=JSON.parse(c,a._fromJSON);var e=r(a._bundlerConfig,c);if(c=w(e)){if(f){var l=f;l.status="blocked"}else l=new D("blocked",null,null,a),d.set(b,l);c.then(function(){return K(l,e)},function(m){return J(l,m)})}else f?K(f,e):d.set(b,new D("resolved_module",e,null,a))}
|
23
|
-
function W(a,b){var c=new TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:T,_chunks:d,_partialRow:"",_stringDecoder:c};a._fromJSON=V(a);return a}
|
21
|
+
b.value);default:throw b.reason;}case "u":return;case "n":return BigInt(d.substring(2));default:d=parseInt(d.substring(1),16);a=O(a,d);switch(a.status){case "resolved_model":E(a);break;case "resolved_module":F(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=L,a.then(P(d,b,c),Q(d)),null;default:throw a.reason;}}}return d}
|
22
|
+
function T(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function U(a,b,c){var d=a._chunks,f=d.get(b);c=JSON.parse(c,a._fromJSON);var e=r(a._bundlerConfig,c);if(c=w(e)){if(f){var l=f;l.status="blocked"}else l=new D("blocked",null,null,a),d.set(b,l);c.then(function(){return K(l,e)},function(m){return J(l,m)})}else f?K(f,e):d.set(b,new D("resolved_module",e,null,a))}
|
23
|
+
function V(a){return function(b,c){return"string"===typeof c?S(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===y?{$$typeof:y,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}function W(a,b){var c=new TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:T,_chunks:d,_partialRow:"",_stringDecoder:c};a._fromJSON=V(a);return a}
|
24
|
+
function X(){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.");}
|
24
25
|
function Y(a,b){function c(e){var l=e.value;if(e.done)N(a,Error("Connection closed."));else{e=l;l=a._stringDecoder;for(var m=e.indexOf(10);-1<m;){var g=a._partialRow;var n=e.subarray(0,m);n=l.decode(n);var h=g+n;g=a;if(""!==h){var k=h.indexOf(":",0);n=parseInt(h.substring(0,k),16);switch(h[k+1]){case "I":U(g,n,h.substring(k+2));break;case "E":k=JSON.parse(h.substring(k+2)).digest;h=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.");
|
25
26
|
h.stack="Error: "+h.message;h.digest=k;k=g._chunks;var z=k.get(n);z?J(z,h):k.set(n,new D("rejected",null,h,g));break;default:h=h.substring(k+1),k=g._chunks,(z=k.get(n))?(g=z,n=h,"pending"===g.status&&(h=g.value,k=g.reason,g.status="resolved_model",g.value=n,null!==h&&(E(g),I(g,h,k)))):k.set(n,new D("resolved_model",h,null,g))}}a._partialRow="";e=e.subarray(m+1);m=e.indexOf(10)}a._partialRow+=l.decode(e,q);return f.read().then(c).catch(d)}}function d(e){N(a,e)}var f=b.getReader();f.read().then(c).catch(d)}
|
26
27
|
exports.createFromFetch=function(a,b){var c=W(b&&b.moduleMap?b.moduleMap:null,X);a.then(function(d){Y(c,d.body)},function(d){N(c,d)});return O(c,0)};exports.createFromReadableStream=function(a,b){b=W(b&&b.moduleMap?b.moduleMap:null,X);Y(b,a);return O(b,0)};
|
@@ -650,6 +650,12 @@ function parseModelString(response, parentObject, key, value) {
|
|
650
650
|
return undefined;
|
651
651
|
}
|
652
652
|
|
653
|
+
case 'n':
|
654
|
+
{
|
655
|
+
// BigInt
|
656
|
+
return BigInt(value.substring(2));
|
657
|
+
}
|
658
|
+
|
653
659
|
default:
|
654
660
|
{
|
655
661
|
// We assume that anything else is a reference ID.
|
@@ -18,8 +18,8 @@ function C(a){try{var b=a.value;if(b.async){var c=q.get(b.id);if("fulfilled"===c
|
|
18
18
|
function M(a,b,c){if(J){var d=J;d.deps++}else d=J={deps:1,value:null};return function(e){b[c]=e;d.deps--;0===d.deps&&"blocked"===a.status&&(e=a.value,a.status="fulfilled",a.value=d.value,null!==e&&E(e,d.value))}}function N(a){return function(b){return G(a,b)}}
|
19
19
|
function O(a,b){function c(){var e=Array.prototype.slice.call(arguments),f=b.bound;return f?"fulfilled"===f.status?d(b.id,f.value.concat(e)):Promise.resolve(f).then(function(h){return d(b.id,h.concat(e))}):d(b.id,e)}var d=a._callServer;u.set(c,b);return c}
|
20
20
|
function P(a,b,c,d){if("$"===d[0]){if("$"===d)return v;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=L(a,b),{$$typeof:x,_payload:a,_init:D};case "@":return b=parseInt(d.substring(2),16),L(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),z[a]||(z[a]=l.createServerContext(a,y)),z[a].Provider;case "F":b=parseInt(d.substring(2),16);b=L(a,b);switch(b.status){case "resolved_model":B(b)}switch(b.status){case "fulfilled":return O(a,
|
21
|
-
b.value);default:throw b.reason;}case "u":return;default:d=parseInt(d.substring(1),16);a=L(a,d);switch(a.status){case "resolved_model":B(a);break;case "resolved_module":C(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=I,a.then(M(d,b,c),N(d)),null;default:throw a.reason;}}}return d}
|
22
|
-
function R(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=n(a._bundlerConfig,c);if(c=t(f)){if(e){var h=e;h.status="blocked"}else h=new A("blocked",null,null,a),d.set(b,h);c.then(function(){return H(h,f)},function(g){return G(h,g)})}else e?H(e,f):d.set(b,new A("resolved_module",f,null,a))}
|
21
|
+
b.value);default:throw b.reason;}case "u":return;case "n":return BigInt(d.substring(2));default:d=parseInt(d.substring(1),16);a=L(a,d);switch(a.status){case "resolved_model":B(a);break;case "resolved_module":C(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=I,a.then(M(d,b,c),N(d)),null;default:throw a.reason;}}}return d}
|
22
|
+
function Q(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function R(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=n(a._bundlerConfig,c);if(c=t(f)){if(e){var h=e;h.status="blocked"}else h=new A("blocked",null,null,a),d.set(b,h);c.then(function(){return H(h,f)},function(g){return G(h,g)})}else e?H(e,f):d.set(b,new A("resolved_module",f,null,a))}
|
23
23
|
function S(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.substring(0,c),16);switch(b[c+1]){case "I":R(a,d,b.substring(c+2));break;case "E":c=JSON.parse(b.substring(c+2)).digest;b=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.");b.stack="Error: "+b.message;b.digest=c;c=a._chunks;
|
24
24
|
var e=c.get(d);e?G(e,b):c.set(d,new A("rejected",null,b,a));break;default:b=b.substring(c+1),e=a._chunks,(c=e.get(d))?"pending"===c.status&&(a=c.value,d=c.reason,c.status="resolved_model",c.value=b,null!==a&&(B(c),F(c,a,d))):e.set(d,new A("resolved_model",b,null,a))}}}function T(a){return function(b,c){return"string"===typeof c?P(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===v?{$$typeof:v,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}
|
25
25
|
function U(a,b){var c=new k.TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:Q,_chunks:d,_partialRow:"",_stringDecoder:c};a._fromJSON=T(a);return a}function V(){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.");}
|
@@ -591,6 +591,12 @@ function parseModelString(response, parentObject, key, value) {
|
|
591
591
|
return undefined;
|
592
592
|
}
|
593
593
|
|
594
|
+
case 'n':
|
595
|
+
{
|
596
|
+
// BigInt
|
597
|
+
return BigInt(value.substring(2));
|
598
|
+
}
|
599
|
+
|
594
600
|
default:
|
595
601
|
{
|
596
602
|
// We assume that anything else is a reference ID.
|
@@ -15,8 +15,8 @@ function x(a){var c=E,b=F;E=a;F=null;try{var d=JSON.parse(a.value,a._response._f
|
|
15
15
|
function G(a,c){a._chunks.forEach(function(b){"pending"===b.status&&C(b,c)})}function H(a,c){var b=a._chunks,d=b.get(c);d||(d=new w("pending",null,null,a),b.set(c,d));return d}function I(a,c,b){if(F){var d=F;d.deps++}else d=F={deps:1,value:null};return function(e){c[b]=e;d.deps--;0===d.deps&&"blocked"===a.status&&(e=a.value,a.status="fulfilled",a.value=d.value,null!==e&&A(e,d.value))}}function J(a){return function(c){return C(a,c)}}
|
16
16
|
function K(a,c){function b(){var e=Array.prototype.slice.call(arguments),f=c.bound;return f?"fulfilled"===f.status?d(c.id,f.value.concat(e)):Promise.resolve(f).then(function(h){return d(c.id,h.concat(e))}):d(c.id,e)}var d=a._callServer;q.set(b,c);return b}
|
17
17
|
function L(a,c,b,d){if("$"===d[0]){if("$"===d)return r;switch(d[1]){case "$":return d.substring(1);case "L":return c=parseInt(d.substring(2),16),a=H(a,c),{$$typeof:t,_payload:a,_init:z};case "@":return c=parseInt(d.substring(2),16),H(a,c);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),v[a]||(v[a]=k.createServerContext(a,u)),v[a].Provider;case "F":c=parseInt(d.substring(2),16);c=H(a,c);switch(c.status){case "resolved_model":x(c)}switch(c.status){case "fulfilled":return K(a,
|
18
|
-
c.value);default:throw c.reason;}case "u":return;default:d=parseInt(d.substring(1),16);a=H(a,d);switch(a.status){case "resolved_model":x(a);break;case "resolved_module":y(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=E,a.then(I(d,c,b),J(d)),null;default:throw a.reason;}}}return d}
|
19
|
-
function N(a,c,b){var d=a._chunks,e=d.get(c);b=JSON.parse(b,a._fromJSON);var f=a._bundlerConfig[b.id][b.name];if(b=p(f)){if(e){var h=e;h.status="blocked"}else h=new w("blocked",null,null,a),d.set(c,h);b.then(function(){return D(h,f)},function(n){return C(h,n)})}else e?D(e,f):d.set(c,new w("resolved_module",f,null,a))}
|
18
|
+
c.value);default:throw c.reason;}case "u":return;case "n":return BigInt(d.substring(2));default:d=parseInt(d.substring(1),16);a=H(a,d);switch(a.status){case "resolved_model":x(a);break;case "resolved_module":y(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=E,a.then(I(d,c,b),J(d)),null;default:throw a.reason;}}}return d}
|
19
|
+
function M(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function N(a,c,b){var d=a._chunks,e=d.get(c);b=JSON.parse(b,a._fromJSON);var f=a._bundlerConfig[b.id][b.name];if(b=p(f)){if(e){var h=e;h.status="blocked"}else h=new w("blocked",null,null,a),d.set(c,h);b.then(function(){return D(h,f)},function(n){return C(h,n)})}else e?D(e,f):d.set(c,new w("resolved_module",f,null,a))}
|
20
20
|
function O(a,c){if(""!==c){var b=c.indexOf(":",0),d=parseInt(c.substring(0,b),16);switch(c[b+1]){case "I":N(a,d,c.substring(b+2));break;case "E":b=JSON.parse(c.substring(b+2)).digest;c=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.");c.stack="Error: "+c.message;c.digest=b;b=a._chunks;
|
21
21
|
var e=b.get(d);e?C(e,c):b.set(d,new w("rejected",null,c,a));break;default:c=c.substring(b+1),e=a._chunks,(b=e.get(d))?"pending"===b.status&&(a=b.value,d=b.reason,b.status="resolved_model",b.value=c,null!==a&&(x(b),B(b,a,d))):e.set(d,new w("resolved_model",c,null,a))}}}function P(a){return function(c,b){return"string"===typeof b?L(a,this,c,b):"object"===typeof b&&null!==b?(c=b[0]===r?{$$typeof:r,type:b[1],key:b[2],ref:null,props:b[3],_owner:null}:b,c):b}}
|
22
22
|
function Q(a,c){var b=new g.TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==c?c:M,_chunks:d,_partialRow:"",_stringDecoder:b};a._fromJSON=P(a);return a}function R(){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.");}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
'use strict';
|
12
12
|
|
13
|
-
'use strict';const n=require("acorn"),p=require("url"),r=require("module");
|
13
|
+
'use strict';const n=require("acorn-loose"),p=require("url"),r=require("module");
|
14
14
|
module.exports=function(){const h=Symbol.for("react.client.reference"),k=Symbol.for("react.server.reference"),t=Promise.prototype,u=Function.prototype.bind;Function.prototype.bind=function(a){const c=u.apply(this,arguments);if(this.$$typeof===k){const b=Array.prototype.slice.call(arguments,1);c.$$typeof=k;c.$$id=this.$$id;c.$$bound=this.$$bound?this.$$bound.concat(b):b}return c};const v={get:function(a,c){switch(c){case "$$typeof":return a.$$typeof;case "$$id":return a.$$id;case "$$async":return a.$$async;
|
15
15
|
case "name":return a.name;case "displayName":return;case "defaultProps":return;case "toJSON":return;case Symbol.toPrimitive:return Object.prototype[Symbol.toPrimitive];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.");}throw Error("Cannot access "+(String(a.name)+"."+String(c))+" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.");
|
16
16
|
},set:function(){throw Error("Cannot assign to a client module from a server module.");}},q={get:function(a,c){switch(c){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 "__esModule":const d=a.$$id;a.default=Object.defineProperties(function(){throw Error("Attempted to call the default export of "+d+" 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.");
|
@@ -10,11 +10,12 @@
|
|
10
10
|
|
11
11
|
'use strict';
|
12
12
|
|
13
|
-
'use strict';var
|
14
|
-
class
|
15
|
-
recursive:!0,include:/\.(js|ts|jsx|tsx)$/}];"string"===typeof b.chunkName?(this.chunkName=b.chunkName,/\[(index|request)\]/.test(this.chunkName)||(this.chunkName+="[index]")):this.chunkName="client[index]";this.clientManifestFilename=b.clientManifestFilename||"react-client-manifest.json";this.ssrManifestFilename=b.ssrManifestFilename||"react-ssr-manifest.json"}apply(b){const
|
16
|
-
{});
|
17
|
-
null,
|
18
|
-
|
19
|
-
const
|
20
|
-
|
13
|
+
'use strict';var v=require("path"),x=require("url"),y=require("neo-async"),A=require("acorn-loose"),B=require("webpack/lib/dependencies/ModuleDependency"),C=require("webpack/lib/dependencies/NullDependency"),D=require("webpack/lib/Template"),E=require("webpack");const F=Array.isArray;class G extends B{constructor(b){super(b)}get type(){return"client-reference"}}const H=require.resolve("../client.browser.js");
|
14
|
+
class I{constructor(b){this.ssrManifestFilename=this.clientManifestFilename=this.chunkName=this.clientReferences=void 0;if(!b||"boolean"!==typeof b.isServer)throw Error("React Server Plugin: You must specify the isServer option as a boolean.");if(b.isServer)throw Error("TODO: Implement the server compiler.");b.clientReferences?"string"!==typeof b.clientReferences&&F(b.clientReferences)?this.clientReferences=b.clientReferences:this.clientReferences=[b.clientReferences]:this.clientReferences=[{directory:".",
|
15
|
+
recursive:!0,include:/\.(js|ts|jsx|tsx)$/}];"string"===typeof b.chunkName?(this.chunkName=b.chunkName,/\[(index|request)\]/.test(this.chunkName)||(this.chunkName+="[index]")):this.chunkName="client[index]";this.clientManifestFilename=b.clientManifestFilename||"react-client-manifest.json";this.ssrManifestFilename=b.ssrManifestFilename||"react-ssr-manifest.json"}apply(b){const r=this;let t,w=!1;b.hooks.beforeCompile.tapAsync("React Server Plugin",(e,f)=>{e=e.contextModuleFactory;const l=b.resolverFactory.get("context",
|
16
|
+
{}),a=b.resolverFactory.get("normal");r.resolveAllClientFiles(b.context,l,a,b.inputFileSystem,e,function(c,d){c?f(c):(t=d,f())})});b.hooks.thisCompilation.tap("React Server Plugin",(e,f)=>{f=f.normalModuleFactory;e.dependencyFactories.set(G,f);e.dependencyTemplates.set(G,new C.Template);e=l=>{l.hooks.program.tap("React Server Plugin",()=>{const a=l.state.module;if(a.resource===H&&(w=!0,t))for(let d=0;d<t.length;d++){const n=t[d];var c=r.chunkName.replace(/\[index\]/g,""+d).replace(/\[request\]/g,
|
17
|
+
D.toPath(n.userRequest));c=new E.AsyncDependenciesBlock({name:c},null,n.request);c.addDependency(n);a.addBlock(c)}})};f.hooks.parser.for("javascript/auto").tap("HarmonyModulesPlugin",e);f.hooks.parser.for("javascript/esm").tap("HarmonyModulesPlugin",e);f.hooks.parser.for("javascript/dynamic").tap("HarmonyModulesPlugin",e)});b.hooks.make.tap("React Server Plugin",e=>{e.hooks.processAssets.tap({name:"React Server Plugin",stage:E.Compilation.PROCESS_ASSETS_STAGE_REPORT},function(){if(!1===w)e.warnings.push(new E.WebpackError("Client runtime at react-server-dom-webpack/client was not found. React Server Components module map file "+
|
18
|
+
r.clientManifestFilename+" was not created."));else{var f=new Set((t||[]).map(d=>d.request)),l={},a={};e.chunkGroups.forEach(function(d){function n(k,h){if(f.has(h.resource)){var g=e.moduleGraph.getExportsInfo(h).getProvidedExports(),m=x.pathToFileURL(h.resource).href;if(void 0!==m){const u={};l[m]={id:k,chunks:p,name:"*"};u["*"]={specifier:m,name:"*"};l[m+"#"]={id:k,chunks:p,name:""};u[""]={specifier:m,name:""};Array.isArray(g)&&g.forEach(function(q){l[m+"#"+q]={id:k,chunks:p,name:q};u[q]={specifier:m,
|
19
|
+
name:q}});a[k]=u}}}const p=d.chunks.map(function(k){return k.id});d.chunks.forEach(function(k){k=e.chunkGraph.getChunkModulesIterable(k);Array.from(k).forEach(function(h){const g=e.chunkGraph.getModuleId(h);n(g,h);h.modules&&h.modules.forEach(m=>{n(g,m)})})})});var c=JSON.stringify(l,null,2);e.emitAsset(r.clientManifestFilename,new E.sources.RawSource(c,!1));c=JSON.stringify(a,null,2);e.emitAsset(r.ssrManifestFilename,new E.sources.RawSource(c,!1))}})})}resolveAllClientFiles(b,r,t,w,e,f){function l(a){if(-1===
|
20
|
+
a.indexOf("use client"))return!1;let c;try{c=A.parse(a,{ecmaVersion:"2024",sourceType:"module"}).body}catch(d){return!1}for(a=0;a<c.length;a++){const d=c[a];if("ExpressionStatement"!==d.type||!d.directive)break;if("use client"===d.directive)return!0}return!1}y.map(this.clientReferences,(a,c)=>{"string"===typeof a?c(null,[new G(a)]):r.resolve({},b,a.directory,{},(d,n)=>{if(d)return c(d);e.resolveDependencies(w,{resource:n,resourceQuery:"",recursive:void 0===a.recursive?!0:a.recursive,regExp:a.include,
|
21
|
+
include:void 0,exclude:a.exclude},(p,k)=>{if(p)return c(p);p=k.map(h=>{var g=v.join(n,h.userRequest);g=new G(g);g.userRequest=h.userRequest;return g});y.filter(p,(h,g)=>{t.resolve({},b,h.request,{},(m,u)=>{if(m||"string"!==typeof u)return g(null,!1);w.readFile(u,"utf-8",(q,z)=>{if(q||"string"!==typeof z)return g(null,!1);q=l(z);g(null,q)})})},c)})})},(a,c)=>{if(a)return f(a);a=[];for(let d=0;d<c.length;d++)a.push.apply(a,c[d]);f(null,a)})}}module.exports=I;
|
@@ -266,8 +266,8 @@ function getIteratorFn(maybeIterable) {
|
|
266
266
|
return null;
|
267
267
|
}
|
268
268
|
|
269
|
+
// A simple string attribute.
|
269
270
|
// Attributes that aren't in the filter are presumed to have this type.
|
270
|
-
|
271
271
|
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
|
272
272
|
// "enumerated" attributes with "true" and "false" as possible values.
|
273
273
|
// When true, it should be set to a "true" string.
|
@@ -287,12 +287,10 @@ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a n
|
|
287
287
|
|
288
288
|
var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
|
289
289
|
|
290
|
-
function PropertyInfoRecord(
|
290
|
+
function PropertyInfoRecord(type, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
|
291
291
|
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
|
292
292
|
this.attributeName = attributeName;
|
293
293
|
this.attributeNamespace = attributeNamespace;
|
294
|
-
this.mustUseProperty = mustUseProperty;
|
295
|
-
this.propertyName = name;
|
296
294
|
this.type = type;
|
297
295
|
this.sanitizeURL = sanitizeURL;
|
298
296
|
this.removeEmptyString = removeEmptyString;
|
@@ -302,8 +300,7 @@ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attribut
|
|
302
300
|
|
303
301
|
['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
|
304
302
|
// $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
|
305
|
-
new PropertyInfoRecord(
|
306
|
-
name.toLowerCase(), // attributeName
|
303
|
+
new PropertyInfoRecord(BOOLEANISH_STRING, name.toLowerCase(), // attributeName
|
307
304
|
null, // attributeNamespace
|
308
305
|
false, // sanitizeURL
|
309
306
|
false);
|
@@ -314,17 +311,15 @@ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attribut
|
|
314
311
|
'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
|
315
312
|
'itemScope'].forEach(function (name) {
|
316
313
|
// $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
|
317
|
-
new PropertyInfoRecord(
|
318
|
-
name.toLowerCase(), // attributeName
|
314
|
+
new PropertyInfoRecord(BOOLEAN, name.toLowerCase(), // attributeName
|
319
315
|
null, // attributeNamespace
|
320
316
|
false, // sanitizeURL
|
321
317
|
false);
|
322
|
-
}); // These are
|
318
|
+
}); // These are HTML attributes that are "overloaded booleans": they behave like
|
323
319
|
|
324
320
|
['rowSpan', 'start'].forEach(function (name) {
|
325
321
|
// $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
|
326
|
-
new PropertyInfoRecord(
|
327
|
-
name.toLowerCase(), // attributeName
|
322
|
+
new PropertyInfoRecord(NUMERIC, name.toLowerCase(), // attributeName
|
328
323
|
null, // attributeNamespace
|
329
324
|
false, // sanitizeURL
|
330
325
|
false);
|
@@ -365,96 +360,19 @@ var capitalize = function (token) {
|
|
365
360
|
|
366
361
|
['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
|
367
362
|
// $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
|
368
|
-
new PropertyInfoRecord(
|
369
|
-
attributeName.toLowerCase(), // attributeName
|
363
|
+
new PropertyInfoRecord(STRING, attributeName.toLowerCase(), // attributeName
|
370
364
|
null, // attributeNamespace
|
371
365
|
false, // sanitizeURL
|
372
366
|
false);
|
373
367
|
}); // These attributes accept URLs. These must not allow javascript: URLS.
|
374
368
|
['src', 'href', 'action'].forEach(function (attributeName) {
|
375
369
|
// $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
|
376
|
-
new PropertyInfoRecord(
|
377
|
-
attributeName.toLowerCase(), // attributeName
|
370
|
+
new PropertyInfoRecord(STRING, attributeName.toLowerCase(), // attributeName
|
378
371
|
null, // attributeNamespace
|
379
372
|
true, // sanitizeURL
|
380
373
|
true);
|
381
374
|
});
|
382
375
|
|
383
|
-
/**
|
384
|
-
* CSS properties which accept numbers but are not in units of "px".
|
385
|
-
*/
|
386
|
-
var isUnitlessNumber = {
|
387
|
-
animationIterationCount: true,
|
388
|
-
aspectRatio: true,
|
389
|
-
borderImageOutset: true,
|
390
|
-
borderImageSlice: true,
|
391
|
-
borderImageWidth: true,
|
392
|
-
boxFlex: true,
|
393
|
-
boxFlexGroup: true,
|
394
|
-
boxOrdinalGroup: true,
|
395
|
-
columnCount: true,
|
396
|
-
columns: true,
|
397
|
-
flex: true,
|
398
|
-
flexGrow: true,
|
399
|
-
flexPositive: true,
|
400
|
-
flexShrink: true,
|
401
|
-
flexNegative: true,
|
402
|
-
flexOrder: true,
|
403
|
-
gridArea: true,
|
404
|
-
gridRow: true,
|
405
|
-
gridRowEnd: true,
|
406
|
-
gridRowSpan: true,
|
407
|
-
gridRowStart: true,
|
408
|
-
gridColumn: true,
|
409
|
-
gridColumnEnd: true,
|
410
|
-
gridColumnSpan: true,
|
411
|
-
gridColumnStart: true,
|
412
|
-
fontWeight: true,
|
413
|
-
lineClamp: true,
|
414
|
-
lineHeight: true,
|
415
|
-
opacity: true,
|
416
|
-
order: true,
|
417
|
-
orphans: true,
|
418
|
-
scale: true,
|
419
|
-
tabSize: true,
|
420
|
-
widows: true,
|
421
|
-
zIndex: true,
|
422
|
-
zoom: true,
|
423
|
-
// SVG-related properties
|
424
|
-
fillOpacity: true,
|
425
|
-
floodOpacity: true,
|
426
|
-
stopOpacity: true,
|
427
|
-
strokeDasharray: true,
|
428
|
-
strokeDashoffset: true,
|
429
|
-
strokeMiterlimit: true,
|
430
|
-
strokeOpacity: true,
|
431
|
-
strokeWidth: true
|
432
|
-
};
|
433
|
-
/**
|
434
|
-
* @param {string} prefix vendor-specific prefix, eg: Webkit
|
435
|
-
* @param {string} key style name, eg: transitionDuration
|
436
|
-
* @return {string} style name prefixed with `prefix`, properly camelCased, eg:
|
437
|
-
* WebkitTransitionDuration
|
438
|
-
*/
|
439
|
-
|
440
|
-
function prefixKey(prefix, key) {
|
441
|
-
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
442
|
-
}
|
443
|
-
/**
|
444
|
-
* Support style names that may come passed in prefixed by adding permutations
|
445
|
-
* of vendor prefixes.
|
446
|
-
*/
|
447
|
-
|
448
|
-
|
449
|
-
var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
|
450
|
-
// infinite loop, because it iterates over the newly added props too.
|
451
|
-
|
452
|
-
Object.keys(isUnitlessNumber).forEach(function (prop) {
|
453
|
-
prefixes.forEach(function (prefix) {
|
454
|
-
isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
455
|
-
});
|
456
|
-
});
|
457
|
-
|
458
376
|
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
459
377
|
|
460
378
|
function isArray(a) {
|
@@ -1747,6 +1665,10 @@ function serializeUndefined() {
|
|
1747
1665
|
return '$undefined';
|
1748
1666
|
}
|
1749
1667
|
|
1668
|
+
function serializeBigInt(n) {
|
1669
|
+
return '$n' + n.toString(10);
|
1670
|
+
}
|
1671
|
+
|
1750
1672
|
function serializeClientReference(request, parent, key, clientReference) {
|
1751
1673
|
var clientReferenceKey = getClientReferenceKey(clientReference);
|
1752
1674
|
var writtenClientReferences = request.writtenClientReferences;
|
@@ -2050,7 +1972,7 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
2050
1972
|
}
|
2051
1973
|
|
2052
1974
|
if (typeof value === 'bigint') {
|
2053
|
-
|
1975
|
+
return serializeBigInt(value);
|
2054
1976
|
}
|
2055
1977
|
|
2056
1978
|
throw new Error("Type " + typeof value + " is not supported in Client Component props." + describeObjectForErrorMessage(parent, key));
|
@@ -2825,6 +2747,12 @@ function parseModelString(response, parentObject, key, value) {
|
|
2825
2747
|
return undefined;
|
2826
2748
|
}
|
2827
2749
|
|
2750
|
+
case 'n':
|
2751
|
+
{
|
2752
|
+
// BigInt
|
2753
|
+
return BigInt(value.substring(2));
|
2754
|
+
}
|
2755
|
+
|
2828
2756
|
default:
|
2829
2757
|
{
|
2830
2758
|
// We assume that anything else is a reference ID.
|