@shopify/hydrogen 0.13.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +144 -0
- package/dist/esnext/client.d.ts +4 -0
- package/dist/esnext/client.js +4 -0
- package/dist/esnext/components/CartProvider/CartProvider.client.js +23 -0
- package/dist/esnext/components/DevTools.d.ts +1 -0
- package/dist/esnext/components/DevTools.js +128 -0
- package/dist/esnext/components/Link/Link.client.d.ts +6 -0
- package/dist/esnext/components/Link/Link.client.js +85 -3
- package/dist/esnext/components/LocalizationProvider/LocalizationContext.client.d.ts +1 -1
- package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.d.ts +16 -0
- package/dist/esnext/components/LocalizationProvider/LocalizationProvider.server.js +7 -2
- package/dist/esnext/components/Seo/DefaultPageSeo.client.js +1 -2
- package/dist/esnext/constants.d.ts +6 -0
- package/dist/esnext/constants.js +6 -0
- package/dist/esnext/entry-client.js +20 -4
- package/dist/esnext/entry-server.d.ts +1 -1
- package/dist/esnext/entry-server.js +42 -23
- package/dist/esnext/foundation/Analytics/Analytics.client.d.ts +3 -0
- package/dist/esnext/foundation/Analytics/Analytics.client.js +28 -0
- package/dist/esnext/foundation/Analytics/Analytics.server.d.ts +1 -0
- package/dist/esnext/foundation/Analytics/Analytics.server.js +38 -0
- package/dist/esnext/foundation/Analytics/ClientAnalytics.d.ts +24 -0
- package/dist/esnext/foundation/Analytics/ClientAnalytics.js +91 -0
- package/dist/esnext/foundation/Analytics/ServerAnalyticsRoute.server.d.ts +2 -0
- package/dist/esnext/foundation/Analytics/ServerAnalyticsRoute.server.js +33 -0
- package/dist/esnext/foundation/Analytics/const.d.ts +8 -0
- package/dist/esnext/foundation/Analytics/const.js +8 -0
- package/dist/esnext/foundation/Analytics/hook.d.ts +1 -0
- package/dist/esnext/foundation/Analytics/hook.js +7 -0
- package/dist/esnext/foundation/Analytics/index.d.ts +2 -0
- package/dist/esnext/foundation/Analytics/index.js +2 -0
- package/dist/esnext/foundation/Analytics/types.d.ts +5 -0
- package/dist/esnext/{components/LocalizationProvider/LocalizationQuery.js → foundation/Analytics/types.js} +0 -0
- package/dist/esnext/foundation/Analytics/utils.d.ts +1 -0
- package/dist/esnext/foundation/Analytics/utils.js +8 -0
- package/dist/esnext/foundation/Boomerang/Boomerang.client.js +3 -1
- package/dist/esnext/foundation/Route/Route.server.js +4 -0
- package/dist/esnext/foundation/Router/BrowserRouter.client.js +68 -15
- package/dist/esnext/foundation/ServerRequestProvider/ServerRequestProvider.js +1 -1
- package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.d.ts +6 -1
- package/dist/esnext/foundation/ServerStateProvider/ServerStateProvider.js +27 -22
- package/dist/esnext/foundation/ShopifyProvider/ShopifyProvider.server.js +4 -1
- package/dist/esnext/foundation/ShopifyProvider/types.d.ts +5 -6
- package/dist/esnext/foundation/constants.d.ts +1 -1
- package/dist/esnext/foundation/constants.js +1 -1
- package/dist/esnext/foundation/fetchSync/client/fetchSync.d.ts +10 -0
- package/dist/esnext/foundation/fetchSync/client/fetchSync.js +27 -0
- package/dist/esnext/foundation/fetchSync/server/fetchSync.d.ts +8 -0
- package/dist/esnext/foundation/fetchSync/server/fetchSync.js +27 -0
- package/dist/esnext/foundation/fetchSync/types.d.ts +5 -0
- package/dist/esnext/foundation/fetchSync/types.js +1 -0
- package/dist/esnext/foundation/useQuery/hooks.d.ts +4 -2
- package/dist/esnext/foundation/useQuery/hooks.js +10 -6
- package/dist/esnext/foundation/useUrl/useUrl.js +8 -1
- package/dist/esnext/framework/Hydration/ServerComponentRequest.server.d.ts +1 -0
- package/dist/esnext/framework/Hydration/ServerComponentRequest.server.js +14 -7
- package/dist/esnext/framework/cache/in-memory.js +5 -5
- package/dist/esnext/framework/cache.d.ts +1 -10
- package/dist/esnext/framework/cache.js +67 -30
- package/dist/esnext/framework/plugin.js +10 -0
- package/dist/esnext/framework/plugins/vite-plugin-css-modules-rsc.js +1 -1
- package/dist/esnext/framework/plugins/vite-plugin-hydrogen-config.js +9 -2
- package/dist/esnext/hooks/useParsedMetafields/useParsedMetafields.d.ts +1 -1
- package/dist/esnext/hooks/useShopQuery/hooks.d.ts +1 -1
- package/dist/esnext/hooks/useShopQuery/hooks.js +37 -22
- package/dist/esnext/index.d.ts +2 -0
- package/dist/esnext/index.js +2 -0
- package/dist/esnext/storefront-api-types.d.ts +150 -3
- package/dist/esnext/storefront-api-types.js +16 -0
- package/dist/esnext/types.d.ts +6 -1
- package/dist/esnext/utilities/apiRoutes.d.ts +2 -3
- package/dist/esnext/utilities/apiRoutes.js +14 -9
- package/dist/esnext/utilities/hash.d.ts +2 -0
- package/dist/esnext/utilities/hash.js +7 -0
- package/dist/esnext/utilities/log/log-cache-api-status.js +1 -1
- package/dist/esnext/utilities/log/log-cache-header.js +1 -1
- package/dist/esnext/utilities/log/log-query-timeline.js +1 -1
- package/dist/esnext/utilities/storefrontApi.d.ts +4 -0
- package/dist/esnext/utilities/storefrontApi.js +21 -0
- package/dist/esnext/utilities/suspense.d.ts +5 -0
- package/dist/esnext/utilities/suspense.js +32 -0
- package/dist/esnext/utilities/template.js +1 -1
- package/dist/esnext/version.d.ts +1 -1
- package/dist/esnext/version.js +1 -1
- package/dist/node/constants.d.ts +6 -0
- package/dist/node/constants.js +7 -1
- package/dist/node/entry-server.d.ts +1 -1
- package/dist/node/entry-server.js +41 -25
- package/dist/node/foundation/Analytics/Analytics.client.d.ts +3 -0
- package/dist/node/foundation/Analytics/Analytics.client.js +32 -0
- package/dist/node/foundation/Analytics/Analytics.server.d.ts +1 -0
- package/dist/node/foundation/Analytics/Analytics.server.js +45 -0
- package/dist/node/foundation/Analytics/ClientAnalytics.d.ts +24 -0
- package/dist/node/foundation/Analytics/ClientAnalytics.js +94 -0
- package/dist/node/foundation/Analytics/ServerAnalyticsRoute.server.d.ts +2 -0
- package/dist/node/foundation/Analytics/ServerAnalyticsRoute.server.js +37 -0
- package/dist/node/foundation/Analytics/const.d.ts +8 -0
- package/dist/node/foundation/Analytics/const.js +11 -0
- package/dist/node/foundation/Analytics/hook.d.ts +1 -0
- package/dist/node/foundation/Analytics/hook.js +11 -0
- package/dist/node/foundation/Analytics/index.d.ts +2 -0
- package/dist/node/foundation/Analytics/index.js +7 -0
- package/dist/node/foundation/Analytics/types.d.ts +5 -0
- package/dist/node/foundation/Analytics/types.js +2 -0
- package/dist/node/foundation/Analytics/utils.d.ts +1 -0
- package/dist/node/foundation/Analytics/utils.js +12 -0
- package/dist/node/foundation/Router/BrowserRouter.client.js +67 -14
- package/dist/node/foundation/ServerRequestProvider/ServerRequestProvider.js +2 -2
- package/dist/node/foundation/ServerStateProvider/ServerStateProvider.d.ts +6 -1
- package/dist/node/foundation/ServerStateProvider/ServerStateProvider.js +27 -22
- package/dist/node/foundation/ShopifyProvider/types.d.ts +5 -6
- package/dist/node/framework/Hydration/ServerComponentRequest.server.d.ts +1 -0
- package/dist/node/framework/Hydration/ServerComponentRequest.server.js +16 -9
- package/dist/node/framework/cache/in-memory.js +5 -5
- package/dist/node/framework/cache.d.ts +1 -10
- package/dist/node/framework/cache.js +71 -36
- package/dist/node/framework/plugin.js +10 -0
- package/dist/node/framework/plugins/vite-plugin-css-modules-rsc.js +1 -1
- package/dist/node/framework/plugins/vite-plugin-hydrogen-config.js +9 -2
- package/dist/node/storefront-api-types.d.ts +150 -3
- package/dist/node/storefront-api-types.js +17 -1
- package/dist/node/types.d.ts +6 -1
- package/dist/node/utilities/apiRoutes.d.ts +2 -3
- package/dist/node/utilities/apiRoutes.js +14 -9
- package/dist/node/utilities/flattenConnection/flattenConnection.d.ts +6 -0
- package/dist/node/utilities/flattenConnection/flattenConnection.js +15 -0
- package/dist/node/utilities/flattenConnection/index.d.ts +1 -0
- package/dist/node/utilities/flattenConnection/index.js +5 -0
- package/dist/node/utilities/hash.d.ts +2 -0
- package/dist/node/utilities/hash.js +11 -0
- package/dist/node/utilities/image_size.d.ts +30 -0
- package/dist/node/utilities/image_size.js +110 -0
- package/dist/node/utilities/index.d.ts +11 -0
- package/dist/node/utilities/index.js +32 -0
- package/dist/node/utilities/isClient/index.d.ts +1 -0
- package/dist/node/utilities/isClient/index.js +5 -0
- package/dist/node/utilities/isClient/isClient.d.ts +4 -0
- package/dist/node/utilities/isClient/isClient.js +10 -0
- package/dist/node/utilities/isServer/index.d.ts +1 -0
- package/dist/node/utilities/isServer/index.js +5 -0
- package/dist/node/utilities/isServer/isServer.d.ts +4 -0
- package/dist/node/utilities/isServer/isServer.js +11 -0
- package/dist/node/utilities/load_script.d.ts +3 -0
- package/dist/node/utilities/load_script.js +27 -0
- package/dist/node/utilities/log/log-cache-api-status.js +1 -1
- package/dist/node/utilities/log/log-cache-header.js +2 -2
- package/dist/node/utilities/log/log-query-timeline.js +2 -2
- package/dist/node/utilities/measurement.d.ts +3 -0
- package/dist/node/utilities/measurement.js +103 -0
- package/dist/node/utilities/parseMetafieldValue/index.d.ts +1 -0
- package/dist/node/utilities/parseMetafieldValue/index.js +5 -0
- package/dist/node/utilities/parseMetafieldValue/parseMetafieldValue.d.ts +6 -0
- package/dist/node/utilities/parseMetafieldValue/parseMetafieldValue.js +39 -0
- package/dist/node/utilities/storefrontApi.d.ts +4 -0
- package/dist/node/utilities/storefrontApi.js +25 -0
- package/dist/node/utilities/suspense.d.ts +12 -0
- package/dist/node/utilities/suspense.js +64 -0
- package/dist/node/utilities/template.js +1 -1
- package/dist/node/utilities/video_parameters.d.ts +47 -0
- package/dist/node/utilities/video_parameters.js +27 -0
- package/dist/node/version.d.ts +1 -1
- package/dist/node/version.js +1 -1
- package/package.json +3 -3
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +9 -21
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +51 -47
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +30 -29
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +51 -47
- package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +17 -17
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +55 -45
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +9 -21
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +51 -47
- package/vendor/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +51 -47
- package/vendor/react-server-dom-vite/package.json +3 -3
- package/dist/esnext/components/LocalizationProvider/LocalizationQuery.d.ts +0 -23
package/dist/node/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "0.
|
|
1
|
+
export declare const LIB_VERSION = "0.16.0";
|
package/dist/node/version.js
CHANGED
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=14"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.16.0",
|
|
11
11
|
"description": "Modern custom Shopify storefronts",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"main": "dist/esnext/index.js",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"react": "0.0.0-experimental-2bf7c02f0-20220314",
|
|
86
86
|
"react-dom": "0.0.0-experimental-2bf7c02f0-20220314",
|
|
87
87
|
"serve-static": "^1.14.1",
|
|
88
|
-
"vite": "^2.
|
|
88
|
+
"vite": "^2.9.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
91
91
|
"body-parser": {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"@vitejs/plugin-react": "^1.
|
|
102
|
+
"@vitejs/plugin-react": "^1.3.0",
|
|
103
103
|
"abort-controller": "^3.0.0",
|
|
104
104
|
"body-parser": "^1.19.2",
|
|
105
105
|
"connect": "^3.7.0",
|
|
@@ -82,25 +82,14 @@ function ReactFlightVitePlugin() {
|
|
|
82
82
|
var CLIENT_COMPONENT_GLOB = '**/*.client.[jt]s?(x)';
|
|
83
83
|
var importerPath = path.dirname(id);
|
|
84
84
|
var importerToRootPath = vite.normalizePath(path.relative(importerPath, config.root));
|
|
85
|
-
|
|
86
|
-
var _ref2 = importerToRootPath.match(/(\.\.\/)+(\.\.)?/) || [],
|
|
87
|
-
importerToRootNested = _ref2[0];
|
|
88
|
-
|
|
89
|
-
var userPrefix = path.normalize(path.join(importerPath, importerToRootNested.replace(/\/?$/, path.sep)));
|
|
90
85
|
var userGlob = path.join(importerToRootPath, CLIENT_COMPONENT_GLOB);
|
|
91
|
-
var importers = [
|
|
86
|
+
var importers = [userGlob];
|
|
92
87
|
clientComponentPaths.forEach(function (componentPath) {
|
|
93
|
-
|
|
94
|
-
var libGlob = path.join(path.relative(importerPath, componentPath), CLIENT_COMPONENT_GLOB);
|
|
95
|
-
importers.push([libGlob, libPrefix]);
|
|
88
|
+
importers.push(path.join(path.relative(importerPath, componentPath), CLIENT_COMPONENT_GLOB));
|
|
96
89
|
});
|
|
97
|
-
var injectedGlobs = "Object.assign(Object.create(null), " + importers.map(function (
|
|
98
|
-
var glob = _ref3[0],
|
|
99
|
-
prefix = _ref3[1];
|
|
90
|
+
var injectedGlobs = "Object.assign(Object.create(null), " + importers.map(function (glob) {
|
|
100
91
|
return (// Mark the globs to modify the result after Vite resolves them.
|
|
101
|
-
|
|
102
|
-
// into absolute imports, and then into hashes.
|
|
103
|
-
"/* HASH_BEGIN " + vite.normalizePath(prefix) + " */ " + ("import.meta.glob('" + vite.normalizePath(glob) + "') /* HASH_END */")
|
|
92
|
+
"/* HASH_BEGIN */ " + ("import.meta.glob('" + vite.normalizePath(glob) + "') /* HASH_END */")
|
|
104
93
|
);
|
|
105
94
|
}).join(', ') + ");";
|
|
106
95
|
return code.replace(INJECTING_RE, injectedGlobs);
|
|
@@ -157,8 +146,8 @@ async function proxyClientComponent(filepath, src) {
|
|
|
157
146
|
exportStatements.forEach(function (key) {
|
|
158
147
|
var isDefault = key === DEFAULT_EXPORT;
|
|
159
148
|
var componentName = isDefault ? getComponentFilename(filepath) : key;
|
|
160
|
-
proxyCode += "export " + (isDefault ? DEFAULT_EXPORT : "const " + componentName + " =") + " wrapInClientProxy({ name: '" + componentName + "', id: '" + getComponentId(filepath) + "',
|
|
161
|
-
String(
|
|
149
|
+
proxyCode += "export " + (isDefault ? DEFAULT_EXPORT : "const " + componentName + " =") + " wrapInClientProxy({ name: '" + componentName + "', id: '" + getComponentId(filepath) + "', value: allImports['" + key + "'], isDefault: " + // eslint-disable-next-line react-internal/safe-string-coercion
|
|
150
|
+
String(isDefault) + " });\n";
|
|
162
151
|
});
|
|
163
152
|
return proxyCode;
|
|
164
153
|
}
|
|
@@ -168,11 +157,10 @@ var hashImportsPlugin = {
|
|
|
168
157
|
transform: function (code, id) {
|
|
169
158
|
// Turn relative import paths to lossy hashes
|
|
170
159
|
if (rscViteFileRE.test(id)) {
|
|
171
|
-
|
|
172
|
-
return code.replace(/\/\*\s*HASH_BEGIN\s*(.+?)\s*\*\/\s*([^]+?)\/\*\s*HASH_END\s*\*\//gm, function (_, prefix, imports) {
|
|
160
|
+
return code.replace(/\/\*\s*HASH_BEGIN\s*\*\/\s*([^]+?)\/\*\s*HASH_END\s*\*\//gm, function (_, imports) {
|
|
173
161
|
return imports.trim().replace(/"([^"]+?)":/gm, function (__, relativePath) {
|
|
174
|
-
var absolutePath =
|
|
175
|
-
return "\"" + getComponentId(absolutePath) + "\":";
|
|
162
|
+
var absolutePath = path.resolve(path.dirname(id.split('?')[0]), relativePath);
|
|
163
|
+
return "\"" + getComponentId(vite.normalizePath(absolutePath)) + "\":";
|
|
176
164
|
});
|
|
177
165
|
});
|
|
178
166
|
}
|
package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js
CHANGED
|
@@ -186,8 +186,9 @@ var MODULE_TAG = Symbol.for('react.module.reference');
|
|
|
186
186
|
function getModuleKey(reference) {
|
|
187
187
|
return reference.filepath + '#' + reference.name;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
189
|
+
function getModuleReference(reference) {
|
|
190
|
+
if (typeof reference === 'string') return globalThis.__STRING_REFERENCE_INDEX[reference];
|
|
191
|
+
return reference && reference.$$typeof === MODULE_TAG ? reference : undefined;
|
|
191
192
|
}
|
|
192
193
|
function resolveModuleMetaData(config, moduleReference) {
|
|
193
194
|
return {
|
|
@@ -1003,6 +1004,11 @@ function attemptResolveElement(type, key, ref, props) {
|
|
|
1003
1004
|
throw new Error('Refs cannot be used in server components, nor passed to client components.');
|
|
1004
1005
|
}
|
|
1005
1006
|
|
|
1007
|
+
if (getModuleReference(type)) {
|
|
1008
|
+
// This is a reference to a client component.
|
|
1009
|
+
return [REACT_ELEMENT_TYPE, type, key, props];
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1006
1012
|
if (typeof type === 'function') {
|
|
1007
1013
|
// This is a server-side component.
|
|
1008
1014
|
return type(props);
|
|
@@ -1022,11 +1028,6 @@ function attemptResolveElement(type, key, ref, props) {
|
|
|
1022
1028
|
|
|
1023
1029
|
return [REACT_ELEMENT_TYPE, type, key, props];
|
|
1024
1030
|
} else if (type != null && typeof type === 'object') {
|
|
1025
|
-
if (isModuleReference(type)) {
|
|
1026
|
-
// This is a reference to a client component.
|
|
1027
|
-
return [REACT_ELEMENT_TYPE, type, key, props];
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
1031
|
switch (type.$$typeof) {
|
|
1031
1032
|
case REACT_LAZY_TYPE:
|
|
1032
1033
|
{
|
|
@@ -1357,52 +1358,55 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
|
1357
1358
|
return null;
|
|
1358
1359
|
}
|
|
1359
1360
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1361
|
+
var moduleReference = getModuleReference(value);
|
|
1362
|
+
|
|
1363
|
+
if (moduleReference) {
|
|
1364
|
+
var moduleKey = getModuleKey(moduleReference);
|
|
1365
|
+
var writtenModules = request.writtenModules;
|
|
1366
|
+
var existingId = writtenModules.get(moduleKey);
|
|
1367
|
+
|
|
1368
|
+
if (existingId !== undefined) {
|
|
1369
|
+
if (parent[0] === REACT_ELEMENT_TYPE && key === '1') {
|
|
1370
|
+
// If we're encoding the "type" of an element, we can refer
|
|
1371
|
+
// to that by a lazy reference instead of directly since React
|
|
1372
|
+
// knows how to deal with lazy values. This lets us suspend
|
|
1373
|
+
// on this component rather than its parent until the code has
|
|
1374
|
+
// loaded.
|
|
1375
|
+
return serializeByRefID(existingId);
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
return serializeByValueID(existingId);
|
|
1379
|
+
}
|
|
1376
1380
|
|
|
1377
|
-
|
|
1381
|
+
try {
|
|
1382
|
+
var moduleMetaData = resolveModuleMetaData(request.bundlerConfig, moduleReference);
|
|
1383
|
+
request.pendingChunks++;
|
|
1384
|
+
var moduleId = request.nextChunkId++;
|
|
1385
|
+
emitModuleChunk(request, moduleId, moduleMetaData);
|
|
1386
|
+
writtenModules.set(moduleKey, moduleId);
|
|
1387
|
+
|
|
1388
|
+
if (parent[0] === REACT_ELEMENT_TYPE && key === '1') {
|
|
1389
|
+
// If we're encoding the "type" of an element, we can refer
|
|
1390
|
+
// to that by a lazy reference instead of directly since React
|
|
1391
|
+
// knows how to deal with lazy values. This lets us suspend
|
|
1392
|
+
// on this component rather than its parent until the code has
|
|
1393
|
+
// loaded.
|
|
1394
|
+
return serializeByRefID(moduleId);
|
|
1378
1395
|
}
|
|
1379
1396
|
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
var moduleId = request.nextChunkId++;
|
|
1384
|
-
emitModuleChunk(request, moduleId, moduleMetaData);
|
|
1385
|
-
writtenModules.set(moduleKey, moduleId);
|
|
1386
|
-
|
|
1387
|
-
if (parent[0] === REACT_ELEMENT_TYPE && key === '1') {
|
|
1388
|
-
// If we're encoding the "type" of an element, we can refer
|
|
1389
|
-
// to that by a lazy reference instead of directly since React
|
|
1390
|
-
// knows how to deal with lazy values. This lets us suspend
|
|
1391
|
-
// on this component rather than its parent until the code has
|
|
1392
|
-
// loaded.
|
|
1393
|
-
return serializeByRefID(moduleId);
|
|
1394
|
-
}
|
|
1397
|
+
return serializeByValueID(moduleId);
|
|
1398
|
+
} catch (x) {
|
|
1399
|
+
request.pendingChunks++;
|
|
1395
1400
|
|
|
1396
|
-
|
|
1397
|
-
} catch (x) {
|
|
1398
|
-
request.pendingChunks++;
|
|
1401
|
+
var _errorId = request.nextChunkId++;
|
|
1399
1402
|
|
|
1400
|
-
|
|
1403
|
+
emitErrorChunk(request, _errorId, x);
|
|
1404
|
+
return serializeByValueID(_errorId);
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1401
1407
|
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
}
|
|
1405
|
-
} else if (value.$$typeof === REACT_PROVIDER_TYPE) {
|
|
1408
|
+
if (typeof value === 'object') {
|
|
1409
|
+
if (value.$$typeof === REACT_PROVIDER_TYPE) {
|
|
1406
1410
|
var providerKey = value._context._globalName;
|
|
1407
1411
|
var writtenProviders = request.writtenProviders;
|
|
1408
1412
|
var providerId = writtenProviders.get(key);
|
|
@@ -7,39 +7,40 @@
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
'use strict';var e=require("react"),h=null,m=0;function n(a,
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
'use strict';var e=require("react"),h=null,m=0;function n(a,c){if(0!==c.length)if(512<c.length)0<m&&(a.enqueue(new Uint8Array(h.buffer,0,m)),h=new Uint8Array(512),m=0),a.enqueue(c);else{var d=h.length-m;d<c.length&&(0===d?a.enqueue(h):(h.set(c.subarray(0,d),m),a.enqueue(h),c=c.subarray(d)),h=new Uint8Array(512),m=0);h.set(c,m);m+=c.length}return!0}var p=new TextEncoder;function r(a){return p.encode(a)}function u(a,c){"function"===typeof a.error?a.error(c):a.close()}var w=JSON.stringify,aa=Symbol.for("react.module.reference");
|
|
11
|
+
function x(a){return"string"===typeof a?globalThis.__STRING_REFERENCE_INDEX[a]:a&&a.$$typeof===aa?a:void 0}var y=Symbol.for("react.element"),ba=Symbol.for("react.fragment"),z=Symbol.for("react.provider"),ca=Symbol.for("react.forward_ref"),da=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),B=Symbol.for("react.default_value");
|
|
12
|
+
function C(a,c,d,b,f,g,k){this.acceptsBooleans=2===c||3===c||4===c;this.attributeName=b;this.attributeNamespace=f;this.mustUseProperty=d;this.propertyName=a;this.type=c;this.sanitizeURL=g;this.removeEmptyString=k}var D="children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ");D.push("innerText","textContent");D.forEach(function(a){new C(a,0,!1,a,null,!1,!1)});
|
|
13
|
+
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new C(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new C(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new C(a,2,!1,a,null,!1,!1)});
|
|
13
14
|
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new C(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new C(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new C(a,4,!1,a,null,!1,!1)});
|
|
14
15
|
["cols","rows","size","span"].forEach(function(a){new C(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new C(a,5,!1,a.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function F(a){return a[1].toUpperCase()}
|
|
15
|
-
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var
|
|
16
|
-
F);new C(
|
|
16
|
+
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var c=a.replace(E,
|
|
17
|
+
F);new C(c,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var c=a.replace(E,F);new C(c,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var c=a.replace(E,F);new C(c,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new C(a,1,!1,a.toLowerCase(),null,!1,!1)});
|
|
17
18
|
new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new C(a,1,!1,a.toLowerCase(),null,!0,!0)});
|
|
18
19
|
var G={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,
|
|
19
|
-
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},
|
|
20
|
+
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ea=["Webkit","ms","Moz","O"];Object.keys(G).forEach(function(a){ea.forEach(function(c){c=c+a.charAt(0).toUpperCase()+a.substring(1);G[c]=G[a]})});var H=Array.isArray;r("<script>");r("\x3c/script>");r('<script src="');r('<script type="module" src="');r('" async="">\x3c/script>');r("\x3c!-- --\x3e");r(' style="');r(":");r(";");r(" ");r('="');r('"');r('=""');r(">");
|
|
20
21
|
r("/>");r(' selected=""');r("\n");r("<!DOCTYPE html>");r("</");r(">");r('<template id="');r('"></template>');r("\x3c!--$--\x3e");r('\x3c!--$?--\x3e<template id="');r('"></template>');r("\x3c!--$!--\x3e");r("\x3c!--/$--\x3e");r('<div hidden id="');r('">');r("</div>");r('<svg aria-hidden="true" style="display:none" id="');r('">');r("</svg>");r('<math aria-hidden="true" style="display:none" id="');r('">');r("</math>");r('<table hidden id="');r('">');r("</table>");r('<table hidden><tbody id="');r('">');
|
|
21
22
|
r("</tbody></table>");r('<table hidden><tr id="');r('">');r("</tr></table>");r('<table hidden><colgroup id="');r('">');r("</colgroup></table>");r('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("');r('$RS("');r('","');r('")\x3c/script>');r('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("');
|
|
22
23
|
r('$RC("');r('","');r('")\x3c/script>');r('function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()};$RX("');r('$RX("');r('")\x3c/script>');var I=null;
|
|
23
|
-
function J(a,
|
|
24
|
-
function L(a){var
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
var
|
|
28
|
-
function N(){throw Error("This Hook is not supported in Server Components.");}function
|
|
29
|
-
function
|
|
30
|
-
function U(a,
|
|
31
|
-
|
|
32
|
-
function V(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(H(a))return"[...]";a=
|
|
33
|
-
function X(a,
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
c
|
|
37
|
-
typeof
|
|
38
|
-
X(
|
|
39
|
-
q.set(
|
|
40
|
-
function Z(a,
|
|
41
|
-
function
|
|
42
|
-
Z(k,g.id,v)}}null!==a.destination&&
|
|
43
|
-
function
|
|
44
|
-
a.pendingChunks&&
|
|
45
|
-
exports.renderToReadableStream=function(a,
|
|
24
|
+
function J(a,c){if(a!==c){a.context._currentValue=a.parentValue;a=a.parent;var d=c.parent;if(null===a){if(null!==d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");J(a,d);c.context._currentValue=c.value}}}function K(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&K(a)}
|
|
25
|
+
function L(a){var c=a.parent;null!==c&&L(c);a.context._currentValue=a.value}function fa(a,c){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?J(a,c):fa(a,c)}
|
|
26
|
+
function ha(a,c){var d=c.parent;if(null===d)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===d.depth?J(a,d):ha(a,d);c.context._currentValue=c.value}function M(a){var c=I;c!==a&&(null===c?L(a):null===a?K(c):c.depth===a.depth?J(c,a):c.depth>a.depth?fa(c,a):ha(c,a),I=a)}function ia(a,c){var d=a._currentValue;a._currentValue=c;var b=I;return I=a={parent:b,depth:null===b?0:b.depth+1,context:a,parentValue:d,value:c}}
|
|
27
|
+
function ja(a){return a._currentValue}
|
|
28
|
+
var ma={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:N,useTransition:N,getCacheForType:function(a){if(!R)throw Error("Reading the cache is only supported while rendering.");var c=R.get(a);void 0===c&&(c=a(),R.set(a,c));return c},readContext:ja,useContext:ja,useReducer:N,useRef:N,useState:N,useInsertionEffect:N,useLayoutEffect:N,useImperativeHandle:N,useEffect:N,useId:N,useMutableSource:N,useSyncExternalStore:N,useCacheRefresh:function(){return la}};
|
|
29
|
+
function N(){throw Error("This Hook is not supported in Server Components.");}function la(){if(!R)throw Error("Refreshing the cache is not supported in Server Components.");}var R=null,na=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=na.ContextRegistry,T=na.ReactCurrentDispatcher;function oa(a){console.error(a)}
|
|
30
|
+
function pa(a,c,d,b){var f=[],g={status:0,fatalError:null,destination:null,bundlerConfig:c,cache:new Map,nextChunkId:0,pendingChunks:0,pingedSegments:f,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,onError:void 0===d?oa:d,toJSON:function(a,b){return qa(g,this,a,b)}};g.pendingChunks++;c=ra(b);a=sa(g,a,c);f.push(a);return g}var ta={};
|
|
31
|
+
function U(a,c,d,b){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in server components, nor passed to client components.");if(x(a))return[y,a,c,b];if("function"===typeof a)return a(b);if("string"===typeof a)return[y,a,c,b];if("symbol"===typeof a)return a===ba?b.children:[y,a,c,b];if(null!=a&&"object"===typeof a)switch(a.$$typeof){case A:var f=a._init;a=f(a._payload);return U(a,c,d,b);case ca:return c=a.render,c(b,void 0);case da:return U(a.type,c,d,b);case z:return ia(a._context,b.value),
|
|
32
|
+
[y,a,c,{value:b.value,children:b.children,__pop:ta}]}throw Error("Unsupported server component type: "+V(a));}function sa(a,c,d){var b={id:a.nextChunkId++,model:c,context:d,ping:function(){var c=a.pingedSegments;c.push(b);1===c.length&&ua(a)}};return b}function va(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,d){return d})}function W(a){var c=JSON.stringify(a);return'"'+a+'"'===c?a:c}
|
|
33
|
+
function V(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(H(a))return"[...]";a=va(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}}
|
|
34
|
+
function X(a,c){if(H(a)){for(var d="[",b=0;b<a.length;b++){0<b&&(d+=", ");if(6<b){d+="...";break}var f=a[b];d=""+b===c&&"object"===typeof f&&null!==f?d+X(f):d+V(f)}return d+"]"}d="{";b=Object.keys(a);for(f=0;f<b.length;f++){0<f&&(d+=", ");if(6<f){d+="...";break}var g=b[f];d+=W(g)+": ";var k=a[g];d=g===c&&"object"===typeof k&&null!==k?d+X(k):d+V(k)}return d+"}"}
|
|
35
|
+
function qa(a,c,d,b){switch(b){case y:return"$"}for(;"object"===typeof b&&null!==b&&(b.$$typeof===y||b.$$typeof===A);)try{switch(b.$$typeof){case y:var f=b;b=U(f.type,f.key,f.ref,f.props);break;case A:var g=b._init;b=g(b._payload)}}catch(t){if("object"===typeof t&&null!==t&&"function"===typeof t.then)return a.pendingChunks++,a=sa(a,b,I),d=a.ping,t.then(d,d),"@"+a.id.toString(16);Y(a,t);a.pendingChunks++;d=a.nextChunkId++;Z(a,d,t);return"@"+d.toString(16)}if(null===b)return null;if(f=x(b)){b=f.filepath+
|
|
36
|
+
"#"+f.name;g=a.writtenModules;var k=g.get(b);if(void 0!==k)return c[0]===y&&"1"===d?"@"+k.toString(16):"$"+k.toString(16);try{var q={id:f.filepath,name:f.name};a.pendingChunks++;var l=a.nextChunkId++,O=w(q),P="M"+l.toString(16)+":"+O+"\n";var Q=p.encode(P);a.completedModuleChunks.push(Q);g.set(b,l);return c[0]===y&&"1"===d?"@"+l.toString(16):"$"+l.toString(16)}catch(t){return a.pendingChunks++,d=a.nextChunkId++,Z(a,d,t),"$"+d.toString(16)}}if("object"===typeof b){if(b.$$typeof===z)return b=b._context._globalName,
|
|
37
|
+
c=a.writtenProviders,d=c.get(d),void 0===d&&(a.pendingChunks++,d=a.nextChunkId++,c.set(b,d),b="P"+d.toString(16)+":"+b+"\n",b=p.encode(b),a.completedJSONChunks.push(b)),"$"+d.toString(16);if(b===ta){a=I;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue=d===B?a.context._defaultValue:d;I=a.parent;return}return b}if("string"===typeof b)return a="$"===b[0]||"@"===b[0]?"$"+b:b,a;if("boolean"===typeof b||"number"===
|
|
38
|
+
typeof b||"undefined"===typeof b)return b;if("function"===typeof b){if(/^on[A-Z]/.test(d))throw Error("Event handlers cannot be passed to client component props. Remove "+(W(d)+" from these props if possible: "+X(c)+"\nIf you need interactivity, consider converting part of this to a client component."));throw Error("Functions cannot be passed directly to client components because they're not serializable. Remove "+(W(d)+" ("+(b.displayName||b.name||"function")+") from this object, or avoid the entire object: "+
|
|
39
|
+
X(c)));}if("symbol"===typeof b){q=a.writtenSymbols;l=q.get(b);if(void 0!==l)return"$"+l.toString(16);l=b.description;if(Symbol.for(l)!==b)throw Error("Only global symbols received from Symbol.for(...) can be passed to client components. The symbol Symbol.for("+(b.description+") cannot be found among global symbols. Remove ")+(W(d)+" from this object, or avoid the entire object: "+X(c)));a.pendingChunks++;d=a.nextChunkId++;c=w(l);c="S"+d.toString(16)+":"+c+"\n";c=p.encode(c);a.completedModuleChunks.push(c);
|
|
40
|
+
q.set(b,d);return"$"+d.toString(16)}if("bigint"===typeof b)throw Error("BigInt ("+b+") is not yet supported in client component props. Remove "+(W(d)+" from this object or use a plain number instead: "+X(c)));throw Error("Type "+typeof b+" is not supported in client component props. Remove "+(W(d)+" from this object, or avoid the entire object: "+X(c)));}function Y(a,c){a=a.onError;a(c)}function wa(a,c){null!==a.destination?(a.status=2,u(a.destination,c)):(a.status=1,a.fatalError=c)}
|
|
41
|
+
function Z(a,c,d){var b="";try{if(d instanceof Error){var f=String(d.message);b=String(d.stack)}else f="Error: "+d}catch(g){f="An error occurred but serializing the error message failed."}d={message:f,stack:b};c="E"+c.toString(16)+":"+w(d)+"\n";c=p.encode(c);a.completedErrorChunks.push(c)}
|
|
42
|
+
function ua(a){var c=T.current,d=R;T.current=ma;R=a.cache;try{var b=a.pingedSegments;a.pingedSegments=[];for(var f=0;f<b.length;f++){var g=b[f];var k=a;M(g.context);try{for(var q=g.model;"object"===typeof q&&null!==q&&q.$$typeof===y;){var l=q;g.model=q;q=U(l.type,l.key,l.ref,l.props)}var O=g.id,P=w(q,k.toJSON),Q="J"+O.toString(16)+":"+P+"\n";var t=p.encode(Q);k.completedJSONChunks.push(t)}catch(v){if("object"===typeof v&&null!==v&&"function"===typeof v.then){var ka=g.ping;v.then(ka,ka)}else Y(k,v),
|
|
43
|
+
Z(k,g.id,v)}}null!==a.destination&&xa(a,a.destination)}catch(v){Y(a,v),wa(a,v)}finally{T.current=c,R=d}}
|
|
44
|
+
function xa(a,c){h=new Uint8Array(512);m=0;try{for(var d=a.completedModuleChunks,b=0;b<d.length;b++)if(a.pendingChunks--,!n(c,d[b])){a.destination=null;b++;break}d.splice(0,b);var f=a.completedJSONChunks;for(b=0;b<f.length;b++)if(a.pendingChunks--,!n(c,f[b])){a.destination=null;b++;break}f.splice(0,b);var g=a.completedErrorChunks;for(b=0;b<g.length;b++)if(a.pendingChunks--,!n(c,g[b])){a.destination=null;b++;break}g.splice(0,b)}finally{h&&0<m&&(c.enqueue(new Uint8Array(h.buffer,0,m)),h=null,m=0)}0===
|
|
45
|
+
a.pendingChunks&&c.close()}function ra(a){if(a){var c=I;M(null);for(var d=0;d<a.length;d++){var b=a[d],f=b[0];b=b[1];S[f]||(S[f]=e.createServerContext(f,B));ia(S[f],b)}a=I;M(c);return a}return null}
|
|
46
|
+
exports.renderToReadableStream=function(a,c,d){var b=pa(a,{},c?c.onError:void 0,d);return new ReadableStream({type:"bytes",start:function(){ua(b)},pull:function(a){if(1===b.status)b.status=2,u(a,b.fatalError);else if(2!==b.status&&null===b.destination){b.destination=a;try{xa(b,a)}catch(g){Y(b,g),wa(b,g)}}},cancel:function(){}})};
|
package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js
CHANGED
|
@@ -138,8 +138,9 @@ var MODULE_TAG = Symbol.for('react.module.reference');
|
|
|
138
138
|
function getModuleKey(reference) {
|
|
139
139
|
return reference.filepath + '#' + reference.name;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function getModuleReference(reference) {
|
|
142
|
+
if (typeof reference === 'string') return globalThis.__STRING_REFERENCE_INDEX[reference];
|
|
143
|
+
return reference && reference.$$typeof === MODULE_TAG ? reference : undefined;
|
|
143
144
|
}
|
|
144
145
|
function resolveModuleMetaData(config, moduleReference) {
|
|
145
146
|
return {
|
|
@@ -955,6 +956,11 @@ function attemptResolveElement(type, key, ref, props) {
|
|
|
955
956
|
throw new Error('Refs cannot be used in server components, nor passed to client components.');
|
|
956
957
|
}
|
|
957
958
|
|
|
959
|
+
if (getModuleReference(type)) {
|
|
960
|
+
// This is a reference to a client component.
|
|
961
|
+
return [REACT_ELEMENT_TYPE, type, key, props];
|
|
962
|
+
}
|
|
963
|
+
|
|
958
964
|
if (typeof type === 'function') {
|
|
959
965
|
// This is a server-side component.
|
|
960
966
|
return type(props);
|
|
@@ -974,11 +980,6 @@ function attemptResolveElement(type, key, ref, props) {
|
|
|
974
980
|
|
|
975
981
|
return [REACT_ELEMENT_TYPE, type, key, props];
|
|
976
982
|
} else if (type != null && typeof type === 'object') {
|
|
977
|
-
if (isModuleReference(type)) {
|
|
978
|
-
// This is a reference to a client component.
|
|
979
|
-
return [REACT_ELEMENT_TYPE, type, key, props];
|
|
980
|
-
}
|
|
981
|
-
|
|
982
983
|
switch (type.$$typeof) {
|
|
983
984
|
case REACT_LAZY_TYPE:
|
|
984
985
|
{
|
|
@@ -1309,52 +1310,55 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
|
1309
1310
|
return null;
|
|
1310
1311
|
}
|
|
1311
1312
|
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1313
|
+
var moduleReference = getModuleReference(value);
|
|
1314
|
+
|
|
1315
|
+
if (moduleReference) {
|
|
1316
|
+
var moduleKey = getModuleKey(moduleReference);
|
|
1317
|
+
var writtenModules = request.writtenModules;
|
|
1318
|
+
var existingId = writtenModules.get(moduleKey);
|
|
1319
|
+
|
|
1320
|
+
if (existingId !== undefined) {
|
|
1321
|
+
if (parent[0] === REACT_ELEMENT_TYPE && key === '1') {
|
|
1322
|
+
// If we're encoding the "type" of an element, we can refer
|
|
1323
|
+
// to that by a lazy reference instead of directly since React
|
|
1324
|
+
// knows how to deal with lazy values. This lets us suspend
|
|
1325
|
+
// on this component rather than its parent until the code has
|
|
1326
|
+
// loaded.
|
|
1327
|
+
return serializeByRefID(existingId);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
return serializeByValueID(existingId);
|
|
1331
|
+
}
|
|
1328
1332
|
|
|
1329
|
-
|
|
1333
|
+
try {
|
|
1334
|
+
var moduleMetaData = resolveModuleMetaData(request.bundlerConfig, moduleReference);
|
|
1335
|
+
request.pendingChunks++;
|
|
1336
|
+
var moduleId = request.nextChunkId++;
|
|
1337
|
+
emitModuleChunk(request, moduleId, moduleMetaData);
|
|
1338
|
+
writtenModules.set(moduleKey, moduleId);
|
|
1339
|
+
|
|
1340
|
+
if (parent[0] === REACT_ELEMENT_TYPE && key === '1') {
|
|
1341
|
+
// If we're encoding the "type" of an element, we can refer
|
|
1342
|
+
// to that by a lazy reference instead of directly since React
|
|
1343
|
+
// knows how to deal with lazy values. This lets us suspend
|
|
1344
|
+
// on this component rather than its parent until the code has
|
|
1345
|
+
// loaded.
|
|
1346
|
+
return serializeByRefID(moduleId);
|
|
1330
1347
|
}
|
|
1331
1348
|
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
var moduleId = request.nextChunkId++;
|
|
1336
|
-
emitModuleChunk(request, moduleId, moduleMetaData);
|
|
1337
|
-
writtenModules.set(moduleKey, moduleId);
|
|
1338
|
-
|
|
1339
|
-
if (parent[0] === REACT_ELEMENT_TYPE && key === '1') {
|
|
1340
|
-
// If we're encoding the "type" of an element, we can refer
|
|
1341
|
-
// to that by a lazy reference instead of directly since React
|
|
1342
|
-
// knows how to deal with lazy values. This lets us suspend
|
|
1343
|
-
// on this component rather than its parent until the code has
|
|
1344
|
-
// loaded.
|
|
1345
|
-
return serializeByRefID(moduleId);
|
|
1346
|
-
}
|
|
1349
|
+
return serializeByValueID(moduleId);
|
|
1350
|
+
} catch (x) {
|
|
1351
|
+
request.pendingChunks++;
|
|
1347
1352
|
|
|
1348
|
-
|
|
1349
|
-
} catch (x) {
|
|
1350
|
-
request.pendingChunks++;
|
|
1353
|
+
var _errorId = request.nextChunkId++;
|
|
1351
1354
|
|
|
1352
|
-
|
|
1355
|
+
emitErrorChunk(request, _errorId, x);
|
|
1356
|
+
return serializeByValueID(_errorId);
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1353
1359
|
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
}
|
|
1357
|
-
} else if (value.$$typeof === REACT_PROVIDER_TYPE) {
|
|
1360
|
+
if (typeof value === 'object') {
|
|
1361
|
+
if (value.$$typeof === REACT_PROVIDER_TYPE) {
|
|
1358
1362
|
var providerKey = value._context._globalName;
|
|
1359
1363
|
var writtenProviders = request.writtenProviders;
|
|
1360
1364
|
var providerId = writtenProviders.get(key);
|
package/vendor/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
'use strict';var e=require("react");function h(a){return Buffer.from(a,"utf8")}var m=JSON.stringify,
|
|
10
|
+
'use strict';var e=require("react");function h(a){return Buffer.from(a,"utf8")}var m=JSON.stringify,aa=Symbol.for("react.module.reference");function p(a){return"string"===typeof a?globalThis.__STRING_REFERENCE_INDEX[a]:a&&a.$$typeof===aa?a:void 0}var r=Symbol.for("react.element"),ba=Symbol.for("react.fragment"),u=Symbol.for("react.provider"),ca=Symbol.for("react.forward_ref"),ea=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.for("react.default_value");
|
|
11
11
|
function x(a,b,d,c,f,g,k){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=f;this.mustUseProperty=d;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=k}var y="children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ");y.push("innerText","textContent");y.forEach(function(a){new x(a,0,!1,a,null,!1,!1)});
|
|
12
12
|
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new x(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new x(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new x(a,2,!1,a,null,!1,!1)});
|
|
13
13
|
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new x(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new x(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new x(a,4,!1,a,null,!1,!1)});
|
|
@@ -16,29 +16,29 @@ function x(a,b,d,c,f,g,k){this.acceptsBooleans=2===b||3===b||4===b;this.attribut
|
|
|
16
16
|
A);new x(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(z,A);new x(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(z,A);new x(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new x(a,1,!1,a.toLowerCase(),null,!1,!1)});
|
|
17
17
|
new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new x(a,1,!1,a.toLowerCase(),null,!0,!0)});
|
|
18
18
|
var B={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,
|
|
19
|
-
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},
|
|
19
|
+
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fa=["Webkit","ms","Moz","O"];Object.keys(B).forEach(function(a){fa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);B[b]=B[a]})});var C=Array.isArray;h("<script>");h("\x3c/script>");h('<script src="');h('<script type="module" src="');h('" async="">\x3c/script>');h("\x3c!-- --\x3e");h(' style="');h(":");h(";");h(" ");h('="');h('"');h('=""');h(">");
|
|
20
20
|
h("/>");h(' selected=""');h("\n");h("<!DOCTYPE html>");h("</");h(">");h('<template id="');h('"></template>');h("\x3c!--$--\x3e");h('\x3c!--$?--\x3e<template id="');h('"></template>');h("\x3c!--$!--\x3e");h("\x3c!--/$--\x3e");h('<div hidden id="');h('">');h("</div>");h('<svg aria-hidden="true" style="display:none" id="');h('">');h("</svg>");h('<math aria-hidden="true" style="display:none" id="');h('">');h("</math>");h('<table hidden id="');h('">');h("</table>");h('<table hidden><tbody id="');h('">');
|
|
21
21
|
h("</tbody></table>");h('<table hidden><tr id="');h('">');h("</tr></table>");h('<table hidden><colgroup id="');h('">');h("</colgroup></table>");h('function $RS(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("');h('$RS("');h('","');h('")\x3c/script>');h('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("');
|
|
22
22
|
h('$RC("');h('","');h('")\x3c/script>');h('function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()};$RX("');h('$RX("');h('")\x3c/script>');var D=null;
|
|
23
23
|
function E(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var d=b.parent;if(null===a){if(null!==d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");E(a,d);b.context._currentValue=b.value}}}function F(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&F(a)}
|
|
24
24
|
function G(a){var b=a.parent;null!==b&&G(b);a.context._currentValue=a.value}function H(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?E(a,b):H(a,b)}function I(a,b){var d=b.parent;if(null===d)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===d.depth?E(a,d):I(a,d);b.context._currentValue=b.value}
|
|
25
25
|
function J(a){var b=D;b!==a&&(null===b?G(a):null===a?F(b):b.depth===a.depth?E(b,a):b.depth>a.depth?H(b,a):I(b,a),D=a)}function M(a,b){var d=a._currentValue;a._currentValue=b;var c=D;return D=a={parent:c,depth:null===c?0:c.depth+1,context:a,parentValue:d,value:b}}function N(a){return a._currentValue}
|
|
26
|
-
var
|
|
27
|
-
function O(){throw Error("This Hook is not supported in Server Components.");}function
|
|
28
|
-
function
|
|
29
|
-
function U(a,b,d,c){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in server components, nor passed to client components.");if("function"===typeof a)return a(c);if("string"===typeof a)return[r,a,b,c];if("symbol"===typeof a)return a===
|
|
30
|
-
|
|
31
|
-
function V(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(C(a))return"[...]";a=
|
|
26
|
+
var ia={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:O,useTransition:O,getCacheForType:function(a){if(!P)throw Error("Reading the cache is only supported while rendering.");var b=P.get(a);void 0===b&&(b=a(),P.set(a,b));return b},readContext:N,useContext:N,useReducer:O,useRef:O,useState:O,useInsertionEffect:O,useLayoutEffect:O,useImperativeHandle:O,useEffect:O,useId:O,useMutableSource:O,useSyncExternalStore:O,useCacheRefresh:function(){return ha}};
|
|
27
|
+
function O(){throw Error("This Hook is not supported in Server Components.");}function ha(){if(!P)throw Error("Refreshing the cache is not supported in Server Components.");}var P=null,Q=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Q.ContextRegistry,S=Q.ReactCurrentDispatcher;function ja(a){console.error(a)}
|
|
28
|
+
function ka(a,b,d,c){var f=[],g={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,pingedSegments:f,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,onError:void 0===d?ja:d,toJSON:function(a,b){return la(g,this,a,b)}};g.pendingChunks++;b=ma(c);a=T(g,a,b);f.push(a);return g}var na={};
|
|
29
|
+
function U(a,b,d,c){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in server components, nor passed to client components.");if(p(a))return[r,a,b,c];if("function"===typeof a)return a(c);if("string"===typeof a)return[r,a,b,c];if("symbol"===typeof a)return a===ba?c.children:[r,a,b,c];if(null!=a&&"object"===typeof a)switch(a.$$typeof){case v:var f=a._init;a=f(a._payload);return U(a,b,d,c);case ca:return b=a.render,b(c,void 0);case ea:return U(a.type,b,d,c);case u:return M(a._context,c.value),
|
|
30
|
+
[r,a,b,{value:c.value,children:c.children,__pop:na}]}throw Error("Unsupported server component type: "+V(a));}function oa(a,b){var d=a.pingedSegments;d.push(b);1===d.length&&setImmediate(function(){return pa(a)})}function T(a,b,d){var c={id:a.nextChunkId++,model:b,context:d,ping:function(){return oa(a,c)}};return c}function qa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,d){return d})}function W(a){var b=JSON.stringify(a);return'"'+a+'"'===b?a:b}
|
|
31
|
+
function V(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(C(a))return"[...]";a=qa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}}
|
|
32
32
|
function X(a,b){if(C(a)){for(var d="[",c=0;c<a.length;c++){0<c&&(d+=", ");if(6<c){d+="...";break}var f=a[c];d=""+c===b&&"object"===typeof f&&null!==f?d+X(f):d+V(f)}return d+"]"}d="{";c=Object.keys(a);for(f=0;f<c.length;f++){0<f&&(d+=", ");if(6<f){d+="...";break}var g=c[f];d+=W(g)+": ";var k=a[g];d=g===b&&"object"===typeof k&&null!==k?d+X(k):d+V(k)}return d+"}"}
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
c=a.writtenProviders,d=c.get(d),void 0===d&&(a.pendingChunks++,d=a.nextChunkId++,c.set(b,d),b="P"+d.toString(16)+":"+b+"\n",a.completedJSONChunks.push(b)),"$"+d.toString(16);if(c===
|
|
33
|
+
function la(a,b,d,c){switch(c){case r:return"$"}for(;"object"===typeof c&&null!==c&&(c.$$typeof===r||c.$$typeof===v);)try{switch(c.$$typeof){case r:var f=c;c=U(f.type,f.key,f.ref,f.props);break;case v:var g=c._init;c=g(c._payload)}}catch(q){if("object"===typeof q&&null!==q&&"function"===typeof q.then)return a.pendingChunks++,a=T(a,c,D),d=a.ping,q.then(d,d),"@"+a.id.toString(16);Y(a,q);a.pendingChunks++;d=a.nextChunkId++;Z(a,d,q);return"@"+d.toString(16)}if(null===c)return null;if(f=p(c)){c=f.filepath+
|
|
34
|
+
"#"+f.name;g=a.writtenModules;var k=g.get(c);if(void 0!==k)return b[0]===r&&"1"===d?"@"+k.toString(16):"$"+k.toString(16);try{var n={id:f.filepath,name:f.name};a.pendingChunks++;var l=a.nextChunkId++,K=m(n);var L="M"+l.toString(16)+":"+K+"\n";a.completedModuleChunks.push(L);g.set(c,l);return b[0]===r&&"1"===d?"@"+l.toString(16):"$"+l.toString(16)}catch(q){return a.pendingChunks++,d=a.nextChunkId++,Z(a,d,q),"$"+d.toString(16)}}if("object"===typeof c){if(c.$$typeof===u)return b=c._context._globalName,
|
|
35
|
+
c=a.writtenProviders,d=c.get(d),void 0===d&&(a.pendingChunks++,d=a.nextChunkId++,c.set(b,d),b="P"+d.toString(16)+":"+b+"\n",a.completedJSONChunks.push(b)),"$"+d.toString(16);if(c===na){a=D;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue=d===w?a.context._defaultValue:d;D=a.parent;return}return c}if("string"===typeof c)return a="$"===c[0]||"@"===c[0]?"$"+c:c,a;if("boolean"===typeof c||"number"===typeof c||"undefined"===
|
|
36
36
|
typeof c)return c;if("function"===typeof c){if(/^on[A-Z]/.test(d))throw Error("Event handlers cannot be passed to client component props. Remove "+(W(d)+" from these props if possible: "+X(b)+"\nIf you need interactivity, consider converting part of this to a client component."));throw Error("Functions cannot be passed directly to client components because they're not serializable. Remove "+(W(d)+" ("+(c.displayName||c.name||"function")+") from this object, or avoid the entire object: "+X(b)));}if("symbol"===
|
|
37
37
|
typeof c){n=a.writtenSymbols;l=n.get(c);if(void 0!==l)return"$"+l.toString(16);l=c.description;if(Symbol.for(l)!==c)throw Error("Only global symbols received from Symbol.for(...) can be passed to client components. The symbol Symbol.for("+(c.description+") cannot be found among global symbols. Remove ")+(W(d)+" from this object, or avoid the entire object: "+X(b)));a.pendingChunks++;d=a.nextChunkId++;b=m(l);b="S"+d.toString(16)+":"+b+"\n";a.completedModuleChunks.push(b);n.set(c,d);return"$"+d.toString(16)}if("bigint"===
|
|
38
|
-
typeof c)throw Error("BigInt ("+c+") is not yet supported in client component props. Remove "+(W(d)+" from this object or use a plain number instead: "+X(b)));throw Error("Type "+typeof c+" is not supported in client component props. Remove "+(W(d)+" from this object, or avoid the entire object: "+X(b)));}function Y(a,b){a=a.onError;a(b)}function
|
|
38
|
+
typeof c)throw Error("BigInt ("+c+") is not yet supported in client component props. Remove "+(W(d)+" from this object or use a plain number instead: "+X(b)));throw Error("Type "+typeof c+" is not supported in client component props. Remove "+(W(d)+" from this object, or avoid the entire object: "+X(b)));}function Y(a,b){a=a.onError;a(b)}function ra(a,b){null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)}
|
|
39
39
|
function Z(a,b,d){var c="";try{if(d instanceof Error){var f=String(d.message);c=String(d.stack)}else f="Error: "+d}catch(g){f="An error occurred but serializing the error message failed."}d={message:f,stack:c};b="E"+b.toString(16)+":"+m(d)+"\n";a.completedErrorChunks.push(b)}
|
|
40
|
-
function
|
|
41
|
-
a.destination&&
|
|
42
|
-
function
|
|
43
|
-
typeof b.flush&&b.flush();0===a.pendingChunks&&b.end()}function
|
|
44
|
-
exports.renderToPipeableStream=function(a,b,d){var c=
|
|
40
|
+
function pa(a){var b=S.current,d=P;S.current=ia;P=a.cache;try{var c=a.pingedSegments;a.pingedSegments=[];for(var f=0;f<c.length;f++){var g=c[f];var k=a;J(g.context);try{for(var n=g.model;"object"===typeof n&&null!==n&&n.$$typeof===r;){var l=n;g.model=n;n=U(l.type,l.key,l.ref,l.props)}var K=g.id,L=m(n,k.toJSON);var q="J"+K.toString(16)+":"+L+"\n";k.completedJSONChunks.push(q)}catch(t){if("object"===typeof t&&null!==t&&"function"===typeof t.then){var da=g.ping;t.then(da,da)}else Y(k,t),Z(k,g.id,t)}}null!==
|
|
41
|
+
a.destination&&sa(a,a.destination)}catch(t){Y(a,t),ra(a,t)}finally{S.current=b,P=d}}
|
|
42
|
+
function sa(a,b){"function"===typeof b.cork&&b.cork();try{for(var d=a.completedModuleChunks,c=0;c<d.length;c++)if(a.pendingChunks--,!b.write(d[c])){a.destination=null;c++;break}d.splice(0,c);var f=a.completedJSONChunks;for(c=0;c<f.length;c++)if(a.pendingChunks--,!b.write(f[c])){a.destination=null;c++;break}f.splice(0,c);var g=a.completedErrorChunks;for(c=0;c<g.length;c++)if(a.pendingChunks--,!b.write(g[c])){a.destination=null;c++;break}g.splice(0,c)}finally{"function"===typeof b.uncork&&b.uncork()}"function"===
|
|
43
|
+
typeof b.flush&&b.flush();0===a.pendingChunks&&b.end()}function ta(a){setImmediate(function(){return pa(a)})}function ua(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{sa(a,b)}catch(d){Y(a,d),ra(a,d)}}}function ma(a){if(a){var b=D;J(null);for(var d=0;d<a.length;d++){var c=a[d],f=c[0];c=c[1];R[f]||(R[f]=e.createServerContext(f,w));M(R[f],c)}a=D;J(b);return a}return null}function va(a,b){return function(){return ua(b,a)}}
|
|
44
|
+
exports.renderToPipeableStream=function(a,b,d){var c=ka(a,{},b?b.onError:void 0,d),f=!1;ta(c);return{pipe:function(a){if(f)throw Error("React currently only supports piping to one writable stream.");f=!0;ua(c,a);a.on("drain",va(a,c));return a}}};
|