mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Build for fa11bd6ecc
This commit is contained in:
@@ -27,7 +27,7 @@ if (
|
||||
}
|
||||
"use strict";
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
@@ -27,7 +27,7 @@ if (
|
||||
}
|
||||
"use strict";
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
@@ -643,4 +643,4 @@ exports.useSyncExternalStore = function(
|
||||
);
|
||||
};
|
||||
exports.useTransition = useTransition;
|
||||
exports.version = "18.3.0-www-classic-e98225485-20221129";
|
||||
exports.version = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function(
|
||||
);
|
||||
};
|
||||
exports.useTransition = useTransition;
|
||||
exports.version = "18.3.0-www-modern-e98225485-20221129";
|
||||
exports.version = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
@@ -654,7 +654,7 @@ exports.useSyncExternalStore = function(
|
||||
);
|
||||
};
|
||||
exports.useTransition = useTransition;
|
||||
exports.version = "18.3.0-www-classic-e98225485-20221129";
|
||||
exports.version = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -646,7 +646,7 @@ exports.useSyncExternalStore = function(
|
||||
);
|
||||
};
|
||||
exports.useTransition = useTransition;
|
||||
exports.version = "18.3.0-www-modern-e98225485-20221129";
|
||||
exports.version = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
|
||||
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
|
||||
@@ -9806,7 +9806,7 @@ var slice = Array.prototype.slice,
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-e98225485-20221129",
|
||||
version: "18.3.0-www-classic-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1336 = {
|
||||
@@ -9837,7 +9837,7 @@ var internals$jscomp$inline_1336 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1337 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
@@ -9473,7 +9473,7 @@ var slice = Array.prototype.slice,
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-e98225485-20221129",
|
||||
version: "18.3.0-www-modern-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1327 = {
|
||||
@@ -9504,7 +9504,7 @@ var internals$jscomp$inline_1327 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1328 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
@@ -42595,7 +42595,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
function createPortal(
|
||||
children,
|
||||
|
||||
@@ -42319,7 +42319,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
function createPortal(
|
||||
children,
|
||||
|
||||
@@ -15556,7 +15556,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1773 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-e98225485-20221129",
|
||||
version: "18.3.0-www-classic-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2154 = {
|
||||
@@ -15586,7 +15586,7 @@ var internals$jscomp$inline_2154 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -15829,4 +15829,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
|
||||
);
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
@@ -15117,7 +15117,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1741 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-e98225485-20221129",
|
||||
version: "18.3.0-www-modern-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2129 = {
|
||||
@@ -15148,7 +15148,7 @@ var internals$jscomp$inline_2129 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2130 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -15337,4 +15337,4 @@ exports.unstable_flushControlled = function(fn) {
|
||||
};
|
||||
exports.unstable_isNewReconciler = !1;
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
@@ -16329,7 +16329,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1847 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-e98225485-20221129",
|
||||
version: "18.3.0-www-classic-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function(internals) {
|
||||
@@ -16373,7 +16373,7 @@ var devToolsConfig$jscomp$inline_1847 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
});
|
||||
assign(Internals, {
|
||||
ReactBrowserEventEmitter: {
|
||||
@@ -16603,7 +16603,7 @@ exports.unstable_renderSubtreeIntoContainer = function(
|
||||
);
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -15880,7 +15880,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1815 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-e98225485-20221129",
|
||||
version: "18.3.0-www-modern-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function(internals) {
|
||||
@@ -15925,7 +15925,7 @@ var devToolsConfig$jscomp$inline_1815 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
|
||||
exports.createPortal = function(children, container) {
|
||||
@@ -16101,7 +16101,7 @@ exports.unstable_flushControlled = function(fn) {
|
||||
};
|
||||
exports.unstable_isNewReconciler = !1;
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -42595,7 +42595,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
function createPortal(
|
||||
children,
|
||||
|
||||
@@ -42319,7 +42319,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
function createPortal(
|
||||
children,
|
||||
|
||||
@@ -15556,7 +15556,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1773 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-e98225485-20221129",
|
||||
version: "18.3.0-www-classic-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2154 = {
|
||||
@@ -15586,7 +15586,7 @@ var internals$jscomp$inline_2154 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -15829,4 +15829,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
|
||||
);
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
@@ -15117,7 +15117,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1741 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-e98225485-20221129",
|
||||
version: "18.3.0-www-modern-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2129 = {
|
||||
@@ -15148,7 +15148,7 @@ var internals$jscomp$inline_2129 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2130 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -15337,4 +15337,4 @@ exports.unstable_flushControlled = function(fn) {
|
||||
};
|
||||
exports.unstable_isNewReconciler = !0;
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
@@ -16329,7 +16329,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1847 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-e98225485-20221129",
|
||||
version: "18.3.0-www-classic-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function(internals) {
|
||||
@@ -16373,7 +16373,7 @@ var devToolsConfig$jscomp$inline_1847 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
});
|
||||
assign(Internals, {
|
||||
ReactBrowserEventEmitter: {
|
||||
@@ -16603,7 +16603,7 @@ exports.unstable_renderSubtreeIntoContainer = function(
|
||||
);
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -15880,7 +15880,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1815 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-e98225485-20221129",
|
||||
version: "18.3.0-www-modern-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function(internals) {
|
||||
@@ -15925,7 +15925,7 @@ var devToolsConfig$jscomp$inline_1815 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
|
||||
exports.createPortal = function(children, container) {
|
||||
@@ -16101,7 +16101,7 @@ exports.unstable_flushControlled = function(fn) {
|
||||
};
|
||||
exports.unstable_isNewReconciler = !0;
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -2877,8 +2877,12 @@ function preinit(href, options) {
|
||||
return;
|
||||
}
|
||||
|
||||
var resources = currentResources;
|
||||
preinitImpl(currentResources, href, options);
|
||||
} // On the server, preinit may be called outside of render when sending an
|
||||
// external SSR runtime as part of the initial resources payload. Since this
|
||||
// is an internal React call, we do not need to use the resources stack.
|
||||
|
||||
function preinitImpl(resources, href, options) {
|
||||
{
|
||||
validatePreinitArguments(href, options);
|
||||
}
|
||||
@@ -3610,7 +3614,10 @@ function cleanupAfterRender(previousDispatcher) {
|
||||
finishRenderingResources();
|
||||
ReactDOMCurrentDispatcher.current = previousDispatcher;
|
||||
} // Used to distinguish these contexts from ones used in other renderers.
|
||||
var ScriptStreamingFormat = 0;
|
||||
var DataStreamingFormat = 1; // Per response, global state that is not contextual to the rendering subtree.
|
||||
|
||||
var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>');
|
||||
var startInlineScript = stringToPrecomputedChunk("<script>");
|
||||
var endInlineScript = stringToPrecomputedChunk("</script>");
|
||||
var startScriptSrc = stringToPrecomputedChunk('<script src="');
|
||||
@@ -3643,6 +3650,8 @@ var scriptReplacer = function(match, prefix, s, suffix) {
|
||||
};
|
||||
|
||||
// Allows us to keep track of what we've already written so we can refer back to it.
|
||||
// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag
|
||||
// is set, the server will send instructions via data attributes (instead of inline scripts)
|
||||
function createResponseState(
|
||||
identifierPrefix,
|
||||
nonce,
|
||||
@@ -3659,6 +3668,8 @@ function createResponseState(
|
||||
'<script nonce="' + escapeTextForBrowser(nonce) + '">'
|
||||
);
|
||||
var bootstrapChunks = [];
|
||||
var externalRuntimeDesc = null;
|
||||
var streamingFormat = ScriptStreamingFormat;
|
||||
|
||||
if (bootstrapScriptContent !== undefined) {
|
||||
bootstrapChunks.push(
|
||||
@@ -3670,14 +3681,26 @@ function createResponseState(
|
||||
|
||||
{
|
||||
if (externalRuntimeConfig !== undefined) {
|
||||
streamingFormat = DataStreamingFormat;
|
||||
|
||||
if (typeof externalRuntimeConfig === "string") {
|
||||
externalRuntimeDesc = {
|
||||
src: externalRuntimeConfig,
|
||||
integrity: undefined
|
||||
};
|
||||
} else {
|
||||
externalRuntimeDesc = externalRuntimeConfig;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapScripts !== undefined) {
|
||||
for (var i = 0; i < bootstrapScripts.length; i++) {
|
||||
var scriptConfig = bootstrapScripts[i];
|
||||
var src =
|
||||
typeof externalRuntimeConfig === "string"
|
||||
? externalRuntimeConfig
|
||||
: externalRuntimeConfig.src;
|
||||
typeof scriptConfig === "string" ? scriptConfig : scriptConfig.src;
|
||||
var integrity =
|
||||
typeof externalRuntimeConfig === "string"
|
||||
? undefined
|
||||
: externalRuntimeConfig.integrity;
|
||||
typeof scriptConfig === "string" ? undefined : scriptConfig.integrity;
|
||||
bootstrapChunks.push(
|
||||
startScriptSrc,
|
||||
stringToChunk(escapeTextForBrowser(src))
|
||||
@@ -3694,18 +3717,18 @@ function createResponseState(
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapScripts !== undefined) {
|
||||
for (var i = 0; i < bootstrapScripts.length; i++) {
|
||||
var scriptConfig = bootstrapScripts[i];
|
||||
if (bootstrapModules !== undefined) {
|
||||
for (var _i = 0; _i < bootstrapModules.length; _i++) {
|
||||
var _scriptConfig = bootstrapModules[_i];
|
||||
|
||||
var _src =
|
||||
typeof scriptConfig === "string" ? scriptConfig : scriptConfig.src;
|
||||
typeof _scriptConfig === "string" ? _scriptConfig : _scriptConfig.src;
|
||||
|
||||
var _integrity =
|
||||
typeof scriptConfig === "string" ? undefined : scriptConfig.integrity;
|
||||
typeof _scriptConfig === "string" ? undefined : _scriptConfig.integrity;
|
||||
|
||||
bootstrapChunks.push(
|
||||
startScriptSrc,
|
||||
startModuleSrc,
|
||||
stringToChunk(escapeTextForBrowser(_src))
|
||||
);
|
||||
|
||||
@@ -3720,44 +3743,20 @@ function createResponseState(
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapModules !== undefined) {
|
||||
for (var _i = 0; _i < bootstrapModules.length; _i++) {
|
||||
var _scriptConfig = bootstrapModules[_i];
|
||||
|
||||
var _src2 =
|
||||
typeof _scriptConfig === "string" ? _scriptConfig : _scriptConfig.src;
|
||||
|
||||
var _integrity2 =
|
||||
typeof _scriptConfig === "string" ? undefined : _scriptConfig.integrity;
|
||||
|
||||
bootstrapChunks.push(
|
||||
startModuleSrc,
|
||||
stringToChunk(escapeTextForBrowser(_src2))
|
||||
);
|
||||
|
||||
if (_integrity2) {
|
||||
bootstrapChunks.push(
|
||||
scriptIntegirty,
|
||||
stringToChunk(escapeTextForBrowser(_integrity2))
|
||||
);
|
||||
}
|
||||
|
||||
bootstrapChunks.push(endAsyncScript);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
bootstrapChunks: bootstrapChunks,
|
||||
startInlineScript: inlineScriptWithNonce,
|
||||
placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
|
||||
segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
|
||||
boundaryPrefix: idPrefix + "B:",
|
||||
idPrefix: idPrefix,
|
||||
nextSuspenseID: 0,
|
||||
streamingFormat: streamingFormat,
|
||||
startInlineScript: inlineScriptWithNonce,
|
||||
sentCompleteSegmentFunction: false,
|
||||
sentCompleteBoundaryFunction: false,
|
||||
sentClientRenderFunction: false,
|
||||
sentStyleInsertionFunction: false
|
||||
sentStyleInsertionFunction: false,
|
||||
externalRuntimeConfig: externalRuntimeDesc
|
||||
};
|
||||
} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion
|
||||
// modes. We only include the variants as they matter for the sake of our purposes.
|
||||
@@ -5769,30 +5768,52 @@ var completeSegmentScript1Full = stringToPrecomputedChunk(
|
||||
);
|
||||
var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("');
|
||||
var completeSegmentScript2 = stringToPrecomputedChunk('","');
|
||||
var completeSegmentScript3 = stringToPrecomputedChunk('")</script>');
|
||||
var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>');
|
||||
var completeSegmentData1 = stringToPrecomputedChunk(
|
||||
'<template data-rsi="" data-sid="'
|
||||
);
|
||||
var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="');
|
||||
var completeSegmentDataEnd = dataElementQuotedEnd;
|
||||
function writeCompletedSegmentInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
contentSegmentID
|
||||
) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (!responseState.sentCompleteSegmentFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentCompleteSegmentFunction = true;
|
||||
writeChunk(destination, completeSegmentScript1Full);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (!responseState.sentCompleteSegmentFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentCompleteSegmentFunction = true;
|
||||
writeChunk(destination, completeSegmentScript1Full);
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, completeSegmentScript1Partial);
|
||||
}
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, completeSegmentScript1Partial);
|
||||
}
|
||||
writeChunk(destination, completeSegmentData1);
|
||||
} // Write function arguments, which are string literals
|
||||
|
||||
writeChunk(destination, responseState.segmentPrefix);
|
||||
var formattedID = stringToChunk(contentSegmentID.toString(16));
|
||||
writeChunk(destination, formattedID);
|
||||
writeChunk(destination, completeSegmentScript2);
|
||||
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeSegmentScript2);
|
||||
} else {
|
||||
writeChunk(destination, completeSegmentData2);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.placeholderPrefix);
|
||||
writeChunk(destination, formattedID);
|
||||
return writeChunkAndReturn(destination, completeSegmentScript3);
|
||||
|
||||
if (scriptFormat) {
|
||||
return writeChunkAndReturn(destination, completeSegmentScriptEnd);
|
||||
} else {
|
||||
return writeChunkAndReturn(destination, completeSegmentDataEnd);
|
||||
}
|
||||
}
|
||||
var completeBoundaryScript1Full = stringToPrecomputedChunk(
|
||||
completeBoundary + ';$RC("'
|
||||
@@ -5808,9 +5829,18 @@ var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk(
|
||||
'$RR("'
|
||||
);
|
||||
var completeBoundaryScript2 = stringToPrecomputedChunk('","');
|
||||
var completeBoundaryScript2a = stringToPrecomputedChunk('",');
|
||||
var completeBoundaryScript3 = stringToPrecomputedChunk('"');
|
||||
var completeBoundaryScript4 = stringToPrecomputedChunk(")</script>");
|
||||
var completeBoundaryScript3a = stringToPrecomputedChunk('",');
|
||||
var completeBoundaryScript3b = stringToPrecomputedChunk('"');
|
||||
var completeBoundaryScriptEnd = stringToPrecomputedChunk(")</script>");
|
||||
var completeBoundaryData1 = stringToPrecomputedChunk(
|
||||
'<template data-rci="" data-bid="'
|
||||
);
|
||||
var completeBoundaryWithStylesData1 = stringToPrecomputedChunk(
|
||||
'<template data-rri="" data-bid="'
|
||||
);
|
||||
var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="');
|
||||
var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="');
|
||||
var completeBoundaryDataEnd = dataElementQuotedEnd;
|
||||
function writeCompletedBoundaryInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
@@ -5824,28 +5854,38 @@ function writeCompletedBoundaryInstruction(
|
||||
hasStyleDependencies = hasStyleResourceDependencies(boundaryResources);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(
|
||||
destination,
|
||||
clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)
|
||||
);
|
||||
} else if (!responseState.sentStyleInsertionFunction) {
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(
|
||||
destination,
|
||||
clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)
|
||||
);
|
||||
} else if (!responseState.sentStyleInsertionFunction) {
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1Partial);
|
||||
}
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1Partial);
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
writeChunk(destination, completeBoundaryScript1Full);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript1Partial);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
writeChunk(destination, completeBoundaryScript1Full);
|
||||
if (hasStyleDependencies) {
|
||||
writeChunk(destination, completeBoundaryWithStylesData1);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript1Partial);
|
||||
writeChunk(destination, completeBoundaryData1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5853,30 +5893,60 @@ function writeCompletedBoundaryInstruction(
|
||||
throw new Error(
|
||||
"An ID must have been assigned before we can complete the boundary."
|
||||
);
|
||||
}
|
||||
} // Write function arguments, which are string and array literals
|
||||
|
||||
var formattedContentID = stringToChunk(contentSegmentID.toString(16));
|
||||
writeChunk(destination, boundaryID);
|
||||
writeChunk(destination, completeBoundaryScript2);
|
||||
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript2);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryData2);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.segmentPrefix);
|
||||
writeChunk(destination, formattedContentID);
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
writeChunk(destination, completeBoundaryScript2a);
|
||||
writeStyleResourceDependencies(destination, boundaryResources);
|
||||
// Script and data writers must format this differently:
|
||||
// - script writer emits an array literal, whose string elements are
|
||||
// escaped for javascript e.g. ["A", "B"]
|
||||
// - data writer emits a string literal, which is escaped as html
|
||||
// e.g. ["A", "B"]
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal
|
||||
|
||||
writeStyleResourceDependenciesInJS(destination, boundaryResources);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryData3a);
|
||||
writeStyleResourceDependenciesInAttr(destination, boundaryResources);
|
||||
}
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript3);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript3b);
|
||||
}
|
||||
}
|
||||
|
||||
return writeChunkAndReturn(destination, completeBoundaryScript4);
|
||||
if (scriptFormat) {
|
||||
return writeChunkAndReturn(destination, completeBoundaryScriptEnd);
|
||||
} else {
|
||||
return writeChunkAndReturn(destination, completeBoundaryDataEnd);
|
||||
}
|
||||
}
|
||||
var clientRenderScript1Full = stringToPrecomputedChunk(
|
||||
clientRenderBoundary + ';$RX("'
|
||||
);
|
||||
var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("');
|
||||
var clientRenderScript1A = stringToPrecomputedChunk('"');
|
||||
var clientRenderScript2 = stringToPrecomputedChunk(")</script>");
|
||||
var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(",");
|
||||
var clientRenderScriptEnd = stringToPrecomputedChunk(")</script>");
|
||||
var clientRenderData1 = stringToPrecomputedChunk(
|
||||
'<template data-rxi="" data-bid="'
|
||||
);
|
||||
var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="');
|
||||
var clientRenderData3 = stringToPrecomputedChunk('" data-msg="');
|
||||
var clientRenderData4 = stringToPrecomputedChunk('" data-stck="');
|
||||
var clientRenderDataEnd = dataElementQuotedEnd;
|
||||
function writeClientRenderBoundaryInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
@@ -5885,15 +5955,22 @@ function writeClientRenderBoundaryInstruction(
|
||||
errorMessage,
|
||||
errorComponentStack
|
||||
) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (!responseState.sentClientRenderFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentClientRenderFunction = true;
|
||||
writeChunk(destination, clientRenderScript1Full);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (!responseState.sentClientRenderFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentClientRenderFunction = true;
|
||||
writeChunk(destination, clientRenderScript1Full);
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, clientRenderScript1Partial);
|
||||
}
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, clientRenderScript1Partial);
|
||||
// <template data-rxi="" data-bid="
|
||||
writeChunk(destination, clientRenderData1);
|
||||
}
|
||||
|
||||
if (boundaryID === null) {
|
||||
@@ -5903,33 +5980,74 @@ function writeClientRenderBoundaryInstruction(
|
||||
}
|
||||
|
||||
writeChunk(destination, boundaryID);
|
||||
writeChunk(destination, clientRenderScript1A);
|
||||
|
||||
if (scriptFormat) {
|
||||
// " needs to be inserted for scripts, since ArgInterstitual does not contain
|
||||
// leading or trailing quotes
|
||||
writeChunk(destination, clientRenderScript1A);
|
||||
}
|
||||
|
||||
if (errorDigest || errorMessage || errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ""))
|
||||
);
|
||||
if (scriptFormat) {
|
||||
// ,"JSONString"
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ""))
|
||||
);
|
||||
} else {
|
||||
// " data-dgst="HTMLString
|
||||
writeChunk(destination, clientRenderData2);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorDigest || ""))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessage || errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ""))
|
||||
);
|
||||
if (scriptFormat) {
|
||||
// ,"JSONString"
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ""))
|
||||
);
|
||||
} else {
|
||||
// " data-msg="HTMLString
|
||||
writeChunk(destination, clientRenderData3);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorMessage || ""))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))
|
||||
);
|
||||
// ,"JSONString"
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))
|
||||
);
|
||||
} else {
|
||||
// " data-stck="HTMLString
|
||||
writeChunk(destination, clientRenderData4);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorComponentStack))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return writeChunkAndReturn(destination, clientRenderScript2);
|
||||
if (scriptFormat) {
|
||||
// ></script>
|
||||
return writeChunkAndReturn(destination, clientRenderScriptEnd);
|
||||
} else {
|
||||
// "></template>
|
||||
return writeChunkAndReturn(destination, clientRenderDataEnd);
|
||||
}
|
||||
}
|
||||
var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g;
|
||||
|
||||
@@ -5995,7 +6113,28 @@ var precedencePlaceholderStart = stringToPrecomputedChunk(
|
||||
'<style data-precedence="'
|
||||
);
|
||||
var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>');
|
||||
function writeInitialResources(destination, resources, responseState) {
|
||||
function writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
// Write initially discovered resources after the shell completes
|
||||
if (!willFlushAllSegments && responseState.externalRuntimeConfig) {
|
||||
// If the root segment is incomplete due to suspended tasks
|
||||
// (e.g. willFlushAllSegments = false) and we are using data
|
||||
// streaming format, ensure the external runtime is sent.
|
||||
// (User code could choose to send this even earlier by calling
|
||||
// preinit(...), if they know they will suspend).
|
||||
var _responseState$extern = responseState.externalRuntimeConfig,
|
||||
src = _responseState$extern.src,
|
||||
integrity = _responseState$extern.integrity;
|
||||
preinitImpl(resources, src, {
|
||||
as: "script",
|
||||
integrity: integrity
|
||||
});
|
||||
}
|
||||
|
||||
function flushLinkResource(resource) {
|
||||
if (!resource.flushed) {
|
||||
pushLinkImpl(target, resource.props, responseState);
|
||||
@@ -6217,21 +6356,23 @@ function hasStyleResourceDependencies(boundaryResources) {
|
||||
var arrayFirstOpenBracket = stringToPrecomputedChunk("[");
|
||||
var arraySubsequentOpenBracket = stringToPrecomputedChunk(",[");
|
||||
var arrayInterstitial = stringToPrecomputedChunk(",");
|
||||
var arrayCloseBracket = stringToPrecomputedChunk("]");
|
||||
var arrayCloseBracket = stringToPrecomputedChunk("]"); // This function writes a 2D array of strings to be embedded in javascript.
|
||||
// E.g.
|
||||
// [["JS_escaped_string1", "JS_escaped_string2"]]
|
||||
|
||||
function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
function writeStyleResourceDependenciesInJS(destination, boundaryResources) {
|
||||
writeChunk(destination, arrayFirstOpenBracket);
|
||||
var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (resource.inShell);
|
||||
else if (resource.flushed) {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyHrefOnly(destination, resource.href);
|
||||
writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
} else {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependency(
|
||||
writeStyleResourceDependencyInJS(
|
||||
destination,
|
||||
resource.href,
|
||||
resource.precedence,
|
||||
@@ -6245,8 +6386,9 @@ function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
});
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
}
|
||||
/* Helper functions */
|
||||
|
||||
function writeStyleResourceDependencyHrefOnly(destination, href) {
|
||||
function writeStyleResourceDependencyHrefOnlyInJS(destination, href) {
|
||||
// We should actually enforce this earlier when the resource is created but for
|
||||
// now we make sure we are actually dealing with a string here.
|
||||
{
|
||||
@@ -6260,7 +6402,12 @@ function writeStyleResourceDependencyHrefOnly(destination, href) {
|
||||
);
|
||||
}
|
||||
|
||||
function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
function writeStyleResourceDependencyInJS(
|
||||
destination,
|
||||
href,
|
||||
precedence,
|
||||
props
|
||||
) {
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
@@ -6309,7 +6456,7 @@ function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
|
||||
default:
|
||||
writeStyleResourceAttribute(destination, propKey, propValue);
|
||||
writeStyleResourceAttributeInJS(destination, propKey, propValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -6318,7 +6465,7 @@ function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function writeStyleResourceAttribute(destination, name, value) {
|
||||
function writeStyleResourceAttributeInJS(destination, name, value) {
|
||||
var attributeName = name.toLowerCase();
|
||||
var attributeValue;
|
||||
|
||||
@@ -6396,23 +6543,224 @@ function writeStyleResourceAttribute(destination, name, value) {
|
||||
destination,
|
||||
stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))
|
||||
);
|
||||
} // This function writes a 2D array of strings to be embedded in an attribute
|
||||
// value and read with JSON.parse in ReactDOMServerExternalRuntime.js
|
||||
// E.g.
|
||||
// [["JSON_escaped_string1", "JSON_escaped_string2"]]
|
||||
|
||||
function writeStyleResourceDependenciesInAttr(destination, boundaryResources) {
|
||||
writeChunk(destination, arrayFirstOpenBracket);
|
||||
var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (resource.inShell);
|
||||
else if (resource.flushed) {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyHrefOnlyInAttr(destination, resource.href);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
} else {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyInAttr(
|
||||
destination,
|
||||
resource.href,
|
||||
resource.precedence,
|
||||
resource.props
|
||||
);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
resource.flushed = true;
|
||||
resource.hint.flushed = true;
|
||||
}
|
||||
});
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
}
|
||||
/* Helper functions */
|
||||
|
||||
function writeStyleResourceDependencyHrefOnlyInAttr(destination, href) {
|
||||
// We should actually enforce this earlier when the resource is created but for
|
||||
// now we make sure we are actually dealing with a string here.
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
|
||||
var coercedHref = "" + href;
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref)))
|
||||
);
|
||||
}
|
||||
|
||||
function createResponseState$1(generateStaticMarkup, identifierPrefix) {
|
||||
var responseState = createResponseState(identifierPrefix, undefined);
|
||||
function writeStyleResourceDependencyInAttr(
|
||||
destination,
|
||||
href,
|
||||
precedence,
|
||||
props
|
||||
) {
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
|
||||
var coercedHref = "" + href;
|
||||
sanitizeURL(coercedHref);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref)))
|
||||
);
|
||||
|
||||
{
|
||||
checkAttributeStringCoercion(precedence, "precedence");
|
||||
}
|
||||
|
||||
var coercedPrecedence = "" + precedence;
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedPrecedence)))
|
||||
);
|
||||
|
||||
for (var propKey in props) {
|
||||
if (hasOwnProperty.call(props, propKey)) {
|
||||
var propValue = props[propKey];
|
||||
|
||||
if (propValue == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (propKey) {
|
||||
case "href":
|
||||
case "rel":
|
||||
case "precedence":
|
||||
case "data-precedence": {
|
||||
break;
|
||||
}
|
||||
|
||||
case "children":
|
||||
case "dangerouslySetInnerHTML":
|
||||
throw new Error(
|
||||
"link" +
|
||||
" is a self-closing tag and must neither have `children` nor " +
|
||||
"use `dangerouslySetInnerHTML`."
|
||||
);
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
|
||||
default:
|
||||
writeStyleResourceAttributeInAttr(destination, propKey, propValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function writeStyleResourceAttributeInAttr(destination, name, value) {
|
||||
var attributeName = name.toLowerCase();
|
||||
var attributeValue;
|
||||
|
||||
switch (typeof value) {
|
||||
case "function":
|
||||
case "symbol":
|
||||
return;
|
||||
}
|
||||
|
||||
switch (name) {
|
||||
// Reserved names
|
||||
case "innerHTML":
|
||||
case "dangerouslySetInnerHTML":
|
||||
case "suppressContentEditableWarning":
|
||||
case "suppressHydrationWarning":
|
||||
case "style":
|
||||
// Ignored
|
||||
return;
|
||||
// Attribute renames
|
||||
|
||||
case "className":
|
||||
attributeName = "class";
|
||||
break;
|
||||
// Booleans
|
||||
|
||||
case "hidden":
|
||||
if (value === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
attributeValue = "";
|
||||
break;
|
||||
// Santized URLs
|
||||
|
||||
case "src":
|
||||
case "href": {
|
||||
{
|
||||
checkAttributeStringCoercion(value, attributeName);
|
||||
}
|
||||
|
||||
attributeValue = "" + value;
|
||||
sanitizeURL(attributeValue);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
if (!isAttributeNameSafe(name)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
// shouldIgnoreAttribute
|
||||
// We have already filtered out null/undefined and reserved words.
|
||||
name.length > 2 &&
|
||||
(name[0] === "o" || name[0] === "O") &&
|
||||
(name[1] === "n" || name[1] === "N")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
checkAttributeStringCoercion(value, attributeName);
|
||||
}
|
||||
|
||||
attributeValue = "" + value;
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(attributeName)))
|
||||
);
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(attributeValue)))
|
||||
);
|
||||
}
|
||||
|
||||
function createResponseState$1(
|
||||
generateStaticMarkup,
|
||||
identifierPrefix,
|
||||
externalRuntimeConfig
|
||||
) {
|
||||
var responseState = createResponseState(
|
||||
identifierPrefix,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
externalRuntimeConfig
|
||||
);
|
||||
return {
|
||||
// Keep this in sync with ReactDOMServerFormatConfig
|
||||
bootstrapChunks: responseState.bootstrapChunks,
|
||||
startInlineScript: responseState.startInlineScript,
|
||||
placeholderPrefix: responseState.placeholderPrefix,
|
||||
segmentPrefix: responseState.segmentPrefix,
|
||||
boundaryPrefix: responseState.boundaryPrefix,
|
||||
idPrefix: responseState.idPrefix,
|
||||
nextSuspenseID: responseState.nextSuspenseID,
|
||||
streamingFormat: responseState.streamingFormat,
|
||||
startInlineScript: responseState.startInlineScript,
|
||||
sentCompleteSegmentFunction: responseState.sentCompleteSegmentFunction,
|
||||
sentCompleteBoundaryFunction: responseState.sentCompleteBoundaryFunction,
|
||||
sentClientRenderFunction: responseState.sentClientRenderFunction,
|
||||
sentStyleInsertionFunction: responseState.sentStyleInsertionFunction,
|
||||
externalRuntimeConfig: responseState.externalRuntimeConfig,
|
||||
// This is an extra field for the legacy renderer
|
||||
generateStaticMarkup: generateStaticMarkup
|
||||
};
|
||||
@@ -10811,8 +11159,18 @@ function flushSegment(request, destination, segment) {
|
||||
}
|
||||
}
|
||||
|
||||
function flushInitialResources(destination, resources, responseState) {
|
||||
writeInitialResources(destination, resources, responseState);
|
||||
function flushInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
);
|
||||
}
|
||||
|
||||
function flushImmediateResources(destination, request) {
|
||||
@@ -10957,7 +11315,8 @@ function flushCompletedQueues(request, destination) {
|
||||
flushInitialResources(
|
||||
destination,
|
||||
request.resources,
|
||||
request.responseState
|
||||
request.responseState,
|
||||
request.allPendingTasks === 0
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11136,7 +11495,8 @@ function renderToStringImpl(
|
||||
children,
|
||||
options,
|
||||
generateStaticMarkup,
|
||||
abortReason
|
||||
abortReason,
|
||||
unstable_externalRuntimeSrc
|
||||
) {
|
||||
var didFatal = false;
|
||||
var fatalError = null;
|
||||
@@ -11164,7 +11524,8 @@ function renderToStringImpl(
|
||||
children,
|
||||
createResponseState$1(
|
||||
generateStaticMarkup,
|
||||
options ? options.identifierPrefix : undefined
|
||||
options ? options.identifierPrefix : undefined,
|
||||
unstable_externalRuntimeSrc
|
||||
),
|
||||
createRootFormatContext(),
|
||||
Infinity,
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -2881,8 +2881,12 @@ function preinit(href, options) {
|
||||
return;
|
||||
}
|
||||
|
||||
var resources = currentResources;
|
||||
preinitImpl(currentResources, href, options);
|
||||
} // On the server, preinit may be called outside of render when sending an
|
||||
// external SSR runtime as part of the initial resources payload. Since this
|
||||
// is an internal React call, we do not need to use the resources stack.
|
||||
|
||||
function preinitImpl(resources, href, options) {
|
||||
{
|
||||
validatePreinitArguments(href, options);
|
||||
}
|
||||
@@ -3614,7 +3618,10 @@ function cleanupAfterRender(previousDispatcher) {
|
||||
finishRenderingResources();
|
||||
ReactDOMCurrentDispatcher.current = previousDispatcher;
|
||||
} // Used to distinguish these contexts from ones used in other renderers.
|
||||
var ScriptStreamingFormat = 0;
|
||||
var DataStreamingFormat = 1; // Per response, global state that is not contextual to the rendering subtree.
|
||||
|
||||
var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>');
|
||||
var startInlineScript = stringToPrecomputedChunk("<script>");
|
||||
var endInlineScript = stringToPrecomputedChunk("</script>");
|
||||
var startScriptSrc = stringToPrecomputedChunk('<script src="');
|
||||
@@ -3647,6 +3654,8 @@ var scriptReplacer = function(match, prefix, s, suffix) {
|
||||
};
|
||||
|
||||
// Allows us to keep track of what we've already written so we can refer back to it.
|
||||
// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag
|
||||
// is set, the server will send instructions via data attributes (instead of inline scripts)
|
||||
function createResponseState(
|
||||
identifierPrefix,
|
||||
nonce,
|
||||
@@ -3663,6 +3672,8 @@ function createResponseState(
|
||||
'<script nonce="' + escapeTextForBrowser(nonce) + '">'
|
||||
);
|
||||
var bootstrapChunks = [];
|
||||
var externalRuntimeDesc = null;
|
||||
var streamingFormat = ScriptStreamingFormat;
|
||||
|
||||
if (bootstrapScriptContent !== undefined) {
|
||||
bootstrapChunks.push(
|
||||
@@ -3674,14 +3685,26 @@ function createResponseState(
|
||||
|
||||
{
|
||||
if (externalRuntimeConfig !== undefined) {
|
||||
streamingFormat = DataStreamingFormat;
|
||||
|
||||
if (typeof externalRuntimeConfig === "string") {
|
||||
externalRuntimeDesc = {
|
||||
src: externalRuntimeConfig,
|
||||
integrity: undefined
|
||||
};
|
||||
} else {
|
||||
externalRuntimeDesc = externalRuntimeConfig;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapScripts !== undefined) {
|
||||
for (var i = 0; i < bootstrapScripts.length; i++) {
|
||||
var scriptConfig = bootstrapScripts[i];
|
||||
var src =
|
||||
typeof externalRuntimeConfig === "string"
|
||||
? externalRuntimeConfig
|
||||
: externalRuntimeConfig.src;
|
||||
typeof scriptConfig === "string" ? scriptConfig : scriptConfig.src;
|
||||
var integrity =
|
||||
typeof externalRuntimeConfig === "string"
|
||||
? undefined
|
||||
: externalRuntimeConfig.integrity;
|
||||
typeof scriptConfig === "string" ? undefined : scriptConfig.integrity;
|
||||
bootstrapChunks.push(
|
||||
startScriptSrc,
|
||||
stringToChunk(escapeTextForBrowser(src))
|
||||
@@ -3698,18 +3721,18 @@ function createResponseState(
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapScripts !== undefined) {
|
||||
for (var i = 0; i < bootstrapScripts.length; i++) {
|
||||
var scriptConfig = bootstrapScripts[i];
|
||||
if (bootstrapModules !== undefined) {
|
||||
for (var _i = 0; _i < bootstrapModules.length; _i++) {
|
||||
var _scriptConfig = bootstrapModules[_i];
|
||||
|
||||
var _src =
|
||||
typeof scriptConfig === "string" ? scriptConfig : scriptConfig.src;
|
||||
typeof _scriptConfig === "string" ? _scriptConfig : _scriptConfig.src;
|
||||
|
||||
var _integrity =
|
||||
typeof scriptConfig === "string" ? undefined : scriptConfig.integrity;
|
||||
typeof _scriptConfig === "string" ? undefined : _scriptConfig.integrity;
|
||||
|
||||
bootstrapChunks.push(
|
||||
startScriptSrc,
|
||||
startModuleSrc,
|
||||
stringToChunk(escapeTextForBrowser(_src))
|
||||
);
|
||||
|
||||
@@ -3724,44 +3747,20 @@ function createResponseState(
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapModules !== undefined) {
|
||||
for (var _i = 0; _i < bootstrapModules.length; _i++) {
|
||||
var _scriptConfig = bootstrapModules[_i];
|
||||
|
||||
var _src2 =
|
||||
typeof _scriptConfig === "string" ? _scriptConfig : _scriptConfig.src;
|
||||
|
||||
var _integrity2 =
|
||||
typeof _scriptConfig === "string" ? undefined : _scriptConfig.integrity;
|
||||
|
||||
bootstrapChunks.push(
|
||||
startModuleSrc,
|
||||
stringToChunk(escapeTextForBrowser(_src2))
|
||||
);
|
||||
|
||||
if (_integrity2) {
|
||||
bootstrapChunks.push(
|
||||
scriptIntegirty,
|
||||
stringToChunk(escapeTextForBrowser(_integrity2))
|
||||
);
|
||||
}
|
||||
|
||||
bootstrapChunks.push(endAsyncScript);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
bootstrapChunks: bootstrapChunks,
|
||||
startInlineScript: inlineScriptWithNonce,
|
||||
placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
|
||||
segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
|
||||
boundaryPrefix: idPrefix + "B:",
|
||||
idPrefix: idPrefix,
|
||||
nextSuspenseID: 0,
|
||||
streamingFormat: streamingFormat,
|
||||
startInlineScript: inlineScriptWithNonce,
|
||||
sentCompleteSegmentFunction: false,
|
||||
sentCompleteBoundaryFunction: false,
|
||||
sentClientRenderFunction: false,
|
||||
sentStyleInsertionFunction: false
|
||||
sentStyleInsertionFunction: false,
|
||||
externalRuntimeConfig: externalRuntimeDesc
|
||||
};
|
||||
} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion
|
||||
// modes. We only include the variants as they matter for the sake of our purposes.
|
||||
@@ -5794,30 +5793,52 @@ var completeSegmentScript1Full = stringToPrecomputedChunk(
|
||||
);
|
||||
var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("');
|
||||
var completeSegmentScript2 = stringToPrecomputedChunk('","');
|
||||
var completeSegmentScript3 = stringToPrecomputedChunk('")</script>');
|
||||
var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>');
|
||||
var completeSegmentData1 = stringToPrecomputedChunk(
|
||||
'<template data-rsi="" data-sid="'
|
||||
);
|
||||
var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="');
|
||||
var completeSegmentDataEnd = dataElementQuotedEnd;
|
||||
function writeCompletedSegmentInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
contentSegmentID
|
||||
) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (!responseState.sentCompleteSegmentFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentCompleteSegmentFunction = true;
|
||||
writeChunk(destination, completeSegmentScript1Full);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (!responseState.sentCompleteSegmentFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentCompleteSegmentFunction = true;
|
||||
writeChunk(destination, completeSegmentScript1Full);
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, completeSegmentScript1Partial);
|
||||
}
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, completeSegmentScript1Partial);
|
||||
}
|
||||
writeChunk(destination, completeSegmentData1);
|
||||
} // Write function arguments, which are string literals
|
||||
|
||||
writeChunk(destination, responseState.segmentPrefix);
|
||||
var formattedID = stringToChunk(contentSegmentID.toString(16));
|
||||
writeChunk(destination, formattedID);
|
||||
writeChunk(destination, completeSegmentScript2);
|
||||
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeSegmentScript2);
|
||||
} else {
|
||||
writeChunk(destination, completeSegmentData2);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.placeholderPrefix);
|
||||
writeChunk(destination, formattedID);
|
||||
return writeChunkAndReturn(destination, completeSegmentScript3);
|
||||
|
||||
if (scriptFormat) {
|
||||
return writeChunkAndReturn(destination, completeSegmentScriptEnd);
|
||||
} else {
|
||||
return writeChunkAndReturn(destination, completeSegmentDataEnd);
|
||||
}
|
||||
}
|
||||
var completeBoundaryScript1Full = stringToPrecomputedChunk(
|
||||
completeBoundary + ';$RC("'
|
||||
@@ -5833,9 +5854,18 @@ var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk(
|
||||
'$RR("'
|
||||
);
|
||||
var completeBoundaryScript2 = stringToPrecomputedChunk('","');
|
||||
var completeBoundaryScript2a = stringToPrecomputedChunk('",');
|
||||
var completeBoundaryScript3 = stringToPrecomputedChunk('"');
|
||||
var completeBoundaryScript4 = stringToPrecomputedChunk(")</script>");
|
||||
var completeBoundaryScript3a = stringToPrecomputedChunk('",');
|
||||
var completeBoundaryScript3b = stringToPrecomputedChunk('"');
|
||||
var completeBoundaryScriptEnd = stringToPrecomputedChunk(")</script>");
|
||||
var completeBoundaryData1 = stringToPrecomputedChunk(
|
||||
'<template data-rci="" data-bid="'
|
||||
);
|
||||
var completeBoundaryWithStylesData1 = stringToPrecomputedChunk(
|
||||
'<template data-rri="" data-bid="'
|
||||
);
|
||||
var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="');
|
||||
var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="');
|
||||
var completeBoundaryDataEnd = dataElementQuotedEnd;
|
||||
function writeCompletedBoundaryInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
@@ -5849,28 +5879,38 @@ function writeCompletedBoundaryInstruction(
|
||||
hasStyleDependencies = hasStyleResourceDependencies(boundaryResources);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(
|
||||
destination,
|
||||
clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)
|
||||
);
|
||||
} else if (!responseState.sentStyleInsertionFunction) {
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(
|
||||
destination,
|
||||
clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)
|
||||
);
|
||||
} else if (!responseState.sentStyleInsertionFunction) {
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1Partial);
|
||||
}
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1Partial);
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
writeChunk(destination, completeBoundaryScript1Full);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript1Partial);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
writeChunk(destination, completeBoundaryScript1Full);
|
||||
if (hasStyleDependencies) {
|
||||
writeChunk(destination, completeBoundaryWithStylesData1);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript1Partial);
|
||||
writeChunk(destination, completeBoundaryData1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5878,30 +5918,60 @@ function writeCompletedBoundaryInstruction(
|
||||
throw new Error(
|
||||
"An ID must have been assigned before we can complete the boundary."
|
||||
);
|
||||
}
|
||||
} // Write function arguments, which are string and array literals
|
||||
|
||||
var formattedContentID = stringToChunk(contentSegmentID.toString(16));
|
||||
writeChunk(destination, boundaryID);
|
||||
writeChunk(destination, completeBoundaryScript2);
|
||||
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript2);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryData2);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.segmentPrefix);
|
||||
writeChunk(destination, formattedContentID);
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
writeChunk(destination, completeBoundaryScript2a);
|
||||
writeStyleResourceDependencies(destination, boundaryResources);
|
||||
// Script and data writers must format this differently:
|
||||
// - script writer emits an array literal, whose string elements are
|
||||
// escaped for javascript e.g. ["A", "B"]
|
||||
// - data writer emits a string literal, which is escaped as html
|
||||
// e.g. ["A", "B"]
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal
|
||||
|
||||
writeStyleResourceDependenciesInJS(destination, boundaryResources);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryData3a);
|
||||
writeStyleResourceDependenciesInAttr(destination, boundaryResources);
|
||||
}
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript3);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript3b);
|
||||
}
|
||||
}
|
||||
|
||||
return writeChunkAndReturn(destination, completeBoundaryScript4);
|
||||
if (scriptFormat) {
|
||||
return writeChunkAndReturn(destination, completeBoundaryScriptEnd);
|
||||
} else {
|
||||
return writeChunkAndReturn(destination, completeBoundaryDataEnd);
|
||||
}
|
||||
}
|
||||
var clientRenderScript1Full = stringToPrecomputedChunk(
|
||||
clientRenderBoundary + ';$RX("'
|
||||
);
|
||||
var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("');
|
||||
var clientRenderScript1A = stringToPrecomputedChunk('"');
|
||||
var clientRenderScript2 = stringToPrecomputedChunk(")</script>");
|
||||
var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(",");
|
||||
var clientRenderScriptEnd = stringToPrecomputedChunk(")</script>");
|
||||
var clientRenderData1 = stringToPrecomputedChunk(
|
||||
'<template data-rxi="" data-bid="'
|
||||
);
|
||||
var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="');
|
||||
var clientRenderData3 = stringToPrecomputedChunk('" data-msg="');
|
||||
var clientRenderData4 = stringToPrecomputedChunk('" data-stck="');
|
||||
var clientRenderDataEnd = dataElementQuotedEnd;
|
||||
function writeClientRenderBoundaryInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
@@ -5910,15 +5980,22 @@ function writeClientRenderBoundaryInstruction(
|
||||
errorMessage,
|
||||
errorComponentStack
|
||||
) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (!responseState.sentClientRenderFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentClientRenderFunction = true;
|
||||
writeChunk(destination, clientRenderScript1Full);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (!responseState.sentClientRenderFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentClientRenderFunction = true;
|
||||
writeChunk(destination, clientRenderScript1Full);
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, clientRenderScript1Partial);
|
||||
}
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, clientRenderScript1Partial);
|
||||
// <template data-rxi="" data-bid="
|
||||
writeChunk(destination, clientRenderData1);
|
||||
}
|
||||
|
||||
if (boundaryID === null) {
|
||||
@@ -5928,33 +6005,74 @@ function writeClientRenderBoundaryInstruction(
|
||||
}
|
||||
|
||||
writeChunk(destination, boundaryID);
|
||||
writeChunk(destination, clientRenderScript1A);
|
||||
|
||||
if (scriptFormat) {
|
||||
// " needs to be inserted for scripts, since ArgInterstitual does not contain
|
||||
// leading or trailing quotes
|
||||
writeChunk(destination, clientRenderScript1A);
|
||||
}
|
||||
|
||||
if (errorDigest || errorMessage || errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ""))
|
||||
);
|
||||
if (scriptFormat) {
|
||||
// ,"JSONString"
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ""))
|
||||
);
|
||||
} else {
|
||||
// " data-dgst="HTMLString
|
||||
writeChunk(destination, clientRenderData2);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorDigest || ""))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessage || errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ""))
|
||||
);
|
||||
if (scriptFormat) {
|
||||
// ,"JSONString"
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ""))
|
||||
);
|
||||
} else {
|
||||
// " data-msg="HTMLString
|
||||
writeChunk(destination, clientRenderData3);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorMessage || ""))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))
|
||||
);
|
||||
// ,"JSONString"
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))
|
||||
);
|
||||
} else {
|
||||
// " data-stck="HTMLString
|
||||
writeChunk(destination, clientRenderData4);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorComponentStack))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return writeChunkAndReturn(destination, clientRenderScript2);
|
||||
if (scriptFormat) {
|
||||
// ></script>
|
||||
return writeChunkAndReturn(destination, clientRenderScriptEnd);
|
||||
} else {
|
||||
// "></template>
|
||||
return writeChunkAndReturn(destination, clientRenderDataEnd);
|
||||
}
|
||||
}
|
||||
var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g;
|
||||
|
||||
@@ -6020,7 +6138,28 @@ var precedencePlaceholderStart = stringToPrecomputedChunk(
|
||||
'<style data-precedence="'
|
||||
);
|
||||
var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>');
|
||||
function writeInitialResources(destination, resources, responseState) {
|
||||
function writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
// Write initially discovered resources after the shell completes
|
||||
if (!willFlushAllSegments && responseState.externalRuntimeConfig) {
|
||||
// If the root segment is incomplete due to suspended tasks
|
||||
// (e.g. willFlushAllSegments = false) and we are using data
|
||||
// streaming format, ensure the external runtime is sent.
|
||||
// (User code could choose to send this even earlier by calling
|
||||
// preinit(...), if they know they will suspend).
|
||||
var _responseState$extern = responseState.externalRuntimeConfig,
|
||||
src = _responseState$extern.src,
|
||||
integrity = _responseState$extern.integrity;
|
||||
preinitImpl(resources, src, {
|
||||
as: "script",
|
||||
integrity: integrity
|
||||
});
|
||||
}
|
||||
|
||||
function flushLinkResource(resource) {
|
||||
if (!resource.flushed) {
|
||||
pushLinkImpl(target, resource.props, responseState);
|
||||
@@ -6242,21 +6381,23 @@ function hasStyleResourceDependencies(boundaryResources) {
|
||||
var arrayFirstOpenBracket = stringToPrecomputedChunk("[");
|
||||
var arraySubsequentOpenBracket = stringToPrecomputedChunk(",[");
|
||||
var arrayInterstitial = stringToPrecomputedChunk(",");
|
||||
var arrayCloseBracket = stringToPrecomputedChunk("]");
|
||||
var arrayCloseBracket = stringToPrecomputedChunk("]"); // This function writes a 2D array of strings to be embedded in javascript.
|
||||
// E.g.
|
||||
// [["JS_escaped_string1", "JS_escaped_string2"]]
|
||||
|
||||
function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
function writeStyleResourceDependenciesInJS(destination, boundaryResources) {
|
||||
writeChunk(destination, arrayFirstOpenBracket);
|
||||
var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (resource.inShell);
|
||||
else if (resource.flushed) {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyHrefOnly(destination, resource.href);
|
||||
writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
} else {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependency(
|
||||
writeStyleResourceDependencyInJS(
|
||||
destination,
|
||||
resource.href,
|
||||
resource.precedence,
|
||||
@@ -6270,8 +6411,9 @@ function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
});
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
}
|
||||
/* Helper functions */
|
||||
|
||||
function writeStyleResourceDependencyHrefOnly(destination, href) {
|
||||
function writeStyleResourceDependencyHrefOnlyInJS(destination, href) {
|
||||
// We should actually enforce this earlier when the resource is created but for
|
||||
// now we make sure we are actually dealing with a string here.
|
||||
{
|
||||
@@ -6285,7 +6427,12 @@ function writeStyleResourceDependencyHrefOnly(destination, href) {
|
||||
);
|
||||
}
|
||||
|
||||
function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
function writeStyleResourceDependencyInJS(
|
||||
destination,
|
||||
href,
|
||||
precedence,
|
||||
props
|
||||
) {
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
@@ -6334,7 +6481,7 @@ function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
|
||||
default:
|
||||
writeStyleResourceAttribute(destination, propKey, propValue);
|
||||
writeStyleResourceAttributeInJS(destination, propKey, propValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -6343,7 +6490,7 @@ function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function writeStyleResourceAttribute(destination, name, value) {
|
||||
function writeStyleResourceAttributeInJS(destination, name, value) {
|
||||
var attributeName = name.toLowerCase();
|
||||
var attributeValue;
|
||||
|
||||
@@ -6421,23 +6568,224 @@ function writeStyleResourceAttribute(destination, name, value) {
|
||||
destination,
|
||||
stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))
|
||||
);
|
||||
} // This function writes a 2D array of strings to be embedded in an attribute
|
||||
// value and read with JSON.parse in ReactDOMServerExternalRuntime.js
|
||||
// E.g.
|
||||
// [["JSON_escaped_string1", "JSON_escaped_string2"]]
|
||||
|
||||
function writeStyleResourceDependenciesInAttr(destination, boundaryResources) {
|
||||
writeChunk(destination, arrayFirstOpenBracket);
|
||||
var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (resource.inShell);
|
||||
else if (resource.flushed) {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyHrefOnlyInAttr(destination, resource.href);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
} else {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyInAttr(
|
||||
destination,
|
||||
resource.href,
|
||||
resource.precedence,
|
||||
resource.props
|
||||
);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
resource.flushed = true;
|
||||
resource.hint.flushed = true;
|
||||
}
|
||||
});
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
}
|
||||
/* Helper functions */
|
||||
|
||||
function writeStyleResourceDependencyHrefOnlyInAttr(destination, href) {
|
||||
// We should actually enforce this earlier when the resource is created but for
|
||||
// now we make sure we are actually dealing with a string here.
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
|
||||
var coercedHref = "" + href;
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref)))
|
||||
);
|
||||
}
|
||||
|
||||
function createResponseState$1(generateStaticMarkup, identifierPrefix) {
|
||||
var responseState = createResponseState(identifierPrefix, undefined);
|
||||
function writeStyleResourceDependencyInAttr(
|
||||
destination,
|
||||
href,
|
||||
precedence,
|
||||
props
|
||||
) {
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
|
||||
var coercedHref = "" + href;
|
||||
sanitizeURL(coercedHref);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref)))
|
||||
);
|
||||
|
||||
{
|
||||
checkAttributeStringCoercion(precedence, "precedence");
|
||||
}
|
||||
|
||||
var coercedPrecedence = "" + precedence;
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedPrecedence)))
|
||||
);
|
||||
|
||||
for (var propKey in props) {
|
||||
if (hasOwnProperty.call(props, propKey)) {
|
||||
var propValue = props[propKey];
|
||||
|
||||
if (propValue == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (propKey) {
|
||||
case "href":
|
||||
case "rel":
|
||||
case "precedence":
|
||||
case "data-precedence": {
|
||||
break;
|
||||
}
|
||||
|
||||
case "children":
|
||||
case "dangerouslySetInnerHTML":
|
||||
throw new Error(
|
||||
"link" +
|
||||
" is a self-closing tag and must neither have `children` nor " +
|
||||
"use `dangerouslySetInnerHTML`."
|
||||
);
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
|
||||
default:
|
||||
writeStyleResourceAttributeInAttr(destination, propKey, propValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function writeStyleResourceAttributeInAttr(destination, name, value) {
|
||||
var attributeName = name.toLowerCase();
|
||||
var attributeValue;
|
||||
|
||||
switch (typeof value) {
|
||||
case "function":
|
||||
case "symbol":
|
||||
return;
|
||||
}
|
||||
|
||||
switch (name) {
|
||||
// Reserved names
|
||||
case "innerHTML":
|
||||
case "dangerouslySetInnerHTML":
|
||||
case "suppressContentEditableWarning":
|
||||
case "suppressHydrationWarning":
|
||||
case "style":
|
||||
// Ignored
|
||||
return;
|
||||
// Attribute renames
|
||||
|
||||
case "className":
|
||||
attributeName = "class";
|
||||
break;
|
||||
// Booleans
|
||||
|
||||
case "hidden":
|
||||
if (value === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
attributeValue = "";
|
||||
break;
|
||||
// Santized URLs
|
||||
|
||||
case "src":
|
||||
case "href": {
|
||||
{
|
||||
checkAttributeStringCoercion(value, attributeName);
|
||||
}
|
||||
|
||||
attributeValue = "" + value;
|
||||
sanitizeURL(attributeValue);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
if (!isAttributeNameSafe(name)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
// shouldIgnoreAttribute
|
||||
// We have already filtered out null/undefined and reserved words.
|
||||
name.length > 2 &&
|
||||
(name[0] === "o" || name[0] === "O") &&
|
||||
(name[1] === "n" || name[1] === "N")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
checkAttributeStringCoercion(value, attributeName);
|
||||
}
|
||||
|
||||
attributeValue = "" + value;
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(attributeName)))
|
||||
);
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(attributeValue)))
|
||||
);
|
||||
}
|
||||
|
||||
function createResponseState$1(
|
||||
generateStaticMarkup,
|
||||
identifierPrefix,
|
||||
externalRuntimeConfig
|
||||
) {
|
||||
var responseState = createResponseState(
|
||||
identifierPrefix,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
externalRuntimeConfig
|
||||
);
|
||||
return {
|
||||
// Keep this in sync with ReactDOMServerFormatConfig
|
||||
bootstrapChunks: responseState.bootstrapChunks,
|
||||
startInlineScript: responseState.startInlineScript,
|
||||
placeholderPrefix: responseState.placeholderPrefix,
|
||||
segmentPrefix: responseState.segmentPrefix,
|
||||
boundaryPrefix: responseState.boundaryPrefix,
|
||||
idPrefix: responseState.idPrefix,
|
||||
nextSuspenseID: responseState.nextSuspenseID,
|
||||
streamingFormat: responseState.streamingFormat,
|
||||
startInlineScript: responseState.startInlineScript,
|
||||
sentCompleteSegmentFunction: responseState.sentCompleteSegmentFunction,
|
||||
sentCompleteBoundaryFunction: responseState.sentCompleteBoundaryFunction,
|
||||
sentClientRenderFunction: responseState.sentClientRenderFunction,
|
||||
sentStyleInsertionFunction: responseState.sentStyleInsertionFunction,
|
||||
externalRuntimeConfig: responseState.externalRuntimeConfig,
|
||||
// This is an extra field for the legacy renderer
|
||||
generateStaticMarkup: generateStaticMarkup
|
||||
};
|
||||
@@ -10586,8 +10934,18 @@ function flushSegment(request, destination, segment) {
|
||||
}
|
||||
}
|
||||
|
||||
function flushInitialResources(destination, resources, responseState) {
|
||||
writeInitialResources(destination, resources, responseState);
|
||||
function flushInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
);
|
||||
}
|
||||
|
||||
function flushImmediateResources(destination, request) {
|
||||
@@ -10732,7 +11090,8 @@ function flushCompletedQueues(request, destination) {
|
||||
flushInitialResources(
|
||||
destination,
|
||||
request.resources,
|
||||
request.responseState
|
||||
request.responseState,
|
||||
request.allPendingTasks === 0
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10911,7 +11270,8 @@ function renderToStringImpl(
|
||||
children,
|
||||
options,
|
||||
generateStaticMarkup,
|
||||
abortReason
|
||||
abortReason,
|
||||
unstable_externalRuntimeSrc
|
||||
) {
|
||||
var didFatal = false;
|
||||
var fatalError = null;
|
||||
@@ -10939,7 +11299,8 @@ function renderToStringImpl(
|
||||
children,
|
||||
createResponseState$1(
|
||||
generateStaticMarkup,
|
||||
options ? options.identifierPrefix : undefined
|
||||
options ? options.identifierPrefix : undefined,
|
||||
unstable_externalRuntimeSrc
|
||||
),
|
||||
createRootFormatContext(),
|
||||
Infinity,
|
||||
|
||||
@@ -339,40 +339,40 @@ function preload(href, options) {
|
||||
}
|
||||
}
|
||||
function preinit(href, options) {
|
||||
if (currentResources) {
|
||||
var resources = currentResources;
|
||||
if (
|
||||
"string" === typeof href &&
|
||||
href &&
|
||||
"object" === typeof options &&
|
||||
null !== options
|
||||
)
|
||||
switch (options.as) {
|
||||
case "style":
|
||||
var resource = resources.stylesMap.get(href);
|
||||
currentResources && preinitImpl(currentResources, href, options);
|
||||
}
|
||||
function preinitImpl(resources, href, options) {
|
||||
if (
|
||||
"string" === typeof href &&
|
||||
href &&
|
||||
"object" === typeof options &&
|
||||
null !== options
|
||||
)
|
||||
switch (options.as) {
|
||||
case "style":
|
||||
var resource = resources.stylesMap.get(href);
|
||||
resource ||
|
||||
((resource = options.precedence || "default"),
|
||||
(resource = createStyleResource(resources, href, resource, {
|
||||
rel: "stylesheet",
|
||||
href: href,
|
||||
"data-precedence": resource,
|
||||
crossOrigin: options.crossOrigin
|
||||
})));
|
||||
resource.set.add(resource);
|
||||
resources.explicitStylePreloads.add(resource.hint);
|
||||
break;
|
||||
case "script":
|
||||
(resource = resources.scriptsMap.get(href)),
|
||||
resource ||
|
||||
((resource = options.precedence || "default"),
|
||||
(resource = createStyleResource(resources, href, resource, {
|
||||
rel: "stylesheet",
|
||||
href: href,
|
||||
"data-precedence": resource,
|
||||
crossOrigin: options.crossOrigin
|
||||
})));
|
||||
resource.set.add(resource);
|
||||
resources.explicitStylePreloads.add(resource.hint);
|
||||
break;
|
||||
case "script":
|
||||
(resource = resources.scriptsMap.get(href)),
|
||||
resource ||
|
||||
((resource = createScriptResource(resources, href, {
|
||||
src: href,
|
||||
async: !0,
|
||||
crossOrigin: options.crossOrigin,
|
||||
integrity: options.integrity
|
||||
})),
|
||||
resources.scripts.add(resource));
|
||||
}
|
||||
}
|
||||
((resource = createScriptResource(resources, href, {
|
||||
src: href,
|
||||
async: !0,
|
||||
crossOrigin: options.crossOrigin,
|
||||
integrity: options.integrity
|
||||
})),
|
||||
resources.scripts.add(resource));
|
||||
}
|
||||
}
|
||||
function preloadAsStylePropsFromProps(href, props) {
|
||||
return {
|
||||
@@ -1449,15 +1449,27 @@ function escapeJSObjectForInstructionScripts(input) {
|
||||
}
|
||||
});
|
||||
}
|
||||
function writeInitialResources(destination, resources, responseState) {
|
||||
function writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
function flushLinkResource(resource) {
|
||||
resource.flushed ||
|
||||
(pushLinkImpl(target, resource.props, responseState),
|
||||
(resource.flushed = !0));
|
||||
}
|
||||
var target = [],
|
||||
charset = resources.charset,
|
||||
bases = resources.bases,
|
||||
!willFlushAllSegments &&
|
||||
responseState.externalRuntimeConfig &&
|
||||
((willFlushAllSegments = responseState.externalRuntimeConfig),
|
||||
preinitImpl(resources, willFlushAllSegments.src, {
|
||||
as: "script",
|
||||
integrity: willFlushAllSegments.integrity
|
||||
}));
|
||||
var target = [];
|
||||
willFlushAllSegments = resources.charset;
|
||||
var bases = resources.bases,
|
||||
preconnects = resources.preconnects,
|
||||
fontPreloads = resources.fontPreloads,
|
||||
precedences = resources.precedences,
|
||||
@@ -1467,9 +1479,9 @@ function writeInitialResources(destination, resources, responseState) {
|
||||
explicitStylePreloads = resources.explicitStylePreloads,
|
||||
explicitScriptPreloads = resources.explicitScriptPreloads,
|
||||
headResources = resources.headResources;
|
||||
charset &&
|
||||
(pushSelfClosing(target, charset.props, "meta", responseState),
|
||||
(charset.flushed = !0),
|
||||
willFlushAllSegments &&
|
||||
(pushSelfClosing(target, willFlushAllSegments.props, "meta", responseState),
|
||||
(willFlushAllSegments.flushed = !0),
|
||||
(resources.charset = null));
|
||||
bases.forEach(function(r) {
|
||||
pushSelfClosing(target, r.props, "base", responseState);
|
||||
@@ -1529,11 +1541,12 @@ function writeInitialResources(destination, resources, responseState) {
|
||||
r.flushed = !0;
|
||||
});
|
||||
headResources.clear();
|
||||
charset = !0;
|
||||
willFlushAllSegments = !0;
|
||||
for (resources = 0; resources < target.length - 1; resources++)
|
||||
destination.push(target[resources]);
|
||||
resources < target.length && (charset = destination.push(target[resources]));
|
||||
return charset;
|
||||
resources < target.length &&
|
||||
(willFlushAllSegments = destination.push(target[resources]));
|
||||
return willFlushAllSegments;
|
||||
}
|
||||
function writeImmediateResources(destination, resources, responseState) {
|
||||
function flushLinkResource(resource) {
|
||||
@@ -1600,7 +1613,7 @@ function writeImmediateResources(destination, resources, responseState) {
|
||||
resources < target.length && (charset = destination.push(target[resources]));
|
||||
return charset;
|
||||
}
|
||||
function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
function writeStyleResourceDependenciesInJS(destination, boundaryResources) {
|
||||
destination.push("[");
|
||||
var nextArrayOpenBrackChunk = "[";
|
||||
boundaryResources.forEach(function(resource) {
|
||||
@@ -1693,20 +1706,127 @@ function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
});
|
||||
destination.push("]");
|
||||
}
|
||||
function createResponseState$1(generateStaticMarkup, identifierPrefix) {
|
||||
function writeStyleResourceDependenciesInAttr(destination, boundaryResources) {
|
||||
destination.push("[");
|
||||
var nextArrayOpenBrackChunk = "[";
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (!resource.inShell)
|
||||
if (resource.flushed)
|
||||
destination.push(nextArrayOpenBrackChunk),
|
||||
(resource = escapeTextForBrowser(JSON.stringify("" + resource.href))),
|
||||
destination.push(resource),
|
||||
destination.push("]"),
|
||||
(nextArrayOpenBrackChunk = ",[");
|
||||
else {
|
||||
destination.push(nextArrayOpenBrackChunk);
|
||||
var precedence = resource.precedence,
|
||||
props = resource.props,
|
||||
coercedHref = "" + resource.href;
|
||||
sanitizeURL(coercedHref);
|
||||
coercedHref = escapeTextForBrowser(JSON.stringify(coercedHref));
|
||||
destination.push(coercedHref);
|
||||
precedence = "" + precedence;
|
||||
destination.push(",");
|
||||
precedence = escapeTextForBrowser(JSON.stringify(precedence));
|
||||
destination.push(precedence);
|
||||
for (var propKey in props)
|
||||
if (hasOwnProperty.call(props, propKey)) {
|
||||
var propValue = props[propKey];
|
||||
if (null != propValue)
|
||||
switch (propKey) {
|
||||
case "href":
|
||||
case "rel":
|
||||
case "precedence":
|
||||
case "data-precedence":
|
||||
break;
|
||||
case "children":
|
||||
case "dangerouslySetInnerHTML":
|
||||
throw Error(formatProdErrorMessage(399, "link"));
|
||||
default:
|
||||
a: {
|
||||
precedence = destination;
|
||||
var name = propKey;
|
||||
coercedHref = name.toLowerCase();
|
||||
switch (typeof propValue) {
|
||||
case "function":
|
||||
case "symbol":
|
||||
break a;
|
||||
}
|
||||
switch (name) {
|
||||
case "innerHTML":
|
||||
case "dangerouslySetInnerHTML":
|
||||
case "suppressContentEditableWarning":
|
||||
case "suppressHydrationWarning":
|
||||
case "style":
|
||||
break a;
|
||||
case "className":
|
||||
coercedHref = "class";
|
||||
break;
|
||||
case "hidden":
|
||||
if (!1 === propValue) break a;
|
||||
break;
|
||||
case "src":
|
||||
case "href":
|
||||
sanitizeURL("" + propValue);
|
||||
break;
|
||||
default:
|
||||
if (!isAttributeNameSafe(name)) break a;
|
||||
}
|
||||
if (
|
||||
!(2 < name.length) ||
|
||||
("o" !== name[0] && "O" !== name[0]) ||
|
||||
("n" !== name[1] && "N" !== name[1])
|
||||
)
|
||||
(propValue = "" + propValue),
|
||||
precedence.push(","),
|
||||
(coercedHref = escapeTextForBrowser(
|
||||
JSON.stringify(coercedHref)
|
||||
)),
|
||||
precedence.push(coercedHref),
|
||||
precedence.push(","),
|
||||
(coercedHref = escapeTextForBrowser(
|
||||
JSON.stringify(propValue)
|
||||
)),
|
||||
precedence.push(coercedHref);
|
||||
}
|
||||
}
|
||||
}
|
||||
destination.push("]");
|
||||
nextArrayOpenBrackChunk = ",[";
|
||||
resource.flushed = !0;
|
||||
resource.hint.flushed = !0;
|
||||
}
|
||||
});
|
||||
destination.push("]");
|
||||
}
|
||||
function createResponseState$1(
|
||||
generateStaticMarkup,
|
||||
identifierPrefix,
|
||||
externalRuntimeConfig
|
||||
) {
|
||||
identifierPrefix = void 0 === identifierPrefix ? "" : identifierPrefix;
|
||||
var externalRuntimeDesc = null,
|
||||
streamingFormat = 0;
|
||||
void 0 !== externalRuntimeConfig &&
|
||||
((streamingFormat = 1),
|
||||
(externalRuntimeDesc =
|
||||
"string" === typeof externalRuntimeConfig
|
||||
? { src: externalRuntimeConfig, integrity: void 0 }
|
||||
: externalRuntimeConfig));
|
||||
return {
|
||||
bootstrapChunks: [],
|
||||
startInlineScript: "<script>",
|
||||
placeholderPrefix: identifierPrefix + "P:",
|
||||
segmentPrefix: identifierPrefix + "S:",
|
||||
boundaryPrefix: identifierPrefix + "B:",
|
||||
idPrefix: identifierPrefix,
|
||||
nextSuspenseID: 0,
|
||||
streamingFormat: streamingFormat,
|
||||
startInlineScript: "<script>",
|
||||
sentCompleteSegmentFunction: !1,
|
||||
sentCompleteBoundaryFunction: !1,
|
||||
sentClientRenderFunction: !1,
|
||||
sentStyleInsertionFunction: !1,
|
||||
externalRuntimeConfig: externalRuntimeDesc,
|
||||
generateStaticMarkup: generateStaticMarkup
|
||||
};
|
||||
}
|
||||
@@ -2809,7 +2929,7 @@ function renderNode(request, task, node) {
|
||||
null !== node &&
|
||||
"function" === typeof node.then)
|
||||
) {
|
||||
var thenableState$19 = getThenableStateAfterSuspending(),
|
||||
var thenableState$17 = getThenableStateAfterSuspending(),
|
||||
segment = task.blockedSegment,
|
||||
newSegment = createPendingSegment(
|
||||
request,
|
||||
@@ -2823,7 +2943,7 @@ function renderNode(request, task, node) {
|
||||
segment.lastPushedText = !1;
|
||||
request = createTask(
|
||||
request,
|
||||
thenableState$19,
|
||||
thenableState$17,
|
||||
task.node,
|
||||
task.blockedBoundary,
|
||||
newSegment,
|
||||
@@ -3147,48 +3267,58 @@ function flushCompletedBoundary(request, destination, boundary) {
|
||||
i = boundary.rootSegmentID;
|
||||
boundary = boundary.resources;
|
||||
var hasStyleDependencies;
|
||||
a: {
|
||||
b: {
|
||||
for (hasStyleDependencies = boundary.values(); ; ) {
|
||||
var resource = hasStyleDependencies.next().value;
|
||||
if (!resource) break;
|
||||
if (!resource.inShell) {
|
||||
hasStyleDependencies = !0;
|
||||
break a;
|
||||
break b;
|
||||
}
|
||||
}
|
||||
hasStyleDependencies = !1;
|
||||
}
|
||||
destination.push(request.startInlineScript);
|
||||
hasStyleDependencies
|
||||
? request.sentCompleteBoundaryFunction
|
||||
? request.sentStyleInsertionFunction
|
||||
? destination.push('$RR("')
|
||||
: ((request.sentStyleInsertionFunction = !0),
|
||||
(resource = 0 === request.streamingFormat)
|
||||
? (destination.push(request.startInlineScript),
|
||||
hasStyleDependencies
|
||||
? request.sentCompleteBoundaryFunction
|
||||
? request.sentStyleInsertionFunction
|
||||
? destination.push('$RR("')
|
||||
: ((request.sentStyleInsertionFunction = !0),
|
||||
destination.push(
|
||||
'$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
(request.sentStyleInsertionFunction = !0),
|
||||
destination.push(
|
||||
'$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,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: request.sentCompleteBoundaryFunction
|
||||
? destination.push('$RC("')
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
destination.push(
|
||||
'$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
(request.sentStyleInsertionFunction = !0),
|
||||
destination.push(
|
||||
'$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,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: request.sentCompleteBoundaryFunction
|
||||
? destination.push('$RC("')
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
destination.push(
|
||||
'$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("'
|
||||
));
|
||||
'$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("'
|
||||
)))
|
||||
: hasStyleDependencies
|
||||
? destination.push('<template data-rri="" data-bid="')
|
||||
: destination.push('<template data-rci="" data-bid="');
|
||||
if (null === completedSegments) throw Error(formatProdErrorMessage(395));
|
||||
i = i.toString(16);
|
||||
destination.push(completedSegments);
|
||||
destination.push('","');
|
||||
resource ? destination.push('","') : destination.push('" data-sid="');
|
||||
destination.push(request.segmentPrefix);
|
||||
destination.push(i);
|
||||
hasStyleDependencies
|
||||
? (destination.push('",'),
|
||||
writeStyleResourceDependencies(destination, boundary))
|
||||
: destination.push('"');
|
||||
return destination.push(")\x3c/script>");
|
||||
? resource
|
||||
? (destination.push('",'),
|
||||
writeStyleResourceDependenciesInJS(destination, boundary))
|
||||
: (destination.push('" data-sty="'),
|
||||
writeStyleResourceDependenciesInAttr(destination, boundary))
|
||||
: resource && destination.push('"');
|
||||
destination = resource
|
||||
? destination.push(")\x3c/script>")
|
||||
: destination.push('"></template>');
|
||||
return destination;
|
||||
}
|
||||
function flushPartiallyCompletedSegment(
|
||||
request,
|
||||
@@ -3205,20 +3335,25 @@ function flushPartiallyCompletedSegment(
|
||||
}
|
||||
flushSegmentContainer(request, destination, segment);
|
||||
request = request.responseState;
|
||||
destination.push(request.startInlineScript);
|
||||
request.sentCompleteSegmentFunction
|
||||
? destination.push('$RS("')
|
||||
: ((request.sentCompleteSegmentFunction = !0),
|
||||
destination.push(
|
||||
'$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("'
|
||||
));
|
||||
(boundary = 0 === request.streamingFormat)
|
||||
? (destination.push(request.startInlineScript),
|
||||
request.sentCompleteSegmentFunction
|
||||
? destination.push('$RS("')
|
||||
: ((request.sentCompleteSegmentFunction = !0),
|
||||
destination.push(
|
||||
'$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("'
|
||||
)))
|
||||
: destination.push('<template data-rsi="" data-sid="');
|
||||
destination.push(request.segmentPrefix);
|
||||
segmentID = segmentID.toString(16);
|
||||
destination.push(segmentID);
|
||||
destination.push('","');
|
||||
boundary ? destination.push('","') : destination.push('" data-pid="');
|
||||
destination.push(request.placeholderPrefix);
|
||||
destination.push(segmentID);
|
||||
return destination.push('")\x3c/script>');
|
||||
destination = boundary
|
||||
? destination.push('")\x3c/script>')
|
||||
: destination.push('"></template>');
|
||||
return destination;
|
||||
}
|
||||
function flushCompletedQueues(request, destination) {
|
||||
try {
|
||||
@@ -3231,7 +3366,8 @@ function flushCompletedQueues(request, destination) {
|
||||
writeInitialResources(
|
||||
destination,
|
||||
request.resources,
|
||||
request.responseState
|
||||
request.responseState,
|
||||
0 === request.allPendingTasks
|
||||
);
|
||||
flushSegment(request, destination, completedRootSegment);
|
||||
request.completedRootSegment = null;
|
||||
@@ -3259,37 +3395,59 @@ function flushCompletedQueues(request, destination) {
|
||||
boundaryID = boundary.id,
|
||||
errorDigest = boundary.errorDigest,
|
||||
errorMessage = boundary.errorMessage,
|
||||
errorComponentStack = boundary.errorComponentStack;
|
||||
bootstrapChunks.push(responseState.startInlineScript);
|
||||
responseState.sentClientRenderFunction
|
||||
? bootstrapChunks.push('$RX("')
|
||||
: ((responseState.sentClientRenderFunction = !0),
|
||||
bootstrapChunks.push(
|
||||
'$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("'
|
||||
));
|
||||
errorComponentStack = boundary.errorComponentStack,
|
||||
scriptFormat = 0 === responseState.streamingFormat;
|
||||
scriptFormat
|
||||
? (bootstrapChunks.push(responseState.startInlineScript),
|
||||
responseState.sentClientRenderFunction
|
||||
? bootstrapChunks.push('$RX("')
|
||||
: ((responseState.sentClientRenderFunction = !0),
|
||||
bootstrapChunks.push(
|
||||
'$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("'
|
||||
)))
|
||||
: bootstrapChunks.push('<template data-rxi="" data-bid="');
|
||||
if (null === boundaryID) throw Error(formatProdErrorMessage(395));
|
||||
bootstrapChunks.push(boundaryID);
|
||||
bootstrapChunks.push('"');
|
||||
if (errorDigest || errorMessage || errorComponentStack) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk = escapeJSStringsForInstructionScripts(errorDigest || "");
|
||||
bootstrapChunks.push(chunk);
|
||||
}
|
||||
if (errorMessage || errorComponentStack) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk$jscomp$0 = escapeJSStringsForInstructionScripts(
|
||||
errorMessage || ""
|
||||
);
|
||||
bootstrapChunks.push(chunk$jscomp$0);
|
||||
}
|
||||
if (errorComponentStack) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk$jscomp$1 = escapeJSStringsForInstructionScripts(
|
||||
errorComponentStack
|
||||
);
|
||||
bootstrapChunks.push(chunk$jscomp$1);
|
||||
}
|
||||
if (!bootstrapChunks.push(")\x3c/script>")) {
|
||||
scriptFormat && bootstrapChunks.push('"');
|
||||
if (errorDigest || errorMessage || errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk = escapeJSStringsForInstructionScripts(errorDigest || "");
|
||||
bootstrapChunks.push(chunk);
|
||||
} else {
|
||||
bootstrapChunks.push('" data-dgst="');
|
||||
var chunk$jscomp$0 = escapeTextForBrowser(errorDigest || "");
|
||||
bootstrapChunks.push(chunk$jscomp$0);
|
||||
}
|
||||
if (errorMessage || errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk$jscomp$1 = escapeJSStringsForInstructionScripts(
|
||||
errorMessage || ""
|
||||
);
|
||||
bootstrapChunks.push(chunk$jscomp$1);
|
||||
} else {
|
||||
bootstrapChunks.push('" data-msg="');
|
||||
var chunk$jscomp$2 = escapeTextForBrowser(errorMessage || "");
|
||||
bootstrapChunks.push(chunk$jscomp$2);
|
||||
}
|
||||
if (errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk$jscomp$3 = escapeJSStringsForInstructionScripts(
|
||||
errorComponentStack
|
||||
);
|
||||
bootstrapChunks.push(chunk$jscomp$3);
|
||||
} else {
|
||||
bootstrapChunks.push('" data-stck="');
|
||||
var chunk$jscomp$4 = escapeTextForBrowser(errorComponentStack);
|
||||
bootstrapChunks.push(chunk$jscomp$4);
|
||||
}
|
||||
if (
|
||||
scriptFormat
|
||||
? !bootstrapChunks.push(")\x3c/script>")
|
||||
: !bootstrapChunks.push('"></template>')
|
||||
) {
|
||||
request.destination = null;
|
||||
i++;
|
||||
clientRenderedBoundaries.splice(0, i);
|
||||
@@ -3310,13 +3468,13 @@ function flushCompletedQueues(request, destination) {
|
||||
completedBoundaries.splice(0, i);
|
||||
var partialBoundaries = request.partialBoundaries;
|
||||
for (i = 0; i < partialBoundaries.length; i++) {
|
||||
var boundary$21 = partialBoundaries[i];
|
||||
var boundary$19 = partialBoundaries[i];
|
||||
a: {
|
||||
clientRenderedBoundaries = request;
|
||||
boundary = destination;
|
||||
clientRenderedBoundaries.resources.boundaryResources =
|
||||
boundary$21.resources;
|
||||
var completedSegments = boundary$21.completedSegments;
|
||||
boundary$19.resources;
|
||||
var completedSegments = boundary$19.completedSegments;
|
||||
for (
|
||||
responseState = 0;
|
||||
responseState < completedSegments.length;
|
||||
@@ -3326,7 +3484,7 @@ function flushCompletedQueues(request, destination) {
|
||||
!flushPartiallyCompletedSegment(
|
||||
clientRenderedBoundaries,
|
||||
boundary,
|
||||
boundary$21,
|
||||
boundary$19,
|
||||
completedSegments[responseState]
|
||||
)
|
||||
) {
|
||||
@@ -3381,8 +3539,8 @@ function abort(request, reason) {
|
||||
}
|
||||
null !== request.destination &&
|
||||
flushCompletedQueues(request, request.destination);
|
||||
} catch (error$24) {
|
||||
logRecoverableError(request, error$24), fatalError(request, error$24);
|
||||
} catch (error$22) {
|
||||
logRecoverableError(request, error$22), fatalError(request, error$22);
|
||||
}
|
||||
}
|
||||
function onError() {}
|
||||
@@ -3390,7 +3548,8 @@ function renderToStringImpl(
|
||||
children,
|
||||
options,
|
||||
generateStaticMarkup,
|
||||
abortReason
|
||||
abortReason,
|
||||
unstable_externalRuntimeSrc
|
||||
) {
|
||||
var didFatal = !1,
|
||||
fatalError$jscomp$0 = null,
|
||||
@@ -3410,7 +3569,8 @@ function renderToStringImpl(
|
||||
children,
|
||||
createResponseState$1(
|
||||
generateStaticMarkup,
|
||||
options ? options.identifierPrefix : void 0
|
||||
options ? options.identifierPrefix : void 0,
|
||||
unstable_externalRuntimeSrc
|
||||
),
|
||||
{ insertionMode: 1, selectedValue: null, noscriptTagInScope: !1 },
|
||||
Infinity,
|
||||
@@ -3461,4 +3621,4 @@ exports.renderToString = function(children, options) {
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-e98225485-20221129";
|
||||
exports.version = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
@@ -339,40 +339,40 @@ function preload(href, options) {
|
||||
}
|
||||
}
|
||||
function preinit(href, options) {
|
||||
if (currentResources) {
|
||||
var resources = currentResources;
|
||||
if (
|
||||
"string" === typeof href &&
|
||||
href &&
|
||||
"object" === typeof options &&
|
||||
null !== options
|
||||
)
|
||||
switch (options.as) {
|
||||
case "style":
|
||||
var resource = resources.stylesMap.get(href);
|
||||
currentResources && preinitImpl(currentResources, href, options);
|
||||
}
|
||||
function preinitImpl(resources, href, options) {
|
||||
if (
|
||||
"string" === typeof href &&
|
||||
href &&
|
||||
"object" === typeof options &&
|
||||
null !== options
|
||||
)
|
||||
switch (options.as) {
|
||||
case "style":
|
||||
var resource = resources.stylesMap.get(href);
|
||||
resource ||
|
||||
((resource = options.precedence || "default"),
|
||||
(resource = createStyleResource(resources, href, resource, {
|
||||
rel: "stylesheet",
|
||||
href: href,
|
||||
"data-precedence": resource,
|
||||
crossOrigin: options.crossOrigin
|
||||
})));
|
||||
resource.set.add(resource);
|
||||
resources.explicitStylePreloads.add(resource.hint);
|
||||
break;
|
||||
case "script":
|
||||
(resource = resources.scriptsMap.get(href)),
|
||||
resource ||
|
||||
((resource = options.precedence || "default"),
|
||||
(resource = createStyleResource(resources, href, resource, {
|
||||
rel: "stylesheet",
|
||||
href: href,
|
||||
"data-precedence": resource,
|
||||
crossOrigin: options.crossOrigin
|
||||
})));
|
||||
resource.set.add(resource);
|
||||
resources.explicitStylePreloads.add(resource.hint);
|
||||
break;
|
||||
case "script":
|
||||
(resource = resources.scriptsMap.get(href)),
|
||||
resource ||
|
||||
((resource = createScriptResource(resources, href, {
|
||||
src: href,
|
||||
async: !0,
|
||||
crossOrigin: options.crossOrigin,
|
||||
integrity: options.integrity
|
||||
})),
|
||||
resources.scripts.add(resource));
|
||||
}
|
||||
}
|
||||
((resource = createScriptResource(resources, href, {
|
||||
src: href,
|
||||
async: !0,
|
||||
crossOrigin: options.crossOrigin,
|
||||
integrity: options.integrity
|
||||
})),
|
||||
resources.scripts.add(resource));
|
||||
}
|
||||
}
|
||||
function preloadAsStylePropsFromProps(href, props) {
|
||||
return {
|
||||
@@ -1458,15 +1458,27 @@ function escapeJSObjectForInstructionScripts(input) {
|
||||
}
|
||||
});
|
||||
}
|
||||
function writeInitialResources(destination, resources, responseState) {
|
||||
function writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
function flushLinkResource(resource) {
|
||||
resource.flushed ||
|
||||
(pushLinkImpl(target, resource.props, responseState),
|
||||
(resource.flushed = !0));
|
||||
}
|
||||
var target = [],
|
||||
charset = resources.charset,
|
||||
bases = resources.bases,
|
||||
!willFlushAllSegments &&
|
||||
responseState.externalRuntimeConfig &&
|
||||
((willFlushAllSegments = responseState.externalRuntimeConfig),
|
||||
preinitImpl(resources, willFlushAllSegments.src, {
|
||||
as: "script",
|
||||
integrity: willFlushAllSegments.integrity
|
||||
}));
|
||||
var target = [];
|
||||
willFlushAllSegments = resources.charset;
|
||||
var bases = resources.bases,
|
||||
preconnects = resources.preconnects,
|
||||
fontPreloads = resources.fontPreloads,
|
||||
precedences = resources.precedences,
|
||||
@@ -1476,9 +1488,9 @@ function writeInitialResources(destination, resources, responseState) {
|
||||
explicitStylePreloads = resources.explicitStylePreloads,
|
||||
explicitScriptPreloads = resources.explicitScriptPreloads,
|
||||
headResources = resources.headResources;
|
||||
charset &&
|
||||
(pushSelfClosing(target, charset.props, "meta", responseState),
|
||||
(charset.flushed = !0),
|
||||
willFlushAllSegments &&
|
||||
(pushSelfClosing(target, willFlushAllSegments.props, "meta", responseState),
|
||||
(willFlushAllSegments.flushed = !0),
|
||||
(resources.charset = null));
|
||||
bases.forEach(function(r) {
|
||||
pushSelfClosing(target, r.props, "base", responseState);
|
||||
@@ -1538,11 +1550,12 @@ function writeInitialResources(destination, resources, responseState) {
|
||||
r.flushed = !0;
|
||||
});
|
||||
headResources.clear();
|
||||
charset = !0;
|
||||
willFlushAllSegments = !0;
|
||||
for (resources = 0; resources < target.length - 1; resources++)
|
||||
destination.push(target[resources]);
|
||||
resources < target.length && (charset = destination.push(target[resources]));
|
||||
return charset;
|
||||
resources < target.length &&
|
||||
(willFlushAllSegments = destination.push(target[resources]));
|
||||
return willFlushAllSegments;
|
||||
}
|
||||
function writeImmediateResources(destination, resources, responseState) {
|
||||
function flushLinkResource(resource) {
|
||||
@@ -1609,7 +1622,7 @@ function writeImmediateResources(destination, resources, responseState) {
|
||||
resources < target.length && (charset = destination.push(target[resources]));
|
||||
return charset;
|
||||
}
|
||||
function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
function writeStyleResourceDependenciesInJS(destination, boundaryResources) {
|
||||
destination.push("[");
|
||||
var nextArrayOpenBrackChunk = "[";
|
||||
boundaryResources.forEach(function(resource) {
|
||||
@@ -1702,20 +1715,127 @@ function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
});
|
||||
destination.push("]");
|
||||
}
|
||||
function createResponseState$1(generateStaticMarkup, identifierPrefix) {
|
||||
function writeStyleResourceDependenciesInAttr(destination, boundaryResources) {
|
||||
destination.push("[");
|
||||
var nextArrayOpenBrackChunk = "[";
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (!resource.inShell)
|
||||
if (resource.flushed)
|
||||
destination.push(nextArrayOpenBrackChunk),
|
||||
(resource = escapeTextForBrowser(JSON.stringify("" + resource.href))),
|
||||
destination.push(resource),
|
||||
destination.push("]"),
|
||||
(nextArrayOpenBrackChunk = ",[");
|
||||
else {
|
||||
destination.push(nextArrayOpenBrackChunk);
|
||||
var precedence = resource.precedence,
|
||||
props = resource.props,
|
||||
coercedHref = "" + resource.href;
|
||||
sanitizeURL(coercedHref);
|
||||
coercedHref = escapeTextForBrowser(JSON.stringify(coercedHref));
|
||||
destination.push(coercedHref);
|
||||
precedence = "" + precedence;
|
||||
destination.push(",");
|
||||
precedence = escapeTextForBrowser(JSON.stringify(precedence));
|
||||
destination.push(precedence);
|
||||
for (var propKey in props)
|
||||
if (hasOwnProperty.call(props, propKey)) {
|
||||
var propValue = props[propKey];
|
||||
if (null != propValue)
|
||||
switch (propKey) {
|
||||
case "href":
|
||||
case "rel":
|
||||
case "precedence":
|
||||
case "data-precedence":
|
||||
break;
|
||||
case "children":
|
||||
case "dangerouslySetInnerHTML":
|
||||
throw Error(formatProdErrorMessage(399, "link"));
|
||||
default:
|
||||
a: {
|
||||
precedence = destination;
|
||||
var name = propKey;
|
||||
coercedHref = name.toLowerCase();
|
||||
switch (typeof propValue) {
|
||||
case "function":
|
||||
case "symbol":
|
||||
break a;
|
||||
}
|
||||
switch (name) {
|
||||
case "innerHTML":
|
||||
case "dangerouslySetInnerHTML":
|
||||
case "suppressContentEditableWarning":
|
||||
case "suppressHydrationWarning":
|
||||
case "style":
|
||||
break a;
|
||||
case "className":
|
||||
coercedHref = "class";
|
||||
break;
|
||||
case "hidden":
|
||||
if (!1 === propValue) break a;
|
||||
break;
|
||||
case "src":
|
||||
case "href":
|
||||
sanitizeURL("" + propValue);
|
||||
break;
|
||||
default:
|
||||
if (!isAttributeNameSafe(name)) break a;
|
||||
}
|
||||
if (
|
||||
!(2 < name.length) ||
|
||||
("o" !== name[0] && "O" !== name[0]) ||
|
||||
("n" !== name[1] && "N" !== name[1])
|
||||
)
|
||||
(propValue = "" + propValue),
|
||||
precedence.push(","),
|
||||
(coercedHref = escapeTextForBrowser(
|
||||
JSON.stringify(coercedHref)
|
||||
)),
|
||||
precedence.push(coercedHref),
|
||||
precedence.push(","),
|
||||
(coercedHref = escapeTextForBrowser(
|
||||
JSON.stringify(propValue)
|
||||
)),
|
||||
precedence.push(coercedHref);
|
||||
}
|
||||
}
|
||||
}
|
||||
destination.push("]");
|
||||
nextArrayOpenBrackChunk = ",[";
|
||||
resource.flushed = !0;
|
||||
resource.hint.flushed = !0;
|
||||
}
|
||||
});
|
||||
destination.push("]");
|
||||
}
|
||||
function createResponseState$1(
|
||||
generateStaticMarkup,
|
||||
identifierPrefix,
|
||||
externalRuntimeConfig
|
||||
) {
|
||||
identifierPrefix = void 0 === identifierPrefix ? "" : identifierPrefix;
|
||||
var externalRuntimeDesc = null,
|
||||
streamingFormat = 0;
|
||||
void 0 !== externalRuntimeConfig &&
|
||||
((streamingFormat = 1),
|
||||
(externalRuntimeDesc =
|
||||
"string" === typeof externalRuntimeConfig
|
||||
? { src: externalRuntimeConfig, integrity: void 0 }
|
||||
: externalRuntimeConfig));
|
||||
return {
|
||||
bootstrapChunks: [],
|
||||
startInlineScript: "<script>",
|
||||
placeholderPrefix: identifierPrefix + "P:",
|
||||
segmentPrefix: identifierPrefix + "S:",
|
||||
boundaryPrefix: identifierPrefix + "B:",
|
||||
idPrefix: identifierPrefix,
|
||||
nextSuspenseID: 0,
|
||||
streamingFormat: streamingFormat,
|
||||
startInlineScript: "<script>",
|
||||
sentCompleteSegmentFunction: !1,
|
||||
sentCompleteBoundaryFunction: !1,
|
||||
sentClientRenderFunction: !1,
|
||||
sentStyleInsertionFunction: !1,
|
||||
externalRuntimeConfig: externalRuntimeDesc,
|
||||
generateStaticMarkup: generateStaticMarkup
|
||||
};
|
||||
}
|
||||
@@ -2722,7 +2842,7 @@ function renderNode(request, task, node) {
|
||||
null !== node &&
|
||||
"function" === typeof node.then)
|
||||
) {
|
||||
var thenableState$19 = getThenableStateAfterSuspending(),
|
||||
var thenableState$17 = getThenableStateAfterSuspending(),
|
||||
segment = task.blockedSegment,
|
||||
newSegment = createPendingSegment(
|
||||
request,
|
||||
@@ -2736,7 +2856,7 @@ function renderNode(request, task, node) {
|
||||
segment.lastPushedText = !1;
|
||||
request = createTask(
|
||||
request,
|
||||
thenableState$19,
|
||||
thenableState$17,
|
||||
task.node,
|
||||
task.blockedBoundary,
|
||||
newSegment,
|
||||
@@ -3060,48 +3180,58 @@ function flushCompletedBoundary(request, destination, boundary) {
|
||||
i = boundary.rootSegmentID;
|
||||
boundary = boundary.resources;
|
||||
var hasStyleDependencies;
|
||||
a: {
|
||||
b: {
|
||||
for (hasStyleDependencies = boundary.values(); ; ) {
|
||||
var resource = hasStyleDependencies.next().value;
|
||||
if (!resource) break;
|
||||
if (!resource.inShell) {
|
||||
hasStyleDependencies = !0;
|
||||
break a;
|
||||
break b;
|
||||
}
|
||||
}
|
||||
hasStyleDependencies = !1;
|
||||
}
|
||||
destination.push(request.startInlineScript);
|
||||
hasStyleDependencies
|
||||
? request.sentCompleteBoundaryFunction
|
||||
? request.sentStyleInsertionFunction
|
||||
? destination.push('$RR("')
|
||||
: ((request.sentStyleInsertionFunction = !0),
|
||||
(resource = 0 === request.streamingFormat)
|
||||
? (destination.push(request.startInlineScript),
|
||||
hasStyleDependencies
|
||||
? request.sentCompleteBoundaryFunction
|
||||
? request.sentStyleInsertionFunction
|
||||
? destination.push('$RR("')
|
||||
: ((request.sentStyleInsertionFunction = !0),
|
||||
destination.push(
|
||||
'$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
(request.sentStyleInsertionFunction = !0),
|
||||
destination.push(
|
||||
'$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,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: request.sentCompleteBoundaryFunction
|
||||
? destination.push('$RC("')
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
destination.push(
|
||||
'$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
(request.sentStyleInsertionFunction = !0),
|
||||
destination.push(
|
||||
'$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,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: request.sentCompleteBoundaryFunction
|
||||
? destination.push('$RC("')
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
destination.push(
|
||||
'$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("'
|
||||
));
|
||||
'$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("'
|
||||
)))
|
||||
: hasStyleDependencies
|
||||
? destination.push('<template data-rri="" data-bid="')
|
||||
: destination.push('<template data-rci="" data-bid="');
|
||||
if (null === completedSegments) throw Error(formatProdErrorMessage(395));
|
||||
i = i.toString(16);
|
||||
destination.push(completedSegments);
|
||||
destination.push('","');
|
||||
resource ? destination.push('","') : destination.push('" data-sid="');
|
||||
destination.push(request.segmentPrefix);
|
||||
destination.push(i);
|
||||
hasStyleDependencies
|
||||
? (destination.push('",'),
|
||||
writeStyleResourceDependencies(destination, boundary))
|
||||
: destination.push('"');
|
||||
return destination.push(")\x3c/script>");
|
||||
? resource
|
||||
? (destination.push('",'),
|
||||
writeStyleResourceDependenciesInJS(destination, boundary))
|
||||
: (destination.push('" data-sty="'),
|
||||
writeStyleResourceDependenciesInAttr(destination, boundary))
|
||||
: resource && destination.push('"');
|
||||
destination = resource
|
||||
? destination.push(")\x3c/script>")
|
||||
: destination.push('"></template>');
|
||||
return destination;
|
||||
}
|
||||
function flushPartiallyCompletedSegment(
|
||||
request,
|
||||
@@ -3118,20 +3248,25 @@ function flushPartiallyCompletedSegment(
|
||||
}
|
||||
flushSegmentContainer(request, destination, segment);
|
||||
request = request.responseState;
|
||||
destination.push(request.startInlineScript);
|
||||
request.sentCompleteSegmentFunction
|
||||
? destination.push('$RS("')
|
||||
: ((request.sentCompleteSegmentFunction = !0),
|
||||
destination.push(
|
||||
'$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("'
|
||||
));
|
||||
(boundary = 0 === request.streamingFormat)
|
||||
? (destination.push(request.startInlineScript),
|
||||
request.sentCompleteSegmentFunction
|
||||
? destination.push('$RS("')
|
||||
: ((request.sentCompleteSegmentFunction = !0),
|
||||
destination.push(
|
||||
'$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("'
|
||||
)))
|
||||
: destination.push('<template data-rsi="" data-sid="');
|
||||
destination.push(request.segmentPrefix);
|
||||
segmentID = segmentID.toString(16);
|
||||
destination.push(segmentID);
|
||||
destination.push('","');
|
||||
boundary ? destination.push('","') : destination.push('" data-pid="');
|
||||
destination.push(request.placeholderPrefix);
|
||||
destination.push(segmentID);
|
||||
return destination.push('")\x3c/script>');
|
||||
destination = boundary
|
||||
? destination.push('")\x3c/script>')
|
||||
: destination.push('"></template>');
|
||||
return destination;
|
||||
}
|
||||
function flushCompletedQueues(request, destination) {
|
||||
try {
|
||||
@@ -3144,7 +3279,8 @@ function flushCompletedQueues(request, destination) {
|
||||
writeInitialResources(
|
||||
destination,
|
||||
request.resources,
|
||||
request.responseState
|
||||
request.responseState,
|
||||
0 === request.allPendingTasks
|
||||
);
|
||||
flushSegment(request, destination, completedRootSegment);
|
||||
request.completedRootSegment = null;
|
||||
@@ -3172,37 +3308,59 @@ function flushCompletedQueues(request, destination) {
|
||||
boundaryID = boundary.id,
|
||||
errorDigest = boundary.errorDigest,
|
||||
errorMessage = boundary.errorMessage,
|
||||
errorComponentStack = boundary.errorComponentStack;
|
||||
bootstrapChunks.push(responseState.startInlineScript);
|
||||
responseState.sentClientRenderFunction
|
||||
? bootstrapChunks.push('$RX("')
|
||||
: ((responseState.sentClientRenderFunction = !0),
|
||||
bootstrapChunks.push(
|
||||
'$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("'
|
||||
));
|
||||
errorComponentStack = boundary.errorComponentStack,
|
||||
scriptFormat = 0 === responseState.streamingFormat;
|
||||
scriptFormat
|
||||
? (bootstrapChunks.push(responseState.startInlineScript),
|
||||
responseState.sentClientRenderFunction
|
||||
? bootstrapChunks.push('$RX("')
|
||||
: ((responseState.sentClientRenderFunction = !0),
|
||||
bootstrapChunks.push(
|
||||
'$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("'
|
||||
)))
|
||||
: bootstrapChunks.push('<template data-rxi="" data-bid="');
|
||||
if (null === boundaryID) throw Error(formatProdErrorMessage(395));
|
||||
bootstrapChunks.push(boundaryID);
|
||||
bootstrapChunks.push('"');
|
||||
if (errorDigest || errorMessage || errorComponentStack) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk = escapeJSStringsForInstructionScripts(errorDigest || "");
|
||||
bootstrapChunks.push(chunk);
|
||||
}
|
||||
if (errorMessage || errorComponentStack) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk$jscomp$0 = escapeJSStringsForInstructionScripts(
|
||||
errorMessage || ""
|
||||
);
|
||||
bootstrapChunks.push(chunk$jscomp$0);
|
||||
}
|
||||
if (errorComponentStack) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk$jscomp$1 = escapeJSStringsForInstructionScripts(
|
||||
errorComponentStack
|
||||
);
|
||||
bootstrapChunks.push(chunk$jscomp$1);
|
||||
}
|
||||
if (!bootstrapChunks.push(")\x3c/script>")) {
|
||||
scriptFormat && bootstrapChunks.push('"');
|
||||
if (errorDigest || errorMessage || errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk = escapeJSStringsForInstructionScripts(errorDigest || "");
|
||||
bootstrapChunks.push(chunk);
|
||||
} else {
|
||||
bootstrapChunks.push('" data-dgst="');
|
||||
var chunk$jscomp$0 = escapeTextForBrowser(errorDigest || "");
|
||||
bootstrapChunks.push(chunk$jscomp$0);
|
||||
}
|
||||
if (errorMessage || errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk$jscomp$1 = escapeJSStringsForInstructionScripts(
|
||||
errorMessage || ""
|
||||
);
|
||||
bootstrapChunks.push(chunk$jscomp$1);
|
||||
} else {
|
||||
bootstrapChunks.push('" data-msg="');
|
||||
var chunk$jscomp$2 = escapeTextForBrowser(errorMessage || "");
|
||||
bootstrapChunks.push(chunk$jscomp$2);
|
||||
}
|
||||
if (errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.push(",");
|
||||
var chunk$jscomp$3 = escapeJSStringsForInstructionScripts(
|
||||
errorComponentStack
|
||||
);
|
||||
bootstrapChunks.push(chunk$jscomp$3);
|
||||
} else {
|
||||
bootstrapChunks.push('" data-stck="');
|
||||
var chunk$jscomp$4 = escapeTextForBrowser(errorComponentStack);
|
||||
bootstrapChunks.push(chunk$jscomp$4);
|
||||
}
|
||||
if (
|
||||
scriptFormat
|
||||
? !bootstrapChunks.push(")\x3c/script>")
|
||||
: !bootstrapChunks.push('"></template>')
|
||||
) {
|
||||
request.destination = null;
|
||||
i++;
|
||||
clientRenderedBoundaries.splice(0, i);
|
||||
@@ -3223,13 +3381,13 @@ function flushCompletedQueues(request, destination) {
|
||||
completedBoundaries.splice(0, i);
|
||||
var partialBoundaries = request.partialBoundaries;
|
||||
for (i = 0; i < partialBoundaries.length; i++) {
|
||||
var boundary$21 = partialBoundaries[i];
|
||||
var boundary$19 = partialBoundaries[i];
|
||||
a: {
|
||||
clientRenderedBoundaries = request;
|
||||
boundary = destination;
|
||||
clientRenderedBoundaries.resources.boundaryResources =
|
||||
boundary$21.resources;
|
||||
var completedSegments = boundary$21.completedSegments;
|
||||
boundary$19.resources;
|
||||
var completedSegments = boundary$19.completedSegments;
|
||||
for (
|
||||
responseState = 0;
|
||||
responseState < completedSegments.length;
|
||||
@@ -3239,7 +3397,7 @@ function flushCompletedQueues(request, destination) {
|
||||
!flushPartiallyCompletedSegment(
|
||||
clientRenderedBoundaries,
|
||||
boundary,
|
||||
boundary$21,
|
||||
boundary$19,
|
||||
completedSegments[responseState]
|
||||
)
|
||||
) {
|
||||
@@ -3294,8 +3452,8 @@ function abort(request, reason) {
|
||||
}
|
||||
null !== request.destination &&
|
||||
flushCompletedQueues(request, request.destination);
|
||||
} catch (error$24) {
|
||||
logRecoverableError(request, error$24), fatalError(request, error$24);
|
||||
} catch (error$22) {
|
||||
logRecoverableError(request, error$22), fatalError(request, error$22);
|
||||
}
|
||||
}
|
||||
function onError() {}
|
||||
@@ -3303,7 +3461,8 @@ function renderToStringImpl(
|
||||
children,
|
||||
options,
|
||||
generateStaticMarkup,
|
||||
abortReason
|
||||
abortReason,
|
||||
unstable_externalRuntimeSrc
|
||||
) {
|
||||
var didFatal = !1,
|
||||
fatalError$jscomp$0 = null,
|
||||
@@ -3323,7 +3482,8 @@ function renderToStringImpl(
|
||||
children,
|
||||
createResponseState$1(
|
||||
generateStaticMarkup,
|
||||
options ? options.identifierPrefix : void 0
|
||||
options ? options.identifierPrefix : void 0,
|
||||
unstable_externalRuntimeSrc
|
||||
),
|
||||
{ insertionMode: 1, selectedValue: null, noscriptTagInScope: !1 },
|
||||
Infinity,
|
||||
@@ -3374,4 +3534,4 @@ exports.renderToString = function(children, options) {
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-e98225485-20221129";
|
||||
exports.version = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
@@ -2878,8 +2878,12 @@ function preinit(href, options) {
|
||||
return;
|
||||
}
|
||||
|
||||
var resources = currentResources;
|
||||
preinitImpl(currentResources, href, options);
|
||||
} // On the server, preinit may be called outside of render when sending an
|
||||
// external SSR runtime as part of the initial resources payload. Since this
|
||||
// is an internal React call, we do not need to use the resources stack.
|
||||
|
||||
function preinitImpl(resources, href, options) {
|
||||
{
|
||||
validatePreinitArguments(href, options);
|
||||
}
|
||||
@@ -3611,7 +3615,10 @@ function cleanupAfterRender(previousDispatcher) {
|
||||
finishRenderingResources();
|
||||
ReactDOMCurrentDispatcher.current = previousDispatcher;
|
||||
} // Used to distinguish these contexts from ones used in other renderers.
|
||||
var ScriptStreamingFormat = 0;
|
||||
var DataStreamingFormat = 1; // Per response, global state that is not contextual to the rendering subtree.
|
||||
|
||||
var dataElementQuotedEnd = stringToPrecomputedChunk('"></template>');
|
||||
var startInlineScript = stringToPrecomputedChunk("<script>");
|
||||
var endInlineScript = stringToPrecomputedChunk("</script>");
|
||||
var startScriptSrc = stringToPrecomputedChunk('<script src="');
|
||||
@@ -3644,6 +3651,8 @@ var scriptReplacer = function(match, prefix, s, suffix) {
|
||||
};
|
||||
|
||||
// Allows us to keep track of what we've already written so we can refer back to it.
|
||||
// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag
|
||||
// is set, the server will send instructions via data attributes (instead of inline scripts)
|
||||
function createResponseState(
|
||||
identifierPrefix,
|
||||
nonce,
|
||||
@@ -3660,6 +3669,8 @@ function createResponseState(
|
||||
'<script nonce="' + escapeTextForBrowser(nonce) + '">'
|
||||
);
|
||||
var bootstrapChunks = [];
|
||||
var externalRuntimeDesc = null;
|
||||
var streamingFormat = ScriptStreamingFormat;
|
||||
|
||||
if (bootstrapScriptContent !== undefined) {
|
||||
bootstrapChunks.push(
|
||||
@@ -3671,14 +3682,26 @@ function createResponseState(
|
||||
|
||||
{
|
||||
if (externalRuntimeConfig !== undefined) {
|
||||
streamingFormat = DataStreamingFormat;
|
||||
|
||||
if (typeof externalRuntimeConfig === "string") {
|
||||
externalRuntimeDesc = {
|
||||
src: externalRuntimeConfig,
|
||||
integrity: undefined
|
||||
};
|
||||
} else {
|
||||
externalRuntimeDesc = externalRuntimeConfig;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapScripts !== undefined) {
|
||||
for (var i = 0; i < bootstrapScripts.length; i++) {
|
||||
var scriptConfig = bootstrapScripts[i];
|
||||
var src =
|
||||
typeof externalRuntimeConfig === "string"
|
||||
? externalRuntimeConfig
|
||||
: externalRuntimeConfig.src;
|
||||
typeof scriptConfig === "string" ? scriptConfig : scriptConfig.src;
|
||||
var integrity =
|
||||
typeof externalRuntimeConfig === "string"
|
||||
? undefined
|
||||
: externalRuntimeConfig.integrity;
|
||||
typeof scriptConfig === "string" ? undefined : scriptConfig.integrity;
|
||||
bootstrapChunks.push(
|
||||
startScriptSrc,
|
||||
stringToChunk(escapeTextForBrowser(src))
|
||||
@@ -3695,18 +3718,18 @@ function createResponseState(
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapScripts !== undefined) {
|
||||
for (var i = 0; i < bootstrapScripts.length; i++) {
|
||||
var scriptConfig = bootstrapScripts[i];
|
||||
if (bootstrapModules !== undefined) {
|
||||
for (var _i = 0; _i < bootstrapModules.length; _i++) {
|
||||
var _scriptConfig = bootstrapModules[_i];
|
||||
|
||||
var _src =
|
||||
typeof scriptConfig === "string" ? scriptConfig : scriptConfig.src;
|
||||
typeof _scriptConfig === "string" ? _scriptConfig : _scriptConfig.src;
|
||||
|
||||
var _integrity =
|
||||
typeof scriptConfig === "string" ? undefined : scriptConfig.integrity;
|
||||
typeof _scriptConfig === "string" ? undefined : _scriptConfig.integrity;
|
||||
|
||||
bootstrapChunks.push(
|
||||
startScriptSrc,
|
||||
startModuleSrc,
|
||||
stringToChunk(escapeTextForBrowser(_src))
|
||||
);
|
||||
|
||||
@@ -3721,44 +3744,20 @@ function createResponseState(
|
||||
}
|
||||
}
|
||||
|
||||
if (bootstrapModules !== undefined) {
|
||||
for (var _i = 0; _i < bootstrapModules.length; _i++) {
|
||||
var _scriptConfig = bootstrapModules[_i];
|
||||
|
||||
var _src2 =
|
||||
typeof _scriptConfig === "string" ? _scriptConfig : _scriptConfig.src;
|
||||
|
||||
var _integrity2 =
|
||||
typeof _scriptConfig === "string" ? undefined : _scriptConfig.integrity;
|
||||
|
||||
bootstrapChunks.push(
|
||||
startModuleSrc,
|
||||
stringToChunk(escapeTextForBrowser(_src2))
|
||||
);
|
||||
|
||||
if (_integrity2) {
|
||||
bootstrapChunks.push(
|
||||
scriptIntegirty,
|
||||
stringToChunk(escapeTextForBrowser(_integrity2))
|
||||
);
|
||||
}
|
||||
|
||||
bootstrapChunks.push(endAsyncScript);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
bootstrapChunks: bootstrapChunks,
|
||||
startInlineScript: inlineScriptWithNonce,
|
||||
placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
|
||||
segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
|
||||
boundaryPrefix: idPrefix + "B:",
|
||||
idPrefix: idPrefix,
|
||||
nextSuspenseID: 0,
|
||||
streamingFormat: streamingFormat,
|
||||
startInlineScript: inlineScriptWithNonce,
|
||||
sentCompleteSegmentFunction: false,
|
||||
sentCompleteBoundaryFunction: false,
|
||||
sentClientRenderFunction: false,
|
||||
sentStyleInsertionFunction: false
|
||||
sentStyleInsertionFunction: false,
|
||||
externalRuntimeConfig: externalRuntimeDesc
|
||||
};
|
||||
} // Constants for the insertion mode we're currently writing in. We don't encode all HTML5 insertion
|
||||
// modes. We only include the variants as they matter for the sake of our purposes.
|
||||
@@ -5801,30 +5800,52 @@ var completeSegmentScript1Full = stringToPrecomputedChunk(
|
||||
);
|
||||
var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("');
|
||||
var completeSegmentScript2 = stringToPrecomputedChunk('","');
|
||||
var completeSegmentScript3 = stringToPrecomputedChunk('")</script>');
|
||||
var completeSegmentScriptEnd = stringToPrecomputedChunk('")</script>');
|
||||
var completeSegmentData1 = stringToPrecomputedChunk(
|
||||
'<template data-rsi="" data-sid="'
|
||||
);
|
||||
var completeSegmentData2 = stringToPrecomputedChunk('" data-pid="');
|
||||
var completeSegmentDataEnd = dataElementQuotedEnd;
|
||||
function writeCompletedSegmentInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
contentSegmentID
|
||||
) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (!responseState.sentCompleteSegmentFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentCompleteSegmentFunction = true;
|
||||
writeChunk(destination, completeSegmentScript1Full);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (!responseState.sentCompleteSegmentFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentCompleteSegmentFunction = true;
|
||||
writeChunk(destination, completeSegmentScript1Full);
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, completeSegmentScript1Partial);
|
||||
}
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, completeSegmentScript1Partial);
|
||||
}
|
||||
writeChunk(destination, completeSegmentData1);
|
||||
} // Write function arguments, which are string literals
|
||||
|
||||
writeChunk(destination, responseState.segmentPrefix);
|
||||
var formattedID = stringToChunk(contentSegmentID.toString(16));
|
||||
writeChunk(destination, formattedID);
|
||||
writeChunk(destination, completeSegmentScript2);
|
||||
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeSegmentScript2);
|
||||
} else {
|
||||
writeChunk(destination, completeSegmentData2);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.placeholderPrefix);
|
||||
writeChunk(destination, formattedID);
|
||||
return writeChunkAndReturn(destination, completeSegmentScript3);
|
||||
|
||||
if (scriptFormat) {
|
||||
return writeChunkAndReturn(destination, completeSegmentScriptEnd);
|
||||
} else {
|
||||
return writeChunkAndReturn(destination, completeSegmentDataEnd);
|
||||
}
|
||||
}
|
||||
var completeBoundaryScript1Full = stringToPrecomputedChunk(
|
||||
completeBoundary + ';$RC("'
|
||||
@@ -5840,9 +5861,18 @@ var completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk(
|
||||
'$RR("'
|
||||
);
|
||||
var completeBoundaryScript2 = stringToPrecomputedChunk('","');
|
||||
var completeBoundaryScript2a = stringToPrecomputedChunk('",');
|
||||
var completeBoundaryScript3 = stringToPrecomputedChunk('"');
|
||||
var completeBoundaryScript4 = stringToPrecomputedChunk(")</script>");
|
||||
var completeBoundaryScript3a = stringToPrecomputedChunk('",');
|
||||
var completeBoundaryScript3b = stringToPrecomputedChunk('"');
|
||||
var completeBoundaryScriptEnd = stringToPrecomputedChunk(")</script>");
|
||||
var completeBoundaryData1 = stringToPrecomputedChunk(
|
||||
'<template data-rci="" data-bid="'
|
||||
);
|
||||
var completeBoundaryWithStylesData1 = stringToPrecomputedChunk(
|
||||
'<template data-rri="" data-bid="'
|
||||
);
|
||||
var completeBoundaryData2 = stringToPrecomputedChunk('" data-sid="');
|
||||
var completeBoundaryData3a = stringToPrecomputedChunk('" data-sty="');
|
||||
var completeBoundaryDataEnd = dataElementQuotedEnd;
|
||||
function writeCompletedBoundaryInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
@@ -5856,28 +5886,38 @@ function writeCompletedBoundaryInstruction(
|
||||
hasStyleDependencies = hasStyleResourceDependencies(boundaryResources);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(
|
||||
destination,
|
||||
clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)
|
||||
);
|
||||
} else if (!responseState.sentStyleInsertionFunction) {
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(
|
||||
destination,
|
||||
clonePrecomputedChunk(completeBoundaryWithStylesScript1FullBoth)
|
||||
);
|
||||
} else if (!responseState.sentStyleInsertionFunction) {
|
||||
responseState.sentStyleInsertionFunction = true;
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1FullPartial);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1Partial);
|
||||
}
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryWithStylesScript1Partial);
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
writeChunk(destination, completeBoundaryScript1Full);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript1Partial);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!responseState.sentCompleteBoundaryFunction) {
|
||||
responseState.sentCompleteBoundaryFunction = true;
|
||||
writeChunk(destination, completeBoundaryScript1Full);
|
||||
if (hasStyleDependencies) {
|
||||
writeChunk(destination, completeBoundaryWithStylesData1);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript1Partial);
|
||||
writeChunk(destination, completeBoundaryData1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5885,30 +5925,60 @@ function writeCompletedBoundaryInstruction(
|
||||
throw new Error(
|
||||
"An ID must have been assigned before we can complete the boundary."
|
||||
);
|
||||
}
|
||||
} // Write function arguments, which are string and array literals
|
||||
|
||||
var formattedContentID = stringToChunk(contentSegmentID.toString(16));
|
||||
writeChunk(destination, boundaryID);
|
||||
writeChunk(destination, completeBoundaryScript2);
|
||||
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript2);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryData2);
|
||||
}
|
||||
|
||||
writeChunk(destination, responseState.segmentPrefix);
|
||||
writeChunk(destination, formattedContentID);
|
||||
|
||||
if (hasStyleDependencies) {
|
||||
writeChunk(destination, completeBoundaryScript2a);
|
||||
writeStyleResourceDependencies(destination, boundaryResources);
|
||||
// Script and data writers must format this differently:
|
||||
// - script writer emits an array literal, whose string elements are
|
||||
// escaped for javascript e.g. ["A", "B"]
|
||||
// - data writer emits a string literal, which is escaped as html
|
||||
// e.g. ["A", "B"]
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript3a); // boundaryResources encodes an array literal
|
||||
|
||||
writeStyleResourceDependenciesInJS(destination, boundaryResources);
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryData3a);
|
||||
writeStyleResourceDependenciesInAttr(destination, boundaryResources);
|
||||
}
|
||||
} else {
|
||||
writeChunk(destination, completeBoundaryScript3);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, completeBoundaryScript3b);
|
||||
}
|
||||
}
|
||||
|
||||
return writeChunkAndReturn(destination, completeBoundaryScript4);
|
||||
if (scriptFormat) {
|
||||
return writeChunkAndReturn(destination, completeBoundaryScriptEnd);
|
||||
} else {
|
||||
return writeChunkAndReturn(destination, completeBoundaryDataEnd);
|
||||
}
|
||||
}
|
||||
var clientRenderScript1Full = stringToPrecomputedChunk(
|
||||
clientRenderBoundary + ';$RX("'
|
||||
);
|
||||
var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("');
|
||||
var clientRenderScript1A = stringToPrecomputedChunk('"');
|
||||
var clientRenderScript2 = stringToPrecomputedChunk(")</script>");
|
||||
var clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(",");
|
||||
var clientRenderScriptEnd = stringToPrecomputedChunk(")</script>");
|
||||
var clientRenderData1 = stringToPrecomputedChunk(
|
||||
'<template data-rxi="" data-bid="'
|
||||
);
|
||||
var clientRenderData2 = stringToPrecomputedChunk('" data-dgst="');
|
||||
var clientRenderData3 = stringToPrecomputedChunk('" data-msg="');
|
||||
var clientRenderData4 = stringToPrecomputedChunk('" data-stck="');
|
||||
var clientRenderDataEnd = dataElementQuotedEnd;
|
||||
function writeClientRenderBoundaryInstruction(
|
||||
destination,
|
||||
responseState,
|
||||
@@ -5917,15 +5987,22 @@ function writeClientRenderBoundaryInstruction(
|
||||
errorMessage,
|
||||
errorComponentStack
|
||||
) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
var scriptFormat = responseState.streamingFormat === ScriptStreamingFormat;
|
||||
|
||||
if (!responseState.sentClientRenderFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentClientRenderFunction = true;
|
||||
writeChunk(destination, clientRenderScript1Full);
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, responseState.startInlineScript);
|
||||
|
||||
if (!responseState.sentClientRenderFunction) {
|
||||
// The first time we write this, we'll need to include the full implementation.
|
||||
responseState.sentClientRenderFunction = true;
|
||||
writeChunk(destination, clientRenderScript1Full);
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, clientRenderScript1Partial);
|
||||
}
|
||||
} else {
|
||||
// Future calls can just reuse the same function.
|
||||
writeChunk(destination, clientRenderScript1Partial);
|
||||
// <template data-rxi="" data-bid="
|
||||
writeChunk(destination, clientRenderData1);
|
||||
}
|
||||
|
||||
if (boundaryID === null) {
|
||||
@@ -5935,33 +6012,74 @@ function writeClientRenderBoundaryInstruction(
|
||||
}
|
||||
|
||||
writeChunk(destination, boundaryID);
|
||||
writeChunk(destination, clientRenderScript1A);
|
||||
|
||||
if (scriptFormat) {
|
||||
// " needs to be inserted for scripts, since ArgInterstitual does not contain
|
||||
// leading or trailing quotes
|
||||
writeChunk(destination, clientRenderScript1A);
|
||||
}
|
||||
|
||||
if (errorDigest || errorMessage || errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ""))
|
||||
);
|
||||
if (scriptFormat) {
|
||||
// ,"JSONString"
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorDigest || ""))
|
||||
);
|
||||
} else {
|
||||
// " data-dgst="HTMLString
|
||||
writeChunk(destination, clientRenderData2);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorDigest || ""))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessage || errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ""))
|
||||
);
|
||||
if (scriptFormat) {
|
||||
// ,"JSONString"
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorMessage || ""))
|
||||
);
|
||||
} else {
|
||||
// " data-msg="HTMLString
|
||||
writeChunk(destination, clientRenderData3);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorMessage || ""))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorComponentStack) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))
|
||||
);
|
||||
// ,"JSONString"
|
||||
if (scriptFormat) {
|
||||
writeChunk(destination, clientRenderErrorScriptArgInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeJSStringsForInstructionScripts(errorComponentStack))
|
||||
);
|
||||
} else {
|
||||
// " data-stck="HTMLString
|
||||
writeChunk(destination, clientRenderData4);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(errorComponentStack))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return writeChunkAndReturn(destination, clientRenderScript2);
|
||||
if (scriptFormat) {
|
||||
// ></script>
|
||||
return writeChunkAndReturn(destination, clientRenderScriptEnd);
|
||||
} else {
|
||||
// "></template>
|
||||
return writeChunkAndReturn(destination, clientRenderDataEnd);
|
||||
}
|
||||
}
|
||||
var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g;
|
||||
|
||||
@@ -6027,7 +6145,28 @@ var precedencePlaceholderStart = stringToPrecomputedChunk(
|
||||
'<style data-precedence="'
|
||||
);
|
||||
var precedencePlaceholderEnd = stringToPrecomputedChunk('"></style>');
|
||||
function writeInitialResources(destination, resources, responseState) {
|
||||
function writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
// Write initially discovered resources after the shell completes
|
||||
if (!willFlushAllSegments && responseState.externalRuntimeConfig) {
|
||||
// If the root segment is incomplete due to suspended tasks
|
||||
// (e.g. willFlushAllSegments = false) and we are using data
|
||||
// streaming format, ensure the external runtime is sent.
|
||||
// (User code could choose to send this even earlier by calling
|
||||
// preinit(...), if they know they will suspend).
|
||||
var _responseState$extern = responseState.externalRuntimeConfig,
|
||||
src = _responseState$extern.src,
|
||||
integrity = _responseState$extern.integrity;
|
||||
preinitImpl(resources, src, {
|
||||
as: "script",
|
||||
integrity: integrity
|
||||
});
|
||||
}
|
||||
|
||||
function flushLinkResource(resource) {
|
||||
if (!resource.flushed) {
|
||||
pushLinkImpl(target, resource.props, responseState);
|
||||
@@ -6249,21 +6388,23 @@ function hasStyleResourceDependencies(boundaryResources) {
|
||||
var arrayFirstOpenBracket = stringToPrecomputedChunk("[");
|
||||
var arraySubsequentOpenBracket = stringToPrecomputedChunk(",[");
|
||||
var arrayInterstitial = stringToPrecomputedChunk(",");
|
||||
var arrayCloseBracket = stringToPrecomputedChunk("]");
|
||||
var arrayCloseBracket = stringToPrecomputedChunk("]"); // This function writes a 2D array of strings to be embedded in javascript.
|
||||
// E.g.
|
||||
// [["JS_escaped_string1", "JS_escaped_string2"]]
|
||||
|
||||
function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
function writeStyleResourceDependenciesInJS(destination, boundaryResources) {
|
||||
writeChunk(destination, arrayFirstOpenBracket);
|
||||
var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (resource.inShell);
|
||||
else if (resource.flushed) {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyHrefOnly(destination, resource.href);
|
||||
writeStyleResourceDependencyHrefOnlyInJS(destination, resource.href);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
} else {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependency(
|
||||
writeStyleResourceDependencyInJS(
|
||||
destination,
|
||||
resource.href,
|
||||
resource.precedence,
|
||||
@@ -6277,8 +6418,9 @@ function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
});
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
}
|
||||
/* Helper functions */
|
||||
|
||||
function writeStyleResourceDependencyHrefOnly(destination, href) {
|
||||
function writeStyleResourceDependencyHrefOnlyInJS(destination, href) {
|
||||
// We should actually enforce this earlier when the resource is created but for
|
||||
// now we make sure we are actually dealing with a string here.
|
||||
{
|
||||
@@ -6292,7 +6434,12 @@ function writeStyleResourceDependencyHrefOnly(destination, href) {
|
||||
);
|
||||
}
|
||||
|
||||
function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
function writeStyleResourceDependencyInJS(
|
||||
destination,
|
||||
href,
|
||||
precedence,
|
||||
props
|
||||
) {
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
@@ -6341,7 +6488,7 @@ function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
|
||||
default:
|
||||
writeStyleResourceAttribute(destination, propKey, propValue);
|
||||
writeStyleResourceAttributeInJS(destination, propKey, propValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -6350,7 +6497,7 @@ function writeStyleResourceDependency(destination, href, precedence, props) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function writeStyleResourceAttribute(destination, name, value) {
|
||||
function writeStyleResourceAttributeInJS(destination, name, value) {
|
||||
var attributeName = name.toLowerCase();
|
||||
var attributeValue;
|
||||
|
||||
@@ -6428,6 +6575,194 @@ function writeStyleResourceAttribute(destination, name, value) {
|
||||
destination,
|
||||
stringToChunk(escapeJSObjectForInstructionScripts(attributeValue))
|
||||
);
|
||||
} // This function writes a 2D array of strings to be embedded in an attribute
|
||||
// value and read with JSON.parse in ReactDOMServerExternalRuntime.js
|
||||
// E.g.
|
||||
// [["JSON_escaped_string1", "JSON_escaped_string2"]]
|
||||
|
||||
function writeStyleResourceDependenciesInAttr(destination, boundaryResources) {
|
||||
writeChunk(destination, arrayFirstOpenBracket);
|
||||
var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (resource.inShell);
|
||||
else if (resource.flushed) {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyHrefOnlyInAttr(destination, resource.href);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
} else {
|
||||
writeChunk(destination, nextArrayOpenBrackChunk);
|
||||
writeStyleResourceDependencyInAttr(
|
||||
destination,
|
||||
resource.href,
|
||||
resource.precedence,
|
||||
resource.props
|
||||
);
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
|
||||
resource.flushed = true;
|
||||
resource.hint.flushed = true;
|
||||
}
|
||||
});
|
||||
writeChunk(destination, arrayCloseBracket);
|
||||
}
|
||||
/* Helper functions */
|
||||
|
||||
function writeStyleResourceDependencyHrefOnlyInAttr(destination, href) {
|
||||
// We should actually enforce this earlier when the resource is created but for
|
||||
// now we make sure we are actually dealing with a string here.
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
|
||||
var coercedHref = "" + href;
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref)))
|
||||
);
|
||||
}
|
||||
|
||||
function writeStyleResourceDependencyInAttr(
|
||||
destination,
|
||||
href,
|
||||
precedence,
|
||||
props
|
||||
) {
|
||||
{
|
||||
checkAttributeStringCoercion(href, "href");
|
||||
}
|
||||
|
||||
var coercedHref = "" + href;
|
||||
sanitizeURL(coercedHref);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedHref)))
|
||||
);
|
||||
|
||||
{
|
||||
checkAttributeStringCoercion(precedence, "precedence");
|
||||
}
|
||||
|
||||
var coercedPrecedence = "" + precedence;
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(coercedPrecedence)))
|
||||
);
|
||||
|
||||
for (var propKey in props) {
|
||||
if (hasOwnProperty.call(props, propKey)) {
|
||||
var propValue = props[propKey];
|
||||
|
||||
if (propValue == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (propKey) {
|
||||
case "href":
|
||||
case "rel":
|
||||
case "precedence":
|
||||
case "data-precedence": {
|
||||
break;
|
||||
}
|
||||
|
||||
case "children":
|
||||
case "dangerouslySetInnerHTML":
|
||||
throw new Error(
|
||||
"link" +
|
||||
" is a self-closing tag and must neither have `children` nor " +
|
||||
"use `dangerouslySetInnerHTML`."
|
||||
);
|
||||
// eslint-disable-next-line-no-fallthrough
|
||||
|
||||
default:
|
||||
writeStyleResourceAttributeInAttr(destination, propKey, propValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function writeStyleResourceAttributeInAttr(destination, name, value) {
|
||||
var attributeName = name.toLowerCase();
|
||||
var attributeValue;
|
||||
|
||||
switch (typeof value) {
|
||||
case "function":
|
||||
case "symbol":
|
||||
return;
|
||||
}
|
||||
|
||||
switch (name) {
|
||||
// Reserved names
|
||||
case "innerHTML":
|
||||
case "dangerouslySetInnerHTML":
|
||||
case "suppressContentEditableWarning":
|
||||
case "suppressHydrationWarning":
|
||||
case "style":
|
||||
// Ignored
|
||||
return;
|
||||
// Attribute renames
|
||||
|
||||
case "className":
|
||||
attributeName = "class";
|
||||
break;
|
||||
// Booleans
|
||||
|
||||
case "hidden":
|
||||
if (value === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
attributeValue = "";
|
||||
break;
|
||||
// Santized URLs
|
||||
|
||||
case "src":
|
||||
case "href": {
|
||||
{
|
||||
checkAttributeStringCoercion(value, attributeName);
|
||||
}
|
||||
|
||||
attributeValue = "" + value;
|
||||
sanitizeURL(attributeValue);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
if (!isAttributeNameSafe(name)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
// shouldIgnoreAttribute
|
||||
// We have already filtered out null/undefined and reserved words.
|
||||
name.length > 2 &&
|
||||
(name[0] === "o" || name[0] === "O") &&
|
||||
(name[1] === "n" || name[1] === "N")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
checkAttributeStringCoercion(value, attributeName);
|
||||
}
|
||||
|
||||
attributeValue = "" + value;
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(attributeName)))
|
||||
);
|
||||
writeChunk(destination, arrayInterstitial);
|
||||
writeChunk(
|
||||
destination,
|
||||
stringToChunk(escapeTextForBrowser(JSON.stringify(attributeValue)))
|
||||
);
|
||||
}
|
||||
|
||||
// ATTENTION
|
||||
@@ -10492,8 +10827,18 @@ function flushSegment(request, destination, segment) {
|
||||
}
|
||||
}
|
||||
|
||||
function flushInitialResources(destination, resources, responseState) {
|
||||
writeInitialResources(destination, resources, responseState);
|
||||
function flushInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
);
|
||||
}
|
||||
|
||||
function flushImmediateResources(destination, request) {
|
||||
@@ -10638,7 +10983,8 @@ function flushCompletedQueues(request, destination) {
|
||||
flushInitialResources(
|
||||
destination,
|
||||
request.resources,
|
||||
request.responseState
|
||||
request.responseState,
|
||||
request.allPendingTasks === 0
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10817,7 +11163,8 @@ function renderToStream(children, options) {
|
||||
undefined,
|
||||
options ? options.bootstrapScriptContent : undefined,
|
||||
options ? options.bootstrapScripts : undefined,
|
||||
options ? options.bootstrapModules : undefined
|
||||
options ? options.bootstrapModules : undefined,
|
||||
options ? options.unstable_externalRuntimeSrc : undefined
|
||||
),
|
||||
createRootFormatContext(undefined),
|
||||
options ? options.progressiveChunkSize : undefined,
|
||||
|
||||
@@ -333,40 +333,40 @@ function preload(href, options) {
|
||||
}
|
||||
}
|
||||
function preinit(href, options) {
|
||||
if (currentResources) {
|
||||
var resources = currentResources;
|
||||
if (
|
||||
"string" === typeof href &&
|
||||
href &&
|
||||
"object" === typeof options &&
|
||||
null !== options
|
||||
)
|
||||
switch (options.as) {
|
||||
case "style":
|
||||
var resource = resources.stylesMap.get(href);
|
||||
currentResources && preinitImpl(currentResources, href, options);
|
||||
}
|
||||
function preinitImpl(resources, href, options) {
|
||||
if (
|
||||
"string" === typeof href &&
|
||||
href &&
|
||||
"object" === typeof options &&
|
||||
null !== options
|
||||
)
|
||||
switch (options.as) {
|
||||
case "style":
|
||||
var resource = resources.stylesMap.get(href);
|
||||
resource ||
|
||||
((resource = options.precedence || "default"),
|
||||
(resource = createStyleResource(resources, href, resource, {
|
||||
rel: "stylesheet",
|
||||
href: href,
|
||||
"data-precedence": resource,
|
||||
crossOrigin: options.crossOrigin
|
||||
})));
|
||||
resource.set.add(resource);
|
||||
resources.explicitStylePreloads.add(resource.hint);
|
||||
break;
|
||||
case "script":
|
||||
(resource = resources.scriptsMap.get(href)),
|
||||
resource ||
|
||||
((resource = options.precedence || "default"),
|
||||
(resource = createStyleResource(resources, href, resource, {
|
||||
rel: "stylesheet",
|
||||
href: href,
|
||||
"data-precedence": resource,
|
||||
crossOrigin: options.crossOrigin
|
||||
})));
|
||||
resource.set.add(resource);
|
||||
resources.explicitStylePreloads.add(resource.hint);
|
||||
break;
|
||||
case "script":
|
||||
(resource = resources.scriptsMap.get(href)),
|
||||
resource ||
|
||||
((resource = createScriptResource(resources, href, {
|
||||
src: href,
|
||||
async: !0,
|
||||
crossOrigin: options.crossOrigin,
|
||||
integrity: options.integrity
|
||||
})),
|
||||
resources.scripts.add(resource));
|
||||
}
|
||||
}
|
||||
((resource = createScriptResource(resources, href, {
|
||||
src: href,
|
||||
async: !0,
|
||||
crossOrigin: options.crossOrigin,
|
||||
integrity: options.integrity
|
||||
})),
|
||||
resources.scripts.add(resource));
|
||||
}
|
||||
}
|
||||
function preloadAsStylePropsFromProps(href, props) {
|
||||
return {
|
||||
@@ -1504,15 +1504,27 @@ function escapeJSObjectForInstructionScripts(input) {
|
||||
}
|
||||
});
|
||||
}
|
||||
function writeInitialResources(destination, resources, responseState) {
|
||||
function writeInitialResources(
|
||||
destination,
|
||||
resources,
|
||||
responseState,
|
||||
willFlushAllSegments
|
||||
) {
|
||||
function flushLinkResource(resource) {
|
||||
resource.flushed ||
|
||||
(pushLinkImpl(target, resource.props, responseState),
|
||||
(resource.flushed = !0));
|
||||
}
|
||||
var target = [],
|
||||
charset = resources.charset,
|
||||
bases = resources.bases,
|
||||
!willFlushAllSegments &&
|
||||
responseState.externalRuntimeConfig &&
|
||||
((willFlushAllSegments = responseState.externalRuntimeConfig),
|
||||
preinitImpl(resources, willFlushAllSegments.src, {
|
||||
as: "script",
|
||||
integrity: willFlushAllSegments.integrity
|
||||
}));
|
||||
var target = [];
|
||||
willFlushAllSegments = resources.charset;
|
||||
var bases = resources.bases,
|
||||
preconnects = resources.preconnects,
|
||||
fontPreloads = resources.fontPreloads,
|
||||
precedences = resources.precedences,
|
||||
@@ -1522,9 +1534,9 @@ function writeInitialResources(destination, resources, responseState) {
|
||||
explicitStylePreloads = resources.explicitStylePreloads,
|
||||
explicitScriptPreloads = resources.explicitScriptPreloads,
|
||||
headResources = resources.headResources;
|
||||
charset &&
|
||||
(pushSelfClosing(target, charset.props, "meta", responseState),
|
||||
(charset.flushed = !0),
|
||||
willFlushAllSegments &&
|
||||
(pushSelfClosing(target, willFlushAllSegments.props, "meta", responseState),
|
||||
(willFlushAllSegments.flushed = !0),
|
||||
(resources.charset = null));
|
||||
bases.forEach(function(r) {
|
||||
pushSelfClosing(target, r.props, "base", responseState);
|
||||
@@ -1584,12 +1596,15 @@ function writeInitialResources(destination, resources, responseState) {
|
||||
r.flushed = !0;
|
||||
});
|
||||
headResources.clear();
|
||||
charset = !0;
|
||||
willFlushAllSegments = !0;
|
||||
for (resources = 0; resources < target.length - 1; resources++)
|
||||
destination.buffer += target[resources];
|
||||
resources < target.length &&
|
||||
(charset = writeChunkAndReturn(destination, target[resources]));
|
||||
return charset;
|
||||
(willFlushAllSegments = writeChunkAndReturn(
|
||||
destination,
|
||||
target[resources]
|
||||
));
|
||||
return willFlushAllSegments;
|
||||
}
|
||||
function writeImmediateResources(destination, resources, responseState) {
|
||||
function flushLinkResource(resource) {
|
||||
@@ -1657,7 +1672,7 @@ function writeImmediateResources(destination, resources, responseState) {
|
||||
(charset = writeChunkAndReturn(destination, target[resources]));
|
||||
return charset;
|
||||
}
|
||||
function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
function writeStyleResourceDependenciesInJS(destination, boundaryResources) {
|
||||
destination.buffer += "[";
|
||||
var nextArrayOpenBrackChunk = "[";
|
||||
boundaryResources.forEach(function(resource) {
|
||||
@@ -1758,6 +1773,107 @@ function writeStyleResourceDependencies(destination, boundaryResources) {
|
||||
});
|
||||
destination.buffer += "]";
|
||||
}
|
||||
function writeStyleResourceDependenciesInAttr(destination, boundaryResources) {
|
||||
destination.buffer += "[";
|
||||
var nextArrayOpenBrackChunk = "[";
|
||||
boundaryResources.forEach(function(resource) {
|
||||
if (!resource.inShell)
|
||||
if (resource.flushed)
|
||||
(destination.buffer += nextArrayOpenBrackChunk),
|
||||
writeChunk(
|
||||
destination,
|
||||
escapeTextForBrowser(JSON.stringify("" + resource.href))
|
||||
),
|
||||
(destination.buffer += "]"),
|
||||
(nextArrayOpenBrackChunk = ",[");
|
||||
else {
|
||||
destination.buffer += nextArrayOpenBrackChunk;
|
||||
var precedence = resource.precedence,
|
||||
props = resource.props,
|
||||
coercedHref = "" + resource.href;
|
||||
sanitizeURL(coercedHref);
|
||||
writeChunk(
|
||||
destination,
|
||||
escapeTextForBrowser(JSON.stringify(coercedHref))
|
||||
);
|
||||
precedence = "" + precedence;
|
||||
writeChunk(destination, ",");
|
||||
writeChunk(
|
||||
destination,
|
||||
escapeTextForBrowser(JSON.stringify(precedence))
|
||||
);
|
||||
for (var propKey in props)
|
||||
if (hasOwnProperty.call(props, propKey)) {
|
||||
var propValue = props[propKey];
|
||||
if (null != propValue)
|
||||
switch (propKey) {
|
||||
case "href":
|
||||
case "rel":
|
||||
case "precedence":
|
||||
case "data-precedence":
|
||||
break;
|
||||
case "children":
|
||||
case "dangerouslySetInnerHTML":
|
||||
throw Error(
|
||||
"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
|
||||
);
|
||||
default:
|
||||
a: {
|
||||
precedence = destination;
|
||||
var name = propKey;
|
||||
coercedHref = name.toLowerCase();
|
||||
switch (typeof propValue) {
|
||||
case "function":
|
||||
case "symbol":
|
||||
break a;
|
||||
}
|
||||
switch (name) {
|
||||
case "innerHTML":
|
||||
case "dangerouslySetInnerHTML":
|
||||
case "suppressContentEditableWarning":
|
||||
case "suppressHydrationWarning":
|
||||
case "style":
|
||||
break a;
|
||||
case "className":
|
||||
coercedHref = "class";
|
||||
break;
|
||||
case "hidden":
|
||||
if (!1 === propValue) break a;
|
||||
break;
|
||||
case "src":
|
||||
case "href":
|
||||
sanitizeURL("" + propValue);
|
||||
break;
|
||||
default:
|
||||
if (!isAttributeNameSafe(name)) break a;
|
||||
}
|
||||
if (
|
||||
!(2 < name.length) ||
|
||||
("o" !== name[0] && "O" !== name[0]) ||
|
||||
("n" !== name[1] && "N" !== name[1])
|
||||
)
|
||||
(propValue = "" + propValue),
|
||||
(precedence.buffer += ","),
|
||||
(coercedHref = escapeTextForBrowser(
|
||||
JSON.stringify(coercedHref)
|
||||
)),
|
||||
(precedence.buffer += coercedHref),
|
||||
(precedence.buffer += ","),
|
||||
(coercedHref = escapeTextForBrowser(
|
||||
JSON.stringify(propValue)
|
||||
)),
|
||||
(precedence.buffer += coercedHref);
|
||||
}
|
||||
}
|
||||
}
|
||||
destination.buffer += "]";
|
||||
nextArrayOpenBrackChunk = ",[";
|
||||
resource.flushed = !0;
|
||||
resource.hint.flushed = !0;
|
||||
}
|
||||
});
|
||||
destination.buffer += "]";
|
||||
}
|
||||
var REACT_ELEMENT_TYPE = Symbol.for("react.element"),
|
||||
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
||||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
||||
@@ -2707,7 +2823,7 @@ function renderNode(request, task, node) {
|
||||
null !== node &&
|
||||
"function" === typeof node.then)
|
||||
) {
|
||||
var thenableState$18 = getThenableStateAfterSuspending(),
|
||||
var thenableState$16 = getThenableStateAfterSuspending(),
|
||||
segment = task.blockedSegment,
|
||||
newSegment = createPendingSegment(
|
||||
request,
|
||||
@@ -2721,7 +2837,7 @@ function renderNode(request, task, node) {
|
||||
segment.lastPushedText = !1;
|
||||
request = createTask(
|
||||
request,
|
||||
thenableState$18,
|
||||
thenableState$16,
|
||||
task.node,
|
||||
task.blockedBoundary,
|
||||
newSegment,
|
||||
@@ -2933,54 +3049,66 @@ function flushCompletedBoundary(request, destination, boundary) {
|
||||
i = boundary.rootSegmentID;
|
||||
boundary = boundary.resources;
|
||||
var hasStyleDependencies;
|
||||
a: {
|
||||
b: {
|
||||
for (hasStyleDependencies = boundary.values(); ; ) {
|
||||
var resource = hasStyleDependencies.next().value;
|
||||
if (!resource) break;
|
||||
if (!resource.inShell) {
|
||||
hasStyleDependencies = !0;
|
||||
break a;
|
||||
break b;
|
||||
}
|
||||
}
|
||||
hasStyleDependencies = !1;
|
||||
}
|
||||
writeChunk(destination, request.startInlineScript);
|
||||
hasStyleDependencies
|
||||
? request.sentCompleteBoundaryFunction
|
||||
? request.sentStyleInsertionFunction
|
||||
? writeChunk(destination, '$RR("')
|
||||
: ((request.sentStyleInsertionFunction = !0),
|
||||
(resource = 0 === request.streamingFormat)
|
||||
? (writeChunk(destination, request.startInlineScript),
|
||||
hasStyleDependencies
|
||||
? request.sentCompleteBoundaryFunction
|
||||
? request.sentStyleInsertionFunction
|
||||
? writeChunk(destination, '$RR("')
|
||||
: ((request.sentStyleInsertionFunction = !0),
|
||||
writeChunk(
|
||||
destination,
|
||||
'$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
(request.sentStyleInsertionFunction = !0),
|
||||
writeChunk(
|
||||
destination,
|
||||
'$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,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: request.sentCompleteBoundaryFunction
|
||||
? writeChunk(destination, '$RC("')
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
writeChunk(
|
||||
destination,
|
||||
'$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
(request.sentStyleInsertionFunction = !0),
|
||||
writeChunk(
|
||||
destination,
|
||||
'$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,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("'
|
||||
))
|
||||
: request.sentCompleteBoundaryFunction
|
||||
? writeChunk(destination, '$RC("')
|
||||
: ((request.sentCompleteBoundaryFunction = !0),
|
||||
writeChunk(
|
||||
destination,
|
||||
'$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("'
|
||||
));
|
||||
'$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("'
|
||||
)))
|
||||
: hasStyleDependencies
|
||||
? writeChunk(destination, '<template data-rri="" data-bid="')
|
||||
: writeChunk(destination, '<template data-rci="" data-bid="');
|
||||
if (null === completedSegments)
|
||||
throw Error(
|
||||
"An ID must have been assigned before we can complete the boundary."
|
||||
);
|
||||
i = i.toString(16);
|
||||
writeChunk(destination, completedSegments);
|
||||
writeChunk(destination, '","');
|
||||
resource
|
||||
? writeChunk(destination, '","')
|
||||
: writeChunk(destination, '" data-sid="');
|
||||
writeChunk(destination, request.segmentPrefix);
|
||||
writeChunk(destination, i);
|
||||
hasStyleDependencies
|
||||
? (writeChunk(destination, '",'),
|
||||
writeStyleResourceDependencies(destination, boundary))
|
||||
: writeChunk(destination, '"');
|
||||
return writeChunkAndReturn(destination, ")\x3c/script>");
|
||||
? resource
|
||||
? (writeChunk(destination, '",'),
|
||||
writeStyleResourceDependenciesInJS(destination, boundary))
|
||||
: (writeChunk(destination, '" data-sty="'),
|
||||
writeStyleResourceDependenciesInAttr(destination, boundary))
|
||||
: resource && writeChunk(destination, '"');
|
||||
destination = resource
|
||||
? writeChunkAndReturn(destination, ")\x3c/script>")
|
||||
: writeChunkAndReturn(destination, '"></template>');
|
||||
return destination;
|
||||
}
|
||||
function flushPartiallyCompletedSegment(
|
||||
request,
|
||||
@@ -2999,21 +3127,28 @@ function flushPartiallyCompletedSegment(
|
||||
}
|
||||
flushSegmentContainer(request, destination, segment);
|
||||
request = request.responseState;
|
||||
writeChunk(destination, request.startInlineScript);
|
||||
request.sentCompleteSegmentFunction
|
||||
? writeChunk(destination, '$RS("')
|
||||
: ((request.sentCompleteSegmentFunction = !0),
|
||||
writeChunk(
|
||||
destination,
|
||||
'$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("'
|
||||
));
|
||||
(boundary = 0 === request.streamingFormat)
|
||||
? (writeChunk(destination, request.startInlineScript),
|
||||
request.sentCompleteSegmentFunction
|
||||
? writeChunk(destination, '$RS("')
|
||||
: ((request.sentCompleteSegmentFunction = !0),
|
||||
writeChunk(
|
||||
destination,
|
||||
'$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("'
|
||||
)))
|
||||
: writeChunk(destination, '<template data-rsi="" data-sid="');
|
||||
writeChunk(destination, request.segmentPrefix);
|
||||
segmentID = segmentID.toString(16);
|
||||
writeChunk(destination, segmentID);
|
||||
writeChunk(destination, '","');
|
||||
boundary
|
||||
? writeChunk(destination, '","')
|
||||
: writeChunk(destination, '" data-pid="');
|
||||
writeChunk(destination, request.placeholderPrefix);
|
||||
writeChunk(destination, segmentID);
|
||||
return writeChunkAndReturn(destination, '")\x3c/script>');
|
||||
destination = boundary
|
||||
? writeChunkAndReturn(destination, '")\x3c/script>')
|
||||
: writeChunkAndReturn(destination, '"></template>');
|
||||
return destination;
|
||||
}
|
||||
function flushCompletedQueues(request, destination) {
|
||||
try {
|
||||
@@ -3026,7 +3161,8 @@ function flushCompletedQueues(request, destination) {
|
||||
writeInitialResources(
|
||||
destination,
|
||||
request.resources,
|
||||
request.responseState
|
||||
request.responseState,
|
||||
0 === request.allPendingTasks
|
||||
);
|
||||
flushSegment(request, destination, completedRootSegment);
|
||||
request.completedRootSegment = null;
|
||||
@@ -3057,39 +3193,61 @@ function flushCompletedQueues(request, destination) {
|
||||
boundaryID = boundary.id,
|
||||
errorDigest = boundary.errorDigest,
|
||||
errorMessage = boundary.errorMessage,
|
||||
errorComponentStack = boundary.errorComponentStack;
|
||||
bootstrapChunks.buffer += responseState.startInlineScript;
|
||||
responseState.sentClientRenderFunction
|
||||
? (bootstrapChunks.buffer += '$RX("')
|
||||
: ((responseState.sentClientRenderFunction = !0),
|
||||
(bootstrapChunks.buffer +=
|
||||
'$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("'));
|
||||
errorComponentStack = boundary.errorComponentStack,
|
||||
scriptFormat = 0 === responseState.streamingFormat;
|
||||
scriptFormat
|
||||
? ((bootstrapChunks.buffer += responseState.startInlineScript),
|
||||
responseState.sentClientRenderFunction
|
||||
? (bootstrapChunks.buffer += '$RX("')
|
||||
: ((responseState.sentClientRenderFunction = !0),
|
||||
(bootstrapChunks.buffer +=
|
||||
'$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("')))
|
||||
: (bootstrapChunks.buffer += '<template data-rxi="" data-bid="');
|
||||
if (null === boundaryID)
|
||||
throw Error(
|
||||
"An ID must have been assigned before we can complete the boundary."
|
||||
);
|
||||
bootstrapChunks.buffer += boundaryID;
|
||||
bootstrapChunks.buffer += '"';
|
||||
if (errorDigest || errorMessage || errorComponentStack) {
|
||||
bootstrapChunks.buffer += ",";
|
||||
var chunk = escapeJSStringsForInstructionScripts(errorDigest || "");
|
||||
bootstrapChunks.buffer += chunk;
|
||||
}
|
||||
if (errorMessage || errorComponentStack) {
|
||||
bootstrapChunks.buffer += ",";
|
||||
var chunk$jscomp$0 = escapeJSStringsForInstructionScripts(
|
||||
errorMessage || ""
|
||||
);
|
||||
bootstrapChunks.buffer += chunk$jscomp$0;
|
||||
}
|
||||
if (errorComponentStack) {
|
||||
bootstrapChunks.buffer += ",";
|
||||
var chunk$jscomp$1 = escapeJSStringsForInstructionScripts(
|
||||
errorComponentStack
|
||||
);
|
||||
bootstrapChunks.buffer += chunk$jscomp$1;
|
||||
}
|
||||
if (!writeChunkAndReturn(bootstrapChunks, ")\x3c/script>")) {
|
||||
scriptFormat && (bootstrapChunks.buffer += '"');
|
||||
if (errorDigest || errorMessage || errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.buffer += ",";
|
||||
var chunk = escapeJSStringsForInstructionScripts(errorDigest || "");
|
||||
bootstrapChunks.buffer += chunk;
|
||||
} else {
|
||||
bootstrapChunks.buffer += '" data-dgst="';
|
||||
var chunk$jscomp$0 = escapeTextForBrowser(errorDigest || "");
|
||||
bootstrapChunks.buffer += chunk$jscomp$0;
|
||||
}
|
||||
if (errorMessage || errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.buffer += ",";
|
||||
var chunk$jscomp$1 = escapeJSStringsForInstructionScripts(
|
||||
errorMessage || ""
|
||||
);
|
||||
bootstrapChunks.buffer += chunk$jscomp$1;
|
||||
} else {
|
||||
bootstrapChunks.buffer += '" data-msg="';
|
||||
var chunk$jscomp$2 = escapeTextForBrowser(errorMessage || "");
|
||||
bootstrapChunks.buffer += chunk$jscomp$2;
|
||||
}
|
||||
if (errorComponentStack)
|
||||
if (scriptFormat) {
|
||||
bootstrapChunks.buffer += ",";
|
||||
var chunk$jscomp$3 = escapeJSStringsForInstructionScripts(
|
||||
errorComponentStack
|
||||
);
|
||||
bootstrapChunks.buffer += chunk$jscomp$3;
|
||||
} else {
|
||||
bootstrapChunks.buffer += '" data-stck="';
|
||||
var chunk$jscomp$4 = escapeTextForBrowser(errorComponentStack);
|
||||
bootstrapChunks.buffer += chunk$jscomp$4;
|
||||
}
|
||||
if (
|
||||
scriptFormat
|
||||
? !writeChunkAndReturn(bootstrapChunks, ")\x3c/script>")
|
||||
: !writeChunkAndReturn(bootstrapChunks, '"></template>')
|
||||
) {
|
||||
request.destination = null;
|
||||
i++;
|
||||
clientRenderedBoundaries.splice(0, i);
|
||||
@@ -3110,13 +3268,13 @@ function flushCompletedQueues(request, destination) {
|
||||
completedBoundaries.splice(0, i);
|
||||
var partialBoundaries = request.partialBoundaries;
|
||||
for (i = 0; i < partialBoundaries.length; i++) {
|
||||
var boundary$20 = partialBoundaries[i];
|
||||
var boundary$18 = partialBoundaries[i];
|
||||
a: {
|
||||
clientRenderedBoundaries = request;
|
||||
boundary = destination;
|
||||
clientRenderedBoundaries.resources.boundaryResources =
|
||||
boundary$20.resources;
|
||||
var completedSegments = boundary$20.completedSegments;
|
||||
boundary$18.resources;
|
||||
var completedSegments = boundary$18.completedSegments;
|
||||
for (
|
||||
responseState = 0;
|
||||
responseState < completedSegments.length;
|
||||
@@ -3126,7 +3284,7 @@ function flushCompletedQueues(request, destination) {
|
||||
!flushPartiallyCompletedSegment(
|
||||
clientRenderedBoundaries,
|
||||
boundary,
|
||||
boundary$20,
|
||||
boundary$18,
|
||||
completedSegments[responseState]
|
||||
)
|
||||
) {
|
||||
@@ -3183,8 +3341,8 @@ function abort(request, reason) {
|
||||
}
|
||||
null !== request.destination &&
|
||||
flushCompletedQueues(request, request.destination);
|
||||
} catch (error$23) {
|
||||
logRecoverableError(request, error$23), fatalError(request, error$23);
|
||||
} catch (error$21) {
|
||||
logRecoverableError(request, error$21), fatalError(request, error$21);
|
||||
}
|
||||
}
|
||||
exports.abortStream = function(stream) {
|
||||
@@ -3324,34 +3482,49 @@ exports.renderToStream = function(children, options) {
|
||||
identifierPrefix = options ? options.identifierPrefix : void 0,
|
||||
bootstrapScriptContent = options ? options.bootstrapScriptContent : void 0,
|
||||
bootstrapScripts = options ? options.bootstrapScripts : void 0,
|
||||
bootstrapModules = options ? options.bootstrapModules : void 0;
|
||||
bootstrapModules = options ? options.bootstrapModules : void 0,
|
||||
externalRuntimeConfig = options
|
||||
? options.unstable_externalRuntimeSrc
|
||||
: void 0;
|
||||
identifierPrefix = void 0 === identifierPrefix ? "" : identifierPrefix;
|
||||
var JSCompiler_inline_result = [];
|
||||
var externalRuntimeDesc = null,
|
||||
streamingFormat = 0;
|
||||
void 0 !== bootstrapScriptContent &&
|
||||
JSCompiler_inline_result.push(
|
||||
"<script>",
|
||||
("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
|
||||
"\x3c/script>"
|
||||
);
|
||||
void 0 !== externalRuntimeConfig &&
|
||||
((streamingFormat = 1),
|
||||
(externalRuntimeDesc =
|
||||
"string" === typeof externalRuntimeConfig
|
||||
? { src: externalRuntimeConfig, integrity: void 0 }
|
||||
: externalRuntimeConfig));
|
||||
if (void 0 !== bootstrapScripts)
|
||||
for (
|
||||
bootstrapScriptContent = 0;
|
||||
bootstrapScriptContent < bootstrapScripts.length;
|
||||
bootstrapScriptContent++
|
||||
) {
|
||||
var scriptConfig = bootstrapScripts[bootstrapScriptContent],
|
||||
integrity$8 =
|
||||
"string" === typeof scriptConfig ? void 0 : scriptConfig.integrity;
|
||||
externalRuntimeConfig = bootstrapScripts[bootstrapScriptContent];
|
||||
var integrity =
|
||||
"string" === typeof externalRuntimeConfig
|
||||
? void 0
|
||||
: externalRuntimeConfig.integrity;
|
||||
JSCompiler_inline_result.push(
|
||||
'<script src="',
|
||||
escapeTextForBrowser(
|
||||
"string" === typeof scriptConfig ? scriptConfig : scriptConfig.src
|
||||
"string" === typeof externalRuntimeConfig
|
||||
? externalRuntimeConfig
|
||||
: externalRuntimeConfig.src
|
||||
)
|
||||
);
|
||||
integrity$8 &&
|
||||
integrity &&
|
||||
JSCompiler_inline_result.push(
|
||||
'" integrity="',
|
||||
escapeTextForBrowser(integrity$8)
|
||||
escapeTextForBrowser(integrity)
|
||||
);
|
||||
JSCompiler_inline_result.push('" async="">\x3c/script>');
|
||||
}
|
||||
@@ -3362,7 +3535,7 @@ exports.renderToStream = function(children, options) {
|
||||
bootstrapScripts++
|
||||
)
|
||||
(bootstrapScriptContent = bootstrapModules[bootstrapScripts]),
|
||||
(scriptConfig =
|
||||
(externalRuntimeConfig =
|
||||
"string" === typeof bootstrapScriptContent
|
||||
? void 0
|
||||
: bootstrapScriptContent.integrity),
|
||||
@@ -3374,31 +3547,33 @@ exports.renderToStream = function(children, options) {
|
||||
: bootstrapScriptContent.src
|
||||
)
|
||||
),
|
||||
scriptConfig &&
|
||||
externalRuntimeConfig &&
|
||||
JSCompiler_inline_result.push(
|
||||
'" integrity="',
|
||||
escapeTextForBrowser(scriptConfig)
|
||||
escapeTextForBrowser(externalRuntimeConfig)
|
||||
),
|
||||
JSCompiler_inline_result.push('" async="">\x3c/script>');
|
||||
JSCompiler_inline_result = {
|
||||
bootstrapChunks: JSCompiler_inline_result,
|
||||
startInlineScript: "<script>",
|
||||
placeholderPrefix: identifierPrefix + "P:",
|
||||
segmentPrefix: identifierPrefix + "S:",
|
||||
boundaryPrefix: identifierPrefix + "B:",
|
||||
idPrefix: identifierPrefix,
|
||||
nextSuspenseID: 0,
|
||||
streamingFormat: streamingFormat,
|
||||
startInlineScript: "<script>",
|
||||
sentCompleteSegmentFunction: !1,
|
||||
sentCompleteBoundaryFunction: !1,
|
||||
sentClientRenderFunction: !1,
|
||||
sentStyleInsertionFunction: !1
|
||||
sentStyleInsertionFunction: !1,
|
||||
externalRuntimeConfig: externalRuntimeDesc
|
||||
};
|
||||
bootstrapModules = createFormatContext(0, null, !1);
|
||||
bootstrapScripts = options ? options.progressiveChunkSize : void 0;
|
||||
bootstrapScriptContent = options.onError;
|
||||
externalRuntimeDesc = options ? options.progressiveChunkSize : void 0;
|
||||
streamingFormat = options.onError;
|
||||
options = [];
|
||||
identifierPrefix = new Set();
|
||||
scriptConfig = {
|
||||
bootstrapScripts = {
|
||||
preloadsMap: new Map(),
|
||||
stylesMap: new Map(),
|
||||
scriptsMap: new Map(),
|
||||
@@ -3421,13 +3596,13 @@ exports.renderToStream = function(children, options) {
|
||||
destination: null,
|
||||
responseState: JSCompiler_inline_result,
|
||||
progressiveChunkSize:
|
||||
void 0 === bootstrapScripts ? 12800 : bootstrapScripts,
|
||||
void 0 === externalRuntimeDesc ? 12800 : externalRuntimeDesc,
|
||||
status: 0,
|
||||
fatalError: null,
|
||||
nextSegmentId: 0,
|
||||
allPendingTasks: 0,
|
||||
pendingRootTasks: 0,
|
||||
resources: scriptConfig,
|
||||
resources: bootstrapScripts,
|
||||
completedRootSegment: null,
|
||||
abortableTasks: identifierPrefix,
|
||||
pingedTasks: options,
|
||||
@@ -3436,10 +3611,7 @@ exports.renderToStream = function(children, options) {
|
||||
partialBoundaries: [],
|
||||
preamble: [],
|
||||
postamble: [],
|
||||
onError:
|
||||
void 0 === bootstrapScriptContent
|
||||
? defaultErrorHandler
|
||||
: bootstrapScriptContent,
|
||||
onError: void 0 === streamingFormat ? defaultErrorHandler : streamingFormat,
|
||||
onAllReady: noop$2,
|
||||
onShellReady: noop$2,
|
||||
onShellError: noop$2,
|
||||
|
||||
@@ -31140,7 +31140,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
function createPortal(
|
||||
children,
|
||||
|
||||
@@ -38421,7 +38421,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
function createPortal(
|
||||
children,
|
||||
|
||||
@@ -11368,7 +11368,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1514 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-e98225485-20221129",
|
||||
version: "18.3.0-www-classic-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2054 = {
|
||||
@@ -11398,7 +11398,7 @@ var internals$jscomp$inline_2054 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2055 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -14880,4 +14880,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
|
||||
);
|
||||
};
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
@@ -13992,7 +13992,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1669 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-e98225485-20221129",
|
||||
version: "18.3.0-www-modern-fa11bd6ec-20221130",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2079 = {
|
||||
@@ -14023,7 +14023,7 @@ var internals$jscomp$inline_2079 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-next-e98225485-20221129"
|
||||
reconcilerVersion: "18.3.0-next-fa11bd6ec-20221130"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2080 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -14347,4 +14347,4 @@ exports.unstable_flushControlled = function(fn) {
|
||||
};
|
||||
exports.unstable_isNewReconciler = !1;
|
||||
exports.unstable_runWithPriority = runWithPriority;
|
||||
exports.version = "18.3.0-next-e98225485-20221129";
|
||||
exports.version = "18.3.0-next-fa11bd6ec-20221130";
|
||||
|
||||
@@ -23844,7 +23844,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-classic-fa11bd6ec-20221130";
|
||||
|
||||
var didWarnAboutNestedUpdates;
|
||||
|
||||
|
||||
@@ -23844,7 +23844,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-e98225485-20221129";
|
||||
var ReactVersion = "18.3.0-www-modern-fa11bd6ec-20221130";
|
||||
|
||||
var didWarnAboutNestedUpdates;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
(function(){function v(a,b,n){function d(a){this.s=a}for(var k=window.$RC,g=window.$RM,t=new Map,u=document,p,l,m=u.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;l=m[h++];)t.set(l.dataset.precedence,p=l);l=0;m=[];for(var f,q,e,c;f=n[l++];){var r=0;q=f[r++];if(e=g.get(q))"l"!==e.s&&m.push(e);else{c=u.createElement("link");c.href=q;c.rel="stylesheet";for(c.dataset.precedence=h=f[r++];e=f[r++];)c.setAttribute(e,f[r++]);e=c._p=new Promise(function(a,b){c.onload=a;c.onerror=b});
|
||||
e.then(d.bind(e,"l"),d.bind(e,"e"));g.set(q,e);m.push(e);f=t.get(h)||p;f===p&&(p=c);t.set(h,c);f?f.parentNode.insertBefore(c,f.nextSibling):(h=u.head,h.insertBefore(c,h.firstChild))}}Promise.all(m).then(k.bind(null,a,b,""),k.bind(null,a,b,"Resource failed to load"))}new MutationObserver(function(){var a=document.getElementById(void 0);a&&(a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry());v();a=document.getElementById(void 0);a.parentNode.removeChild(a);var b=document.getElementById(void 0);
|
||||
if(b){b=b.previousSibling;var n=b.parentNode,d=b.nextSibling,k=0;do{if(d&&8===d.nodeType){var g=d.data;if("/$"===g)if(0===k)break;else k--;else"$"!==g&&"$?"!==g&&"$!"!==g||k++}g=d.nextSibling;n.removeChild(d);d=g}while(d);for(;a.firstChild;)n.insertBefore(a.firstChild,d);b.data="$";b._reactRetry&&b._reactRetry()}a=document.getElementById(void 0);b=document.getElementById(void 0);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)})})();
|
||||
(function(){function A(c,a,e){function b(a){this.s=a}for(var k=window.$RC,d=window.$RM,t=new Map,u=document,p,m,n=u.querySelectorAll("link[data-precedence],style[data-precedence]"),l=0;m=n[l++];)t.set(m.dataset.precedence,p=m);m=0;n=[];for(var h,q,g,f;h=e[m++];){var r=0;q=h[r++];if(g=d.get(q))"l"!==g.s&&n.push(g);else{f=u.createElement("link");f.href=q;f.rel="stylesheet";for(f.dataset.precedence=l=h[r++];g=h[r++];)f.setAttribute(g,h[r++]);g=f._p=new Promise(function(a,b){f.onload=a;f.onerror=b});
|
||||
g.then(b.bind(g,"l"),b.bind(g,"e"));d.set(q,g);n.push(g);h=t.get(l)||p;h===p&&(p=f);t.set(l,f);h?h.parentNode.insertBefore(f,h.nextSibling):(l=u.head,l.insertBefore(f,l.firstChild))}}Promise.all(n).then(k.bind(null,c,a,""),k.bind(null,c,a,"Resource failed to load"))}function v(c,a,e){a=document.getElementById(a);a.parentNode.removeChild(a);var b=document.getElementById(c);if(b){c=b.previousSibling;if(e)c.data="$!",b.setAttribute("data-dgst",e);else{e=c.parentNode;b=c.nextSibling;var k=0;do{if(b&&
|
||||
8===b.nodeType){var d=b.data;if("/$"===d)if(0===k)break;else k--;else"$"!==d&&"$?"!==d&&"$!"!==d||k++}d=b.nextSibling;e.removeChild(b);b=d}while(b);for(;a.firstChild;)e.insertBefore(a.firstChild,b);c.data="$"}c._reactRetry&&c._reactRetry()}}function w(){for(var c=document.getElementsByTagName("template"),a=0;a<c.length;a++)x(c[a])}function y(c){var a=new MutationObserver(function(a){for(var b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)c.item(d).parentNode&&x(c.item(d))});a.observe(c,
|
||||
{childList:!0});window.addEventListener("DOMContentLoaded",function(){a.disconnect()})}function x(c){if(1===c.nodeType&&c.dataset){var a=c.dataset;if(null!=a.rxi){var e=a.dgst,b=a.msg,k=a.stck,d=document.getElementById(a.bid);d&&(a=d.previousSibling,a.data="$!",d=d.dataset,e&&(d.dgst=e),b&&(d.msg=b),k&&(d.stck=k),a._reactRetry&&a._reactRetry());c.remove()}else if(null!=a.rri)A(a.bid,a.sid,JSON.parse(a.sty)),c.remove();else if(null!=a.rci)v(a.bid,a.sid),c.remove();else if(null!=a.rsi){e=a.pid;b=document.getElementById(a.sid);
|
||||
e=document.getElementById(e);for(b.parentNode.removeChild(b);b.firstChild;)e.parentNode.insertBefore(b.firstChild,e);e.parentNode.removeChild(e);c.remove()}}}window.$RC||(window.$RC=v,window.$RM=new Map);if("loading"===document.readyState)if(null!=document.body)y(document.body);else{var z=new MutationObserver(function(){document.body&&("loading"===document.readyState&&y(document.body),w(),z.disconnect())});z.observe(document.documentElement,{childList:!0})}w()})();
|
||||
|
||||
Reference in New Issue
Block a user