From dc697245aee5991d5d36267c4ea50443244460df Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Sun, 14 Jan 2024 02:37:08 -0500 Subject: [PATCH] Update React from f1039be4a to 60a927d04 (#60619) Includes a fix for useOptimistic. React upstream changes: - https://github.com/facebook/react/pull/27936 - https://github.com/facebook/react/pull/27924 - https://github.com/facebook/react/pull/27930 - https://github.com/facebook/react/pull/27923 - https://github.com/facebook/react/pull/27922 - https://github.com/facebook/react/pull/27917 - https://github.com/facebook/react/pull/27916 - https://github.com/facebook/react/pull/27918 - https://github.com/facebook/react/pull/27919 - https://github.com/facebook/react/pull/27914 - https://github.com/facebook/react/pull/27911 - https://github.com/facebook/react/pull/27909 - https://github.com/facebook/react/pull/27907 - https://github.com/facebook/react/pull/27906 - https://github.com/facebook/react/pull/27905 Closes NEXT-2096 --- package.json | 20 +- ...t-dom-server-legacy.browser.development.js | 57 +- ...ct-dom-server-legacy.browser.production.js | 48 +- ...om-server-legacy.browser.production.min.js | 220 ++--- ...eact-dom-server-legacy.node.development.js | 57 +- ...react-dom-server-legacy.node.production.js | 48 +- ...t-dom-server-legacy.node.production.min.js | 235 +++--- ...t-dom-server-rendering-stub.development.js | 2 +- ...ct-dom-server-rendering-stub.production.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 57 +- .../react-dom-server.browser.production.js | 48 +- ...react-dom-server.browser.production.min.js | 280 +++---- .../cjs/react-dom-server.bun.production.js | 48 +- .../cjs/react-dom-server.edge.development.js | 57 +- .../cjs/react-dom-server.edge.production.js | 48 +- .../react-dom-server.edge.production.min.js | 289 +++---- .../cjs/react-dom-server.node.development.js | 57 +- .../cjs/react-dom-server.node.production.js | 48 +- .../react-dom-server.node.production.min.js | 243 +++--- .../react-dom-unstable_testing.development.js | 33 +- .../react-dom-unstable_testing.production.js | 24 +- ...act-dom-unstable_testing.production.min.js | 782 ++++++++--------- .../cjs/react-dom.development.js | 33 +- .../cjs/react-dom.production.js | 24 +- .../cjs/react-dom.production.min.js | 758 ++++++++--------- .../cjs/react-dom.profiling.js | 24 +- .../cjs/react-dom.profiling.min.js | 788 +++++++++--------- .../react-dom-experimental/package.json | 4 +- ...t-dom-server-legacy.browser.development.js | 57 +- ...ct-dom-server-legacy.browser.production.js | 48 +- ...om-server-legacy.browser.production.min.js | 235 +++--- ...eact-dom-server-legacy.node.development.js | 57 +- ...react-dom-server-legacy.node.production.js | 48 +- ...t-dom-server-legacy.node.production.min.js | 256 +++--- ...t-dom-server-rendering-stub.development.js | 2 +- ...ct-dom-server-rendering-stub.production.js | 2 +- ...om-server-rendering-stub.production.min.js | 2 +- .../react-dom-server.browser.development.js | 57 +- .../react-dom-server.browser.production.js | 48 +- ...react-dom-server.browser.production.min.js | 185 ++-- .../cjs/react-dom-server.bun.production.js | 48 +- .../cjs/react-dom-server.edge.development.js | 57 +- .../cjs/react-dom-server.edge.production.js | 48 +- .../react-dom-server.edge.production.min.js | 198 ++--- .../cjs/react-dom-server.node.development.js | 57 +- .../cjs/react-dom-server.node.production.js | 48 +- .../react-dom-server.node.production.min.js | 196 ++--- .../react-dom/cjs/react-dom.development.js | 33 +- .../react-dom/cjs/react-dom.production.js | 24 +- .../react-dom/cjs/react-dom.production.min.js | 756 ++++++++--------- .../react-dom/cjs/react-dom.profiling.js | 24 +- .../react-dom/cjs/react-dom.profiling.min.js | 784 ++++++++--------- .../next/src/compiled/react-dom/package.json | 4 +- .../cjs/react-jsx-dev-runtime.development.js | 24 +- .../cjs/react-jsx-runtime.development.js | 24 +- .../cjs/react.development.js | 22 +- .../cjs/react.production.js | 2 +- .../cjs/react.production.min.js | 2 +- .../cjs/react.shared-subset.development.js | 22 +- .../cjs/react.shared-subset.production.js | 2 +- .../cjs/react.shared-subset.production.min.js | 2 +- .../package.json | 4 +- .../react-server-dom-turbopack/package.json | 4 +- .../package.json | 4 +- .../react-server-dom-webpack/package.json | 4 +- .../cjs/react-jsx-dev-runtime.development.js | 24 +- .../cjs/react-jsx-runtime.development.js | 24 +- .../compiled/react/cjs/react.development.js | 22 +- .../compiled/react/cjs/react.production.js | 2 +- .../react/cjs/react.production.min.js | 2 +- .../cjs/react.shared-subset.development.js | 22 +- .../cjs/react.shared-subset.production.js | 2 +- .../cjs/react.shared-subset.production.min.js | 2 +- pnpm-lock.yaml | 110 ++- 75 files changed, 4489 insertions(+), 3447 deletions(-) diff --git a/package.json b/package.json index 38dd195e18580..edfe88405ac99 100644 --- a/package.json +++ b/package.json @@ -197,16 +197,16 @@ "random-seed": "0.3.0", "react": "18.2.0", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@18.3.0-canary-f1039be4a-20240107", + "react-builtin": "npm:react@18.3.0-canary-60a927d04-20240113", "react-dom": "18.2.0", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@18.3.0-canary-f1039be4a-20240107", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-f1039be4a-20240107", - "react-experimental-builtin": "npm:react@0.0.0-experimental-f1039be4a-20240107", - "react-server-dom-turbopack": "18.3.0-canary-f1039be4a-20240107", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-f1039be4a-20240107", - "react-server-dom-webpack": "18.3.0-canary-f1039be4a-20240107", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-f1039be4a-20240107", + "react-dom-builtin": "npm:react-dom@18.3.0-canary-60a927d04-20240113", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-60a927d04-20240113", + "react-experimental-builtin": "npm:react@0.0.0-experimental-60a927d04-20240113", + "react-server-dom-turbopack": "18.3.0-canary-60a927d04-20240113", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-60a927d04-20240113", + "react-server-dom-webpack": "18.3.0-canary-60a927d04-20240113", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-60a927d04-20240113", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -216,8 +216,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.9", - "scheduler-builtin": "npm:scheduler@0.24.0-canary-f1039be4a-20240107", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-f1039be4a-20240107", + "scheduler-builtin": "npm:scheduler@0.24.0-canary-60a927d04-20240113", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-60a927d04-20240113", "seedrandom": "3.0.5", "selenium-webdriver": "4.0.0-beta.4", "semver": "7.3.7", diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index 2cf4461b3bb81..f37efea75879f 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") { var React = require("next/dist/compiled/react-experimental"); var ReactDOM = require('react-dom'); -var ReactVersion = '18.3.0-experimental-f1039be4a-20240107'; +var ReactVersion = '18.3.0-experimental-60a927d04-20240113'; var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; @@ -6673,8 +6673,9 @@ function getWrappedName(outerType, innerType, wrapperName) { function getContextName(type) { return type.displayName || 'Context'; -} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. +} +var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. function getComponentNameFromType(type) { if (type == null) { @@ -6682,13 +6683,12 @@ function getComponentNameFromType(type) { return null; } - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); + if (typeof type === 'function') { + if (type.$$typeof === REACT_CLIENT_REFERENCE) { + // TODO: Create a convention for naming client references with debug info. + return null; } - } - if (typeof type === 'function') { return type.displayName || type.name || null; } @@ -6723,6 +6723,12 @@ function getComponentNameFromType(type) { } if (typeof type === 'object') { + { + if (typeof type.tag === 'number') { + error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); + } + } + switch (type.$$typeof) { case REACT_CONTEXT_TYPE: var context = type; @@ -9415,7 +9421,8 @@ function renderSuspenseBoundary(request, someTask, keyPath, props) { errorDigest = logRecoverableError(request, error, thrownInfo); } - encodeErrorForBoundary(newBoundary, errorDigest, error, thrownInfo); // We don't need to decrement any task numbers because we didn't spawn any new task. + encodeErrorForBoundary(newBoundary, errorDigest, error, thrownInfo); + untrackBoundary(request, newBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task. // We don't need to schedule any task because we know the parent has written yet. // We do need to fallthrough to create the fallback though. } finally { @@ -10596,6 +10603,36 @@ function trackPostpone(request, trackedPostpones, task, segment) { slots[task.childIndex] = segment.id; } +} // In case a boundary errors, we need to stop tracking it because we won't +// resume it. + + +function untrackBoundary(request, boundary) { + var trackedPostpones = request.trackedPostpones; + + if (trackedPostpones === null) { + return; + } + + var boundaryKeyPath = boundary.trackedContentKeyPath; + + if (boundaryKeyPath === null) { + return; + } + + var boundaryNode = trackedPostpones.workingMap.get(boundaryKeyPath); + + if (boundaryNode === undefined) { + return; + } // Downgrade to plain ReplayNode since we won't replay through it. + // $FlowFixMe[cannot-write]: We intentionally downgrade this to the other tuple. + + + boundaryNode.length = 4; // Remove any resumable slots. + + boundaryNode[2] = []; + boundaryNode[3] = null; // TODO: We should really just remove the boundary from all parent paths too so + // we don't replay the path to it. } function injectPostponedHole(request, task, reason, thrownInfo) { @@ -10814,7 +10851,8 @@ function erroredTask(request, boundary, error, errorInfo) { if (boundary.status !== CLIENT_RENDERED) { boundary.status = CLIENT_RENDERED; - encodeErrorForBoundary(boundary, errorDigest, error, errorInfo); // Regardless of what happens next, this boundary won't be displayed, + encodeErrorForBoundary(boundary, errorDigest, error, errorInfo); + untrackBoundary(request, boundary); // Regardless of what happens next, this boundary won't be displayed, // so we can flush it, if the parent already flushed. if (boundary.parentFlushed) { @@ -10978,6 +11016,7 @@ function abortTask(task, request, error) { } encodeErrorForBoundary(boundary, _errorDigest, errorMessage, _errorInfo); + untrackBoundary(request, boundary); if (boundary.parentFlushed) { request.clientRenderedBoundaries.push(boundary); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js index edf204ea3decc..a5b433744222b 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js @@ -26,7 +26,7 @@ function formatProdErrorMessage(code) { return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.'; } -var ReactVersion = '18.3.0-experimental-f1039be4a-20240107'; +var ReactVersion = '18.3.0-experimental-60a927d04-20240113'; // A pure JS implementation of a string hashing function. We do not use it for // security or obfuscation purposes, only to create compact hashes. So we @@ -4994,8 +4994,9 @@ function getWrappedName(outerType, innerType, wrapperName) { function getContextName(type) { return type.displayName || 'Context'; -} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. +} +const REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. function getComponentNameFromType(type) { if (type == null) { @@ -5004,6 +5005,11 @@ function getComponentNameFromType(type) { } if (typeof type === 'function') { + if (type.$$typeof === REACT_CLIENT_REFERENCE) { + // TODO: Create a convention for naming client references with debug info. + return null; + } + return type.displayName || type.name || null; } @@ -5038,6 +5044,7 @@ function getComponentNameFromType(type) { } if (typeof type === 'object') { + switch (type.$$typeof) { case REACT_CONTEXT_TYPE: const context = type; @@ -6995,7 +7002,8 @@ function renderSuspenseBoundary(request, someTask, keyPath, props) { errorDigest = logRecoverableError(request, error, thrownInfo); } - encodeErrorForBoundary(newBoundary, errorDigest); // We don't need to decrement any task numbers because we didn't spawn any new task. + encodeErrorForBoundary(newBoundary, errorDigest); + untrackBoundary(request, newBoundary); // We don't need to decrement any task numbers because we didn't spawn any new task. // We don't need to schedule any task because we know the parent has written yet. // We do need to fallthrough to create the fallback though. } finally { @@ -7994,6 +8002,36 @@ function trackPostpone(request, trackedPostpones, task, segment) { slots[task.childIndex] = segment.id; } +} // In case a boundary errors, we need to stop tracking it because we won't +// resume it. + + +function untrackBoundary(request, boundary) { + const trackedPostpones = request.trackedPostpones; + + if (trackedPostpones === null) { + return; + } + + const boundaryKeyPath = boundary.trackedContentKeyPath; + + if (boundaryKeyPath === null) { + return; + } + + const boundaryNode = trackedPostpones.workingMap.get(boundaryKeyPath); + + if (boundaryNode === undefined) { + return; + } // Downgrade to plain ReplayNode since we won't replay through it. + // $FlowFixMe[cannot-write]: We intentionally downgrade this to the other tuple. + + + boundaryNode.length = 4; // Remove any resumable slots. + + boundaryNode[2] = []; + boundaryNode[3] = null; // TODO: We should really just remove the boundary from all parent paths too so + // we don't replay the path to it. } function injectPostponedHole(request, task, reason, thrownInfo) { @@ -8210,7 +8248,8 @@ function erroredTask(request, boundary, error, errorInfo) { if (boundary.status !== CLIENT_RENDERED) { boundary.status = CLIENT_RENDERED; - encodeErrorForBoundary(boundary, errorDigest); // Regardless of what happens next, this boundary won't be displayed, + encodeErrorForBoundary(boundary, errorDigest); + untrackBoundary(request, boundary); // Regardless of what happens next, this boundary won't be displayed, // so we can flush it, if the parent already flushed. if (boundary.parentFlushed) { @@ -8348,6 +8387,7 @@ function abortTask(task, request, error) { const errorDigest = logRecoverableError(request, error, errorInfo); encodeErrorForBoundary(boundary, errorDigest); + untrackBoundary(request, boundary); if (boundary.parentFlushed) { request.clientRenderedBoundaries.push(boundary); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js index 8dd258377fe47..2e0d284577a70 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.min.js @@ -63,23 +63,23 @@ function Mb(a,b){a.push(O("script"));var c=null,d=null,e;for(e in b)if(z.call(b, function Nb(a,b,c){a.push(O(c));var d=c=null,e;for(e in b)if(z.call(b,e)){var f=b[e];if(null!=f)switch(e){case "children":c=f;break;case "dangerouslySetInnerHTML":d=f;break;default:K(a,e,f)}}a.push(">");M(a,d,c);return"string"===typeof c?(a.push(A(c)),null):c}var Ob=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Pb=new Map;function O(a){var b=Pb.get(a);if(void 0===b){if(!Ob.test(a))throw Error(q(65,a));b="<"+a;Pb.set(a,b)}return b} function Qb(a,b,c,d,e,f,g){switch(b){case "div":case "span":case "svg":case "path":case "a":case "g":case "p":case "li":break;case "select":a.push(O("select"));var h=null,k=null,l;for(l in c)if(z.call(c,l)){var m=c[l];if(null!=m)switch(l){case "children":h=m;break;case "dangerouslySetInnerHTML":k=m;break;case "defaultValue":case "value":break;default:K(a,l,m)}}a.push(">");M(a,k,h);return h;case "option":var p=f.selectedValue;a.push(O("option"));var n=null,r=null,D=null,B=null,y;for(y in c)if(z.call(c, y)){var v=c[y];if(null!=v)switch(y){case "children":n=v;break;case "selected":D=v;break;case "dangerouslySetInnerHTML":B=v;break;case "value":r=v;default:K(a,y,v)}}if(null!=p){var u=null!==r?""+r:Gb(n);if(Fa(p))for(var F=0;F");M(a,B,n);return n;case "textarea":a.push(O("textarea"));var x=null,t=null,E=null,P;for(P in c)if(z.call(c,P)){var G=c[P];if(null!=G)switch(P){case "children":E= -G;break;case "value":x=G;break;case "defaultValue":t=G;break;case "dangerouslySetInnerHTML":throw Error(q(91));default:K(a,P,G)}}null===x&&null!==t&&(x=t);a.push(">");if(null!=E){if(null!=x)throw Error(q(92));if(Fa(E)){if(1");null!==ub&&ub.forEach(Db,a);return null;case "button":a.push(O("button"));var ra=null,sa=null,da=null,ta=null,ua=null,Xa=null,va=null,Ya;for(Ya in c)if(z.call(c,Ya)){var ea=c[Ya];if(null!=ea)switch(Ya){case "children":ra=ea;break;case "dangerouslySetInnerHTML":sa=ea;break;case "name":da=ea;break;case "formAction":ta=ea;break;case "formEncType":ua=ea;break;case "formMethod":Xa=ea;break;case "formTarget":va=ea;break;default:K(a,Ya,ea)}}var Uc=Eb(a,d,e,ta,ua,Xa,va,da);a.push(">");null!== -Uc&&Uc.forEach(Db,a);M(a,sa,ra);if("string"===typeof ra){a.push(A(ra));var Vc=null}else Vc=ra;return Vc;case "form":a.push(O("form"));var Za=null,Wc=null,ka=null,$a=null,ab=null,bb=null,cb;for(cb in c)if(z.call(c,cb)){var la=c[cb];if(null!=la)switch(cb){case "children":Za=la;break;case "dangerouslySetInnerHTML":Wc=la;break;case "action":ka=la;break;case "encType":$a=la;break;case "method":ab=la;break;case "target":bb=la;break;default:K(a,cb,la)}}var ac=null,bc=null;if("function"===typeof ka)if("function"=== -typeof ka.$$FORM_ACTION){var De=sb(d),Ga=ka.$$FORM_ACTION(De);ka=Ga.action||"";$a=Ga.encType;ab=Ga.method;bb=Ga.target;ac=Ga.data;bc=Ga.name}else a.push(" ","action",'="',tb,'"'),bb=ab=$a=ka=null,Fb(d,e);null!=ka&&K(a,"action",ka);null!=$a&&K(a,"encType",$a);null!=ab&&K(a,"method",ab);null!=bb&&K(a,"target",bb);a.push(">");null!==bc&&(a.push('"),null!==ac&&ac.forEach(Db,a));M(a,Wc,Za);if("string"===typeof Za){a.push(A(Za));var Xc=null}else Xc=Za;return Xc; -case "menuitem":a.push(O("menuitem"));for(var vb in c)if(z.call(c,vb)){var Yc=c[vb];if(null!=Yc)switch(vb){case "children":case "dangerouslySetInnerHTML":throw Error(q(400));default:K(a,vb,Yc)}}a.push(">");return null;case "title":if(3===f.insertionMode||f.tagScope&1||null!=c.itemProp)var Zc=Kb(a,c);else Kb(e.hoistableChunks,c),Zc=null;return Zc;case "link":return Hb(a,c,d,e,g,f.insertionMode,!!(f.tagScope&1));case "script":var cc=c.async;if("string"!==typeof c.src||!c.src||!cc||"function"===typeof cc|| -"symbol"===typeof cc||c.onLoad||c.onError||3===f.insertionMode||f.tagScope&1||null!=c.itemProp)var $c=Mb(a,c);else{var wb=c.src;if("module"===c.type){var xb=d.moduleScriptResources;var ad=e.preloads.moduleScripts}else xb=d.scriptResources,ad=e.preloads.scripts;var yb=xb.hasOwnProperty(wb)?xb[wb]:void 0;if(null!==yb){xb[wb]=null;var dc=c;if(yb){2===yb.length&&(dc=w({},c),Ib(dc,yb));var bd=ad.get(wb);bd&&(bd.length=0)}var cd=[];e.scripts.add(cd);Mb(cd,dc)}g&&a.push("\x3c!-- --\x3e");$c=null}return $c; -case "style":var zb=c.precedence,wa=c.href;if(3===f.insertionMode||f.tagScope&1||null!=c.itemProp||"string"!==typeof zb||"string"!==typeof wa||""===wa){a.push(O("style"));var Ha=null,dd=null,db;for(db in c)if(z.call(c,db)){var Ab=c[db];if(null!=Ab)switch(db){case "children":Ha=Ab;break;case "dangerouslySetInnerHTML":dd=Ab;break;default:K(a,db,Ab)}}a.push(">");var eb=Array.isArray(Ha)?2>Ha.length?Ha[0]:null:Ha;"function"!==typeof eb&&"symbol"!==typeof eb&&null!==eb&&void 0!==eb&&a.push(A(""+eb));M(a, -dd,Ha);a.push(Lb("style"));var ed=null}else{var xa=e.styles.get(zb);if(null!==(d.styleResources.hasOwnProperty(wa)?d.styleResources[wa]:void 0)){d.styleResources[wa]=null;xa?xa.hrefs.push(A(wa)):(xa={precedence:A(zb),rules:[],hrefs:[A(wa)],sheets:new Map},e.styles.set(zb,xa));var fd=xa.rules,Ia=null,gd=null,Bb;for(Bb in c)if(z.call(c,Bb)){var ec=c[Bb];if(null!=ec)switch(Bb){case "children":Ia=ec;break;case "dangerouslySetInnerHTML":gd=ec}}var fb=Array.isArray(Ia)?2>Ia.length?Ia[0]:null:Ia;"function"!== -typeof fb&&"symbol"!==typeof fb&&null!==fb&&void 0!==fb&&fd.push(A(""+fb));M(fd,gd,Ia)}xa&&e.boundaryResources&&e.boundaryResources.styles.add(xa);g&&a.push("\x3c!-- --\x3e");ed=void 0}return ed;case "meta":if(3===f.insertionMode||f.tagScope&1||null!=c.itemProp)var hd=Jb(a,c,"meta");else g&&a.push("\x3c!-- --\x3e"),hd="string"===typeof c.charSet?Jb(e.charsetChunks,c,"meta"):"viewport"===c.name?Jb(e.preconnectChunks,c,"meta"):Jb(e.hoistableChunks,c,"meta");return hd;case "listing":case "pre":a.push(O(b)); +G;break;case "value":x=G;break;case "defaultValue":t=G;break;case "dangerouslySetInnerHTML":throw Error(q(91));default:K(a,P,G)}}null===x&&null!==t&&(x=t);a.push(">");if(null!=E){if(null!=x)throw Error(q(92));if(Fa(E)){if(1");null!==ub&&ub.forEach(Db,a);return null;case "button":a.push(O("button"));var ra=null,sa=null,da=null,ta=null,ua=null,Xa=null,va=null,Ya;for(Ya in c)if(z.call(c,Ya)){var ea=c[Ya];if(null!=ea)switch(Ya){case "children":ra=ea;break;case "dangerouslySetInnerHTML":sa=ea;break;case "name":da=ea;break;case "formAction":ta=ea;break;case "formEncType":ua=ea;break;case "formMethod":Xa=ea;break;case "formTarget":va=ea;break;default:K(a,Ya,ea)}}var Vc=Eb(a,d,e,ta,ua,Xa,va,da);a.push(">");null!== +Vc&&Vc.forEach(Db,a);M(a,sa,ra);if("string"===typeof ra){a.push(A(ra));var Wc=null}else Wc=ra;return Wc;case "form":a.push(O("form"));var Za=null,Xc=null,ka=null,$a=null,ab=null,bb=null,cb;for(cb in c)if(z.call(c,cb)){var la=c[cb];if(null!=la)switch(cb){case "children":Za=la;break;case "dangerouslySetInnerHTML":Xc=la;break;case "action":ka=la;break;case "encType":$a=la;break;case "method":ab=la;break;case "target":bb=la;break;default:K(a,cb,la)}}var ac=null,bc=null;if("function"===typeof ka)if("function"=== +typeof ka.$$FORM_ACTION){var Ee=sb(d),Ga=ka.$$FORM_ACTION(Ee);ka=Ga.action||"";$a=Ga.encType;ab=Ga.method;bb=Ga.target;ac=Ga.data;bc=Ga.name}else a.push(" ","action",'="',tb,'"'),bb=ab=$a=ka=null,Fb(d,e);null!=ka&&K(a,"action",ka);null!=$a&&K(a,"encType",$a);null!=ab&&K(a,"method",ab);null!=bb&&K(a,"target",bb);a.push(">");null!==bc&&(a.push('"),null!==ac&&ac.forEach(Db,a));M(a,Xc,Za);if("string"===typeof Za){a.push(A(Za));var Yc=null}else Yc=Za;return Yc; +case "menuitem":a.push(O("menuitem"));for(var vb in c)if(z.call(c,vb)){var Zc=c[vb];if(null!=Zc)switch(vb){case "children":case "dangerouslySetInnerHTML":throw Error(q(400));default:K(a,vb,Zc)}}a.push(">");return null;case "title":if(3===f.insertionMode||f.tagScope&1||null!=c.itemProp)var $c=Kb(a,c);else Kb(e.hoistableChunks,c),$c=null;return $c;case "link":return Hb(a,c,d,e,g,f.insertionMode,!!(f.tagScope&1));case "script":var cc=c.async;if("string"!==typeof c.src||!c.src||!cc||"function"===typeof cc|| +"symbol"===typeof cc||c.onLoad||c.onError||3===f.insertionMode||f.tagScope&1||null!=c.itemProp)var ad=Mb(a,c);else{var wb=c.src;if("module"===c.type){var xb=d.moduleScriptResources;var bd=e.preloads.moduleScripts}else xb=d.scriptResources,bd=e.preloads.scripts;var yb=xb.hasOwnProperty(wb)?xb[wb]:void 0;if(null!==yb){xb[wb]=null;var dc=c;if(yb){2===yb.length&&(dc=w({},c),Ib(dc,yb));var cd=bd.get(wb);cd&&(cd.length=0)}var dd=[];e.scripts.add(dd);Mb(dd,dc)}g&&a.push("\x3c!-- --\x3e");ad=null}return ad; +case "style":var zb=c.precedence,wa=c.href;if(3===f.insertionMode||f.tagScope&1||null!=c.itemProp||"string"!==typeof zb||"string"!==typeof wa||""===wa){a.push(O("style"));var Ha=null,ed=null,db;for(db in c)if(z.call(c,db)){var Ab=c[db];if(null!=Ab)switch(db){case "children":Ha=Ab;break;case "dangerouslySetInnerHTML":ed=Ab;break;default:K(a,db,Ab)}}a.push(">");var eb=Array.isArray(Ha)?2>Ha.length?Ha[0]:null:Ha;"function"!==typeof eb&&"symbol"!==typeof eb&&null!==eb&&void 0!==eb&&a.push(A(""+eb));M(a, +ed,Ha);a.push(Lb("style"));var fd=null}else{var xa=e.styles.get(zb);if(null!==(d.styleResources.hasOwnProperty(wa)?d.styleResources[wa]:void 0)){d.styleResources[wa]=null;xa?xa.hrefs.push(A(wa)):(xa={precedence:A(zb),rules:[],hrefs:[A(wa)],sheets:new Map},e.styles.set(zb,xa));var gd=xa.rules,Ia=null,hd=null,Bb;for(Bb in c)if(z.call(c,Bb)){var ec=c[Bb];if(null!=ec)switch(Bb){case "children":Ia=ec;break;case "dangerouslySetInnerHTML":hd=ec}}var fb=Array.isArray(Ia)?2>Ia.length?Ia[0]:null:Ia;"function"!== +typeof fb&&"symbol"!==typeof fb&&null!==fb&&void 0!==fb&&gd.push(A(""+fb));M(gd,hd,Ia)}xa&&e.boundaryResources&&e.boundaryResources.styles.add(xa);g&&a.push("\x3c!-- --\x3e");fd=void 0}return fd;case "meta":if(3===f.insertionMode||f.tagScope&1||null!=c.itemProp)var id=Jb(a,c,"meta");else g&&a.push("\x3c!-- --\x3e"),id="string"===typeof c.charSet?Jb(e.charsetChunks,c,"meta"):"viewport"===c.name?Jb(e.preconnectChunks,c,"meta"):Jb(e.hoistableChunks,c,"meta");return id;case "listing":case "pre":a.push(O(b)); var gb=null,hb=null,ib;for(ib in c)if(z.call(c,ib)){var Cb=c[ib];if(null!=Cb)switch(ib){case "children":gb=Cb;break;case "dangerouslySetInnerHTML":hb=Cb;break;default:K(a,ib,Cb)}}a.push(">");if(null!=hb){if(null!=gb)throw Error(q(60));if("object"!==typeof hb||!("__html"in hb))throw Error(q(61));var ya=hb.__html;null!==ya&&void 0!==ya&&("string"===typeof ya&&0e.highImagePreloads.size)fc.delete(Ja),e.highImagePreloads.add(za)}else if(!d.imageResources.hasOwnProperty(Ja)){d.imageResources[Ja]=C;var gc=c.crossOrigin;var jd="string"===typeof gc?"use-credentials"===gc?gc:"":void 0;var aa=e.headers,hc;aa&&0aa.highImagePreloads.length)&&(hc=Rb(L,"image",{imageSrcSet:c.srcSet,imageSizes:c.sizes,crossOrigin:jd,integrity:c.integrity,nonce:c.nonce,type:c.type, -fetchPriority:c.fetchPriority,referrerPolicy:c.refererPolicy}),2<=(aa.remainingCapacity-=hc.length))?(e.resets.image[Ja]=C,aa.highImagePreloads&&(aa.highImagePreloads+=", "),aa.highImagePreloads+=hc):(za=[],N(za,{rel:"preload",as:"image",href:I?void 0:L,imageSrcSet:I,imageSizes:id,crossOrigin:jd,integrity:c.integrity,type:c.type,fetchPriority:c.fetchPriority,referrerPolicy:c.referrerPolicy}),"high"===c.fetchPriority||10>e.highImagePreloads.size?e.highImagePreloads.add(za):(e.bulkPreloads.add(za), -fc.set(Ja,za)))}}return Jb(a,c,"img");case "base":case "area":case "br":case "col":case "embed":case "hr":case "keygen":case "param":case "source":case "track":case "wbr":return Jb(a,c,b);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":break;case "head":if(2>f.insertionMode&&null===e.headChunks){e.headChunks=[];var kd=Nb(e.headChunks,c,"head")}else kd=Nb(a,c,"head");return kd;case "html":if(0=== -f.insertionMode&&null===e.htmlChunks){e.htmlChunks=[""];var ld=Nb(e.htmlChunks,c,"html")}else ld=Nb(a,c,"html");return ld;default:if(-1!==b.indexOf("-")){a.push(O(b));var ic=null,md=null,Ka;for(Ka in c)if(z.call(c,Ka)){var V=c[Ka];if(null!=V){var nd=Ka;switch(Ka){case "children":ic=V;break;case "dangerouslySetInnerHTML":md=V;break;case "style":qb(a,V);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;case "className":nd="class";default:if(oa(Ka)&&"function"!==typeof V&& -"symbol"!==typeof V&&!1!==V){if(!0===V)V="";else if("object"===typeof V)continue;a.push(" ",nd,'="',A(V),'"')}}}}a.push(">");M(a,md,ic);return ic}}return Nb(a,c,b)}var Sb=new Map;function Lb(a){var b=Sb.get(a);void 0===b&&(b="",Sb.set(a,b));return b}function Tb(a,b){b=b.bootstrapChunks;for(var c=0;ce.highImagePreloads.size)fc.delete(Ja),e.highImagePreloads.add(za)}else if(!d.imageResources.hasOwnProperty(Ja)){d.imageResources[Ja]=C;var gc=c.crossOrigin;var kd="string"===typeof gc?"use-credentials"===gc?gc:"":void 0;var aa=e.headers,hc;aa&&0aa.highImagePreloads.length)&&(hc=Rb(L,"image",{imageSrcSet:c.srcSet,imageSizes:c.sizes,crossOrigin:kd,integrity:c.integrity,nonce:c.nonce,type:c.type, +fetchPriority:c.fetchPriority,referrerPolicy:c.refererPolicy}),2<=(aa.remainingCapacity-=hc.length))?(e.resets.image[Ja]=C,aa.highImagePreloads&&(aa.highImagePreloads+=", "),aa.highImagePreloads+=hc):(za=[],N(za,{rel:"preload",as:"image",href:I?void 0:L,imageSrcSet:I,imageSizes:jd,crossOrigin:kd,integrity:c.integrity,type:c.type,fetchPriority:c.fetchPriority,referrerPolicy:c.referrerPolicy}),"high"===c.fetchPriority||10>e.highImagePreloads.size?e.highImagePreloads.add(za):(e.bulkPreloads.add(za), +fc.set(Ja,za)))}}return Jb(a,c,"img");case "base":case "area":case "br":case "col":case "embed":case "hr":case "keygen":case "param":case "source":case "track":case "wbr":return Jb(a,c,b);case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":break;case "head":if(2>f.insertionMode&&null===e.headChunks){e.headChunks=[];var ld=Nb(e.headChunks,c,"head")}else ld=Nb(a,c,"head");return ld;case "html":if(0=== +f.insertionMode&&null===e.htmlChunks){e.htmlChunks=[""];var md=Nb(e.htmlChunks,c,"html")}else md=Nb(a,c,"html");return md;default:if(-1!==b.indexOf("-")){a.push(O(b));var ic=null,nd=null,Ka;for(Ka in c)if(z.call(c,Ka)){var V=c[Ka];if(null!=V){var od=Ka;switch(Ka){case "children":ic=V;break;case "dangerouslySetInnerHTML":nd=V;break;case "style":qb(a,V);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":break;case "className":od="class";default:if(oa(Ka)&&"function"!==typeof V&& +"symbol"!==typeof V&&!1!==V){if(!0===V)V="";else if("object"===typeof V)continue;a.push(" ",od,'="',A(V),'"')}}}}a.push(">");M(a,nd,ic);return ic}}return Nb(a,c,b)}var Sb=new Map;function Lb(a){var b=Sb.get(a);void 0===b&&(b="",Sb.set(a,b));return b}function Tb(a,b){b=b.bootstrapChunks;for(var c=0;c')} function Vb(a,b,c,d){switch(c.insertionMode){case 0:case 1:case 2:return a.push('