react-server-dom-webpack 18.3.0-next-4fcc9184a-20230217 → 18.3.0-next-bfb9cbd8c-20230223
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 -7
- package/cjs/react-server-dom-webpack-client.browser.production.min.js +17 -18
- package/cjs/react-server-dom-webpack-client.edge.development.js +14 -48
- package/cjs/react-server-dom-webpack-client.edge.production.min.js +16 -19
- package/cjs/react-server-dom-webpack-client.node.development.js +23 -69
- package/cjs/react-server-dom-webpack-client.node.production.min.js +17 -19
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +52 -157
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +15 -19
- package/cjs/react-server-dom-webpack-node-register.js +9 -9
- package/cjs/react-server-dom-webpack-plugin.js +8 -8
- package/cjs/react-server-dom-webpack-server.browser.development.js +122 -142
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +31 -31
- package/cjs/react-server-dom-webpack-server.edge.development.js +122 -142
- package/cjs/react-server-dom-webpack-server.edge.production.min.js +27 -27
- package/cjs/react-server-dom-webpack-server.node.development.js +122 -142
- package/cjs/react-server-dom-webpack-server.node.production.min.js +27 -27
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +122 -142
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +27 -27
- package/esm/{react-server-dom-webpack-node-loader.js → react-server-dom-webpack-node-loader.production.min.js} +4 -4
- package/package.json +4 -4
- package/umd/react-server-dom-webpack-client.browser.development.js +14 -10
- package/umd/react-server-dom-webpack-client.browser.production.min.js +14 -14
- package/umd/react-server-dom-webpack-server.browser.development.js +127 -146
- package/umd/react-server-dom-webpack-server.browser.production.min.js +42 -42
@@ -690,7 +690,7 @@ function missingCall() {
|
|
690
690
|
throw new Error('Trying to call a function from "use server" but the callServer option ' + 'was not implemented in your router runtime.');
|
691
691
|
}
|
692
692
|
|
693
|
-
function createResponse(bundlerConfig, callServer) {
|
693
|
+
function createResponse$1(bundlerConfig, callServer) {
|
694
694
|
var chunks = new Map();
|
695
695
|
var response = {
|
696
696
|
_bundlerConfig: bundlerConfig,
|
@@ -857,11 +857,11 @@ function createFromJSONCallback(response) {
|
|
857
857
|
};
|
858
858
|
}
|
859
859
|
|
860
|
-
function createResponse
|
860
|
+
function createResponse(bundlerConfig, callServer) {
|
861
861
|
// NOTE: CHECK THE COMPILER OUTPUT EACH TIME YOU CHANGE THIS.
|
862
862
|
// It should be inlined to one object literal but minor changes can break it.
|
863
|
-
var stringDecoder =
|
864
|
-
var response = createResponse(bundlerConfig, callServer);
|
863
|
+
var stringDecoder = createStringDecoder() ;
|
864
|
+
var response = createResponse$1(bundlerConfig, callServer);
|
865
865
|
response._partialRow = '';
|
866
866
|
|
867
867
|
{
|
@@ -873,6 +873,10 @@ function createResponse$1(bundlerConfig, callServer) {
|
|
873
873
|
return response;
|
874
874
|
}
|
875
875
|
|
876
|
+
function createResponseFromOptions(options) {
|
877
|
+
return createResponse(null, options && options.callServer ? options.callServer : undefined);
|
878
|
+
}
|
879
|
+
|
876
880
|
function startReadingFromStream(response, stream) {
|
877
881
|
var reader = stream.getReader();
|
878
882
|
|
@@ -898,13 +902,13 @@ function startReadingFromStream(response, stream) {
|
|
898
902
|
}
|
899
903
|
|
900
904
|
function createFromReadableStream(stream, options) {
|
901
|
-
var response =
|
905
|
+
var response = createResponseFromOptions(options);
|
902
906
|
startReadingFromStream(response, stream);
|
903
907
|
return getRoot(response);
|
904
908
|
}
|
905
909
|
|
906
910
|
function createFromFetch(promiseForResponse, options) {
|
907
|
-
var response =
|
911
|
+
var response = createResponseFromOptions(options);
|
908
912
|
promiseForResponse.then(function (r) {
|
909
913
|
startReadingFromStream(response, r.body);
|
910
914
|
}, function (e) {
|
@@ -914,7 +918,7 @@ function createFromFetch(promiseForResponse, options) {
|
|
914
918
|
}
|
915
919
|
|
916
920
|
function createFromXHR(request, options) {
|
917
|
-
var response =
|
921
|
+
var response = createResponseFromOptions(options);
|
918
922
|
var processedLength = 0;
|
919
923
|
|
920
924
|
function progress(e) {
|
@@ -7,22 +7,21 @@
|
|
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
|
11
|
-
function
|
12
|
-
var
|
13
|
-
|
14
|
-
function
|
15
|
-
function
|
16
|
-
function
|
17
|
-
function
|
18
|
-
function
|
19
|
-
function O(a,b,c,d){if("$"===d[0]){if("$"===d)return
|
20
|
-
b.value);default:throw b.reason;}default:d=parseInt(d.substring(1),16);a=
|
21
|
-
function Q(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=
|
10
|
+
'use strict';var l=require("react"),m={stream:!0};function n(a,b){return a?(a=a[b.id][b.name],b.async?{id:a.id,chunks:a.chunks,name:a.name,async:!0}:a):b}var p=new Map,q=new Map;function r(){}
|
11
|
+
function t(a){for(var b=a.chunks,c=[],d=0;d<b.length;d++){var e=b[d],f=p.get(e);if(void 0===f){f=__webpack_chunk_load__(e);c.push(f);var h=p.set.bind(p,e,null);f.then(h,r);p.set(e,f)}else null!==f&&c.push(f)}if(a.async){if(b=q.get(a.id))return"fulfilled"===b.status?null:b;var g=Promise.all(c).then(function(){return __webpack_require__(a.id)});g.then(function(k){g.status="fulfilled";g.value=k},function(k){g.status="rejected";g.reason=k});q.set(a.id,g);return g}return 0<c.length?Promise.all(c):null}
|
12
|
+
var u=Symbol.for("react.element"),v=Symbol.for("react.lazy"),w=Symbol.for("react.default_value"),x=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function y(a,b,c,d){this.status=a;this.value=b;this.reason=c;this._response=d}y.prototype=Object.create(Promise.prototype);
|
13
|
+
y.prototype.then=function(a,b){switch(this.status){case "resolved_model":z(this);break;case "resolved_module":A(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":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)}};
|
14
|
+
function C(a){switch(a.status){case "resolved_model":z(a);break;case "resolved_module":A(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":throw a;default:throw a.reason;}}function D(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function E(a,b,c){switch(a.status){case "fulfilled":D(b,a.value);break;case "pending":case "blocked":a.value=b;a.reason=c;break;case "rejected":c&&D(c,a.reason)}}
|
15
|
+
function F(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&D(c,b)}}function G(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&&(A(a),E(a,c,d))}}var H=null,I=null;
|
16
|
+
function z(a){var b=H,c=I;H=a;I=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==I&&0<I.deps?(I.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(e){a.status="rejected",a.reason=e}finally{H=b,I=c}}
|
17
|
+
function A(a){try{var b=a.value;if(b.async){var c=q.get(b.id);if("fulfilled"===c.status)var d=c.value;else throw c.reason;}else d=__webpack_require__(b.id);var e="*"===b.name?d:""===b.name?d.__esModule?d.default:d:d[b.name];a.status="fulfilled";a.value=e}catch(f){a.status="rejected",a.reason=f}}function J(a,b){a._chunks.forEach(function(c){"pending"===c.status&&F(c,b)})}function K(a,b){var c=a._chunks,d=c.get(b);d||(d=new y("pending",null,null,a),c.set(b,d));return d}
|
18
|
+
function L(a,b,c){if(I){var d=I;d.deps++}else d=I={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&&D(e,d.value))}}function M(a){return function(b){return F(a,b)}}function N(a,b){var c=a._callServer;return function(){var d=Array.prototype.slice.call(arguments),e=b.bound;return"fulfilled"===e.status?c(b,e.value.concat(d)):Promise.resolve(e).then(function(f){return c(b,f.concat(d))})}}
|
19
|
+
function O(a,b,c,d){if("$"===d[0]){if("$"===d)return u;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=K(a,b),{$$typeof:v,_payload:a,_init:C};case "@":return b=parseInt(d.substring(2),16),K(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),x[a]||(x[a]=l.createServerContext(a,w)),x[a].Provider;case "F":b=parseInt(d.substring(2),16);b=K(a,b);switch(b.status){case "resolved_model":z(b)}switch(b.status){case "fulfilled":return N(a,
|
20
|
+
b.value);default:throw b.reason;}default:d=parseInt(d.substring(1),16);a=K(a,d);switch(a.status){case "resolved_model":z(a);break;case "resolved_module":A(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=H,a.then(L(d,b,c),M(d)),null;default:throw a.reason;}}}return d}function P(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}
|
21
|
+
function Q(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 y("blocked",null,null,a),d.set(b,h);c.then(function(){return G(h,f)},function(g){return F(h,g)})}else e?G(e,f):d.set(b,new y("resolved_module",f,null,a))}function R(a){J(a,Error("Connection closed."))}
|
22
22
|
function S(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.substring(0,c),16);switch(b[c+1]){case "I":Q(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;
|
23
|
-
var e=c.get(d);e?
|
24
|
-
function U(a
|
25
|
-
function V(a,b){function c(
|
26
|
-
exports.
|
27
|
-
exports.createFromXHR=function(a,b){function c(){for(var
|
28
|
-
d);return J(e,0)};
|
23
|
+
var e=c.get(d);e?F(e,b):c.set(d,new y("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&&(z(c),E(c,a,d))):e.set(d,new y("resolved_model",b,null,a))}}}function T(a){return function(b,c){return"string"===typeof c?O(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===u?{$$typeof:u,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}
|
24
|
+
function U(a){a=a&&a.callServer?a.callServer:void 0;var b=new TextDecoder,c=new Map;a={_bundlerConfig:null,_callServer:void 0!==a?a:P,_chunks:c,_partialRow:"",_stringDecoder:b};a._fromJSON=T(a);return a}
|
25
|
+
function V(a,b){function c(f){var h=f.value;if(f.done)R(a);else{f=h;h=a._stringDecoder;for(var g=f.indexOf(10);-1<g;){var k=a._partialRow;var B=f.subarray(0,g);B=h.decode(B);S(a,k+B);a._partialRow="";f=f.subarray(g+1);g=f.indexOf(10)}a._partialRow+=h.decode(f,m);return e.read().then(c).catch(d)}}function d(f){J(a,f)}var e=b.getReader();e.read().then(c).catch(d)}exports.createFromFetch=function(a,b){var c=U(b);a.then(function(d){V(c,d.body)},function(d){J(c,d)});return K(c,0)};
|
26
|
+
exports.createFromReadableStream=function(a,b){b=U(b);V(b,a);return K(b,0)};
|
27
|
+
exports.createFromXHR=function(a,b){function c(){for(var h=a.responseText,g=f,k=h.indexOf("\n",g);-1<k;)g=e._partialRow+h.substring(g,k),S(e,g),e._partialRow="",g=k+1,k=h.indexOf("\n",g);e._partialRow+=h.substring(g);f=h.length}function d(){J(e,new TypeError("Network error"))}var e=U(b),f=0;a.addEventListener("progress",c);a.addEventListener("load",function(){c();R(e)});a.addEventListener("error",d);a.addEventListener("abort",d);a.addEventListener("timeout",d);return K(e,0)};
|
@@ -690,7 +690,7 @@ function missingCall() {
|
|
690
690
|
throw new Error('Trying to call a function from "use server" but the callServer option ' + 'was not implemented in your router runtime.');
|
691
691
|
}
|
692
692
|
|
693
|
-
function createResponse(bundlerConfig, callServer) {
|
693
|
+
function createResponse$1(bundlerConfig, callServer) {
|
694
694
|
var chunks = new Map();
|
695
695
|
var response = {
|
696
696
|
_bundlerConfig: bundlerConfig,
|
@@ -811,20 +811,6 @@ function processFullRow(response, row) {
|
|
811
811
|
}
|
812
812
|
}
|
813
813
|
}
|
814
|
-
|
815
|
-
function processStringChunk(response, chunk, offset) {
|
816
|
-
var linebreak = chunk.indexOf('\n', offset);
|
817
|
-
|
818
|
-
while (linebreak > -1) {
|
819
|
-
var fullrow = response._partialRow + chunk.substring(offset, linebreak);
|
820
|
-
processFullRow(response, fullrow);
|
821
|
-
response._partialRow = '';
|
822
|
-
offset = linebreak + 1;
|
823
|
-
linebreak = chunk.indexOf('\n', offset);
|
824
|
-
}
|
825
|
-
|
826
|
-
response._partialRow += chunk.substring(offset);
|
827
|
-
}
|
828
814
|
function processBinaryChunk(response, chunk) {
|
829
815
|
|
830
816
|
var stringDecoder = response._stringDecoder;
|
@@ -857,11 +843,11 @@ function createFromJSONCallback(response) {
|
|
857
843
|
};
|
858
844
|
}
|
859
845
|
|
860
|
-
function createResponse
|
846
|
+
function createResponse(bundlerConfig, callServer) {
|
861
847
|
// NOTE: CHECK THE COMPILER OUTPUT EACH TIME YOU CHANGE THIS.
|
862
848
|
// It should be inlined to one object literal but minor changes can break it.
|
863
|
-
var stringDecoder =
|
864
|
-
var response = createResponse(bundlerConfig, callServer);
|
849
|
+
var stringDecoder = createStringDecoder() ;
|
850
|
+
var response = createResponse$1(bundlerConfig, callServer);
|
865
851
|
response._partialRow = '';
|
866
852
|
|
867
853
|
{
|
@@ -873,6 +859,14 @@ function createResponse$1(bundlerConfig, callServer) {
|
|
873
859
|
return response;
|
874
860
|
}
|
875
861
|
|
862
|
+
function noServerCall() {
|
863
|
+
throw new 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.');
|
864
|
+
}
|
865
|
+
|
866
|
+
function createResponseFromOptions(options) {
|
867
|
+
return createResponse(options && options.moduleMap ? options.moduleMap : null, noServerCall);
|
868
|
+
}
|
869
|
+
|
876
870
|
function startReadingFromStream(response, stream) {
|
877
871
|
var reader = stream.getReader();
|
878
872
|
|
@@ -898,13 +892,13 @@ function startReadingFromStream(response, stream) {
|
|
898
892
|
}
|
899
893
|
|
900
894
|
function createFromReadableStream(stream, options) {
|
901
|
-
var response =
|
895
|
+
var response = createResponseFromOptions(options);
|
902
896
|
startReadingFromStream(response, stream);
|
903
897
|
return getRoot(response);
|
904
898
|
}
|
905
899
|
|
906
900
|
function createFromFetch(promiseForResponse, options) {
|
907
|
-
var response =
|
901
|
+
var response = createResponseFromOptions(options);
|
908
902
|
promiseForResponse.then(function (r) {
|
909
903
|
startReadingFromStream(response, r.body);
|
910
904
|
}, function (e) {
|
@@ -913,35 +907,7 @@ function createFromFetch(promiseForResponse, options) {
|
|
913
907
|
return getRoot(response);
|
914
908
|
}
|
915
909
|
|
916
|
-
function createFromXHR(request, options) {
|
917
|
-
var response = createResponse$1(options && options.moduleMap ? options.moduleMap : null, options && options.callServer ? options.callServer : undefined);
|
918
|
-
var processedLength = 0;
|
919
|
-
|
920
|
-
function progress(e) {
|
921
|
-
var chunk = request.responseText;
|
922
|
-
processStringChunk(response, chunk, processedLength);
|
923
|
-
processedLength = chunk.length;
|
924
|
-
}
|
925
|
-
|
926
|
-
function load(e) {
|
927
|
-
progress();
|
928
|
-
close(response);
|
929
|
-
}
|
930
|
-
|
931
|
-
function error(e) {
|
932
|
-
reportGlobalError(response, new TypeError('Network error'));
|
933
|
-
}
|
934
|
-
|
935
|
-
request.addEventListener('progress', progress);
|
936
|
-
request.addEventListener('load', load);
|
937
|
-
request.addEventListener('error', error);
|
938
|
-
request.addEventListener('abort', error);
|
939
|
-
request.addEventListener('timeout', error);
|
940
|
-
return getRoot(response);
|
941
|
-
}
|
942
|
-
|
943
910
|
exports.createFromFetch = createFromFetch;
|
944
911
|
exports.createFromReadableStream = createFromReadableStream;
|
945
|
-
exports.createFromXHR = createFromXHR;
|
946
912
|
})();
|
947
913
|
}
|
@@ -7,22 +7,19 @@
|
|
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
|
11
|
-
function
|
12
|
-
var
|
13
|
-
|
14
|
-
function
|
15
|
-
function
|
16
|
-
function
|
17
|
-
function
|
18
|
-
function
|
19
|
-
function
|
20
|
-
b.value);default:throw b.reason;}default:d=parseInt(d.substring(1),16);a=
|
21
|
-
function
|
22
|
-
function
|
23
|
-
var e
|
24
|
-
|
25
|
-
function
|
26
|
-
exports.createFromFetch=function(a,b){var c=U(b&&b.moduleMap?b.moduleMap:null,b&&b.callServer?b.callServer:void 0);a.then(function(a){V(c,a.body)},function(a){I(c,a)});return J(c,0)};exports.createFromReadableStream=function(a,b){b=U(b&&b.moduleMap?b.moduleMap:null,b&&b.callServer?b.callServer:void 0);V(b,a);return J(b,0)};
|
27
|
-
exports.createFromXHR=function(a,b){function c(){for(var b=a.responseText,c=f,d=b.indexOf("\n",c);-1<d;)c=e._partialRow+b.substring(c,d),S(e,c),e._partialRow="",c=d+1,d=b.indexOf("\n",c);e._partialRow+=b.substring(c);f=b.length}function d(){I(e,new TypeError("Network error"))}var e=U(b&&b.moduleMap?b.moduleMap:null,b&&b.callServer?b.callServer:void 0),f=0;a.addEventListener("progress",c);a.addEventListener("load",function(){c();R(e)});a.addEventListener("error",d);a.addEventListener("abort",d);a.addEventListener("timeout",
|
28
|
-
d);return J(e,0)};
|
10
|
+
'use strict';var p=require("react"),q={stream:!0};function r(a,b){return a?(a=a[b.id][b.name],b.async?{id:a.id,chunks:a.chunks,name:a.name,async:!0}:a):b}var t=new Map,u=new Map;function v(){}
|
11
|
+
function w(a){for(var b=a.chunks,c=[],d=0;d<b.length;d++){var f=b[d],e=t.get(f);if(void 0===e){e=__webpack_chunk_load__(f);c.push(e);var m=t.set.bind(t,f,null);e.then(m,v);t.set(f,e)}else null!==e&&c.push(e)}if(a.async){if(b=u.get(a.id))return"fulfilled"===b.status?null:b;var l=Promise.all(c).then(function(){return __webpack_require__(a.id)});l.then(function(g){l.status="fulfilled";l.value=g},function(g){l.status="rejected";l.reason=g});u.set(a.id,l);return l}return 0<c.length?Promise.all(c):null}
|
12
|
+
var x=Symbol.for("react.element"),y=Symbol.for("react.lazy"),A=Symbol.for("react.default_value"),B=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function C(a,b,c,d){this.status=a;this.value=b;this.reason=c;this._response=d}C.prototype=Object.create(Promise.prototype);
|
13
|
+
C.prototype.then=function(a,b){switch(this.status){case "resolved_model":D(this);break;case "resolved_module":E(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":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)}};
|
14
|
+
function F(a){switch(a.status){case "resolved_model":D(a);break;case "resolved_module":E(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":throw a;default:throw a.reason;}}function G(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function H(a,b,c){switch(a.status){case "fulfilled":G(b,a.value);break;case "pending":case "blocked":a.value=b;a.reason=c;break;case "rejected":c&&G(c,a.reason)}}
|
15
|
+
function I(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&G(c,b)}}function J(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&&(E(a),H(a,c,d))}}var K=null,L=null;
|
16
|
+
function D(a){var b=K,c=L;K=a;L=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==L&&0<L.deps?(L.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(f){a.status="rejected",a.reason=f}finally{K=b,L=c}}
|
17
|
+
function E(a){try{var b=a.value;if(b.async){var c=u.get(b.id);if("fulfilled"===c.status)var d=c.value;else throw c.reason;}else d=__webpack_require__(b.id);var f="*"===b.name?d:""===b.name?d.__esModule?d.default:d:d[b.name];a.status="fulfilled";a.value=f}catch(e){a.status="rejected",a.reason=e}}function M(a,b){a._chunks.forEach(function(c){"pending"===c.status&&I(c,b)})}function N(a,b){var c=a._chunks,d=c.get(b);d||(d=new C("pending",null,null,a),c.set(b,d));return d}
|
18
|
+
function O(a,b,c){if(L){var d=L;d.deps++}else d=L={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&&G(f,d.value))}}function P(a){return function(b){return I(a,b)}}function Q(a,b){var c=a._callServer;return function(){var d=Array.prototype.slice.call(arguments),f=b.bound;return"fulfilled"===f.status?c(b,f.value.concat(d)):Promise.resolve(f).then(function(e){return c(b,e.concat(d))})}}
|
19
|
+
function R(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=N(a,b),{$$typeof:y,_payload:a,_init:F};case "@":return b=parseInt(d.substring(2),16),N(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),B[a]||(B[a]=p.createServerContext(a,A)),B[a].Provider;case "F":b=parseInt(d.substring(2),16);b=N(a,b);switch(b.status){case "resolved_model":D(b)}switch(b.status){case "fulfilled":return Q(a,
|
20
|
+
b.value);default:throw b.reason;}default:d=parseInt(d.substring(1),16);a=N(a,d);switch(a.status){case "resolved_model":D(a);break;case "resolved_module":E(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=K,a.then(O(d,b,c),P(d)),null;default:throw a.reason;}}}return d}function S(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}
|
21
|
+
function T(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 m=f;m.status="blocked"}else m=new C("blocked",null,null,a),d.set(b,m);c.then(function(){return J(m,e)},function(l){return I(m,l)})}else f?J(f,e):d.set(b,new C("resolved_module",e,null,a))}function U(a){return function(b,c){return"string"===typeof c?R(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}}
|
22
|
+
function V(a,b){var c=new TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:S,_chunks:d,_partialRow:"",_stringDecoder:c};a._fromJSON=U(a);return a}function W(){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.");}
|
23
|
+
function X(a,b){function c(e){var m=e.value;if(e.done)M(a,Error("Connection closed."));else{e=m;m=a._stringDecoder;for(var l=e.indexOf(10);-1<l;){var g=a._partialRow;var n=e.subarray(0,l);n=m.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":T(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.");
|
24
|
+
h.stack="Error: "+h.message;h.digest=k;k=g._chunks;var z=k.get(n);z?I(z,h):k.set(n,new C("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&&(D(g),H(g,h,k)))):k.set(n,new C("resolved_model",h,null,g))}}a._partialRow="";e=e.subarray(l+1);l=e.indexOf(10)}a._partialRow+=m.decode(e,q);return f.read().then(c).catch(d)}}function d(e){M(a,e)}var f=b.getReader();f.read().then(c).catch(d)}
|
25
|
+
exports.createFromFetch=function(a,b){var c=V(b&&b.moduleMap?b.moduleMap:null,W);a.then(function(d){X(c,d.body)},function(d){M(c,d)});return N(c,0)};exports.createFromReadableStream=function(a,b){b=V(b&&b.moduleMap?b.moduleMap:null,W);X(b,a);return N(b,0)};
|
@@ -14,10 +14,11 @@ if (process.env.NODE_ENV !== "production") {
|
|
14
14
|
(function() {
|
15
15
|
'use strict';
|
16
16
|
|
17
|
+
var util = require('util');
|
17
18
|
var React = require('react');
|
18
19
|
|
19
20
|
function createStringDecoder() {
|
20
|
-
return new TextDecoder();
|
21
|
+
return new util.TextDecoder();
|
21
22
|
}
|
22
23
|
var decoderOptions = {
|
23
24
|
stream: true
|
@@ -690,7 +691,7 @@ function missingCall() {
|
|
690
691
|
throw new Error('Trying to call a function from "use server" but the callServer option ' + 'was not implemented in your router runtime.');
|
691
692
|
}
|
692
693
|
|
693
|
-
function createResponse(bundlerConfig, callServer) {
|
694
|
+
function createResponse$1(bundlerConfig, callServer) {
|
694
695
|
var chunks = new Map();
|
695
696
|
var response = {
|
696
697
|
_bundlerConfig: bundlerConfig,
|
@@ -857,11 +858,11 @@ function createFromJSONCallback(response) {
|
|
857
858
|
};
|
858
859
|
}
|
859
860
|
|
860
|
-
function createResponse
|
861
|
+
function createResponse(bundlerConfig, callServer) {
|
861
862
|
// NOTE: CHECK THE COMPILER OUTPUT EACH TIME YOU CHANGE THIS.
|
862
863
|
// It should be inlined to one object literal but minor changes can break it.
|
863
|
-
var stringDecoder =
|
864
|
-
var response = createResponse(bundlerConfig, callServer);
|
864
|
+
var stringDecoder = createStringDecoder() ;
|
865
|
+
var response = createResponse$1(bundlerConfig, callServer);
|
865
866
|
response._partialRow = '';
|
866
867
|
|
867
868
|
{
|
@@ -873,75 +874,28 @@ function createResponse$1(bundlerConfig, callServer) {
|
|
873
874
|
return response;
|
874
875
|
}
|
875
876
|
|
876
|
-
function
|
877
|
-
|
878
|
-
|
879
|
-
function progress(_ref) {
|
880
|
-
var done = _ref.done,
|
881
|
-
value = _ref.value;
|
882
|
-
|
883
|
-
if (done) {
|
884
|
-
close(response);
|
885
|
-
return;
|
886
|
-
}
|
887
|
-
|
888
|
-
var buffer = value;
|
889
|
-
processBinaryChunk(response, buffer);
|
890
|
-
return reader.read().then(progress).catch(error);
|
891
|
-
}
|
892
|
-
|
893
|
-
function error(e) {
|
894
|
-
reportGlobalError(response, e);
|
895
|
-
}
|
896
|
-
|
897
|
-
reader.read().then(progress).catch(error);
|
898
|
-
}
|
899
|
-
|
900
|
-
function createFromReadableStream(stream, options) {
|
901
|
-
var response = createResponse$1(options && options.moduleMap ? options.moduleMap : null, options && options.callServer ? options.callServer : undefined);
|
902
|
-
startReadingFromStream(response, stream);
|
903
|
-
return getRoot(response);
|
877
|
+
function noServerCall() {
|
878
|
+
throw new 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.');
|
904
879
|
}
|
905
880
|
|
906
|
-
function
|
907
|
-
var response = createResponse
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
881
|
+
function createFromNodeStream(stream, moduleMap) {
|
882
|
+
var response = createResponse(moduleMap, noServerCall);
|
883
|
+
stream.on('data', function (chunk) {
|
884
|
+
if (typeof chunk === 'string') {
|
885
|
+
processStringChunk(response, chunk, 0);
|
886
|
+
} else {
|
887
|
+
processBinaryChunk(response, chunk);
|
888
|
+
}
|
889
|
+
});
|
890
|
+
stream.on('error', function (error) {
|
891
|
+
reportGlobalError(response, error);
|
892
|
+
});
|
893
|
+
stream.on('end', function () {
|
894
|
+
return close(response);
|
912
895
|
});
|
913
896
|
return getRoot(response);
|
914
897
|
}
|
915
898
|
|
916
|
-
|
917
|
-
var response = createResponse$1(options && options.moduleMap ? options.moduleMap : null, options && options.callServer ? options.callServer : undefined);
|
918
|
-
var processedLength = 0;
|
919
|
-
|
920
|
-
function progress(e) {
|
921
|
-
var chunk = request.responseText;
|
922
|
-
processStringChunk(response, chunk, processedLength);
|
923
|
-
processedLength = chunk.length;
|
924
|
-
}
|
925
|
-
|
926
|
-
function load(e) {
|
927
|
-
progress();
|
928
|
-
close(response);
|
929
|
-
}
|
930
|
-
|
931
|
-
function error(e) {
|
932
|
-
reportGlobalError(response, new TypeError('Network error'));
|
933
|
-
}
|
934
|
-
|
935
|
-
request.addEventListener('progress', progress);
|
936
|
-
request.addEventListener('load', load);
|
937
|
-
request.addEventListener('error', error);
|
938
|
-
request.addEventListener('abort', error);
|
939
|
-
request.addEventListener('timeout', error);
|
940
|
-
return getRoot(response);
|
941
|
-
}
|
942
|
-
|
943
|
-
exports.createFromFetch = createFromFetch;
|
944
|
-
exports.createFromReadableStream = createFromReadableStream;
|
945
|
-
exports.createFromXHR = createFromXHR;
|
899
|
+
exports.createFromNodeStream = createFromNodeStream;
|
946
900
|
})();
|
947
901
|
}
|
@@ -7,22 +7,20 @@
|
|
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
|
11
|
-
function
|
12
|
-
var
|
13
|
-
|
14
|
-
function
|
15
|
-
function
|
16
|
-
function
|
17
|
-
function
|
18
|
-
function
|
19
|
-
function O(a,b,
|
20
|
-
|
21
|
-
function Q(a,b
|
22
|
-
function
|
23
|
-
var e=
|
24
|
-
function
|
25
|
-
function
|
26
|
-
|
27
|
-
exports.createFromXHR=function(a,b){function c(){for(var b=a.responseText,c=f,d=b.indexOf("\n",c);-1<d;)c=e._partialRow+b.substring(c,d),S(e,c),e._partialRow="",c=d+1,d=b.indexOf("\n",c);e._partialRow+=b.substring(c);f=b.length}function d(){I(e,new TypeError("Network error"))}var e=U(b&&b.moduleMap?b.moduleMap:null,b&&b.callServer?b.callServer:void 0),f=0;a.addEventListener("progress",c);a.addEventListener("load",function(){c();R(e)});a.addEventListener("error",d);a.addEventListener("abort",d);a.addEventListener("timeout",
|
28
|
-
d);return J(e,0)};
|
10
|
+
'use strict';var k=require("util"),l=require("react"),m={stream:!0};function n(a,c){return a?(a=a[c.id][c.name],c.async?{id:a.id,chunks:a.chunks,name:a.name,async:!0}:a):c}var p=new Map,q=new Map;function r(){}
|
11
|
+
function t(a){for(var c=a.chunks,b=[],d=0;d<c.length;d++){var e=c[d],f=p.get(e);if(void 0===f){f=__webpack_chunk_load__(e);b.push(f);var h=p.set.bind(p,e,null);f.then(h,r);p.set(e,f)}else null!==f&&b.push(f)}if(a.async){if(c=q.get(a.id))return"fulfilled"===c.status?null:c;var g=Promise.all(b).then(function(){return __webpack_require__(a.id)});g.then(function(w){g.status="fulfilled";g.value=w},function(w){g.status="rejected";g.reason=w});q.set(a.id,g);return g}return 0<b.length?Promise.all(b):null}
|
12
|
+
var u=Symbol.for("react.element"),v=Symbol.for("react.lazy"),x=Symbol.for("react.default_value"),y=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function z(a,c,b,d){this.status=a;this.value=c;this.reason=b;this._response=d}z.prototype=Object.create(Promise.prototype);
|
13
|
+
z.prototype.then=function(a,c){switch(this.status){case "resolved_model":A(this);break;case "resolved_module":B(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":a&&(null===this.value&&(this.value=[]),this.value.push(a));c&&(null===this.reason&&(this.reason=[]),this.reason.push(c));break;default:c(this.reason)}};
|
14
|
+
function C(a){switch(a.status){case "resolved_model":A(a);break;case "resolved_module":B(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":throw a;default:throw a.reason;}}function D(a,c){for(var b=0;b<a.length;b++)(0,a[b])(c)}function E(a,c,b){switch(a.status){case "fulfilled":D(c,a.value);break;case "pending":case "blocked":a.value=c;a.reason=b;break;case "rejected":b&&D(b,a.reason)}}
|
15
|
+
function F(a,c){if("pending"===a.status||"blocked"===a.status){var b=a.reason;a.status="rejected";a.reason=c;null!==b&&D(b,c)}}function G(a,c){if("pending"===a.status||"blocked"===a.status){var b=a.value,d=a.reason;a.status="resolved_module";a.value=c;null!==b&&(B(a),E(a,b,d))}}var H=null,I=null;
|
16
|
+
function A(a){var c=H,b=I;H=a;I=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==I&&0<I.deps?(I.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(e){a.status="rejected",a.reason=e}finally{H=c,I=b}}
|
17
|
+
function B(a){try{var c=a.value;if(c.async){var b=q.get(c.id);if("fulfilled"===b.status)var d=b.value;else throw b.reason;}else d=__webpack_require__(c.id);var e="*"===c.name?d:""===c.name?d.__esModule?d.default:d:d[c.name];a.status="fulfilled";a.value=e}catch(f){a.status="rejected",a.reason=f}}function J(a,c){a._chunks.forEach(function(b){"pending"===b.status&&F(b,c)})}function K(a,c){var b=a._chunks,d=b.get(c);d||(d=new z("pending",null,null,a),b.set(c,d));return d}
|
18
|
+
function L(a,c,b){if(I){var d=I;d.deps++}else d=I={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&&D(e,d.value))}}function M(a){return function(c){return F(a,c)}}function N(a,c){var b=a._callServer;return function(){var d=Array.prototype.slice.call(arguments),e=c.bound;return"fulfilled"===e.status?b(c,e.value.concat(d)):Promise.resolve(e).then(function(f){return b(c,f.concat(d))})}}
|
19
|
+
function O(a,c,b,d){if("$"===d[0]){if("$"===d)return u;switch(d[1]){case "$":return d.substring(1);case "L":return c=parseInt(d.substring(2),16),a=K(a,c),{$$typeof:v,_payload:a,_init:C};case "@":return c=parseInt(d.substring(2),16),K(a,c);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),y[a]||(y[a]=l.createServerContext(a,x)),y[a].Provider;case "F":c=parseInt(d.substring(2),16);c=K(a,c);switch(c.status){case "resolved_model":A(c)}switch(c.status){case "fulfilled":return N(a,
|
20
|
+
c.value);default:throw c.reason;}default:d=parseInt(d.substring(1),16);a=K(a,d);switch(a.status){case "resolved_model":A(a);break;case "resolved_module":B(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=H,a.then(L(d,c,b),M(d)),null;default:throw a.reason;}}}return d}function P(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}
|
21
|
+
function Q(a,c,b){var d=a._chunks,e=d.get(c);b=JSON.parse(b,a._fromJSON);var f=n(a._bundlerConfig,b);if(b=t(f)){if(e){var h=e;h.status="blocked"}else h=new z("blocked",null,null,a),d.set(c,h);b.then(function(){return G(h,f)},function(g){return F(h,g)})}else e?G(e,f):d.set(c,new z("resolved_module",f,null,a))}
|
22
|
+
function R(a,c){if(""!==c){var b=c.indexOf(":",0),d=parseInt(c.substring(0,b),16);switch(c[b+1]){case "I":Q(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;
|
23
|
+
var e=b.get(d);e?F(e,c):b.set(d,new z("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&&(A(b),E(b,a,d))):e.set(d,new z("resolved_model",c,null,a))}}}function S(a){return function(c,b){return"string"===typeof b?O(a,this,c,b):"object"===typeof b&&null!==b?(c=b[0]===u?{$$typeof:u,type:b[1],key:b[2],ref:null,props:b[3],_owner:null}:b,c):b}}
|
24
|
+
function T(a,c){var b=new k.TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==c?c:P,_chunks:d,_partialRow:"",_stringDecoder:b};a._fromJSON=S(a);return a}function U(){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.");}
|
25
|
+
exports.createFromNodeStream=function(a,c){var b=T(c,U);a.on("data",function(d){if("string"===typeof d){for(var e=0,f=d.indexOf("\n",e);-1<f;)e=b._partialRow+d.substring(e,f),R(b,e),b._partialRow="",e=f+1,f=d.indexOf("\n",e);b._partialRow+=d.substring(e)}else{f=b._stringDecoder;for(e=d.indexOf(10);-1<e;){var h=b._partialRow;var g=d.subarray(0,e);g=f.decode(g);R(b,h+g);b._partialRow="";d=d.subarray(e+1);e=d.indexOf(10)}b._partialRow+=f.decode(d,m)}});a.on("error",function(d){J(b,d)});a.on("end",function(){J(b,
|
26
|
+
Error("Connection closed."))});return K(b,0)};
|