react-server-dom-webpack 19.0.0-canary-657428a9e-20240416 → 19.0.0-canary-33a32441e9-20240418

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.
@@ -1,35 +0,0 @@
1
- /**
2
- * @license React
3
- * react-server-dom-webpack-client.browser.production.min.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
-
11
- 'use strict';(function(){(function(t,y){"object"===typeof exports&&"undefined"!==typeof module?y(exports,require("react-dom")):"function"===typeof define&&define.amd?define(["exports","react-dom"],y):(t="undefined"!==typeof globalThis?globalThis:t||self,y(t.ReactServerDOMClient={},t.ReactDOM))})(this,function(t,y){function X(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.');
12
- c=b[2]}return 4===b.length?[a.id,a.chunks,c,1]:[a.id,a.chunks,c]}return b}function O(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 Y(){}function Z(a){for(var b=a[1],c=[],e=0;e<b.length;){var m=b[e++],l=b[e++],h=E.get(m);void 0===h?(P.set(m,l),l=__webpack_chunk_load__(m),c.push(l),h=E.set.bind(E,m,null),l.then(h,Y),E.set(m,l)):null!==
13
- h&&c.push(h)}return 4===a.length?0===c.length?O(a[0]):Promise.all(c).then(function(){return O(a[0])}):0<c.length?Promise.all(c):null}function aa(a){if(null===a||"object"!==typeof a)return null;a=Q&&a[Q]||a["@@iterator"];return"function"===typeof a?a:null}function F(a,b){var c=a.length;a.push(b);return c}function ba(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}function ca(a,b,c,e,m){function l(q,d){if(null===d)return null;if("object"===
14
- typeof d){switch(d.$$typeof){case G: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"+F(c,d).toString(16);case R:q=d._payload;var f=d._init;null===k&&(k=new FormData);g++;try{var p=f(q),n=h++,u=JSON.stringify(p,l);k.append(b+n,u);return"$"+n.toString(16)}catch(r){if("object"===typeof r&&null!==r&&"function"===typeof r.then){g++;var z=h++;p=function(){try{var A=JSON.stringify(d,
15
- l),H=k;H.append(b+z,A);g--;0===g&&e(H)}catch(da){m(da)}};r.then(p,p);return"$"+z.toString(16)}m(r);return null}finally{g--}}if("function"===typeof d.then){null===k&&(k=new FormData);g++;var x=h++;d.then(function(r){try{var A=JSON.stringify(r,l);r=k;r.append(b+x,A);g--;0===g&&e(r)}catch(H){m(H)}},function(r){m(r)});return"$@"+x.toString(16)}if(ea(d))return d;if(d instanceof FormData){null===k&&(k=new FormData);var fa=k;p=h++;var ha=b+p+"_";d.forEach(function(r,A){fa.append(ha+A,r)});return"$K"+p.toString(16)}if(d instanceof
16
- Map)return p=JSON.stringify(Array.from(d),l),null===k&&(k=new FormData),n=h++,k.append(b+n,p),"$Q"+n.toString(16);if(d instanceof Set)return p=JSON.stringify(Array.from(d),l),null===k&&(k=new FormData),n=h++,k.append(b+n,p),"$W"+n.toString(16);if(aa(d))return Array.from(d);p=S(d);if(p!==ia&&(null===p||null!==S(p))){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.");return"$T"+F(c,d).toString(16)}return d}if("string"===
17
- typeof d){if("Z"===d[d.length-1]&&this[q]instanceof Date)return"$D"+d;p="$"===d[0]?"$"+d:d;return p}if("boolean"===typeof d)return d;if("number"===typeof d)return ba(d);if("undefined"===typeof d)return"$undefined";if("function"===typeof d){p=M.get(d);if(void 0!==p)return p=JSON.stringify(p,l),null===k&&(k=new FormData),n=h++,k.set(b+n,p),"$F"+n.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.");
18
- return"$T"+F(c,d).toString(16)}if("symbol"===typeof d){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"+F(c,d).toString(16)}if("bigint"===typeof d)return"$n"+d.toString(10);throw Error("Type "+typeof d+" is not supported as an argument to a Server Function.");}var h=1,g=0,k=null;a=JSON.stringify(a,l);null===k?e(a):(k.set(b+"0",a),0===g&&e(k))}function ja(a,b,c){M.set(a,b)}function w(a,
19
- b,c,e){this.status=a;this.value=b;this.reason=c;this._response=e}function ka(a){switch(a.status){case "resolved_model":I(a);break;case "resolved_module":J(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":case "cyclic":throw a;default:throw a.reason;}}function B(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function T(a,b,c){switch(a.status){case "fulfilled":B(b,a.value);break;case "pending":case "blocked":case "cyclic":a.value=b;a.reason=c;break;case "rejected":c&&B(c,
20
- a.reason)}}function K(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&B(c,b)}}function U(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,e=a.reason;a.status="resolved_module";a.value=b;null!==c&&(J(a),T(a,c,e))}}function I(a){var b=L,c=v;L=a;v=null;var e=a.value;a.status="cyclic";a.value=null;a.reason=null;try{var m=JSON.parse(e,a._response._fromJSON);if(null!==v&&0<v.deps)v.value=m,a.status="blocked",a.value=null,a.reason=
21
- null;else{var l=a.value;a.status="fulfilled";a.value=m;null!==l&&B(l,m)}}catch(h){a.status="rejected",a.reason=h}finally{L=b,v=c}}function J(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 e="*"===b[2]?c:""===b[2]?c.__esModule?c.default:c:c[b[2]];a.status="fulfilled";a.value=e}catch(m){a.status="rejected",a.reason=m}}function N(a,b){a._chunks.forEach(function(c){"pending"===c.status&&K(c,b)})}
22
- function C(a,b){var c=a._chunks,e=c.get(b);e||(e=new w("pending",null,null,a),c.set(b,e));return e}function la(a,b,c,e,m,l){if(v){var h=v;e||h.deps++}else h=v={deps:e?0:1,value:null};return function(g){b[c]=l(m,g);""===c&&null===h.value&&(h.value=b[c]);h.deps--;0===h.deps&&"blocked"===a.status&&(g=a.value,a.status="fulfilled",a.value=h.value,null!==g&&B(g,h.value))}}function ma(a){return function(b){return K(a,b)}}function na(a,b){var c=a._callServer;a=function(){var e=Array.prototype.slice.call(arguments),
23
- m=b.bound;return m?"fulfilled"===m.status?c(b.id,m.value.concat(e)):Promise.resolve(m).then(function(l){return c(b.id,l.concat(e))}):c(b.id,e)};M.set(a,b);return a}function D(a,b,c,e,m){b=C(a,b);switch(b.status){case "resolved_model":I(b);break;case "resolved_module":J(b)}switch(b.status){case "fulfilled":return m(a,b.value);case "pending":case "blocked":case "cyclic":var l=L;b.then(la(l,c,e,"cyclic"===b.status,a,m),ma(l));return null;default:throw b.reason;}}function oa(a,b){return new Map(b)}function pa(a,
24
- b){return new Set(b)}function qa(a,b){a=new FormData;for(var c=0;c<b.length;c++)a.append(b[c][0],b[c][1]);return a}function ra(a,b){return b}function sa(a,b,c,e){if("$"===e[0]){if("$"===e)return G;switch(e[1]){case "$":return e.slice(1);case "L":return b=parseInt(e.slice(2),16),a=C(a,b),{$$typeof:R,_payload:a,_init:ka};case "@":if(2===e.length)return new Promise(function(){});b=parseInt(e.slice(2),16);return C(a,b);case "S":return Symbol.for(e.slice(2));case "F":return e=parseInt(e.slice(2),16),D(a,
25
- e,b,c,na);case "T":b=parseInt(e.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.");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 e=parseInt(e.slice(2),
26
- 16),D(a,e,b,c,oa);case "W":return e=parseInt(e.slice(2),16),D(a,e,b,c,pa);case "B":return;case "K":return e=parseInt(e.slice(2),16),D(a,e,b,c,qa);case "I":return Infinity;case "-":return"$-0"===e?-0:-Infinity;case "N":return NaN;case "u":return;case "D":return new Date(Date.parse(e.slice(2)));case "n":return BigInt(e.slice(2));default:return e=parseInt(e.slice(1),16),D(a,e,b,c,ra)}}return e}function ta(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');
27
- }function ua(a,b,c){var e=a._chunks,m=e.get(b);c=JSON.parse(c,a._fromJSON);var l=X(a._bundlerConfig,c);if(c=Z(l)){if(m){var h=m;h.status="blocked"}else h=new w("blocked",null,null,a),e.set(b,h);c.then(function(){return U(h,l)},function(g){return K(h,g)})}else m?U(m,l):e.set(b,new w("resolved_module",l,null,a))}function va(a){return function(b,c){return"string"===typeof c?sa(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===G?{$$typeof:G,type:c[1],key:c[2],ref:null,props:c[3]}:c,b):c}}function V(a){var b=
28
- a&&a.callServer?a.callServer:void 0;a=a&&a.temporaryReferences?a.temporaryReferences:void 0;var c=new Map;b={_bundlerConfig:null,_moduleLoading:null,_callServer:void 0!==b?b:ta,_encodeFormAction:void 0,_nonce:void 0,_chunks:c,_stringDecoder:new TextDecoder,_fromJSON:null,_rowState:0,_rowID:0,_rowTag:0,_rowLength:0,_buffer:[],_tempRefs:a};b._fromJSON=va(b);return b}function W(a,b){function c(l){var h=l.value;if(l.done)N(a,Error("Connection closed."));else{var g=0,k=a._rowState,q=a._rowID,d=a._rowTag,
29
- f=a._rowLength;l=a._buffer;for(var p=h.length;g<p;){var n=-1;switch(k){case 0:n=h[g++];58===n?k=1:q=q<<4|(96<n?n-87:n-48);continue;case 1:k=h[g];84===k?(d=k,k=2,g++):64<k&&91>k||114===k||120===k?(d=k,k=3,g++):(d=0,k=3);continue;case 2:n=h[g++];44===n?k=4:f=f<<4|(96<n?n-87:n-48);continue;case 3:n=h.indexOf(10,g);break;case 4:n=g+f,n>h.length&&(n=-1)}var u=h.byteOffset+g;if(-1<n){g=new Uint8Array(h.buffer,u,n-g);f=a;u=d;var z=f._stringDecoder;d="";for(var x=0;x<l.length;x++)d+=z.decode(l[x],wa);d+=
30
- z.decode(g);switch(u){case 73:ua(f,q,d);break;case 72:q=d[0];d=d.slice(1);f=JSON.parse(d,f._fromJSON);d=xa.d;switch(q){case "D":d.D(f);break;case "C":"string"===typeof f?d.C(f):d.C(f[0],f[1]);break;case "L":q=f[0];g=f[1];3===f.length?d.L(q,g,f[2]):d.L(q,g);break;case "m":"string"===typeof f?d.m(f):d.m(f[0],f[1]);break;case "X":"string"===typeof f?d.X(f):d.X(f[0],f[1]);break;case "S":"string"===typeof f?d.S(f):d.S(f[0],0===f[1]?void 0:f[1],3===f.length?f[2]:void 0);break;case "M":"string"===typeof f?
31
- d.M(f):d.M(f[0],f[1])}break;case 69:d=JSON.parse(d);g=d.digest;d=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.");d.stack="Error: "+d.message;d.digest=g;g=f._chunks;(u=g.get(q))?K(u,d):g.set(q,new w("rejected",null,d,f));break;case 84:f._chunks.set(q,new w("fulfilled",d,null,f));
32
- 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:g=f._chunks,(u=g.get(q))?(f=u,q=d,"pending"===f.status&&(d=f.value,g=f.reason,f.status="resolved_model",f.value=q,null!==d&&(I(f),T(f,d,g)))):g.set(q,new w("resolved_model",d,null,f))}g=n;3===k&&g++;f=q=d=k=0;l.length=0}else{h=new Uint8Array(h.buffer,u,h.byteLength-
33
- g);l.push(h);f-=h.byteLength;break}}a._rowState=k;a._rowID=q;a._rowTag=d;a._rowLength=f;return m.read().then(c).catch(e)}}function e(l){N(a,l)}var m=b.getReader();m.read().then(c).catch(e)}var wa={stream:!0},E=new Map,P=new Map,ya=__webpack_require__.u;__webpack_require__.u=function(a){var b=P.get(a);return void 0!==b?b:ya(a)};var xa=y.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=Symbol.for("react.element"),R=Symbol.for("react.lazy"),Q=Symbol.iterator,ea=Array.isArray,S=Object.getPrototypeOf,
34
- ia=Object.prototype,M=new WeakMap;w.prototype=Object.create(Promise.prototype);w.prototype.then=function(a,b){switch(this.status){case "resolved_model":I(this);break;case "resolved_module":J(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&&b(this.reason)}};var L=null,v=null;t.createFromFetch=function(a,b){var c=
35
- V(b);a.then(function(e){W(c,e.body)},function(e){N(c,e)});return C(c,0)};t.createFromReadableStream=function(a,b){b=V(b);W(b,a);return C(b,0)};t.createServerReference=function(a,b,c){c=function(){var e=Array.prototype.slice.call(arguments);return b(a,e)};ja(c,{id:a,bound:null});return c};t.createTemporaryReferenceSet=function(){return[]};t.encodeReply=function(a,b){return new Promise(function(c,e){ca(a,"",b&&b.temporaryReferences?b.temporaryReferences:void 0,c,e)})}})})();