react-server-dom-webpack 18.3.0-next-6ddcbd4f9-20230209 → 18.3.0-next-4a4ef2706-20230212
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.development.js +95 -37
- package/cjs/react-server-dom-webpack-client.production.min.js +11 -9
- package/cjs/react-server-dom-webpack-node-register.js +9 -271
- package/cjs/react-server-dom-webpack-plugin.js +8 -247
- package/cjs/react-server-dom-webpack-server.browser.development.js +69 -29
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +42 -40
- package/cjs/react-server-dom-webpack-server.edge.development.js +69 -29
- package/cjs/react-server-dom-webpack-server.edge.production.min.js +44 -43
- package/cjs/react-server-dom-webpack-server.node.development.js +69 -29
- package/cjs/react-server-dom-webpack-server.node.production.min.js +46 -45
- package/esm/react-server-dom-webpack-node-loader.js +195 -116
- package/package.json +3 -3
- package/umd/react-server-dom-webpack-client.development.js +95 -37
- package/umd/react-server-dom-webpack-client.production.min.js +13 -12
- package/umd/react-server-dom-webpack-server.browser.development.js +69 -29
- package/umd/react-server-dom-webpack-server.browser.production.min.js +40 -39
@@ -8,53 +8,54 @@
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
10
|
'use strict';var aa=require("react");var e="function"===typeof AsyncLocalStorage,ba=e?new AsyncLocalStorage:null,m=null,n=0;function p(a,b){if(0!==b.length)if(512<b.length)0<n&&(a.enqueue(new Uint8Array(m.buffer,0,n)),m=new Uint8Array(512),n=0),a.enqueue(b);else{var c=m.length-n;c<b.length&&(0===c?a.enqueue(m):(m.set(b.subarray(0,c),n),a.enqueue(m),b=b.subarray(c)),m=new Uint8Array(512),n=0);m.set(b,n);n+=b.length}return!0}var q=new TextEncoder;
|
11
|
-
function r(a){return q.encode(a)}function ca(a,b){"function"===typeof a.error?a.error(b):a.close()}var t=JSON.stringify;function u(a,b,c){a=t(c);b=b.toString(16)+":"+a+"\n";return q.encode(b)}
|
12
|
-
var v=Symbol.for("react.client.reference"),
|
13
|
-
function
|
14
|
-
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new
|
15
|
-
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new
|
16
|
-
["cols","rows","size","span"].forEach(function(a){new
|
17
|
-
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering transform-origin underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(
|
18
|
-
|
19
|
-
new
|
20
|
-
var
|
21
|
-
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ra=["Webkit","ms","Moz","O"];Object.keys(
|
11
|
+
function r(a){return q.encode(a)}function ca(a,b){"function"===typeof a.error?a.error(b):a.close()}var t=JSON.stringify;function da(a,b,c){a=t(c,a.toJSON);b=b.toString(16)+":"+a+"\n";return q.encode(b)}function u(a,b,c){a=t(c);b=b.toString(16)+":"+a+"\n";return q.encode(b)}
|
12
|
+
var v=Symbol.for("react.client.reference"),ha=Symbol.for("react.server.reference"),x=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel");
|
13
|
+
function A(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new A(a,0,!1,a,null,!1,!1)});
|
14
|
+
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new A(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new A(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new A(a,2,!1,a,null,!1,!1)});
|
15
|
+
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new A(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new A(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new A(a,4,!1,a,null,!1,!1)});
|
16
|
+
["cols","rows","size","span"].forEach(function(a){new A(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new A(a,5,!1,a.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function C(a){return a[1].toUpperCase()}
|
17
|
+
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering transform-origin underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(B,
|
18
|
+
C);new A(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(B,C);new A(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(B,C);new A(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!1,!1)});
|
19
|
+
new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!0,!0)});
|
20
|
+
var D={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,
|
21
|
+
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ra=["Webkit","ms","Moz","O"];Object.keys(D).forEach(function(a){ra.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);D[b]=D[a]})});var sa=Array.isArray;r('"></template>');r("<script>");r("\x3c/script>");r('<script src="');r('<script type="module" src="');r('" integrity="');r('" async="">\x3c/script>');r("\x3c!-- --\x3e");r(' style="');r(":");r(";");
|
22
22
|
r(" ");r('="');r('"');r('=""');r(">");r("/>");r(' selected=""');r("\n");r("<!DOCTYPE html>");r("</");r(">");r('<template id="');r('"></template>');r("\x3c!--$--\x3e");r('\x3c!--$?--\x3e<template id="');r('"></template>');r("\x3c!--$!--\x3e");r("\x3c!--/$--\x3e");r("<template");r('"');r(' data-dgst="');r(' data-msg="');r(' data-stck="');r("></template>");r('<div hidden id="');r('">');r("</div>");r('<svg aria-hidden="true" style="display:none" id="');r('">');r("</svg>");r('<math aria-hidden="true" style="display:none" id="');
|
23
23
|
r('">');r("</math>");r('<table hidden id="');r('">');r("</table>");r('<table hidden><tbody id="');r('">');r("</tbody></table>");r('<table hidden><tr id="');r('">');r("</tr></table>");r('<table hidden><colgroup id="');r('">');r("</colgroup></table>");r('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("');r('$RS("');r('","');r('")\x3c/script>');r('<template data-rsi="" data-sid="');
|
24
|
-
r('" data-pid="');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}}
|
25
|
-
r('$RC("');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}}
|
26
|
-
r('$RM=new Map;\n$RR=function(p,q,
|
27
|
-
r('$RR("');r('","');r('",');r('"');r(")\x3c/script>");r('<template data-rci="" data-bid="');r('<template data-rri="" data-bid="');r('" data-sid="');r('" data-sty="');r('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');r('$RX("');r('"');r(",");r(")\x3c/script>");r('<template data-rxi="" data-bid="');r('" data-dgst="');r('" data-msg="');r('" data-stck="');r('<
|
28
|
-
r('"></style>');r("[");r(",[");r(",");r("]");var
|
29
|
-
function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?G(a,b):va(a,b)}
|
30
|
-
function wa(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?G(a,c):wa(a,c);b.context._currentValue=b.value}function H(a){var b=
|
24
|
+
r('" data-pid="');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RC("');
|
25
|
+
r('$RC("');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("');
|
26
|
+
r('$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};$RR("');
|
27
|
+
r('$RR("');r('","');r('",');r('"');r(")\x3c/script>");r('<template data-rci="" data-bid="');r('<template data-rri="" data-bid="');r('" data-sid="');r('" data-sty="');r('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');r('$RX("');r('"');r(",");r(")\x3c/script>");r('<template data-rxi="" data-bid="');r('" data-dgst="');r('" data-msg="');r('" data-stck="');r('<template data-precedence="">');
|
28
|
+
r("</template>");r('<style data-precedence="');r('"></style>');r("[");r(",[");r(",");r("]");var E=null;function G(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");G(a,c);b.context._currentValue=b.value}}}
|
29
|
+
function ta(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&ta(a)}function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?G(a,b):va(a,b)}
|
30
|
+
function wa(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?G(a,c):wa(a,c);b.context._currentValue=b.value}function H(a){var b=E;b!==a&&(null===b?ua(a):null===a?ta(b):b.depth===a.depth?G(b,a):b.depth>a.depth?va(b,a):wa(b,a),E=a)}function xa(a,b){var c=a._currentValue;a._currentValue=b;var d=E;return E=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var I=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`");
|
31
31
|
function ya(){}function za(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(ya,ya),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}J=b;throw I;}}var J=null;
|
32
|
-
function Aa(){if(null===J)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=J;J=null;return a}var K=null,
|
33
|
-
var
|
34
|
-
function
|
35
|
-
function Fa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=
|
36
|
-
var
|
37
|
-
function
|
38
|
-
c?
|
39
|
-
function Pa(a,b){a.pendingChunks++;var c=
|
40
|
-
function Ra(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Sa(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:
|
41
|
-
function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===v)return[
|
42
|
-
b._init;b=h(b._payload);return X(a,b,c,d,f,g);case la:return a=b.render,
|
43
|
-
function Va(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.
|
44
|
-
b=a.nextChunkId++,c=V(a,
|
45
|
-
function Y(a){if("string"===typeof a)return a;switch(a){case ma:return"Suspense";case na:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case la:return Y(a.render);case oa:return Y(a.type);case
|
46
|
-
function Z(a,b){var c=Wa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(sa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Ta(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===
|
32
|
+
function Aa(){if(null===J)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=J;J=null;return a}var K=null,M=0,N=null;function Ba(){var a=N;N=null;return a}function Ca(a){return a._currentValue}
|
33
|
+
var Ga={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:O,useTransition:O,readContext:Ca,useContext:Ca,useReducer:O,useRef:O,useState:O,useInsertionEffect:O,useLayoutEffect:O,useImperativeHandle:O,useEffect:O,useId:Da,useMutableSource:O,useSyncExternalStore:O,useCacheRefresh:function(){return Ea},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=qa;return b},use:Fa};
|
34
|
+
function O(){throw Error("This Hook is not supported in Server Components.");}function Ea(){throw Error("Refreshing the cache is not supported in Server Components.");}function Da(){if(null===K)throw Error("useId can only be used while React is rendering");var a=K.identifierCount++;return":"+K.identifierPrefix+"S"+a.toString(32)+":"}
|
35
|
+
function Fa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=M;M+=1;null===N&&(N=[]);return za(N,a,b)}if(a.$$typeof===ka)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function P(){return(new AbortController).signal}function Ha(){if(Q)return Q;if(e){var a=ba.getStore();if(a)return a}return new Map}
|
36
|
+
var Ia={getCacheSignal:function(){var a=Ha(),b=a.get(P);void 0===b&&(b=P(),a.set(P,b));return b},getCacheForType:function(a){var b=Ha(),c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},Q=null,R=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=R.ContextRegistry,T=R.ReactCurrentDispatcher,U=R.ReactCurrentCache;function Ja(a){console.error(a)}
|
37
|
+
function Ka(a,b,c,d,f){if(null!==U.current&&U.current!==Ia)throw Error("Currently React only supports one RSC renderer at a time.");U.current=Ia;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedImportChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenClientReferences:new Map,writtenServerReferences:new Map,writtenProviders:new Map,identifierPrefix:f||
|
38
|
+
"",identifierCount:1,onError:void 0===c?Ja:c,toJSON:function(a,b){return La(k,this,a,b)}};k.pendingChunks++;b=Ma(d);a=Na(k,a,b,g);h.push(a);return k}var Oa={};
|
39
|
+
function Pa(a,b){a.pendingChunks++;var c=Na(a,null,E,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,Qa(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;Qa(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id}
|
40
|
+
function Ra(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Sa(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:z,_payload:a,_init:Ra}}
|
41
|
+
function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===v)return[x,b,c,f];M=0;N=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Sa(f):f}if("string"===typeof b)return[x,b,c,f];if("symbol"===typeof b)return b===ia?f.children:[x,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===v)return[x,b,c,f];switch(b.$$typeof){case z:var h=
|
42
|
+
b._init;b=h(b._payload);return X(a,b,c,d,f,g);case la:return a=b.render,M=0,N=g,a(f,void 0);case oa:return X(a,b.type,c,d,f,g);case ja:return xa(b._context,f.value),[x,b,c,{value:f.value,children:f.children,__pop:Oa}]}}throw Error("Unsupported Server Component type: "+Ta(b));}function Qa(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&Ua(a)}function Na(a,b,c,d){var f={id:a.nextChunkId++,status:0,model:b,context:c,ping:function(){return Qa(a,f)},thenableState:null};d.add(f);return f}
|
43
|
+
function Va(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenClientReferences,h=g.get(f);if(void 0!==h)return b[0]===x&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var y=a.nextChunkId++,ea=t(l),w=y.toString(16)+":I"+ea+"\n";var L=q.encode(w);a.completedImportChunks.push(L);g.set(f,y);return b[0]===x&&"1"===c?"$L"+y.toString(16):"$"+y.toString(16)}catch(fa){return a.pendingChunks++,
|
44
|
+
b=a.nextChunkId++,c=V(a,fa),W(a,b,c),"$"+b.toString(16)}}function Wa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Ta(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(sa(a))return"[...]";a=Wa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}}
|
45
|
+
function Y(a){if("string"===typeof a)return a;switch(a){case ma:return"Suspense";case na:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case la:return Y(a.render);case oa:return Y(a.type);case z:var b=a._payload;a=a._init;try{return Y(a(b))}catch(c){}}return""}
|
46
|
+
function Z(a,b){var c=Wa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(sa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Ta(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===x)f="<"+Y(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?Z(l):
|
47
47
|
Ta(l);k===b?(c=f.length,d=l.length,f+=l):f=10>l.length&&40>f.length+l.length?f+l:f+"..."}f+="}"}return void 0===b?f:-1<c&&0<d?(a=" ".repeat(c)+"^".repeat(d),"\n "+f+"\n "+a):"\n "+f}
|
48
|
-
function
|
49
|
-
d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if("function"===typeof d.then)return"$@"+Pa(a,d).toString(16);if(d.$$typeof===ja)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=u(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Oa){a=
|
50
|
-
d===pa?a.context._defaultValue:d;
|
51
|
-
Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+
|
52
|
-
|
48
|
+
function La(a,b,c,d){switch(d){case x:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===x||d.$$typeof===z);)try{switch(d.$$typeof){case x:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case z:var g=d._init;d=g(d._payload)}}catch(h){c=h===I?Aa():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=Na(a,d,E,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Ba(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+
|
49
|
+
d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if("function"===typeof d.then)return"$@"+Pa(a,d).toString(16);if(d.$$typeof===ja)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=u(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Oa){a=E;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue=
|
50
|
+
d===pa?a.context._defaultValue:d;E=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if(d.$$typeof===ha)return c=a.writtenServerReferences,b=c.get(d),void 0!==b?a="$F"+b.toString(16):(f={id:d.$$filepath,name:d.$$name,bound:Promise.resolve(d.$$bound)},a.pendingChunks++,b=a.nextChunkId++,f=da(a,b,f),a.completedJSONChunks.push(f),c.set(d,
|
51
|
+
b),a="$F"+b.toString(16)),a;if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error('Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server".'+Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+
|
52
|
+
(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=u(a,c,"$S"+g);a.completedImportChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));}
|
53
|
+
function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}function Xa(a,b){null!==a.destination?(a.status=2,ca(a.destination,b)):(a.status=1,a.fatalError=b)}
|
53
54
|
function W(a,b,c){c={digest:c};b=b.toString(16)+":E"+t(c)+"\n";b=q.encode(b);a.completedErrorChunks.push(b)}
|
54
|
-
function Ua(a){var b=
|
55
|
-
|
56
|
-
function Ya(a,b){m=new Uint8Array(512);n=0;try{for(var c=a.
|
55
|
+
function Ua(a){var b=T.current,c=Q;T.current=Ga;Q=a.cache;K=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){H(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===x){var l=k,y=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,y);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===x;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var ea=da(h,g.id,k);h.completedJSONChunks.push(ea);h.abortableTasks.delete(g);
|
56
|
+
g.status=1}catch(F){var w=F===I?Aa():F;if("object"===typeof w&&null!==w&&"function"===typeof w.then){var L=g.ping;w.then(L,L);g.thenableState=Ba()}else{h.abortableTasks.delete(g);g.status=4;var fa=V(h,w);W(h,g.id,fa)}}}}null!==a.destination&&Ya(a,a.destination)}catch(F){V(a,F),Xa(a,F)}finally{T.current=b,Q=c,K=null}}
|
57
|
+
function Ya(a,b){m=new Uint8Array(512);n=0;try{for(var c=a.completedImportChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!p(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!p(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!p(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{m&&0<n&&(b.enqueue(new Uint8Array(m.buffer,0,n)),m=null,n=0)}0===
|
57
58
|
a.pendingChunks&&b.close()}function Za(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=V(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var f=a.nextChunkId++;W(a,f,d);c.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=u(a,b.id,c);a.completedErrorChunks.push(b)});c.clear()}null!==a.destination&&Ya(a,a.destination)}catch(g){V(a,g),Xa(a,g)}}
|
58
|
-
function
|
59
|
-
exports.renderToReadableStream=function(a,b,c){var d=
|
59
|
+
function Ma(a){if(a){var b=E;H(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];S[f]||(S[f]=aa.createServerContext(f,pa));xa(S[f],d)}a=E;H(b);return a}return null}
|
60
|
+
exports.renderToReadableStream=function(a,b,c){var d=Ka(a,b,c?c.onError:void 0,c?c.context:void 0,c?c.identifierPrefix:void 0);if(c&&c.signal){var f=c.signal;if(f.aborted)Za(d,f.reason);else{var g=function(){Za(d,f.reason);f.removeEventListener("abort",g)};f.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){e?ba.run(d.cache,Ua,d):Ua(d)},pull:function(a){if(1===d.status)d.status=2,ca(a,d.fatalError);else if(2!==d.status&&null===d.destination){d.destination=a;try{Ya(d,
|
60
61
|
a)}catch(k){V(d,k),Xa(d,k)}}},cancel:function(){}},{highWaterMark:0})};
|
@@ -270,21 +270,25 @@ function processReferenceChunk(request, id, reference) {
|
|
270
270
|
var row = id.toString(16) + ':' + json + '\n';
|
271
271
|
return stringToChunk(row);
|
272
272
|
}
|
273
|
-
function
|
274
|
-
var json = stringify(
|
273
|
+
function processImportChunk(request, id, clientReferenceMetadata) {
|
274
|
+
var json = stringify(clientReferenceMetadata);
|
275
275
|
var row = serializeRowHeader('I', id) + json + '\n';
|
276
276
|
return stringToChunk(row);
|
277
277
|
}
|
278
278
|
|
279
279
|
// eslint-disable-next-line no-unused-vars
|
280
280
|
var CLIENT_REFERENCE_TAG = Symbol.for('react.client.reference');
|
281
|
+
var SERVER_REFERENCE_TAG = Symbol.for('react.server.reference');
|
281
282
|
function getClientReferenceKey(reference) {
|
282
283
|
return reference.filepath + '#' + reference.name + (reference.async ? '#async' : '');
|
283
284
|
}
|
284
285
|
function isClientReference(reference) {
|
285
286
|
return reference.$$typeof === CLIENT_REFERENCE_TAG;
|
286
287
|
}
|
287
|
-
function
|
288
|
+
function isServerReference(reference) {
|
289
|
+
return reference.$$typeof === SERVER_REFERENCE_TAG;
|
290
|
+
}
|
291
|
+
function resolveClientReferenceMetadata(config, clientReference) {
|
288
292
|
var resolvedModuleData = config[clientReference.filepath][clientReference.name];
|
289
293
|
|
290
294
|
if (clientReference.async) {
|
@@ -298,6 +302,13 @@ function resolveModuleMetaData(config, clientReference) {
|
|
298
302
|
return resolvedModuleData;
|
299
303
|
}
|
300
304
|
}
|
305
|
+
function resolveServerReferenceMetadata(config, serverReference) {
|
306
|
+
return {
|
307
|
+
id: serverReference.$$filepath,
|
308
|
+
name: serverReference.$$name,
|
309
|
+
bound: Promise.resolve(serverReference.$$bound)
|
310
|
+
};
|
311
|
+
}
|
301
312
|
|
302
313
|
// ATTENTION
|
303
314
|
// When adding new symbols to this file,
|
@@ -622,7 +633,7 @@ function isArray(a) {
|
|
622
633
|
// Run `yarn generate-inline-fizz-runtime` to generate.
|
623
634
|
var clientRenderBoundary = '$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};';
|
624
635
|
var completeBoundary = '$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};';
|
625
|
-
var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,
|
636
|
+
var completeBoundaryWithStyles = '$RM=new Map;\n$RR=function(p,q,w){function r(l){this.s=l}for(var t=$RC,m=$RM,u=new Map,n=new Map,g=document,h,e,f=g.querySelectorAll("template[data-precedence]"),c=0;e=f[c++];){for(var b=e.content.firstChild;b;b=b.nextSibling)u.set(b.getAttribute("data-href"),b);e.parentNode.removeChild(e)}f=g.querySelectorAll("link[data-precedence],style[data-precedence]");for(c=0;e=f[c++];)m.set(e.getAttribute("STYLE"===e.nodeName?"data-href":"href"),e),n.set(e.dataset.precedence,h=e);e=0;f=[];for(var d,\nv,a;d=w[e++];){var k=0;b=d[k++];if(!(a=m.get(b))){if(a=u.get(b))c=a.getAttribute("data-precedence");else{a=g.createElement("link");a.href=b;a.rel="stylesheet";for(a.dataset.precedence=c=d[k++];v=d[k++];)a.setAttribute(v,d[k++]);d=a._p=new Promise(function(l,x){a.onload=l;a.onerror=x});d.then(r.bind(d,"l"),r.bind(d,"e"))}m.set(b,a);b=n.get(c)||h;b===h&&(h=a);n.set(c,a);b?b.parentNode.insertBefore(a,b.nextSibling):(c=g.head,c.insertBefore(a,c.firstChild))}d=a._p;c=a.getAttribute("media");!d||"l"===\nd.s||c&&!matchMedia(c).matches||f.push(d)}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};';
|
626
637
|
var completeSegment = '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};';
|
627
638
|
|
628
639
|
var ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
@@ -703,10 +714,10 @@ var completeSegmentScript2 = stringToPrecomputedChunk('","');
|
|
703
714
|
var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>');
|
704
715
|
var completeSegmentData1 = stringToPrecomputedChunk('<template data-rsi="" data-sid="');
|
705
716
|
var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="');
|
706
|
-
var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '
|
717
|
+
var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundary + '$RC("');
|
707
718
|
var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("');
|
708
|
-
var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary +
|
709
|
-
var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '
|
719
|
+
var completeBoundaryWithStylesScript1FullBoth = stringToPrecomputedChunk(completeBoundary + completeBoundaryWithStyles + '$RR("');
|
720
|
+
var completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(completeBoundaryWithStyles + '$RR("');
|
710
721
|
var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("');
|
711
722
|
var completeBoundaryScript2 = stringToPrecomputedChunk('","');
|
712
723
|
var completeBoundaryScript3a = stringToPrecomputedChunk('",');
|
@@ -726,6 +737,8 @@ var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="');
|
|
726
737
|
var clientRenderData3 = stringToPrecomputedChunk('" data-msg="');
|
727
738
|
var clientRenderData4 = stringToPrecomputedChunk('" data-stck="');
|
728
739
|
|
740
|
+
var styleTagTemplateOpen = stringToPrecomputedChunk('<template data-precedence="">');
|
741
|
+
var styleTagTemplateClose = stringToPrecomputedChunk('</template>'); // Tracks whether we wrote any late style tags. We use this to determine
|
729
742
|
var precedencePlaceholderStart = stringToPrecomputedChunk('<style data-precedence="');
|
730
743
|
var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>');
|
731
744
|
|
@@ -1257,11 +1270,12 @@ function createRequest(model, bundlerConfig, onError, context, identifierPrefix)
|
|
1257
1270
|
pendingChunks: 0,
|
1258
1271
|
abortableTasks: abortSet,
|
1259
1272
|
pingedTasks: pingedTasks,
|
1260
|
-
|
1273
|
+
completedImportChunks: [],
|
1261
1274
|
completedJSONChunks: [],
|
1262
1275
|
completedErrorChunks: [],
|
1263
1276
|
writtenSymbols: new Map(),
|
1264
|
-
|
1277
|
+
writtenClientReferences: new Map(),
|
1278
|
+
writtenServerReferences: new Map(),
|
1265
1279
|
writtenProviders: new Map(),
|
1266
1280
|
identifierPrefix: identifierPrefix || '',
|
1267
1281
|
identifierCount: 1,
|
@@ -1572,6 +1586,10 @@ function serializePromiseID(id) {
|
|
1572
1586
|
return '$@' + id.toString(16);
|
1573
1587
|
}
|
1574
1588
|
|
1589
|
+
function serializeServerReferenceID(id) {
|
1590
|
+
return '$F' + id.toString(16);
|
1591
|
+
}
|
1592
|
+
|
1575
1593
|
function serializeSymbolReference(name) {
|
1576
1594
|
return '$S' + name;
|
1577
1595
|
}
|
@@ -1580,10 +1598,10 @@ function serializeProviderReference(name) {
|
|
1580
1598
|
return '$P' + name;
|
1581
1599
|
}
|
1582
1600
|
|
1583
|
-
function serializeClientReference(request, parent, key,
|
1584
|
-
var
|
1585
|
-
var
|
1586
|
-
var existingId =
|
1601
|
+
function serializeClientReference(request, parent, key, clientReference) {
|
1602
|
+
var clientReferenceKey = getClientReferenceKey(clientReference);
|
1603
|
+
var writtenClientReferences = request.writtenClientReferences;
|
1604
|
+
var existingId = writtenClientReferences.get(clientReferenceKey);
|
1587
1605
|
|
1588
1606
|
if (existingId !== undefined) {
|
1589
1607
|
if (parent[0] === REACT_ELEMENT_TYPE && key === '1') {
|
@@ -1599,11 +1617,11 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1599
1617
|
}
|
1600
1618
|
|
1601
1619
|
try {
|
1602
|
-
var
|
1620
|
+
var clientReferenceMetadata = resolveClientReferenceMetadata(request.bundlerConfig, clientReference);
|
1603
1621
|
request.pendingChunks++;
|
1604
|
-
var
|
1605
|
-
|
1606
|
-
|
1622
|
+
var importId = request.nextChunkId++;
|
1623
|
+
emitImportChunk(request, importId, clientReferenceMetadata);
|
1624
|
+
writtenClientReferences.set(clientReferenceKey, importId);
|
1607
1625
|
|
1608
1626
|
if (parent[0] === REACT_ELEMENT_TYPE && key === '1') {
|
1609
1627
|
// If we're encoding the "type" of an element, we can refer
|
@@ -1611,10 +1629,10 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1611
1629
|
// knows how to deal with lazy values. This lets us suspend
|
1612
1630
|
// on this component rather than its parent until the code has
|
1613
1631
|
// loaded.
|
1614
|
-
return serializeLazyID(
|
1632
|
+
return serializeLazyID(importId);
|
1615
1633
|
}
|
1616
1634
|
|
1617
|
-
return serializeByValueID(
|
1635
|
+
return serializeByValueID(importId);
|
1618
1636
|
} catch (x) {
|
1619
1637
|
request.pendingChunks++;
|
1620
1638
|
var errorId = request.nextChunkId++;
|
@@ -1632,6 +1650,24 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1632
1650
|
}
|
1633
1651
|
}
|
1634
1652
|
|
1653
|
+
function serializeServerReference(request, parent, key, serverReference) {
|
1654
|
+
var writtenServerReferences = request.writtenServerReferences;
|
1655
|
+
var existingId = writtenServerReferences.get(serverReference);
|
1656
|
+
|
1657
|
+
if (existingId !== undefined) {
|
1658
|
+
return serializeServerReferenceID(existingId);
|
1659
|
+
}
|
1660
|
+
|
1661
|
+
var serverReferenceMetadata = resolveServerReferenceMetadata(request.bundlerConfig, serverReference);
|
1662
|
+
request.pendingChunks++;
|
1663
|
+
var metadataId = request.nextChunkId++; // We assume that this object doesn't suspend.
|
1664
|
+
|
1665
|
+
var processedChunk = processModelChunk(request, metadataId, serverReferenceMetadata);
|
1666
|
+
request.completedJSONChunks.push(processedChunk);
|
1667
|
+
writtenServerReferences.set(serverReference, metadataId);
|
1668
|
+
return serializeServerReferenceID(metadataId);
|
1669
|
+
}
|
1670
|
+
|
1635
1671
|
function escapeStringValue(value) {
|
1636
1672
|
if (value[0] === '$') {
|
1637
1673
|
// We need to escape $ or @ prefixed strings since we use those to encode
|
@@ -2060,7 +2096,7 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
2060
2096
|
|
2061
2097
|
if (typeof value === 'object') {
|
2062
2098
|
if (isClientReference(value)) {
|
2063
|
-
return serializeClientReference(request, parent, key, value);
|
2099
|
+
return serializeClientReference(request, parent, key, value); // $FlowFixMe[method-unbinding]
|
2064
2100
|
} else if (typeof value.then === 'function') {
|
2065
2101
|
// We assume that any object with a .then property is a "Thenable" type,
|
2066
2102
|
// or a Promise type. Either of which can be represented by a Promise.
|
@@ -2124,10 +2160,14 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
2124
2160
|
return serializeClientReference(request, parent, key, value);
|
2125
2161
|
}
|
2126
2162
|
|
2163
|
+
if (isServerReference(value)) {
|
2164
|
+
return serializeServerReference(request, parent, key, value);
|
2165
|
+
}
|
2166
|
+
|
2127
2167
|
if (/^on[A-Z]/.test(key)) {
|
2128
2168
|
throw new Error('Event handlers cannot be passed to Client Component props.' + describeObjectForErrorMessage(parent, key) + '\nIf you need interactivity, consider converting part of this to a Client Component.');
|
2129
2169
|
} else {
|
2130
|
-
throw new Error('Functions cannot be passed directly to Client Components ' +
|
2170
|
+
throw new Error('Functions cannot be passed directly to Client Components ' + 'unless you explicitly expose it by marking it with "use server".' + describeObjectForErrorMessage(parent, key));
|
2131
2171
|
}
|
2132
2172
|
}
|
2133
2173
|
|
@@ -2219,15 +2259,15 @@ function emitErrorChunkDev(request, id, digest, message, stack) {
|
|
2219
2259
|
request.completedErrorChunks.push(processedChunk);
|
2220
2260
|
}
|
2221
2261
|
|
2222
|
-
function
|
2223
|
-
var processedChunk =
|
2224
|
-
request.
|
2262
|
+
function emitImportChunk(request, id, clientReferenceMetadata) {
|
2263
|
+
var processedChunk = processImportChunk(request, id, clientReferenceMetadata);
|
2264
|
+
request.completedImportChunks.push(processedChunk);
|
2225
2265
|
}
|
2226
2266
|
|
2227
2267
|
function emitSymbolChunk(request, id, name) {
|
2228
2268
|
var symbolReference = serializeSymbolReference(name);
|
2229
2269
|
var processedChunk = processReferenceChunk(request, id, symbolReference);
|
2230
|
-
request.
|
2270
|
+
request.completedImportChunks.push(processedChunk);
|
2231
2271
|
}
|
2232
2272
|
|
2233
2273
|
function emitProviderChunk(request, id, contextName) {
|
@@ -2350,12 +2390,12 @@ function flushCompletedChunks(request, destination) {
|
|
2350
2390
|
try {
|
2351
2391
|
// We emit module chunks first in the stream so that
|
2352
2392
|
// they can be preloaded as early as possible.
|
2353
|
-
var
|
2393
|
+
var importsChunks = request.completedImportChunks;
|
2354
2394
|
var i = 0;
|
2355
2395
|
|
2356
|
-
for (; i <
|
2396
|
+
for (; i < importsChunks.length; i++) {
|
2357
2397
|
request.pendingChunks--;
|
2358
|
-
var chunk =
|
2398
|
+
var chunk = importsChunks[i];
|
2359
2399
|
var keepWriting = writeChunkAndReturn(destination, chunk);
|
2360
2400
|
|
2361
2401
|
if (!keepWriting) {
|
@@ -2365,7 +2405,7 @@ function flushCompletedChunks(request, destination) {
|
|
2365
2405
|
}
|
2366
2406
|
}
|
2367
2407
|
|
2368
|
-
|
2408
|
+
importsChunks.splice(0, i); // Next comes model data.
|
2369
2409
|
|
2370
2410
|
var jsonChunks = request.completedJSONChunks;
|
2371
2411
|
i = 0;
|